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

Requested reviews:
  nel (nel-tinyerp)
  Naresh(OpenERP) (nch-openerp)

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

Hello,

FIX] build_ctx_periods method return more periods than those asked when both 
period is same

When we have more than one period on same month, So build_ctx_periods method 
will return all that periods within the selected start date and end date 
because it search on date not on period.

Regards,
Amit Dodiya


-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-382088-ado/+merge/91762
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.0-opw-382088-ado.
=== modified file 'account/account.py'
--- account/account.py	2012-01-31 11:03:20 +0000
+++ account/account.py	2012-02-07 05:50:23 +0000
@@ -951,6 +951,8 @@
         return super(account_period, self).write(cr, uid, ids, vals, context=context)
 
     def build_ctx_periods(self, cr, uid, period_from_id, period_to_id):
+        if period_from_id == period_to_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

_______________________________________________
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