Odoo Help


Problem with readonly

Samba Faye
on 10/24/13, 10:13 AM 968 views

Well, I have issue with the readonly option on a field which I creat like above

<field nam="nam_of_field" readonly="True"/> I fill this field from on_change() of an other one. But when I save my form, the value of my field(the readonly field) is lost. The field is empty. And an empty value is save. What can I do?

can you please post your code along with your question and elaborate in clear?

Abhishek H Menon
on 10/24/13, 10:20 AM

Well, yeah, it's readonly. onchange functions don't store the change in the database, just in the user interface - which disallows changes.

Brett Lehrer
on 10/24/13, 11:35 AM

Use fields.related instead of these it think it may be better than using onchange.

Abhishek H Menon
on 10/25/13, 7:48 AM

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.


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

0 follower(s)


Asked: 10/24/13, 10:13 AM
Seen: 968 times
Last updated: 3/16/15, 8:10 AM