Skip to Content
Menu
This question has been flagged
4180 Zobrazenia

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
Zrušiť
Related Posts Replies Zobrazenia Aktivita
2
júl 19
21783
4
mar 16
6585
0
mar 25
1278
0
jan 25
3353
2
dec 24
2371