Review: Needs Fixing

Valencia,

There is still a scope of improvements here.

Here they are:
1. Use only once the expression int(id). The use of int(id) in the domain is 
not necessary, better to say useless.

2. You can always use minimal code by just updating the domain, rest of the 
things would go intact.

dom = [('id', '=', id)]
if obj_model._columns.get('active'):
   dom.append(Your TEST)
ids = obj_model.search(cr, uid, dom, context=context)

This makes the code look cleaner.

Thanks,
Serpent Consulting Services.
-- 
https://code.launchpad.net/~openerp-dev/openobject-server/6.0-opw-51206-vro/+merge/85792
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-server/6.0-opw-51206-vro.

_______________________________________________
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