コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
2361 ビュー

Hi everyone, I have a problem on a readonly field in which its value disappears when I am saving a record in odoo 10. Can you help me about this problem? 

アバター
破棄
最善の回答

Hi,

As you are using odoo 10, you have to use an OCA module:  Read Only ByPass


This module changes the behaviour of Odoo by propagating on_change modifications to readonly fields to the backend create and write methods.

To change that behavior you have to set context on ir.actions.act_window:


{'readonly_by_pass': True}

or by telling fields allowed to change:



{'readonly_by_pass': ['readonly_field_1', 'readonly_field_2',]}


On one2many fields, you can also pass the context in the field definition:


From the version 11 and above, we can use force_save="1" along with the field.

アバター
破棄
著作者

Thank you very much for this Niyas Raphy. I appreciated it.

関連投稿 返信 ビュー 活動
3
8月 19
12790
7
7月 19
4754
0
6月 19
3148
0
3月 19
5259
2
9月 18
3186