Skip to Content
Menu
This question has been flagged

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
Discard
Related Posts Replies Views Activity
2
Jul 19
20136
4
Mar 16
5887
2
Dec 24
440
1
Aug 23
12546
1
Aug 23
11040