From 9b921dae5e24792eba35218bbea3a0dd8dac2cf5 Mon Sep 17 00:00:00 2001 From: Luis Torres Date: Wed, 17 Jul 2019 16:00:03 +0000 Subject: [PATCH] [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) --- addons/hr_expense/models/hr_expense.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'),