diff --git a/addons/purchase/models/purchase.py b/addons/purchase/models/purchase.py index 28bde993e43..86011139988 100644 --- a/addons/purchase/models/purchase.py +++ b/addons/purchase/models/purchase.py @@ -864,8 +864,7 @@ class PurchaseOrderLine(models.Model): self.date_planned = self._get_date_planned(seller).strftime(DEFAULT_SERVER_DATETIME_FORMAT) if not seller: - if self.product_id.seller_ids.filtered(lambda s: s.name.id == self.partner_id.id): - self.price_unit = 0.0 + self.price_unit = self.product_id.standard_price return price_unit = self.env['account.tax']._fix_tax_included_price_company(seller.price, self.product_id.supplier_taxes_id, self.taxes_id, self.company_id) if seller else 0.0 diff --git a/addons/stock_landed_costs/tests/test_stockvaluationlayer.py b/addons/stock_landed_costs/tests/test_stockvaluationlayer.py index d0401bab47a..b0f0d37c0dc 100644 --- a/addons/stock_landed_costs/tests/test_stockvaluationlayer.py +++ b/addons/stock_landed_costs/tests/test_stockvaluationlayer.py @@ -257,8 +257,8 @@ class TestStockValuationLCFIFOVB(TestStockValuationLCCommon): with rfq.order_line.new() as po_line: po_line.product_id = self.product1 - po_line.price_unit = 10 po_line.product_qty = 10 + po_line.price_unit = 10 po_line.taxes_id.clear() rfq = rfq.save() @@ -344,8 +344,8 @@ class TestStockValuationLCFIFOVB(TestStockValuationLCCommon): with rfq.order_line.new() as po_line: po_line.product_id = self.product1 - po_line.price_unit = 10 po_line.product_qty = 10 + po_line.price_unit = 10 po_line.taxes_id.clear() rfq = rfq.save() @@ -397,8 +397,8 @@ class TestStockValuationLCFIFOVB(TestStockValuationLCCommon): with rfq.order_line.new() as po_line: po_line.product_id = self.product1 - po_line.price_unit = 10 po_line.product_qty = 10 + po_line.price_unit = 10 po_line.taxes_id.clear() rfq = rfq.save()