Hello, I added some extra field on product template. And, now I try to add that on the search procesus using select atribute but that does'nt work.
<field name="caractmat" select="1"/>
<field name="commat" select="1"/>
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello, I added some extra field on product template. And, now I try to add that on the search procesus using select atribute but that does'nt work.
<field name="caractmat" select="1"/>
<field name="commat" select="1"/>
I found the solution. In fact select atributes seems being useless (for what I wanted). For add custom field on search I just modifiy the view of the product_search_form_view
and add the collumn that I wanted.
<record model="ir.ui.view" id="product_search_form_view_inherit">
<field name="name">product.search.form.inherit</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_search_form_view"/>
<field name="type">search</field>
<field name="arch" type="xml">
<field name="name" position="replace">
<field name="name" string="Product" filter_domain="['|', ('name','ilike',self), '|', ('default_code','ilike',self), '|', ('commat','ilike',self), '|', ('caractmat','ilike',self), '|', ('manufacturer','ilike',self), ('description','ilike',self)]"/>
</field>
</field>
</record>
Hi Dimitry,
Thanks for your answer, unfortunately I don't seem to be able to modify this correctly.
I am trying to allow search by vendor SKU/Stock Code to the search view at Sales >> Product which is a custom field (x_vendorsku)
Unfortunately I have tried modifying in debug mode on Sales >> Products >> Edit Searchview by modifiying <field name="name" string="Product" filter_domain="['|',('name','ilike',self),('default_code','ilike',self)]"/> to <field name="name" string="Product" filter_domain="['|',('name','ilike',self),('default_code','ilike',self),('x_vendorsku','ilike',self)]"/>
further to the above comment, this does not seem to work and seems to switch off the search by name or search by default_code functionality. I am new to openerp and am obviously doing something wrong, however I cannot seem to find a post anywhere that explains how to do the above. Any help or input would be much appreciated.
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
RegistrarsePublicaciones relacionadas | Respuestas | Vistas | Actividad | |
---|---|---|---|---|
Remove Search Box on /shop page
Resuelto
|
|
4
nov 23
|
3264 | |
|
1
mar 15
|
5967 | ||
|
2
mar 24
|
1605 | ||
|
0
dic 23
|
1490 | ||
|
1
nov 22
|
2105 |