Purpose of the task is to the ui of HR Settings tab, on the employee form have to be reorganized to be more clear So in this task, split the status details under the two new groups 'Payroll' and 'Application Settings'. Related PR: https://github.com/odoo/enterprise/pull/14089 closes odoo/odoo#59984 Taskid: 2351762 Related: odoo/enterprise#14089 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
54 lines
2.8 KiB
XML
54 lines
2.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<record id="view_employee_form" model="ir.ui.view">
|
|
<field name="name">hr.employee.form.inherit.hr.fleet</field>
|
|
<field name="model">hr.employee</field>
|
|
<field name="inherit_id" ref="hr.view_employee_form" />
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//header" position="inside">
|
|
<button name="action_get_claim_report" string="Claim Car Report"
|
|
class="btn btn-secondary"
|
|
type="object" groups="fleet.fleet_group_manager"
|
|
attrs="{'invisible': [('employee_cars_count','=', 0)]}"
|
|
confirm="This report will contain only PDF files. If you want all documents, please go on vehicle page. Do you want to proceed?"/>
|
|
</xpath>
|
|
<div name="button_box" position="inside">
|
|
<button name="action_open_employee_cars" type="object"
|
|
class="oe_stat_button" icon="fa-car" groups="fleet.fleet_group_manager"
|
|
attrs="{'invisible': [('employee_cars_count','=', 0)]}">
|
|
<field name="employee_cars_count" widget="statinfo" />
|
|
</button>
|
|
</div>
|
|
<group name="application_group" position="attributes">
|
|
<attribute name="string">Application Settings</attribute>
|
|
</group>
|
|
<group name="application_group" position="inside">
|
|
<field name="mobility_card" string="Fleet Mobility Card"/>
|
|
</group>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="res_users_view_form_preferences" model="ir.ui.view">
|
|
<field name="name">hr.user.preferences.form.inherit.hr.fleet</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="//header" position="inside">
|
|
<button name="action_get_claim_report" string="Claim Car Report"
|
|
class="btn btn-primary"
|
|
type="object" groups="fleet.fleet_group_manager"
|
|
invisible="context.get('from_my_profile', False)"
|
|
attrs="{'invisible': [('employee_cars_count','=', 0)]}"
|
|
confirm="This report will contain only PDF files. If you want all documents, please go on vehicle page. Do you want to proceed?"/>
|
|
</xpath>
|
|
<xpath expr="//div[@name='button_box']" position="inside">
|
|
<button name="action_open_employee_cars" type="object"
|
|
class="oe_stat_button" icon="fa-car" groups="fleet.fleet_group_manager"
|
|
attrs="{'invisible': [('employee_cars_count','=', 0)]}">
|
|
<field name="employee_cars_count" widget="statinfo" />
|
|
</button>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
</odoo>
|