<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"/>
- <field name="amt_to_invoice" invisible="True"/>
- <field name="hrs_to_invoice" invisible="True"/>
+ <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" groups="product.group_sale_pricelist" 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_timesheet"/>
- <field name="currency_id"/>
+ <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[@id='list']" position="inside">
- <a id="3">
- <t t-if="record.timesheets.raw_value">
- <button name="open_timesheets" class="oe_project_buttons" type="object"><t t-if="record.total_timesheet.value <= 1"> Timesheet</t><t t-if="record.total_timesheet.value > 1"> Timesheets</t>(<t t-esc="record.total_timesheet.value"/>)</button>
- </t>
- </a>
- </xpath>
-
- <xpath expr="//tr[@id='deadline']" position="before">
- <tr >
- <th align="left">To invoice</th>
- <td align="left">
- <field name="amt_to_invoice"/> <t t-esc="record.currency_id.raw_value[1].split(' ')[1][1]"/>
- </td>
- </tr>
- <tr>
- <th align="left">To hours</th>
- <td align="left">
- <field name="hrs_to_invoice"/> h
- </td>
- </tr>
- </xpath>
+ <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>
</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" />