Review: Needs Fixing

Please fix the browse inside the loop.  account.parent_id is *already* a browse 
record, so you don't need to call again browse on its id!  You can access its 
fields directly.

This does the right job:

    parent = account.parent_id
    while parent:
        level += 1
        parent = parent.parent_id

Please fix,
Raphael

-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-783670-mtr/+merge/64800
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-783670-mtr.

_______________________________________________
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

Reply via email to