İçereği Atla
Menü
This question has been flagged
2 Cevaplar
3421 Görünümler

Hey everyone. I'm wondering if there is a way to copy an existing Quality Worksheet Template's design. 

I have already created a server action "Duplicate" for the Worksheet Template model, but haven't written any Python code for it yet. I want to write code that will copy an existing worksheet template's design so that I can reuse its layout but tweak minor things, without having to create the whole template design from scratch. Thanks for your time to help.


Avatar
Vazgeç
Üretici

@Cybrosys Hey, thanks for the reply. Unfortunately this doesn't copy the design template, but rather creates copies of all the quality worksheet templates with blank design templates

Hi,

have you made any progress on this matter @Kristo? I need the same feature and would very much appreciate any help.

Thanks!

Üretici

No Markus, this was a dead end. I haven't explored the matter further, but you might be able to achieve it by copy/pasting the xml data of the worksheet.

I will need more details around this, but for those who really need it, feel free to contact me in order to develop it

Best Answer

Sadly I have not enough karma to "comment". So I'll just have to answer here.
I have tried some inheritance stuff, using the same model as the Worksheet i want to duplicate, without any success. 
It somehow overwrote the already existing worksheet. @Axel what is the best way to contact you? I would be very interested in this feature.

Avatar
Vazgeç
Best Answer

Hi,

Try the below code

rec = env['worksheet.template'].sudo().search([])
for i in rec:
    i.copy()


Regards

Avatar
Vazgeç
Related Posts Cevaplar Görünümler Aktivite
0
Tem 24
890
1
Eyl 23
1516
1
Haz 23
2643
1
Mar 24
3797
0
Kas 22
2028