[FIX] hr_expense: don't display confusing button

When adding line from expense sheet, you don't want to see
the header with action button, nor the stat buttons.

Closes #16996
This commit is contained in:
jem-odoo
2018-01-19 15:37:05 +01:00
parent 171ce8fb2a
commit 2cd74cdd0d
+3 -3
View File
@@ -27,13 +27,13 @@
<field eval="25" name="priority"/>
<field name="arch" type="xml">
<form string="Expenses">
<header>
<header invisible="context.get('expense_adding_line')">
<button name="submit_expenses" states="draft" string="Submit to Manager" type="object" class="oe_highlight o_expense_submit"/>
<field name="state" widget="statusbar" statusbar_visible="draft,reported,done"/>
<button name="view_sheet" type="object" string="View Report" class="oe_highlight" attrs="{'invisible': [('state', '=','draft')]}"/>
</header>
<sheet>
<div class="oe_button_box">
<div class="oe_button_box" invisible="context.get('expense_adding_line')">
<button name="action_get_attachment_view"
class="oe_stat_button"
icon="fa-book"
@@ -454,7 +454,7 @@
<field name="account_move_id" invisible="1"/>
</group>
</group>
<field name="expense_line_ids" nolabel="1" widget="many2many" domain="[('state', '=', 'draft')]" options="{'not_delete': True}">
<field name="expense_line_ids" nolabel="1" widget="many2many" domain="[('state', '=', 'draft')]" options="{'not_delete': True}" context="{'expense_adding_line': True}">
<tree>
<field name="date"/>
<field name="name"/>