Merge lp:~openerp-dev/openobject-addons/6.0-opw-15293-ado into lp:openobject-addons/6.0

Proposed by Amit Dodiya (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/6.0-opw-15293-ado
Merge into: lp:openobject-addons/6.0
Diff against target: 27 lines (+5/-5)
1 file modified
account/report/account_invoice_report.py (+5/-5)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.0-opw-15293-ado
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Priyesh (OpenERP) Pending
Review via email: mp+74948@code.launchpad.net

Description of the change

Hello Sir,

"[FIX]: Avg Due Delay and Avg. Delay To Pay columns in Invoice Analysis Report"

The columns represent the label oddly. "Avg Due Delay" and "Avg. Delay To Pay" columns in Accounting > Reporting > Statistic Reports > Invoice Analysis Report.

So i have changed the code for label and query for Invoice Analysis Report.

Thanks,
Amit

To post a comment you must log in.

Unmerged revisions

4820. By Amit Dodiya (OpenERP)

[FIX]: Avg Due Delay and Avg. Delay To Pay columns in Invoice Analysis Report

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/report/account_invoice_report.py'
2--- account/report/account_invoice_report.py 2011-04-07 12:29:55 +0000
3+++ account/report/account_invoice_report.py 2011-09-12 07:09:23 +0000
4@@ -71,8 +71,8 @@
5 'account_id': fields.many2one('account.account', 'Account',readonly=True),
6 'partner_bank_id': fields.many2one('res.partner.bank', 'Bank Account',readonly=True),
7 'residual': fields.float('Total Residual', readonly=True),
8- 'delay_to_pay': fields.float('Avg. Delay To Pay', readonly=True, group_operator="avg"),
9- 'due_delay': fields.float('Avg. Due Delay', readonly=True, group_operator="avg"),
10+ 'delay_to_pay': fields.float('Avg. Delay Days After Due Date', readonly=True, group_operator="avg"),
11+ 'due_delay': fields.float('Avg. Due Days for Pay', readonly=True, group_operator="avg"),
12 }
13 _order = 'date desc'
14 def init(self, cr):
15@@ -148,9 +148,9 @@
16 / cr.rate as price_average,
17
18 cr.rate as currency_rate,
19- sum((select extract(epoch from avg(date_trunc('day',aml.date_created)-date_trunc('day',l.create_date)))/(24*60*60)::decimal(16,2)
20- from account_move_line as aml
21- left join account_invoice as a ON (a.move_id=aml.move_id)
22+ sum((select extract(epoch from avg(date_trunc('day',am.date)-date_trunc('day',a.date_due)))/(24*60*60)::decimal(16,2)
23+ from account_move as am
24+ left join account_invoice as a ON (a.move_id=am.id)
25 left join account_invoice_line as l ON (a.id=l.invoice_id)
26 where a.id=ai.id)) as delay_to_pay,
27 sum((select extract(epoch from avg(date_trunc('day',a.date_due)-date_trunc('day',a.date_invoice)))/(24*60*60)::decimal(16,2)