تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3257 أدوات العرض

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?

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

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