Odoo Help


How can i browse this m2m record?

David Arnold
on 6/24/14, 11:20 AM 1,029 views


results the name of the attribute_use_id of the first property_fiscal_attribute of the company.partner_id


How can I get a [] of the IDs of property_fiscal_attribute where attribute_use_id.name = "foo" ?




result in an error `'record_browse_list' has no attribute 'browse'` - can anyone help out? Thanks


Hello to India Thank you for your help! I think this is almost it, as python complains that attribute_use_id is not aglobal variable... How to make python understand that it is bound to the property_fiscal_attribute?

David Arnold
on 6/24/14, 12:35 PM

either you edited, or i din't see it: "x.attribute_use_id.name" :-D Thanks!

David Arnold
on 6/24/14, 12:38 PM

Serpent Consulting Services Pvt. Ltd.

--Serpent Consulting Services Pvt. Ltd.--
Serpent Consulting Services Pvt. Ltd.
| 6 6 8
Gandhinagar, India
--Serpent Consulting Services Pvt. Ltd.--

Serpent Consulting Services Pvt. Ltd. Your Odoo/OpenERP Solution, just an email away!

Serpent Consulting Services Pvt. Ltd.
On 6/24/14, 12:11 PM


You should do this kind of smart code!

res = [x.id for x in company.partner_id.property_fiscal_attribute if x.attribute_use_id.name == 'foo']

If res has some value, it means there is a record which matches foo, [] otherwise.

This should help.



David Arnold
On 6/24/14, 12:42 PM

Thank you! Saved my sanity for today ;-)

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 6/24/14, 11:20 AM
Seen: 1029 times
Last updated: 3/16/15, 8:10 AM