Ir al contenido
Menú
Se marcó esta pregunta
4154 Vistas

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
jul 19
21755
4
mar 16
6575
0
mar 25
1264
0
ene 25
3308
2
dic 24
2346