[IMP]:improved report and fixed total_est
bzr revid: apa@tinyerp.com-20120608064819-p4yy10y6s5n0jtqo
This commit is contained in:
parent
f7352c6dea
commit
38a2bd8cc1
|
@ -336,7 +336,7 @@ class account_analytic_account(osv.osv):
|
|||
def _get_total_estimation(self, account):
|
||||
tot_est = 0.0
|
||||
if account.fix_price_invoices:
|
||||
total_est += account.amount_max
|
||||
tot_est += account.amount_max
|
||||
if account.invoice_on_timesheets:
|
||||
tot_est += account.hours_qtt_est
|
||||
return tot_est
|
||||
|
|
|
@ -27,9 +27,20 @@ class analytic_account(report_sxw.rml_parse):
|
|||
super(analytic_account, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
'get_lines': self.get_lines,
|
||||
})
|
||||
def get_lines(self, analytic_account):
|
||||
res = []
|
||||
res.insert(0,('Fix Price Invoices',analytic_account.amount_max,analytic_account.ca_invoiced,analytic_account.remaining_ca,analytic_account.ca_to_invoice))
|
||||
res.insert(1,('Invoice On Timesheets',analytic_account.hours_qtt_est,analytic_account.hours_qtt_invoiced,analytic_account.remaining_hours,analytic_account.hours_qtt_non_invoiced))
|
||||
return res
|
||||
#return res.append(
|
||||
# ('Fix Price Invoices',analytic_account.amount_max,analytic_account.ca_invoiced,analytic_account.remaining_ca,analytic_account.ca_to_invoice),
|
||||
# ('Invoice On Timesheets',analytic_account.hours_qtt_est,analytic_account.hours_qtt_invoiced,analytic_account.remaining_hours,analytic_account.hours_qtt_non_invoiced)
|
||||
#)
|
||||
|
||||
report_sxw.report_sxw(
|
||||
'report.analytic_account',
|
||||
'report.analytic.account',
|
||||
'account.analytic.account',
|
||||
'addons/account_analytic_analysis/report/analytic_account.rml',
|
||||
parser=analytic_account
|
||||
|
|
|
@ -178,7 +178,6 @@
|
|||
<images/>
|
||||
</stylesheet>
|
||||
<story>
|
||||
<section>
|
||||
<para style="terp_header_Centre">Analytic Account</para>
|
||||
<para style="terp_header_Centre">[[repeatIn(objects,'account')]]</para>
|
||||
<para style="terp_header_Centre">
|
||||
|
@ -304,76 +303,28 @@
|
|||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
<para style="terp_default_1">[[repeatIn(get_lines(account),'line')]]</para>
|
||||
<blockTable colWidths="121.0,86.0,85.0,87.0,102.0" style="Table2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_8">Fix Price Invoices</para>
|
||||
<para style="terp_default_8">[[ line[0] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(account.amount_max) ]]</para>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(line[1]) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(account.ca_invoiced) ]]</para>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(line[2]) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(account.remaining_ca) ]]</para>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(line[3]) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(account.ca_to_invoice) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_8">Invoice on Timesheet</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(account.quantity_max) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(account.hours_qtt_invoiced) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(account.remaining_hours) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(account.hours_qtt_non_invoiced) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_8">Charge Expenses</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[formatLang(account.expense_max) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[formatLang(account.expense_invoiced) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[formatLang(account.expense_max) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[formatLang(account.expense_to_invoice) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9_Bold">Total</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9_Bold">[[ formatLang(account.est_total) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9_Bold">[[ formatLang(account.invoiced_total) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9_Bold">[[ formatLang(account.remaining_total) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9_Bold">[[ formatLang(account.toinvoice_total) ]]</para>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(line[4]) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
|
@ -412,7 +363,6 @@
|
|||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
</story>
|
||||
</document>
|
||||
|
||||
|
|
Loading…
Reference in New Issue