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

In a website view we used the attribute t-field to print the value of one field to format the value (so we won't use t-esc or something else). For example:

 <span t-field="o.somefloatvalue" />

If you click at the top on edit and change this value then the value is changed in the webpage/view and also in the record itself (which we don't want!!!).

Is it possible to disable the editing of such values in the frontend editor?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Give attribute contentEditable = "False" to element. for example : <span contentEditable="False" t-field="o.somefloatvalue"/>, now your field cannot be edited.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 7 23
30451
1
thg 11 23
3108
1
thg 4 22
6899
0
thg 7 15
4154
1
thg 11 15
10089