I want to filter only company in partner_id field but new domain is not working
<record id="car_to_point_payment_custom" model="ir.ui.view">
<field name="name">account.payment.form</field>
<field name="model">account.payment</field>
<field name="inherit_id" ref="account.view_account_payment_form"/><xpath expr="//field[@name='partner_id']" position="replace">
<field name="partner_id" nolabel="1"
attrs="{'required': [('payment_type', 'in', ('inbound', 'outbound'))], 'invisible': [('payment_type', 'not in', ('inbound', 'outbound'))], 'readonly': [('state', '!=', 'draft')]}"
context="{'default_is_company': True, 'default_supplier': payment_type == 'outbound', 'default_customer': payment_type == 'inbound'}"/>
<!--<attribute name ="domain">"('company_type', '=', 'company')"</attribute>--></xpath>
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
This question has been flagged
try
<attribute name ="domain">[('company_type', '=', 'company')]</attribute>
i tried like this ...
<xpath expr="//field[@name='partner_id']" position="attributes">
<attribute name ="domain">[('company_type', '=', 'company')]</attribute>
But its not working in account.payment model
Try this
[('is_company', '=', 'True')]
Hello,
try
<field name="partner_id" position="attributes">
<attribute name ="domain">[('company_type', '=', 'company')]</attribute>
</field>
No Jagadish,Its not working i tried can u add this domain into ur locally for account.payment model
company_type type field is many2one with res.company object ? or its selection field ?
Company_type is selection field in res.partner object,the default one
In res.partner one filed is there company_type ,I want to add domain based on that field
Try this
<attribute name ="domain">[('partner_id.company_type', '=', 'company')]</attribute>
Tried same but not working
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up