diff options
| author | Luis Torres <luis_t@vauxoo.com> | 2019-07-17 16:00:03 +0000 |
|---|---|---|
| committer | Goffin Simon <sig@odoo.com> | 2019-07-22 08:42:39 +0000 |
| commit | 9b921dae5e24792eba35218bbea3a0dd8dac2cf5 (patch) | |
| tree | cc8bea4dbaf34b7d5deadf368f4466781c60afb9 | |
| parent | d18336bcd7c789905d5bc06d61310f80fb80ac0c (diff) | |
[FIX] hr_expense: Correct states are used in the payment_mode field
The states for the expense are:
- draft
- reported
- approved
- done
- refused
So in the definition of the `payment_mode` field, these states must be used.
Before this fix, wrong states were used in the definition of the field
`payment_mode`.
opw:2038715
closes odoo/odoo#35051
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
| -rw-r--r-- | addons/hr_expense/models/hr_expense.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/hr_expense/models/hr_expense.py b/addons/hr_expense/models/hr_expense.py index a8120989819..6d69b9a3e01 100644 --- a/addons/hr_expense/models/hr_expense.py +++ b/addons/hr_expense/models/hr_expense.py @@ -65,7 +65,7 @@ class HrExpense(models.Model): payment_mode = fields.Selection([ ("own_account", "Employee (to reimburse)"), ("company_account", "Company") - ], default='own_account', states={'done': [('readonly', True)], 'post': [('readonly', True)], 'submitted': [('readonly', True)]}, string="Paid By") + ], default='own_account', states={'done': [('readonly', True)], 'approved': [('readonly', True)], 'reported': [('readonly', True)]}, string="Paid By") attachment_number = fields.Integer('Number of Attachments', compute='_compute_attachment_number') state = fields.Selection([ ('draft', 'To Submit'), |
