We are trying to add further domain filtering on the field "product_id" in sale.order.form
Current xml:
<notebook>
<page string="Order Lines">
<field name="order_line" mode="tree,kanban" attrs="{'readonly': [('state', 'in', ('done','cancel'))]}">
<form string="Sales Order Lines">
<group>
<group>
<field name="product_id" context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom, 'company_id': parent.company_id}" attrs="{'readonly': ['|', ('qty_invoiced', '>', 0), ('procurement_ids', '!=', [])]}"/>
We wish to copy the domain filter we use on products view search (product.template.search):
<search string="Product">
<field name="name" string="Product" filter_domain="['|','|','|','|','|',('default_code','ilike',self),('name','ilike',self),('barcode','ilike',self),('product_variant_ids','ilike',self),('description_sale','ilike',self),('sku','ilike',self)]"/>
I have searched the forums, googled, and tested several implementations of syntaxes with no luck.
So please help reviewing how it should be written
Thanks,
Can you make little more clear, how you need to add the domain the for the product field?
We want the field "product_id" to filter on fields: 'default_code', 'name', 'barcode', 'product_variant_ids', 'description_sale, 'sku'.
So this widget will suggest product records where input matches above mentioned fields.
Screenshot: https://drive.google.com/file/d/1DeWWHrvR2xxxrbatFr2ZgKxw9EDy0hJG/view?usp=sharing
Hope it makes it more clear?