Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
How do I get res_partner to only show me customers and not everything under res_partner?
From a tutorial it said to add this: domain = "[("customers", "=", True)]" to <field name = "res_partner_id" />
eg: field name = "res_partner_id" domain = "[("customers", "=", True)]" />, this doesn't work. It there another syntax I should be using?
In a many2one field, you could restrict the records shown by using domain in Odoo.
<field name="partner_id" domain="[('customer','=',True)]" >
A similar case has been handled in Sales order, you could check the code in sale module.
First enable debug mode. Go to -> Sale -> Customers -> Sale & Purchase tab -> Customer. Find the technical name of customer field. Your field name in domain is wrong. You will not get any error due to the wrong name in the domain.
Technically the domain will be applied with a wrong name in it for the particular field "res_partner_id". You can view the applied domain in debug mode.
domain = "[("customer", "=", True)]"
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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 4/24/15, 5:38 AM|
|Seen: 1468 times|
|Last updated: 5/6/15, 2:50 AM|