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.
« Back to merge proposal
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)] _columns. get('active' ): search( cr, uid, dom, context=context)
if obj_model.
dom.append(Your TEST)
ids = obj_model.
This makes the code look cleaner.
Thanks,
Serpent Consulting Services.