콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
3428 화면

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.


아바타
취소
작성자

@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!

작성자

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

베스트 답변

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.

아바타
취소
베스트 답변

Hi,

Try the below code

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


Regards

아바타
취소
관련 게시물 답글 화면 활동
0
7월 24
932
1
9월 23
1545
1
6월 23
2671
1
3월 24
3836
0
11월 22
2057