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.

1

How to disable Edit option on image widget?

By
Hardik Shah
on 2/3/14, 3:10 AM 3,366 views

I want to display the image as readonly on a custom form.

The field is:

<field name="photo" widget='image' options='{"size": [150, 140]}' readonly="1"  />

even after I keep the field as readonly="1" the Edit option appears.

How do I disable the Edit option on image widget?

Hi Hardik, Can you tell me, is this image field a related field like *"fields.related"*, if not then atleast one time you will be updating the image into that field so making it readonly is not useful and although due to image widget it will not become readonly. But If this is a related field than you can go for creating a *"field.function"* for type as *"binary"*, instead of "related" field, which will automatically become a un-editable field. Regards

Hiren Vora - CEO at Emipro Technologies Pvt. Ltd. India
on 7/4/14, 3:08 AM

yes it is bug currenty shows and allows you to click on edit image if it is readonly. it also allows you to select select image but when you will click on save it will not save changes for image as you made it readonly. so you can post issue for that and till solution comes you can go ahed with this readonly=true code;)

Turkesh Patel (tpa)
on 7/4/14, 3:33 AM

hello Hardik shah .. Any solution ,I need the same thing..

Turkesh Patel (tpa)
on 7/4/14, 3:33 AM

this is "fields.binary".

Ashmsh.M
on 7/4/14, 3:56 AM
0

Vasiliy Birukov

--Vasiliy Birukov--
3446
| 6 6 8
Russian Federation
--Vasiliy Birukov--

Help develop and implement any project on base Odoo.

Vasiliy Birukov
On 7/4/14, 10:06 AM

Use CSS for hide.

0
Sergey
On 8/13/14, 2:01 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

3 follower(s)

Stats

Asked: 2/3/14, 3:10 AM
Seen: 3366 times
Last updated: 7/18/15, 6:19 AM