Ignore landed cost price when recompute unit price

issue10957
review367831002
(grafted from 9b7cb0a11dab87559d69a7d0482a0313901b4b98)

--HG--
branch : 6.0
This commit is contained in:
Cédric Krier committed 2021-11-22 10:12:35 +01:00
1 parent b5a398a7ea
commit bd4aa1accc
2 files changed
+11

No files matched your search

+10
View File
@@ -11,7 +11,17 @@ class Move(metaclass=PoolMeta):
digits=price_digits, readonly=True)
def _compute_unit_price(self, unit_price):
if self.unit_landed_cost:
unit_price -= self.unit_landed_cost
unit_price = super()._compute_unit_price(unit_price)
if self.unit_landed_cost:
unit_price += self.unit_landed_cost
return unit_price
def _compute_component_unit_price(self, unit_price):
if self.unit_landed_cost:
unit_price -= self.unit_landed_cost
unit_price = super()._compute_component_unit_price(unit_price)
if self.unit_landed_cost:
unit_price += self.unit_landed_cost
return unit_price
+1
View File
@@ -9,6 +9,7 @@ depends:
stock
extra_depends:
account_invoice_stock
product_kit
xml:
account.xml
product.xml