Rifakat (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/6.0-opw-18258-rha into
lp:openobject-addons/6.0.
Requested reviews:
Vo Minh Thu (OpenERP) (vmt-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-18258-rha/+merge/80043
Hello,
Corrected calculation for account level. Account level was not altered while
changing the parent of any account.
Kindly review it.
Regards,
Rifakat
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-18258-rha/+merge/80043
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.0-opw-18258-rha.
=== modified file 'account/account.py'
--- account/account.py 2011-10-10 08:50:07 +0000
+++ account/account.py 2011-10-21 10:40:01 +0000
@@ -337,9 +337,10 @@
accounts = self.browse(cr, uid, ids, context=context)
for account in accounts:
level = 0
- if account.parent_id:
- obj = self.browse(cr, uid, account.parent_id.id)
- level = obj.level + 1
+ parent = account.parent_id
+ while parent:
+ level += 1
+ parent = parent.parent_id
res[account.id] = level
return res
_______________________________________________
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