Skip to content
Snippets Groups Projects
Commit d7c9521d authored by sofiagvaladze's avatar sofiagvaladze
Browse files

[FIX] hr_expense: set expense_line_ids during report creation


Steps to reproduce
- Install Accounting
- Create user and employee, "user_acc", with Accounting-Accounting and no Expense rights
- Take the expense in "To Submit" state for the employee different than user_acc and create report
- Save the report.

Bug - expense lines disappear.

task - 3099142

closes odoo/odoo#107845

Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
parent 232d5c61
Branches
Tags
No related merge requests found
......@@ -741,7 +741,7 @@
<notebook>
<page name="expenses" string="Expense">
<field name="is_editable" invisible="1"/>
<field name="expense_line_ids" nolabel="1" widget="many2many" domain="[('state', '=', 'draft'), ('employee_id', '=', employee_id), ('company_id', '=', company_id)]" options="{'reload_on_button': True}" context="{'form_view_ref' : 'hr_expense.hr_expense_view_form_without_header', 'default_company_id': company_id, 'default_employee_id': employee_id}" attrs="{'readonly': [('is_editable', '=', False)]}">
<field name="expense_line_ids" nolabel="1" widget="many2many" domain="[('state', '=', 'draft'), ('employee_id', '=', employee_id), ('company_id', '=', company_id)]" options="{'reload_on_button': True}" context="{'form_view_ref' : 'hr_expense.hr_expense_view_form_without_header', 'default_company_id': company_id, 'default_employee_id': employee_id}" attrs="{'readonly': [('is_editable', '=', False)]}" force_save="1">
<tree decoration-danger="is_refused" editable="bottom">
<field name="date" optional="show"/>
<field name="product_id"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment