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

Hey everyone, 

I have this One2many field displayed as a tree view, and I want to prevent creation and deletion of rows conditionally, but also leave the existing rows editable, so 'readonly' wont work for me.

I tried attrs="{'create': [('order_type', '!=', 'renewal)]}" same for delete, but it did not work, 

is it possible to do that form xml, without having to write some JS code ? 

thank you in advance!

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

found the solution on stackoverflow
\https://stackoverflow.com/questions/63071176/prevent-create-and-delete-on-a-one2many-tree-view/63075724#63075724

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
سبتمبر 22
2186
4
مايو 18
11115
4
يناير 18
3487
4
ديسمبر 23
17678
1
سبتمبر 16
7398