[FIX] hr_expense: adding expenses to expense sheet error

Before this commit,
- create an expense
- click on create expense report button
- click on add expense in expense lines
- click on create
> the record does not exist error.

After, you can add expense to expense report via the lines without issue.
The (not yet existing) expense sheet is not part of the context anymore.

closes odoo/odoo#116544

Task-id: 3245816
X-original-commit: ee222533bedec6a1910723b28429c8f6c04d2169
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Signed-off-by: Detry Thomas (det) <det@odoo.com>
This commit is contained in:
det
2023-03-25 04:10:23 +01:00
parent 27049e1793
commit e54d633e5d
@@ -772,7 +772,6 @@
'form_view_ref' : 'hr_expense.hr_expense_view_form_without_header',
'default_company_id': company_id,
'default_employee_id': employee_id,
'default_sheet_id': active_id,
'default_payment_mode': payment_mode,
}"
attrs="{'readonly': [('is_editable', '=', False)]}"