Hi, I have inherited res.partner in my python code and added a boolean field called is_investor, which tells us that the partner is an 'investor'.
In XML in base.view_partner_tree, which displays all the types of partners, I want to display only those records for whom is_investor is true.
I tried to add a domain like "[('is_investor', '=', True)]" to the 'display_name' field but it didn't work because Odoo is still taking the original parent view definition.
Here is my code:
<record id="base_view_partner_tree" model="ir.ui.view">
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_tree"/>
<field name="arch" type="xml">
<field name="display_name" domain="[('is_investor', '=', True)]"/>
</field>
</record>
Despite this code, it is still showing me all of the partners including customers, suppliers, etc. I only want to see investors in this Tree view.
Can someone tell me how to add this domain successfully?