Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
4168 Zobrazení

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šit
Related Posts Odpovědi Zobrazení Aktivita
2
čvc 19
21770
4
bře 16
6577
0
bře 25
1266
0
led 25
3312
2
pro 24
2354