[FIX] account: method build_ctx_periods returns more periods than those asked when both period are the same

lp bug: https://launchpad.net/bugs/922957 fixed

bzr revid: rco@openerp.com-20120208094735-vh2lnba79da9kn92
This commit is contained in:
Raphael Collet 2012-02-08 10:47:35 +01:00
parent 6fd7e2ce47
commit 37da83d9a8
1 changed files with 2 additions and 0 deletions

View File

@ -1078,6 +1078,8 @@ class account_period(osv.osv):
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