[IMP] project_timesheet: improve field names for project kanban view

bzr revid: rco@openerp.com-20120509082451-jfsd0pgn7o4vddf5
This commit is contained in:
Raphael Collet 2012-05-09 10:24:51 +02:00
parent 85e4f9c4f2
commit 36346f081e
2 changed files with 8 additions and 8 deletions

View 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 = {

View 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">
@ -45,13 +45,13 @@
<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>