Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ

I'm generating PDF documents from a docx file, the PDF are contracts to new employees.


In the docx file I have fields like employee's name {{NAME}} and ID {{ID}} and so, from that i can now generate thousands of PDF files.

On the Odoo side, I have Sign Documents Module, it works well.


Browsing in this forum I got the code to upload the document and implement to my need:


attachment_vals = [{
'res_model': 'sign.template',
'name': name,
'type': 'binary',
'res_id': 4567,
'mimetype': 'application/pdf',
'store_fname': name,
'datas': document_64
}]
 
doc_id = self.api.execute_kw(database, uid, api_key, 
"ir.attachment", "create", attachment_vals)

can see the PDF file in the Attachment view page (enabled with developer mode) 

How can I access the document from the Sign module.

Thanks.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 8 22
3493
1
thg 4 25
4587
0
thg 12 24
1211
2
thg 8 24
9913
0
thg 12 23
1072