Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
4159 Tampilan

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
Buang
Post Terkait Replies Tampilan Aktivitas
2
Jul 19
21759
4
Mar 16
6575
0
Mar 25
1264
0
Jan 25
3308
2
Des 24
2346