Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
4172 Visualizações

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
2
jul. 19
21771
4
mar. 16
6580
0
mar. 25
1268
0
jan. 25
3326
2
dez. 24
2359