diff --git a/stock.py b/stock.py index 3b690162ee..c9a81edc0f 100644 --- a/stock.py +++ b/stock.py @@ -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 diff --git a/tryton.cfg b/tryton.cfg index a3cc89db20..0d643abe0f 100644 --- a/tryton.cfg +++ b/tryton.cfg @@ -9,6 +9,7 @@ depends: stock extra_depends: account_invoice_stock + product_kit xml: account.xml product.xml