Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
8589 Näkymät

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!

Avatar
Hylkää
Tekijä Paras vastaus

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

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
syysk. 22
2313
4
toukok. 18
11255
4
tammik. 18
3691
4
jouluk. 23
17816
1
syysk. 16
7504