Odoo Help


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.


Custom field for products that can hold multiple cross reference part numbers

Henk Smith
on 4/16/15, 4:28 PM 540 views

I am implementing Odoo for my auto parts store and my products have many part numbers from different manufacturers and suppliers

I need to add a custom field to the product model that will allow me to capture these part numbers. Each product may have many part numbers to be captured

For example, I have a product with internal reference number ALTR00001. This product has cross reference numbers 0124325001 and ALT3260

I would need to add a field that can store these values, linked to the product and be searchable by adding it into the search filters so that I can quickly find products by their cross reference numbers when creating quotes and sales orders

Using advanced search is not a good option as its way too slow and cumbersome

Can anyone help?

Diego Calzadilla
On 4/17/15, 12:29 PM

This is actully possible, have you already some code?  I have developed a similar module.

In general you should try this:

*In product model define a one2many field that allows you to capture as many fields as you like, in this case it would allow you to capture 0124325001 & ALT3260.

*As you need to search this kind of values quickly, you need to inherit product search view and add something like this in xml file:

<field string="New search parameter" name="your_one2manyfield" filter_domain="[('your_one2manyfield.field', 'ilike',self)]"/>

If  you have some code, publilsh it and I can help you.

Hope this help you!!

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

1 follower(s)


Asked: 4/16/15, 4:28 PM
Seen: 540 times
Last updated: 4/17/15, 12:29 PM