Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
4289 Prikazi

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
Opusti
Related Posts Odgovori Prikazi Aktivnost
2
jul. 19
21901
4
mar. 16
6685
0
mar. 25
1419
0
jan. 25
3498
2
dec. 24
2552