diff options
| author | Adrian Torres <adt@odoo.com> | 2018-09-24 12:22:45 +0200 |
|---|---|---|
| committer | Adrian Torres <adt@odoo.com> | 2018-09-27 12:10:23 +0200 |
| commit | 3f4f77fd9d5c79c21665fa08d703bba7571decd8 (patch) | |
| tree | cb4c161d09ead94255ea40e545ed5225ab113a8a /addons/lunch/models | |
| parent | 52a8ed3c0c72b21baf589bc9b91a030d9da661a8 (diff) | |
[REF] *: adapt code to new related default behaviour
This commit adapts the business code to changes introduced by
the parent commit in order to keep the same behaviour as before.
All readonly=False fields will have to be checked afterwards to confirm
that the business case requires write access to the source field.
Diffstat (limited to 'addons/lunch/models')
| -rw-r--r-- | addons/lunch/models/lunch.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/lunch/models/lunch.py b/addons/lunch/models/lunch.py index 36cd7d1408c..facc3d44809 100644 --- a/addons/lunch/models/lunch.py +++ b/addons/lunch/models/lunch.py @@ -46,7 +46,7 @@ class LunchOrder(models.Model): 'Status', readonly=True, index=True, copy=False, compute='_compute_order_state', store=True) alerts = fields.Text(compute='_compute_alerts_get', string="Alerts") - company_id = fields.Many2one('res.company', related='user_id.company_id', store=True) + company_id = fields.Many2one('res.company', related='user_id.company_id', store=True, readonly=False) currency_id = fields.Many2one('res.currency', related='company_id.currency_id', readonly=True, store=True) cash_move_balance = fields.Monetary(compute='_compute_cash_move_balance', multi='cash_move_balance') balance_visible = fields.Boolean(compute='_compute_cash_move_balance', multi='cash_move_balance') @@ -183,7 +183,7 @@ class LunchOrderLine(models.Model): ('cancelled', 'Cancelled')], 'Status', readonly=True, index=True, default='new') cashmove = fields.One2many('lunch.cashmove', 'order_id', 'Cash Move') - currency_id = fields.Many2one('res.currency', related='order_id.currency_id') + currency_id = fields.Many2one('res.currency', related='order_id.currency_id', readonly=False) def _check_supplier_availibility(self): products = self.mapped('product_id') |
