summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxLarue <mla@odoo.com>2019-06-06 07:47:51 +0000
committerMaxLarue <mla@odoo.com>2019-06-06 07:54:02 +0000
commit00d0789bd9d5147c39bd7d4fd42d042efb0fb68b (patch)
tree75eb267baf658d281b10ea00eac3fdf626d8b490
parent8922ab710da639c53900f512c57be3fc6edbd79d (diff)
[IMP] hr_expense: reduce employee visibility on report creation
When creating or editing an expense report, we have to select the corresponding expenses. Since it is constrained that these expenses belong to the same employee as the one from the report, it is not practical to see other expenses in the dialog when adding them. This commit extend the domai of the field in the expense report form so that it doesn't show expenses from other employees. task #1999537 closes odoo/odoo#33932 Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
-rw-r--r--addons/hr_expense/views/hr_expense_views.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/hr_expense/views/hr_expense_views.xml b/addons/hr_expense/views/hr_expense_views.xml
index 3fcf76099c6..38a24ab8541 100644
--- a/addons/hr_expense/views/hr_expense_views.xml
+++ b/addons/hr_expense/views/hr_expense_views.xml
@@ -506,7 +506,7 @@
</group>
<notebook>
<page name="expenses" string="Expense">
- <field name="expense_line_ids" nolabel="1" widget="many2many" domain="[('state', '=', 'draft')]" options="{'reload_on_button': True}" context="{'form_view_ref' : 'hr_expense.hr_expense_view_form_without_header', 'expense_adding_line': True}">
+ <field name="expense_line_ids" nolabel="1" widget="many2many" domain="[('state', '=', 'draft'), ('employee_id', '=', employee_id)]" options="{'reload_on_button': True}" context="{'form_view_ref' : 'hr_expense.hr_expense_view_form_without_header', 'expense_adding_line': True}">
<tree decoration-danger="is_refused">
<field name="date"/>
<field name="name"/>