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

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
22378
4
3月 16
6995
3
9月 25
3005
0
3月 25
1651
0
1月 25
3830