[FIX] hr_expense: adding new line on an approved expense report

When an expense report is confirmed, it's not possible to add a new
line.

opw:755969
This commit is contained in:
Goffin Simon
2017-08-02 10:11:39 +02:00
parent afd4b68acc
commit d28e410d36
+1 -1
View File
@@ -378,7 +378,7 @@ class HrExpenseSheet(models.Model):
_order = "accounting_date desc, id desc"
name = fields.Char(string='Expense Report Summary', required=True)
expense_line_ids = fields.One2many('hr.expense', 'sheet_id', string='Expense Lines', states={'done': [('readonly', True)], 'post': [('readonly', True)]}, copy=False)
expense_line_ids = fields.One2many('hr.expense', 'sheet_id', string='Expense Lines', states={'approve': [('readonly', True)], 'done': [('readonly', True)], 'post': [('readonly', True)]}, copy=False)
state = fields.Selection([('submit', 'Submitted'),
('approve', 'Approved'),
('post', 'Posted'),