Code review comment for lp:~openerp-dev/openobject-server/6.0-opw-51206-vro

Revision history for this message
Serpent Consulting Services (serpent-consulting-services) wrote :

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.

review: Needs Fixing

« Back to merge proposal