summaryrefslogtreecommitdiff
path: root/addons/hr_expense
diff options
context:
space:
mode:
authorKevin Baptiste <kba@odoo.com>2020-12-07 08:59:52 +0000
committerKevin Baptiste <kba@odoo.com>2020-12-07 08:59:52 +0000
commitd0ad00fddf5c3eb05381769a4e75c93e4dcfc388 (patch)
tree4a4eca3ebaee40d94d028c1376d44aaf0240e455 /addons/hr_expense
parentc36aa16c2cc431a1e3b3bb7047dbae4fcac13946 (diff)
[FIX] hr_expense: fix form view not editable on new record
Since commit 80c1dad, the form view of a new record was no longer editable. The "editability" of the expense sheet is computed based on the status but no default value was available. closes odoo/odoo#62940 Taskid: 2413154 Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Diffstat (limited to 'addons/hr_expense')
-rw-r--r--addons/hr_expense/models/hr_expense.py2
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 0566716521e..fa2aecad30a 100644
--- a/addons/hr_expense/models/hr_expense.py
+++ b/addons/hr_expense/models/hr_expense.py
@@ -94,7 +94,7 @@ class HrExpense(models.Model):
('approved', 'Approved'),
('done', 'Paid'),
('refused', 'Refused')
- ], compute='_compute_state', string='Status', copy=False, index=True, readonly=True, store=True, help="Status of the expense.")
+ ], compute='_compute_state', string='Status', copy=False, index=True, readonly=True, store=True, default='draft', help="Status of the expense.")
sheet_id = fields.Many2one('hr.expense.sheet', string="Expense Report", domain="[('employee_id', '=', employee_id), ('company_id', '=', company_id)]", readonly=True, copy=False)
reference = fields.Char("Bill Reference")
is_refused = fields.Boolean("Explicitly Refused by manager or accountant", readonly=True, copy=False)