跳至內容
選單
此問題已被標幟
4171 瀏覽次數

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
21770
4
3月 16
6579
0
3月 25
1268
0
1月 25
3324
2
12月 24
2357