[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user