File: hr_employee_views.xml

package info (click to toggle)
odoo 18.0.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 878,716 kB
  • sloc: javascript: 927,937; python: 685,670; xml: 388,524; sh: 1,033; sql: 415; makefile: 26
file content (54 lines) | stat: -rw-r--r-- 2,490 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?xml version="1.0" encoding="utf-8"?>
<odoo>

    <record id="hr_hr_employee_view_form" model="ir.ui.view">
        <field name="name">hr.employee.view.form.inherit</field>
        <field name="model">hr.employee</field>
        <field name="inherit_id" ref="hr.view_employee_form"/>
        <field name="arch" type="xml">

            <xpath expr="//page[@name='public']" position="after">
                <page string="Received Badges" name="received_badges" invisible="not user_id">
                    <field name="has_badges" invisible="1"/>
                    <button string="Grant a Badge" type="action" name="%(action_reward_wizard)d"/> to reward this employee for a good action
                    <div class="o_field_nocontent mt-2" invisible="has_badges">
                        <p>
                            Grant this employee his first badge
                        </p><p class="oe_grey">
                            Badges are rewards of good work. Give them to people you believe deserve it.
                        </p>
                    </div>
                    <div class="mt-2">
                        <field name="badge_ids" mode="kanban" />
                    </div>
                </page>
            </xpath>

        </field>
    </record>

    <record id="hr_employee_public_view_form" model="ir.ui.view">
        <field name="name">hr.employee.public.view.form.inherit</field>
        <field name="model">hr.employee.public</field>
        <field name="inherit_id" ref="hr.hr_employee_public_view_form"/>
        <field name="arch" type="xml">

            <xpath expr="//page[@name='public']" position="after">
                <page string="Received Badges" name="received_badges" invisible="not user_id">
                    <field name="has_badges" invisible="1"/>
                    <button string="Grant a Badge" type="action" name="%(action_reward_wizard)d"/> to reward this employee for a good action
                    <div class="o_field_nocontent" invisible="has_badges">
                        <p>
                            Grant this employee his first badge
                        </p><p class="oe_grey">
                            Badges are rewards of good work. Give them to people you believe deserve it.
                        </p>
                    </div>
                    <field name="badge_ids" mode="kanban" widget="many2many"/>
                </page>
            </xpath>

        </field>
    </record>

</odoo>