コンテンツへスキップ
メニュー
この質問にフラグが付けられました
4183 ビュー

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

アバター
破棄
関連投稿 返信 ビュー 活動
2
7月 19
21785
4
3月 16
6587
0
3月 25
1279
0
1月 25
3360
2
12月 24
2379