flectra/addons/sale_timesheet/views/sale_order_views.xml
flectra-admin 769eafb483 [INIT] Inception of Flectra from Odoo
Flectra is Forked from Odoo v11 commit : (6135e82d73)
2018-01-16 11:45:59 +05:30

44 lines
2.2 KiB
XML

<?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.view_order_form"/>
<field name="arch" type="xml">
<data>
<xpath expr="//button[@name='action_view_invoice']" position="before">
<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">
<field name="timesheet_count" widget="statinfo" string="Timesheets"/>
</button>
</xpath>
<xpath expr="//button[@name='action_view_invoice']" position="before">
<button type="object"
name="action_view_project_ids"
class="oe_stat_button"
icon="fa-puzzle-piece"
string="Project(s) Overview"
attrs="{'invisible': [('project_ids', '=', [])]}"
groups="project.group_project_user">
<field name="project_ids" invisible="1"/>
</button>
</xpath>
<xpath expr="//button[@name='action_view_invoice']" position="before">
<button type="object"
name="action_view_task"
class="oe_stat_button"
icon="fa-tasks"
attrs="{'invisible': [('tasks_count', '=', 0)]}"
groups="project.group_project_user">
<field name="tasks_count" widget="statinfo" string="Tasks"/>
</button>
</xpath>
</data>
</field>
</record>
</odoo>