From 7583a7da0435dfddcf8cf2c81b9046ecd3688783 Mon Sep 17 00:00:00 2001 From: "P. Christeas" Date: Tue, 14 Dec 2010 17:36:08 +0200 Subject: [PATCH] account report: fix read_group() API mismatch read_group() of account entries and followup reports didn't match that of server. We'd better use generic references to positional and keyword arguments instead. bzr revid: p_christ@hol.gr-20101214153608-mbcjfzu26wolyip9 --- addons/account/report/account_entries_report.py | 4 ++-- addons/account_followup/report/account_followup_report.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/account/report/account_entries_report.py b/addons/account/report/account_entries_report.py index 80065880ad9..e80cb290889 100644 --- a/addons/account/report/account_entries_report.py +++ b/addons/account/report/account_entries_report.py @@ -94,7 +94,7 @@ class account_entries_report(osv.osv): return super(account_entries_report, self).search(cr, uid, args=args, offset=offset, limit=limit, order=order, context=context, count=count) - def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None): + def read_group(self, cr, uid, domain, *args, **kwargs): todel=[] fiscalyear_obj = self.pool.get('account.fiscalyear') period_obj = self.pool.get('account.period') @@ -112,7 +112,7 @@ class account_entries_report(osv.osv): for a in [['period_id','in','current_year'], ['period_id','in','current_period']]: if a in domain: domain.remove(a) - return super(account_entries_report, self).read_group(cr, uid, domain, fields, groupby, offset, limit, context) + return super(account_entries_report, self).read_group(cr, uid, domain, *args, **kwargs) def init(self, cr): tools.drop_view_if_exists(cr, 'account_entries_report') diff --git a/addons/account_followup/report/account_followup_report.py b/addons/account_followup/report/account_followup_report.py index ba0756f5c49..878f44ced30 100644 --- a/addons/account_followup/report/account_followup_report.py +++ b/addons/account_followup/report/account_followup_report.py @@ -55,14 +55,14 @@ class account_followup_stat(osv.osv): return super(account_followup_stat, self).search(cr, uid, args=args, offset=offset, limit=limit, order=order, context=context, count=count) - def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None): + def read_group(self, cr, uid, domain, *args, **kwargs): for arg in domain: if arg[0] == 'period_id' and arg[2] == 'current_year': current_year = self.pool.get('account.fiscalyear').find(cr, uid) ids = self.pool.get('account.fiscalyear').read(cr, uid, [current_year], ['period_ids'])[0]['period_ids'] domain.append(['period_id','in',ids]) domain.remove(arg) - return super(account_followup_stat, self).read_group(cr, uid, domain, fields, groupby, offset, limit, context) + return super(account_followup_stat, self).read_group(cr, uid, domain, *args, **kwargs) def init(self, cr): tools.drop_view_if_exists(cr, 'account_followup_stat')