From a4869fce23ec5d478a1a5156b3d40551132ff3d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= <tde@openerp.com> Date: Fri, 25 Sep 2015 15:54:19 +0200 Subject: [PATCH] [FIX] hr_equipment: form view Category is a classic m2o, not a statusbar. Moreover fixed category_id being twice in the form, leading to one of them being impossible to use. --- addons/hr_equipment/views/hr_equipment_views.xml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/addons/hr_equipment/views/hr_equipment_views.xml b/addons/hr_equipment/views/hr_equipment_views.xml index 49dc9fc1c06c..648721a1640b 100644 --- a/addons/hr_equipment/views/hr_equipment_views.xml +++ b/addons/hr_equipment/views/hr_equipment_views.xml @@ -199,10 +199,6 @@ <field name="model">hr.equipment</field> <field name="arch" type="xml"> <form string="Equipments"> - <header> - <field name="category_id" widget="statusbar" clickable="True" - options="{'fold_field': 'fold'}"/> - </header> <sheet> <div class="oe_button_box" name="button_box"> <button name="%(hr_equipment_request_action_from_equipment)d" @@ -215,13 +211,14 @@ <div class="oe_title"> <label for="name" class="oe_edit_only"/> <h1><field name="name" string="Name" placeholder="Equipment Name"/></h1> + <label for="category_id" class="oe_edit_only"/> + <field name="category_id" options="{"no_open": True}"/> <label for="serial_no" class="oe_edit_only"/> <field name="serial_no"/> </div> <group> <group> - <field name="category_id" invisible="1" on_change="1" options="{"no_open": True}"/> - <field name="equipment_assign_to" on_change="1" widget="radio"/> + <field name="equipment_assign_to" widget="radio"/> <field name="employee_id" string="Employee" attrs="{'invisible': ['|', ('equipment_assign_to', '=', 'department'), ('equipment_assign_to', '=', False)]}"/> <field name="department_id" string="Department" attrs="{'invisible': ['|', ('equipment_assign_to', '=', 'employee'), ('equipment_assign_to', '=', False)]}"/> </group> -- GitLab