[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>
This commit is contained in:
committed by
Goffin Simon
parent
d18336bcd7
commit
9b921dae5e
@@ -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'),
|
||||
|
||||
Reference in New Issue
Block a user