Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I fiddled around with the form view, as I wanted to add a second image to the product basic form.
Therefore, I first created the field:
- Settings - Databse Structure - Models
- searched for product.template
- Edited this model by adding a new field called "x_secondpicture" of type binary
Then, I activated the developer mode and wanted to edit the form view:
- Sales - Products - selected Form View - > "Manage Views"
- Selected "product.template.common.form" and clicked "edit"
- Found the node for the first image and clicked on "+" to insert a new node.
But now, I have two problems:
- For the second field, the widget "image" is not available - in fact no other widget except "manytomanyattendee" is available
- I inadvertently messed around with the original image node, and now I only have a download link available - I can't edit anything anymore.
Who can help?
Could you post your module code to a public repository so that others can take a look? I've been working on another module to add multiple product images to product.template with the help of another developer that may be of interest to you:
If you are trying to add an image directly next to the other image widget on the product.template I think you will need to first check that you have your field inside product.template and then you will need to inherit the product_template_form_view and use xpath to insert your custom field directly after the following line:
<field name="image_medium" widget="image" class="oe_avatar oe_left"/>
I've built a very basic module to achieve what you've described above here:
just do a:
sudo git clone https://github.com/lukebranch/product_images/tree/master
in your /addons folder and install it and you should be good to go.
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 platform 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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 12/10/14, 9:06 AM|
|Seen: 1279 times|
|Last updated: 3/16/15, 8:10 AM|