تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
1518 أدوات العرض

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.

الصورة الرمزية
إهمال
أفضل إجابة

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,

الصورة الرمزية
إهمال
الكاتب أفضل إجابة

Hi,

thanks for your return.

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



الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
فبراير 19
6036
1
مارس 15
7142
1
مارس 15
4323
0
فبراير 21
15
1
أكتوبر 23
7696