Skip to Content
Menu
This question has been flagged
3 Replies
10137 Views

In Sales->Product  module I need to make one field as the custom searchable.

where to edit & need any tags or configurations to do?


Hi Dep how to use the given configuration and where to use those tags to make the custom field serchable 


How should I inherit the product search view and add the custom filed which I want? 

Avatar
Discard

How to inherit the product search view and add the custom filed which we want ?

Best Answer

<record id="product_template_search_custom_view" model="ir.ui.view">
            <field name="name">product.template.customsearch</field>
            <field name="model">product.template</field>
             <field name="inherit_id" ref="product.product_template_search_view"/>
             <field name="arch" type="xml">
             
             
              <xpath expr="/search/field[@name='name']" position="before">
                
               <field name="ean13" string="EAN 13 Baarcode" domain="[('sale_ok','=',1)]"/>
                  <field name="attribute_ield"/> #how to add that search
                 
             </xpath>
             
             
             
            </field>
        </record>

Avatar
Discard
Best Answer

Hello Sudarsan,

I think you should inherit the product search view and add the custom filed which you want.

Or 

You can go to search view > Advanced Search > select the field > give the value and press the Apply button.

Hope this helpful for you

Thanks & Regards

Ankit H Gandhi

Avatar
Discard