跳至內容
選單
此問題已被標幟
1 回覆
3409 瀏覽次數

Is it possible to enable duplication in a tree view? The documentation currently says 'duplicate="1"' only works on form views... Is this possible for tree views as well?

If yes, how?

If no, why isn't this possible? This is such a basic, and in my opinion common, operation...

頭像
捨棄
最佳答案

Hi,

BY default this is not possible in tree view, but you can achieve it using the help of a server action, which calls the copy function.

Create a server action named Copy for your model and that executes python code, add the below code into it and create a contextual action using it.

for record in records:
     record.copy()

Thanks

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
10月 23
2098
2
9月 23
15020
1
3月 15
8504
2
3月 15
31070
1
3月 15
12127