Debian Codegraph @

addons/hr_timesheet/wizard/hr_employee_delete_wizard_views.xml

raw
1 <?xml version="1.0" encoding="utf-8"?>
2 <odoo>
3 <data>
4 <record id="hr_employee_delete_wizard_form" model="ir.ui.view">
5 <field name="name">Delete Employee</field>
6 <field name="model">hr.employee.delete.wizard</field>
7 <field name="arch" type="xml">
8 <form string="Delete Employee">
9 <field name="has_timesheet" invisible="1"/>
10 <field name="has_active_employee" invisible="1"/>
11 <span invisible="not has_timesheet">
12 Uh-oh! The employee you’re trying to delete still has some timesheets hanging around and can’t be deleted.
13 <span invisible="not has_active_employee">
14 So here are your two options: either delete those timesheets or consider archiving the employee instead.
15 </span>
16 <span invisible="has_active_employee" groups="hr_timesheet.group_hr_timesheet_approver">
17 Please first delete all of their timesheets.
18 </span>
19 </span>
20 <span invisible="has_timesheet">
21 Are you sure you want to delete these employees?
22 </span>
23 <footer invisible="not has_timesheet">
24 <button string="Archive Employees" type="object" name="action_archive" class="btn btn-primary"
25 invisible="not has_active_employee" data-hotkey="q"/>
26 <button string="See Timesheets" type="object" name="action_open_timesheets" class="btn btn-primary" groups="hr_timesheet.group_hr_timesheet_approver"
27 invisible="has_active_employee" data-hotkey="w"/>
28 <button string="See Timesheets" type="object" name="action_open_timesheets" class="btn btn-secondary" groups="hr_timesheet.group_hr_timesheet_approver"
29 invisible="not has_active_employee" data-hotkey="w"/>
30 <button string="Discard" special="cancel" data-hotkey="x"/>
31 </footer>
32 <footer invisible="has_timesheet">
33 <button string="Ok" type="object" name="action_confirm_delete" class="btn btn-primary" data-hotkey="q"/>
34 <button string="Discard" special="cancel" data-hotkey="x"/>
35 </footer>
36 </form>
37 </field>
38 </record>
39 </data>
40 </odoo>