[IMP] project_timesheet: improve field names for project kanban view
authorRaphael Collet <rco@openerp.com>
Wed, 9 May 2012 08:24:51 +0000 (10:24 +0200)
committerRaphael Collet <rco@openerp.com>
Wed, 9 May 2012 08:24:51 +0000 (10:24 +0200)
bzr revid: rco@openerp.com-20120509082451-jfsd0pgn7o4vddf5

addons/project_timesheet/project_timesheet.py
addons/project_timesheet/project_timesheet_view.xml

index 85ffc99..585b3cd 100644 (file)
@@ -36,8 +36,8 @@ class project_project(osv.osv):
             line_ids = account_analytic_line.search(cr, uid, [('account_id', '=', project.analytic_account_id.id), ('to_invoice','=',1), ('invoice_id','=',False)])
             lines = account_analytic_line.browse(cr, uid, line_ids, context)
             res[project.id] = {
-                'amt_to_invoice': sum(line.amount for line in lines),
-                'hrs_to_invoice': sum(line.unit_amount for line in lines),
+                'amount_to_invoice': sum(line.amount for line in lines),
+                'time_to_invoice': sum(line.unit_amount for line in lines),
             }
         return res
 
@@ -51,8 +51,8 @@ class project_project(osv.osv):
 
     _columns = {
         'use_timesheets': fields.boolean('Timesheets', help="Check this field if this project manages timesheets"),
-        'amt_to_invoice': fields.function(_to_invoice, string="Amount to Invoice", multi="sums"),
-        'hrs_to_invoice': fields.function(_to_invoice, string="Time to Invoice", multi="sums"),
+        'amount_to_invoice': fields.function(_to_invoice, string="Amount to Invoice", multi="sums"),
+        'time_to_invoice': fields.function(_to_invoice, string="Time to Invoice", multi="sums"),
         'timesheet_count': fields.function(_timesheet_count, type='integer', string="Issue"),
     }
     _defaults = {
index 8e3d2d7..f0b2e2a 100644 (file)
@@ -9,8 +9,8 @@
             <field name="arch" type="xml">
                 <field name="use_tasks" position='after'>
                     <field name="use_timesheets"/>
-                    <field name="amt_to_invoice" invisible="True"/>
-                    <field name="hrs_to_invoice" invisible="True"/>
+                    <field name="amount_to_invoice" invisible="True"/>
+                    <field name="time_to_invoice" invisible="True"/>
                 </field>
                 <field name="warn_customer" position="after">
                     <group colspan="4" col="4">
                         <tr>
                             <th align="left">Amount to invoice</th>
                             <td align="left">
-                                <field name="amt_to_invoice"/> <t t-esc="record.currency_id.raw_value[1].split(' ')[1][1]"/>
+                                <field name="amount_to_invoice"/> <t t-esc="record.currency_id.raw_value[1].split(' ')[1][1]"/>
                             </td>
                         </tr>
                         <tr>
                             <th align="left">Time to Invoice</th>
                             <td align="left">
-                                <field name="hrs_to_invoice"/> <field name="company_uom_id"/>
+                                <field name="time_to_invoice"/> <field name="company_uom_id"/>
                             </td>
                         </tr>
                     </t>