summaryrefslogtreecommitdiff
path: root/addons/sale_timesheet/views/sale_order_views.xml
blob: 261e207a3cfcc8df7ff86ec85382f8d736d35837 (plain)
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
<?xml version="1.0" encoding="utf-8"?>
<odoo>
        <record id="view_order_form_inherit_sale_timesheet" model="ir.ui.view">
            <field name="name">sale.order.form.sale.timesheet</field>
            <field name="model">sale.order</field>
            <field name="inherit_id" ref="sale_project.view_order_form_inherit_sale_project"/>
            <field name="arch" type="xml">
                <data>
                    <xpath expr="//button[@name='action_view_project_ids']" position="attributes">
                        <attribute name="string">Project Overview</attribute>
                    </xpath>
                    <xpath expr="//button[@name='action_view_invoice']" position="before">
                        <field name="timesheet_count" invisible="1" />
                        <button type="object"
                           name="action_view_timesheet"
                           class="oe_stat_button"
                           icon="fa-clock-o"
                           attrs="{'invisible': [('timesheet_count', '=', 0)]}"
                           groups="hr_timesheet.group_hr_timesheet_user">
                            <div class="o_field_widget o_stat_info">
                                <span class="o_stat_value">
                                    <field name="timesheet_total_duration" class="mr4" widget="statinfo" nolabel="1"/>
                                    <field name="timesheet_encode_uom_id" options="{'no_open' : True}"/>
                                </span>
                                <span class="o_stat_text">Recorded</span>
                            </div>
                        </button>
                    </xpath>
                </data>
           </field>
        </record>
</odoo>