python - OpenERP - NotImplementedError on evaluating result of object.browse(...) -


i'm browsing records, perform specific code if browsing return results.

here code :

sub = self.pool.get('subscription.subscription').search(cr,uid,[('partner_id','=',partner.id),('active','=',true)]) if sub:     mtp.send_mail(cr, uid, level.email_template_id.id, partner.id, context=ctx) 

but not work, when evaluating if condition, exception raised :

notimplementederror: iteration not allowed on browse_record(res.partner, 15918) 

i don't understand, because i'm not iterating on result checking if result exist, neither calling __iter__ method.

thank help

cheers

in general cases problem invoking browse method 1 id, not list of ids, return value 1 record, not list of records, not iterable.


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -