openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #04254
[Merge] lp:~openerp-dev/openobject-addons/trunk-bug-735990-ara into lp:openobject-addons
Ashvin Rathod (OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/trunk-bug-735990-ara into lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #735990 in OpenERP Addons: "Con not open account chart from Wizard If we passing fiscal year argument."
https://bugs.launchpad.net/openobject-addons/+bug/735990
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-735990-ara/+merge/53624
Hello,
Fix: Con not open account chart from Wizard If we passing fiscal year argument
Thanks,
ara
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-735990-ara/+merge/53624
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-bug-735990-ara.
=== modified file 'account/wizard/account_chart.py'
--- account/wizard/account_chart.py 2011-02-15 12:13:39 +0000
+++ account/wizard/account_chart.py 2011-03-16 13:09:38 +0000
@@ -83,13 +83,16 @@
result = mod_obj.get_object_reference(cr, uid, 'account', 'action_account_tree')
id = result and result[1] or False
result = act_obj.read(cr, uid, [id], context=context)[0]
+ fiscalyear = data.get('fiscalyear', False) and data['fiscalyear'][0] or False
result['periods'] = []
if data['period_from'] and data['period_to']:
- result['periods'] = period_obj.build_ctx_periods(cr, uid, data['period_from'], data['period_to'])
- result['context'] = str({'fiscalyear': data['fiscalyear'], 'periods': result['periods'], \
+ period_from = data.get('period_from', False) and data['period_from'][0] or False
+ period_to = data.get('period_to', False) and data['period_to'][0] or False
+ result['periods'] = period_obj.build_ctx_periods(cr, uid, period_from, period_to)
+ result['context'] = str({'fiscalyear': fiscalyear, 'periods': result['periods'], \
'state': data['target_move']})
if data['fiscalyear']:
- result['name'] += ':' + fy_obj.read(cr, uid, [data['fiscalyear']], context=context)[0]['code']
+ result['name'] += ':' + fy_obj.read(cr, uid, [fiscalyear], context=context)[0]['code']
return result
_defaults = {
Follow ups