There is product.product and product.template concept in odoo. But in order line, we actually see product.product only which located under Product Variants. But for quite updates, we normally need go to product template to do some stuff. And I see there is no quick button to go to the product template from the variant form. And the messages are totally separated between variant form and template form which cause a lot of inconvenience in practical. Is there anyway to redirect the product variant form directly to the product template or any way to add a related button on the variant form to do that? If there is a module do that, I wish to buy it. Thank you.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project
- MRP
This question has been flagged
HI,
You can easily add a field named product_tmpl_id (already exist in product.product model) in the corresponding view. As it is Many2one field, you can click and open the product template easily. Either you can add the field from the UI to the view or from the code.
To add the field to the view from UI, see this: How To Add custom field from UI Without Code
Thanks
Your approach is working on my situation. Thank you very much! You guys Rock!
Just some further question, is there also product_product_id? Just curious because we can go to the variants pages from product template for multi variant product. But there is no way to reach that for no variant templates. Thank you!
In the product.template model you will have a one2many field name product_variant_ids
On a short form of the product variant (the xml view product.product.view.form.easy) there is sentence "All general settings about this product are managed on the product template". You can click on the part 'product template' to open a related template.
You can add the same link for a rich form:
Turn on the developer mode (settings > activate the developer mode)
Go to a product.product form and in the top right corner click on the 'bug' icon
Choose edit form view
After some field (e.g. after <field name='barcode'/> add <button name="open_product_template" type="object" string="the product template" class="oe_link"/>
Save, refresh a page, and you would have the required button righ on a product variant form
Thank you for you answer. But this method opens a pop up dialog on edit mode which I believe suitable in some certain requirement. But for my situation, Niyas Raphy's answer is more proper. Thank you !
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
2
Aug 23
|
2892 | ||
|
0
Oct 21
|
1286 | ||
|
1
Sep 19
|
4374 | ||
|
1
Feb 25
|
497 | ||
|
2
Jan 24
|
17939 |