<field name="type">form</field>
<field name="inherit_id" ref="project.edit_project"/>
<field name="arch" type="xml">
- <field name="warn_customer" position="after">
- <group colspan="4" col="4">
- <separator colspan="4" string="Invoicing Data"/>
- <field name="pricelist_id" groups="product.group_sale_pricelist" domain="[('type','=','sale')]" widget="selection"/>
- <field name="to_invoice" widget="selection" string="Invoice Task Work"/>
- <field name="amount_max"/>
- <field name="amount_invoiced"/>
- </group>
+ <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>
+ </record>
+
+ <record id="view_project_kanban_inherited" model="ir.ui.view">
+ <field name="name">project.project.kanban.inherited</field>
+ <field name="model">project.project</field>
+ <field name="type">kanban</field>
+ <field name="inherit_id" ref="project.view_project_kanban"/>
+ <field name="arch" type="xml">
+ <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="//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[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>