Skip to content
Snippets Groups Projects
Commit 2cf5d468 authored by lathuat1997's avatar lathuat1997
Browse files

[FIX] hr_expense: add employee_id to expense list on expense sheet form


Issue:
On expense sheet form:
- Choose an employee not like current user.
- Create an expense from expense list.
- Edit expense list and save expense sheet.
=> Error: "You cannot add expenses of another employee."

Purpose:
- Expense list has not `employee_id`.
- When save form, `employee_id` on expense list is current user.

Solution:
- Add `employee_id` on expense list.

closes odoo/odoo#109399

Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
parent b6947f26
Branches
Tags
No related merge requests found
......@@ -677,6 +677,7 @@
<tree decoration-danger="is_refused" editable="bottom">
<field name="date" optional="show"/>
<field name="name"/>
<field name="employee_id" invisible="1"/>
<field name="state" invisible="1"/>
<field name="reference" optional="hide"/>
<field name="analytic_account_id" optional="show" domain="['|', ('company_id', '=', parent.company_id), ('company_id', '=', False)]" groups="analytic.group_analytic_accounting"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment