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

Hi folks,

In v7, the context of a list view being edited inline, (with editable="bottom" or "top"), I'm looking for a way to manipulate the visibility of a field based on the state of the field: attrs="{'invisible':[('context.set_editable','=',True)]}" but example above crashes with unknown field error.

Is there a variable holding the state of the list view telling wether it is editing or browsing ?

Thanks for your time, Nicolas

アバター
破棄
最善の回答

Try this in your field

invisible="context.get('set_editable',False)"

アバター
破棄
著作者

Thanks, I just tried but there doesn't seem to be the 'set_editable' key in the context at this level (in the column). pity, it looked adequate..

According to .../addons/web/doc/list_view.rst this setting will only tell if the list is editable, not if it's currently being edited.

関連投稿 返信 ビュー 活動
1
3月 15
8420
2
5月 16
17139
2
6月 15
5607
5
3月 15
9853
3
3月 15
20752