Debian Codegraph @

addons/hr_timesheet/views/hr_employee_views.xml

raw
1 <?xml version="1.0" encoding="utf-8"?>
2 <odoo>
3 <record id="timesheet_action_view_from_employee_form" model="ir.actions.act_window.view">
4 <field name="sequence" eval="10"/>
5 <field name="view_mode">form</field>
6 <field name="view_id" ref="hr_timesheet_line_form"/>
7 <field name="act_window_id" ref="timesheet_action_from_employee"/>
8 </record>
9
10 <record id="hr_employee_view_form_inherit_timesheet" model="ir.ui.view">
11 <field name="name">hr.employee.form.timesheet</field>
12 <field name="model">hr.employee</field>
13 <field name="inherit_id" ref="hr_hourly_cost.view_employee_form"/>
14 <field name="priority" eval="40"/>
15 <field name="arch" type="xml">
16 <xpath expr="/form" position="attributes">
17 <attribute name="delete">0</attribute>
18 </xpath>
19 <button name="action_open_versions" position="before">
20 <field name="has_timesheet" groups="hr_timesheet.group_hr_timesheet_user" invisible="1"/>
21 <button invisible="not has_timesheet" class="oe_stat_button" type="object" name="action_timesheet_from_employee" icon="fa-calendar" groups="hr_timesheet.group_hr_timesheet_user">
22 <div class="o_stat_info">
23 <span class="o_stat_text">Timesheets</span>
24 </div>
25 </button>
26 </button>
27 </field>
28 </record>
29
30 <record id="view_employee_tree_inherit_timesheet" model="ir.ui.view">
31 <field name="name">hr.employee.list.timesheet</field>
32 <field name="model">hr.employee</field>
33 <field name="inherit_id" ref="hr.view_employee_tree"/>
34 <field name="arch" type="xml">
35 <xpath expr="/list" position="attributes">
36 <attribute name="delete">0</attribute>
37 </xpath>
38 </field>
39 </record>
40
41 <record id="hr_employee_view_kanban_inherit_timesheet" model="ir.ui.view">
42 <field name="name">hr.employee.kanban.timesheet</field>
43 <field name="model">hr.employee</field>
44 <field name="inherit_id" ref="hr.hr_kanban_view_employees"/>
45 <field name="arch" type="xml">
46 <xpath expr="/kanban" position="attributes">
47 <attribute name="delete">0</attribute>
48 </xpath>
49 </field>
50 </record>
51
52 <record id="unlink_employee_action" model="ir.actions.server">
53 <field name="name">Delete</field>
54 <field name="model_id" ref="hr.model_hr_employee"/>
55 <field name="binding_model_id" ref="hr.model_hr_employee"/>
56 <field name="binding_view_types">form,list,kanban</field>
57 <field name="state">code</field>
58 <field name="code">action = records.action_unlink_wizard()</field>
59 </record>
60 </odoo>