You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
2.1 KiB
45 lines
2.1 KiB
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<!-- Adding the relative fields in 'project.task' module-->
|
|
<record id="view_task_form2" model="ir.ui.view">
|
|
<field name="name">project.task.view.form.inherit.automatic.project.task.timer</field>
|
|
<field name="model">project.task</field>
|
|
<field name="inherit_id" ref="project.view_task_form2"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='tag_ids']" position="after">
|
|
<label for="task_timer"/>
|
|
<div class="o_row" style="display: inline-block;">
|
|
<field name="task_timer" widget="boolean_toggle"
|
|
invisible="True"/>
|
|
</div>
|
|
<field name="is_status_stage" invisible="True"/>
|
|
<field name="check_stage" invisible="True"/>
|
|
</xpath>
|
|
<xpath expr="//div[@name='button_box']" position="inside">
|
|
<div style="margin-top:10px;">
|
|
<widget name="web_ribbon" text="In Progress"
|
|
attrs="{'invisible': [('task_timer', '=', False)]}"/>
|
|
</div>
|
|
</xpath>
|
|
<xpath expr="//field[@name='timesheet_ids']/tree/field[@name='unit_amount']"
|
|
position="before">
|
|
<field name="date_start" required="1"/>
|
|
<field name="date_end"/>
|
|
<field name="timer_duration" invisible="1"/>
|
|
</xpath>
|
|
<xpath expr="//field[@name='progress']" position="after">
|
|
<field name="is_user_working" invisible="1"/>
|
|
<label for="duration"/>
|
|
<div>
|
|
<button style="pointer-events: none;"
|
|
class="oe_inline label label-default">
|
|
<field name="duration" id="duration" widget="task_timer"
|
|
style="color: red;"
|
|
attrs="{'readonly': [('is_user_working', '=', True)]}"
|
|
sum="real duration"/>
|
|
</button>
|
|
</div>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
</odoo>
|
|
|