From d28e410d364a306b2d9b013f74118bbdbc532292 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Tue, 1 Aug 2017 16:45:42 +0200 Subject: [PATCH] [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 --- 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 6065f1a0ec3..aa708898d4e 100644 --- a/addons/hr_expense/models/hr_expense.py +++ b/addons/hr_expense/models/hr_expense.py @@ -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'),