Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
7740 Ansichten

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

Avatar
Verwerfen
Beste Antwort

Try this in your field

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

Avatar
Verwerfen
Autor

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.

Verknüpfte Beiträge Antworten Ansichten Aktivität
1
März 15
8413
2
Mai 16
17136
2
Juni 15
5586
5
März 15
9850
3
März 15
20745