Skip to content

Commit

Permalink
[FIX] product_cost_usd: correctly set purchase price in multicompany
Browse files Browse the repository at this point in the history
Since each company has its own purchase price, we must explicitly set the
company we are working with (the one in the sale order line) to correctly
set the purchase price.
  • Loading branch information
xmglord authored and luisg123v committed Aug 27, 2024
1 parent 5d0d154 commit 960242e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions product_cost_usd/models/sale_order_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def _compute_purchase_price(self):
"""
res = super()._compute_purchase_price()
for line in self:
line = line.with_company(line.company_id)
pricelist = line.order_id.pricelist_id
date = line.order_id.date_order
if not line.product_id:
Expand Down

0 comments on commit 960242e

Please sign in to comment.