This question has been flagged
1 Reply
4691 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?

Avatar
Discard
Best Answer

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



Avatar
Discard