[FIX]: document: Fixed error in document yaml
bzr revid: rpa@tinyerp.com-20100713095006-6wii7got8r4jszf1
This commit is contained in:
parent
ccaa55e712
commit
723c5df587
|
@ -45,8 +45,9 @@
|
|||
-
|
||||
Attach a pdf file in "My document"
|
||||
-
|
||||
!python {model: ir.attachment}: |
|
||||
!python {model: 'ir.attachment'}: |
|
||||
import tools
|
||||
import base64
|
||||
file = open(tools.config['addons_path'] + '/document/test/partner.pdf')
|
||||
id = self.write(cr, uid, [ref("document_1")], {'datas' : base64.encodestring(file.read())}, context)
|
||||
pdf_file = open(tools.config['addons_path'] + '/document/test/partner.pdf')
|
||||
self.write(cr, uid, [ref("document_1")], {'datas_fname': 'partner.pdf', 'datas' : base64.encodestring(pdf_file.read())}, context)
|
||||
|
||||
|
|
Loading…
Reference in New Issue