Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
4215 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 7 19
21827
4
thg 3 16
6643
0
thg 3 25
1336
0
thg 1 25
3427
2
thg 12 24
2447