[IMP]:added icons on buttons.
[odoo/odoo.git] / addons / project_timesheet / project_timesheet_view.xml
index b9e8816..e04e4ea 100644 (file)
@@ -7,19 +7,13 @@
             <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="use_tasks" position="after">
+                    <field name="use_timesheets"/>
+                    <field name="timesheet_count"/>
+                    <field name="currency_id"/>
+                    <field name="partner_id"/>
                 </field>
-                <xpath expr="//td[@class='buttons']" position="inside">
-                    <t t-if="record.timesheets.raw_value">
-                        <button name="open_timesheets" class="oe_project_buttons" type="object"><img src="/project_timesheet/static/src/img/timesheet_icon.png" width="50" height="50" align="center"/></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[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>
@@ -47,7 +51,7 @@
             <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>
@@ -114,7 +118,6 @@ the project form.</field>
         </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" />