Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
3405 มุมมอง

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ต.ค. 23
2098
dynamic template for list views แก้ไขแล้ว
2
ก.ย. 23
15018
1
มี.ค. 15
8504
2
มี.ค. 15
31067
1
มี.ค. 15
12125