Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
4470 Widoki

I try to insert a call sign before the entered text. if I enter a text in the field after saving! are displayed

def _warnings(self, cr, uid, context=None):

mytext = textwrap.dedent('warning')

wrapped = textwrap.fill(mytext)

result = textwrap.indent(wrapped, '! ')

return result


'warning': fields.char(compute='_warnings',readonly=True, states={'Draft': [('readonly', False)]}),
---------------------
XML

<tree string='Test'>

<field name="warning"/>

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
lip 19
22202
4
mar 16
6865
3
wrz 25
2860
0
mar 25
1578
0
sty 25
3721