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

Managing 2 references for a product

By
Kibong Moon
on 12/9/14, 1:37 AM 466 views

Is there any way to keep 2 references for a single product?

The use case is like this:

1. A company have managed product numbers to identify products.

2. At some point of time, that company changed the numbering system.

3. However, still many customers request quotation based on the old numbers.

4. Internally the company manages product inventory, purchase, etc. based on new numbers.

5. So we need to keep old and new numbers as references for product at the same time.

If it is supported out of the box by Odoo, can you provide instruction on how to?

If it's not, then how much effor would be needed and can you provide a overall explanation on how to implement it?

Thanks in advance.

Regards,

Kibong.

0

Atchuthan - Technical Consultant, Sodexis Inc

--Atchuthan - Technical Consultant, Sodexis Inc--
3883
| 5 3 8
Puducherry, India
--Atchuthan - Technical Consultant, Sodexis Inc--
Passionate coder in Python/Odoo(formerly known as OpenERP).

Contact me via GMail: atchuthantu@gmail.com via Skype: atchuthan_skype
via Linkedin: http://in.linkedin.com/in/atchuthantu
Atchuthan - Technical Consultant, Sodexis Inc
On 12/9/14, 2:16 AM

Try these steps

1. Add a new field 'old_code' or something.
2. Change name_get and name_search function of product.product with old_code also.
3. Show field in TREE view of products
4. Modify search view for product name.
        <record model="ir.ui.view" id="product_product_search_form_view_inherit">
            <field name="model">product.product</field>
            <field name="inherit_id" ref="product.product_search_form_view" />
            <field name="arch" type="xml">
                <field name="name" position="replace">
                    <field name="name" string="Product"
                        filter_domain="['|','|',('name','ilike',self),('default_code','ilike',self),('old_code','ilike',self)]" />
                </field>
            </field>
        </record>

0
Kibong Moon
On 12/9/14, 3:56 AM

Thanks a lot, Atchunthan!

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)

Stats

Asked: 12/9/14, 1:37 AM
Seen: 466 times
Last updated: 3/16/15, 8:10 AM