openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #04633
[Merge] lp:~openerp-dev/openobject-addons/trunk-bug-728417-ara into lp:openobject-addons
Ashvin Rathod (OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/trunk-bug-728417-ara into lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #728417 in OpenERP Addons: "[6.0.1] Exception raised when setting an Account InActive"
https://bugs.launchpad.net/openobject-addons/+bug/728417
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-728417-ara/+merge/54839
Hello,
Fix:#728417 Exception raised when setting an Account InActive
Thanks,
ara
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-728417-ara/+merge/54839
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-bug-728417-ara.
=== modified file 'account/account.py'
--- account/account.py 2011-03-17 17:33:16 +0000
+++ account/account.py 2011-03-25 10:30:57 +0000
@@ -249,6 +249,7 @@
children_and_consolidated = self._get_children_and_consol(cr, uid, ids, context=context)
#compute for each account the balance/debit/credit from the move lines
accounts = {}
+ res = {}
if children_and_consolidated:
aml_query = self.pool.get('account.move.line')._query_get(cr, uid, context=context)
@@ -305,11 +306,13 @@
sums[current.id][fn] += sums[child.id][fn]
else:
sums[current.id][fn] += currency_obj.compute(cr, uid, child.company_id.currency_id.id, current.company_id.currency_id.id, sums[child.id][fn], context=context)
- res = {}
null_result = dict((fn, 0.0) for fn in field_names)
for id in ids:
res[id] = sums.get(id, null_result)
- return res
+ else:
+ for id in ids:
+ res[id] = 0.0
+ return res
def _get_company_currency(self, cr, uid, ids, field_name, arg, context=None):
result = {}
Follow ups