Amit Dodiya (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.0-opw-15293-ado into 
lp:openobject-addons/6.0.

Requested reviews:
  Priyesh (OpenERP) (pso-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-15293-ado/+merge/74948

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
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-15293-ado/+merge/74948
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.0-opw-15293-ado.
=== modified file 'account/report/account_invoice_report.py'
--- account/report/account_invoice_report.py	2011-04-07 12:29:55 +0000
+++ account/report/account_invoice_report.py	2011-09-12 07:09:23 +0000
@@ -71,8 +71,8 @@
         'account_id': fields.many2one('account.account', 'Account',readonly=True),
         'partner_bank_id': fields.many2one('res.partner.bank', 'Bank Account',readonly=True),
         'residual': fields.float('Total Residual', readonly=True),
-        'delay_to_pay': fields.float('Avg. Delay To Pay', readonly=True, group_operator="avg"),
-        'due_delay': fields.float('Avg. Due Delay', readonly=True, group_operator="avg"),
+        'delay_to_pay': fields.float('Avg. Delay Days After Due Date', readonly=True, group_operator="avg"),
+        'due_delay': fields.float('Avg. Due Days for Pay', readonly=True, group_operator="avg"),
     }
     _order = 'date desc'
     def init(self, cr):
@@ -148,9 +148,9 @@
                      / cr.rate as price_average,
 
                     cr.rate as currency_rate,
-                    sum((select extract(epoch from avg(date_trunc('day',aml.date_created)-date_trunc('day',l.create_date)))/(24*60*60)::decimal(16,2)
-                        from account_move_line as aml
-                        left join account_invoice as a ON (a.move_id=aml.move_id)
+                    sum((select extract(epoch from avg(date_trunc('day',am.date)-date_trunc('day',a.date_due)))/(24*60*60)::decimal(16,2)
+                        from account_move as am
+                        left join account_invoice as a ON (a.move_id=am.id)
                         left join account_invoice_line as l ON (a.id=l.invoice_id)
                         where a.id=ai.id)) as delay_to_pay,
                     sum((select extract(epoch from avg(date_trunc('day',a.date_due)-date_trunc('day',a.date_invoice)))/(24*60*60)::decimal(16,2)

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to