Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
4182 Переглядів

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"/>

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
2
лип. 19
21784
4
бер. 16
6585
0
бер. 25
1278
0
січ. 25
3356
Line Spacing in Odoo 17 Вирішено
2
груд. 24
2377