[IMP] sale: store the curency of sales order

It is already stored on the sales order lines, which is incoherent and
potentially error-prone...
This commit is contained in:
Victor Feyens
2020-03-26 10:27:57 +00:00
parent efc2d0e2cc
commit 75069b4edc
+1 -1
View File
@@ -187,7 +187,7 @@ class SaleOrder(models.Model):
required=True, readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]},
domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]", tracking=1,
help="If you change the pricelist, only newly added lines will be affected.")
currency_id = fields.Many2one("res.currency", related='pricelist_id.currency_id', string="Currency", readonly=True, required=True)
currency_id = fields.Many2one(related='pricelist_id.currency_id', depends=["pricelist_id"], store=True)
analytic_account_id = fields.Many2one(
'account.analytic.account', 'Analytic Account',
readonly=True, copy=False, check_company=True, # Unrequired company