Skip to content
Snippets Groups Projects
Commit 34644baa authored by Nicolas Martinelli's avatar Nicolas Martinelli
Browse files

[FIX] sale_margin: no company


Complement of commit 7a24df48

opw-2009044

closes odoo/odoo#34374

Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
parent 044c5c2c
Branches
Tags
No related merge requests found
......@@ -18,7 +18,8 @@ class SaleOrderLine(models.Model):
if product_uom_id != product_id.uom_id:
purchase_price = product_id.uom_id._compute_price(purchase_price, product_uom_id)
price = frm_cur._convert(
purchase_price, to_cur, order_id.company_id, order_id.date_order or fields.Date.today(), round=False)
purchase_price, to_cur, order_id.company_id or self.env.user.company_id,
order_id.date_order or fields.Date.today(), round=False)
return price
@api.model
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment