Odoo Help

0

I have a problem with creating an image on a view

By
Tarek Mohamed Ibrahim
on 2/22/16, 4:23 AM 404 views

I created a class with an image field

        'image': fields.binary("Image",),

I added the "image" widget on the xml view file

   <field name="image" widget='image' class="oe_avatar oe_left" options='{"preview_image": "image_medium"}'/>

The image placeholder appeared successfully on the view when I upgraded the module, but when I select an image and save the screen nothing is saved, what is missing?, pls help


 

0

Ahmed M.Elmubarak

--Ahmed M.Elmubarak--
--Ahmed M.Elmubarak--


Ahmed M.Elmubarak
On 2/22/16, 7:00 AM

Hello,

I think this because you're using options='{"preview_image": image_medium"}'. and you don't have this field 'image_medium' you can check this lines 


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

Question tools

1 follower(s)

Stats

Asked: 2/22/16, 4:23 AM
Seen: 404 times
Last updated: 2/22/16, 7:00 AM