Odoo Help

Welcome!

This community 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.

0

How to add custom search in product form based on some attribute name of products?

By
Odoo
on 2/23/15, 9:19 PM 407 views

I  need a custom search in product form based on some attribute name of products

Suppose My Product name is Apple black ABC 12345 .I know only some attributes from the products like black ABC .When I enter  black ABC  in the product search view it should shown related product wl shown based on my attribute name(black ABC,).How to create  a custom Search for this task

This is my code-----------

 <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>

0

deep

--deep--
1617
| 5 4 7
Bengaluru, India
--deep--

Techno-Functional Associate with 6+ years of experience in Odoo (formerly known as OpenERP).

deep
On 2/24/15, 12:25 AM

In Py class.. write a orm method called "name_search", in that you achieve the search however you want...

Refer for such methods in Standard objects, like res_partner etc..

can you give one example..

Odoo
on 2/24/15, 12:27 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 2/23/15, 9:19 PM
Seen: 407 times
Last updated: 3/16/15, 8:10 AM