diff --git a/rma/models/stock_rule.py b/rma/models/stock_rule.py index bf1340da..a3da529f 100644 --- a/rma/models/stock_rule.py +++ b/rma/models/stock_rule.py @@ -35,7 +35,8 @@ class StockRule(models.Model): res["partner_id"] = line.delivery_address_id.id else: res["partner_id"] = line.rma_id.partner_id.id - dest_loc = self.env["stock.location"].browse([res["location_dest_id"]])[0] - if dest_loc.usage == "internal": - res["price_unit"] = line.price_unit + company_id = res["company_id"] + company = self.env["res.company"].browse(company_id) + cost = product_id.with_company(company).standard_price + res["price_unit"] = cost return res