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

Product Code in Product Creation

By
Sansal Birbas
on 11/30/14, 10:21 AM 855 views

Hi Friends

I want to have a product code component in addition to default components on the interface of product creation view. For this purpose, first i created a field `x_product_code` both in product.template and in product.product. Then i tried to add this field to the view `product.template.common.form`. But I did not achieve my goal. I also want this `product code` option to appear in sales order creation view.

Could you help me with this please?

It would help if you can clarify what do you mean by "But I did not achieve my goal." How does it now achieve your goal, are there any error? Also, I doubt that "product.template.common.form" view is used anywhere. Also, you need to clarify where you want "this `product code` option to appear in sales order creation view". Assuming that you want it to appear in the sale.order.line (which is the only option I can think of), you need to define a related field in the sale.order.line, change related the view to display that field, implement on_change mechanism on product_id field of sale.order.line if you want the field to change value as product_id is changed. If you don't implement the on_change mechanism, the value will be correct after it is saved.

Ivan
on 11/30/14, 10:31 PM


Well, Mr.Doe. You are right about making it clear. I want to have another field when i want to create a product. I mean, when i go to products page in sales module and click "create" on that page, there comes a product creation interface. Normally there we can find product name, can be sold, can be expensed, etc options. I want to add a new component to that interface. It will be used to enter product code information. When i go to devrloper mode and when i click the manage views i see several views related to that interface. I discovered product.template.common.form contains the default components. Then first by creating a product code field, i wanted to add that field to that view. But i could not manage to add it to the interface the way i wanted. Maybe it would be better to put it just below the product name component. Also, i want to see this new product code field to be appeared in sale.order.line just the way you mentioned. So i can add a product by its product code . Thanks


1 Ara 2014 Pts 07:31 tarihinde John Doe <niecw@mail.odoo.com> şunu yazdı:

It would help if you can clarify what do you mean by "But I did not achieve my goal." How does it now achieve your goal, are there any error? Also, I doubt that "product.template.common.form" view is used anywhere. Also, you need to clarify where you want "this `product code` option to appear in sales order creation view". Assuming that you want it to appear in the sale.order.line (which is the only option I can think of), you need to define a related field in the sale.order.line, change related the view to display that field, implement on_change mechanism on product_id field of sale.order.line if you want the field to change value as product_id is changed. If you don't implement the on_change mechanism, the value will be correct after it is saved.

--
John Doe
Sent by Odoo Inc. using Odoo about Forum Post Product Code in Product Creation
Sansal Birbas
on 12/1/14, 1:49 AM


Well, Mr.Doe. You are right about making it clear. I want to have another field when i want to create a product. I mean, when i go to products page in sales module and click "create" on that page, there comes a product creation interface. Normally there we can find product name, can be sold, can be expensed, etc options. I want to add a new component to that interface. It will be used to enter product code information. When i go to devrloper mode and when i click the manage views i see several views related to that interface. I discovered product.template.common.form contains the default components. Then first by creating a product code field, i wanted to add that field to that view. But i could not manage to add it to the interface the way i wanted. Maybe it would be better to put it just below the product name component. Also, i want to see this new product code field to be appeared in sale.order.line just the way you mentioned. So i can add a product by its product code . Thanks


1 Ara 2014 Pts 08:49 tarihinde fourgaver6513 <fourgaver6513@rhyta.com> şunu yazdı:

A new answer for Product Code in Product Creation has been posted. Click here to access the post.

--
fourgaver6513
Sent by Odoo S.A. using Odoo about Forum Post Product Code in Product Creation
Sansal Birbas
on 12/1/14, 1:49 AM


Well, Mr.Doe. You are right about making it clear. I want to have another field when i want to create a product. I mean, when i go to products page in sales module and click "create" on that page, there comes a product creation interface. Normally there we can find product name, can be sold, can be expensed, etc options. I want to add a new component to that interface. It will be used to enter product code information. When i go to devrloper mode and when i click the manage views i see several views related to that interface. I discovered product.template.common.form contains the default components. Then first by creating a product code field, i wanted to add that field to that view. But i could not manage to add it to the interface the way i wanted. Maybe it would be better to put it just below the product name component. Also, i want to see this new product code field to be appeared in sale.order.line just the way you mentioned. So i can add a product by its product code . Thanks


1 Ara 2014 Pts 08:50 tarihinde tengifiricent1937 <tengifiricent1937@gustr.com> şunu yazdı:

A new answer for Product Code in Product Creation has been posted. Click here to access the post.

--
tengifiricent1937
Sent by Odoo S.A. using Odoo about Forum Post Product Code in Product Creation
Sansal Birbas
on 12/1/14, 1:49 AM

If you go to Sales >> Products >> Products menu and open one of the product in form view, activate developer mode, and select Edit Form View from the developer mode's drop down, you'll see that the form used is product.product_normal_form_view. Maybe you can try inheriting that form first?

Ivan
on 12/1/14, 2:44 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: 11/30/14, 10:21 AM
Seen: 855 times
Last updated: 3/16/15, 8:10 AM