diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/hr_maintenance/views/hr_views.xml | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/hr_maintenance/views/hr_views.xml')
| -rw-r--r-- | addons/hr_maintenance/views/hr_views.xml | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/addons/hr_maintenance/views/hr_views.xml b/addons/hr_maintenance/views/hr_views.xml new file mode 100644 index 00000000..0750adc6 --- /dev/null +++ b/addons/hr_maintenance/views/hr_views.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <record id="hr_employee_view_form" model="ir.ui.view"> + <field name="name">hr.employee.view.form.inherit.maintenance</field> + <field name="model">hr.employee</field> + <field name="inherit_id" ref="hr.view_employee_form"/> + <field name="arch" type="xml"> + <div name="button_box" position="inside"> + <button name="%(maintenance.hr_equipment_action)d" + context="{'search_default_employee_id': id, 'default_employee_id': id}" + groups="maintenance.group_equipment_manager" + class="o_stat_button" + icon="fa-cubes" + type="action"> + <field name="equipment_count" widget="statinfo"/> + </button> + </div> + </field> + </record> + + <!-- user preferences --> + <record id="res_users_view_form_preference" model="ir.ui.view"> + <field name="name">res.users.view.form.inherit.maintenance</field> + <field name="model">res.users</field> + <field name="inherit_id" ref="hr.res_users_view_form_profile"/> + <field name="arch" type="xml"> + <xpath expr="//div[@name='button_box']" position="inside"> + <field name="employee_id" invisible="1"/> + <button name="%(maintenance.hr_equipment_action)d" + context="{'search_default_employee_id': employee_id, 'default_employee_id': employee_id}" + class="o_stat_button" + icon="fa-cubes" + type="action"> + <field name="equipment_count" widget="statinfo"/> + </button> + </xpath> + </field> + </record> +</odoo> |
