diff options
| author | Victor Feyens <vfe@odoo.com> | 2020-03-19 09:49:38 +0000 |
|---|---|---|
| committer | Victor Feyens <vfe@odoo.com> | 2020-03-26 10:27:57 +0000 |
| commit | 75069b4edc8a7671cda2af71b19ea38412a732b5 (patch) | |
| tree | d954c053e4ad031bbf1217c7ce70128aa28a6fde | |
| parent | efc2d0e2cc77b8c7730c4e346ecd37d7905e89ce (diff) | |
[IMP] sale: store the curency of sales order
It is already stored on the sales order lines, which is incoherent and
potentially error-prone...
| -rw-r--r-- | addons/sale/models/sale.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/sale/models/sale.py b/addons/sale/models/sale.py index 631a64d5009..7d877ab8279 100644 --- a/addons/sale/models/sale.py +++ b/addons/sale/models/sale.py @@ -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 |
