Saurang Suthar(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-bug-1018591-ssu into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #1018591 in OpenERP Addons: "Aged Partner Balance Report chooses FY for
wrong company"
https://bugs.launchpad.net/openobject-addons/+bug/1018591
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1018591-ssu/+merge/133665
Hello,
I have fixed the issue of Aged Partner Balance Report chooses FY for wrong
company and gives Validation Error.
Kindly review it.
Thank you.
Saurang Suthar
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1018591-ssu/+merge/133665
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-bug-1018591-ssu.
=== modified file 'account/wizard/account_report_common.py'
--- account/wizard/account_report_common.py 2012-08-20 11:10:00 +0000
+++ account/wizard/account_report_common.py 2012-11-09 12:49:28 +0000
@@ -119,7 +119,11 @@
def _get_fiscalyear(self, cr, uid, context=None):
now = time.strftime('%Y-%m-%d')
- fiscalyears = self.pool.get('account.fiscalyear').search(cr, uid, [('date_start', '<', now), ('date_stop', '>', now)], limit=1 )
+ company_id = None
+ ids = context.get('active_ids', [])
+ for wiz in self.browse(cr, uid, ids, context=context):
+ company_id = wiz.company_id
+ fiscalyears = self.pool.get('account.fiscalyear').search(cr, uid, [('date_start', '<', now), ('date_stop', '>', now), ('company_id', '=', company_id)], limit=1 )
return fiscalyears and fiscalyears[0] or False
def _get_all_journal(self, cr, uid, context=None):
_______________________________________________
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