Se rendre au contenu
Menu
Cette question a été signalée

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
Ignorer
Publications associées Réponses Vues Activité
2
juil. 19
21770
4
mars 16
6579
0
mars 25
1268
0
janv. 25
3324
2
déc. 24
2357