Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
4176 Visualizzazioni

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"/>

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
lug 19
21780
4
mar 16
6582
0
mar 25
1277
0
gen 25
3345
2
dic 24
2367