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.
This domain probelm in a function not in view.
domain_before=(('type', '=', 'purchase')) is there, i want to append one more domain domain_append_1=('type','=','general') with "|" operator using domain.append() function.
Purchase Order xml file override and add your domain and also python init file add depends purchase module.
<record model="ir.ui.view" id="purchase_order_domin_form">
<field name="inherit_id" ref="purchase.purchase_order_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='pricelist_id']" position="replace">
<field domain="['|',('type','=','purchase'),('type','=','general')]" name="pricelist_id" groups="product.group_purchase_pricelist" on_change="onchange_pricelist(pricelist_id, context)"/>
You can override search method of your target model. Then you can save existing target domain, remove from domain list. You need to delete because string '|' need to append in the begining of domain list. Append string '|' in domain list. After this you can append your desired domain tuple and the existing one sequentially.
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: 7/23/14, 7:03 AM|
|Seen: 1598 times|
|Last updated: 3/16/15, 8:10 AM|