← Back to team overview

clearcorp team mailing list archive

lp:~cv.clearcorp/openobject-addons/6.1-lp-956100-account-report-one-period into lp:~clearcorp/openobject-addons/6.1-ccorp

 

Carlos Vásquez (CLEARCORP) has proposed merging lp:~cv.clearcorp/openobject-addons/6.1-lp-956100-account-report-one-period into lp:~clearcorp/openobject-addons/6.1-ccorp.

Requested reviews:
  CLEARCORP development team (clearcorp)
Related bugs:
  Bug #956100 in OpenERP Addons: "Error if start period is same as end period when generating Chart of Accounts"
  https://bugs.launchpad.net/openobject-addons/+bug/956100

For more details, see:
https://code.launchpad.net/~cv.clearcorp/openobject-addons/6.1-lp-956100-account-report-one-period/+merge/98656

The "build_ctx_periods" method in "account_period" is returning the period id as an int when the period_from = period_to in the context.

It should return a list with the period id, so other methods that rely on the output can iterate on the result.
-- 
https://code.launchpad.net/~cv.clearcorp/openobject-addons/6.1-lp-956100-account-report-one-period/+merge/98656
Your team CLEARCORP development team is requested to review the proposed merge of lp:~cv.clearcorp/openobject-addons/6.1-lp-956100-account-report-one-period into lp:~clearcorp/openobject-addons/6.1-ccorp.
=== modified file 'account/account.py'
--- account/account.py	2012-02-15 09:38:17 +0000
+++ account/account.py	2012-03-21 15:48:33 +0000
@@ -1079,7 +1079,7 @@
 
     def build_ctx_periods(self, cr, uid, period_from_id, period_to_id):
         if period_from_id == period_to_id:
-            return period_from_id
+            return [period_from_id]
         period_from = self.browse(cr, uid, period_from_id)
         period_date_start = period_from.date_start
         company1_id = period_from.company_id.id


Follow ups