<field name="type">form</field>
<field name="inherit_id" ref="project.edit_project"/>
<field name="arch" type="xml">
- <xpath expr="//field[@name='task']" position='after'>
- <field name="timesheets"/>
+ <xpath expr='//tr[@name="use_tasks_row"]' position='after'>
+ <tr name="use_timesheets_row">
+ <th style="border-right:1px solid #DDD;" width="140px">Timesheets</th>
+ <td><field name="use_timesheets" nolabel="1"/></td>
+ <td style="text-align:right;"><button icon="terp-go-week" class="oe_btn_width" name="open_timesheets" string="Timesheets" type="object" attrs="{'invisible':[('use_timesheets','=', 0)]}"/></td>
+ </tr>
</xpath>
-
- <field name="warn_customer" position="after">
- <group colspan="4" col="4">
- <separator colspan="4" string="Invoicing Data"/>
- <field name="pricelist_id" domain="[('type','=','sale')]" widget="selection"/>
- <field name="to_invoice" widget="selection" string="Invoice Task Work"/>
- <field name="amount_max" groups="base.group_extended"/>
- <field name="amount_invoiced" groups="base.group_extended"/>
- </group>
- </field>
</field>
</record>
<field name="type">kanban</field>
<field name="inherit_id" ref="project.view_project_kanban"/>
<field name="arch" type="xml">
- <field name="task" position="after">
- <field name="timesheets"/>
- <field name="total_hours"/>
- <field name="effective_hours"/>
+ <field name="use_tasks" position="after">
+ <field name="use_timesheets"/>
+ <field name="timesheet_count"/>
+ <field name="currency_id"/>
+ <field name="partner_id"/>
</field>
- <xpath expr="//t[@t-name='tasks']" position="after">
- <t t-name="timesheets">
- <ul class="oe_kanban_tooltip">
- <li><b>Timesheets</b></li>
- </ul>
- </t>
- </xpath>
- <xpath expr="//td[@class='buttons']" position="inside">
- <t t-if="record.timesheets.raw_value">
- <button name="open_timesheets" class="oe_project_buttons" type="object" tooltip="timesheets"><img src="/project_timesheet/static/src/img/timesheet_icon.png" class="project_icon"/></button>
- </t>
+ <xpath expr="//div[contains(@class, 'oe_kanban_project_list')]" position="inside">
+ <a t-if="record.use_timesheets.raw_value"
+ name="open_timesheets" type="object">Timesheets(<field name="timesheet_count"/>)</a>
</xpath>
- <xpath expr="//div[@id='sequence']" position="inside">
-
- <div class="sequence">
- <button name="open_timesheets" class="oe_to_invoice_buttons" type="object">
- <small>To invoice</small>
- <div class="manager">
- <field name="amount_invoiced"/>
- </div>
- </button>
- </div>
-
+ <xpath expr="//div[contains(@class, 'oe_kanban_project_deadline')]" position="before">
+ <div class="oe_kanban_project_fields oe_kanban_project_invoice" t-if="record.partner_id.raw_value">
+ <div>Amount to invoice</div>
+ <div><field name="amount_to_invoice"/> <t t-esc="record.currency_id.raw_value[1].split(' ')[1][1]"/></div>
+ <div>Time to Invoice</div>
+ <div><field name="time_to_invoice"/> <field name="company_uom_id"/></div>
+ </div>
</xpath>
</field>
</record>
<field name="inherit_id" ref="project_invoice_form"/>
<field name="arch" type="xml">
<field name="partner_id" position="replace">
- <field colspan="4" name="partner_id" on_change="onchange_partner_id(partner_id)" select="1" string="Customer" attrs="{'required':[('to_invoice','!=',False)]}"/>
+ <field name="partner_id" on_change="onchange_partner_id(partner_id)" select="1" string="Customer" attrs="{'required':[('to_invoice','!=',False)]}"/>
</field>
</field>
</record>
</record>
<menuitem action="hr_timesheet.action_hr_timesheet_sign_in"
id="menu_hr_timesheet_sign_in"
- groups="base.group_extended"
parent="hr_attendance.menu_hr_attendance"
sequence="5" />