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

Hi all,

It is great if we can make a conditional required or readonly from the python code !

in version 15 the possibility of making a field readonly based on a condition existed !

however on the current version it seem to be replaced ! 

it is possible to make it available or we should put an @api.contraints for every fields ? 

Best regards.

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

Hello Nabil, 

In case of odoo v15 you can check the field_view_get method and based on that apply the conditions. 

For more reference : click here

Thanks,

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

Hi,

thanks for your return.

we can only override write and create method to do manually the conditional required ! ;)



Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 2 19
6027
1
thg 3 15
7132
1
thg 3 15
4296
0
thg 2 21
15
1
thg 10 23
7678