[IMP] edi: yml of edi document
bzr revid: hmo@tinyerp.com-20110711082603-56r1dmtfc2h0lxgt
This commit is contained in:
@@ -0,0 +1,118 @@
|
||||
%PDF-1.3
|
||||
%“Œ‹ž ReportLab Generated PDF document http://www.reportlab.com
|
||||
% 'BasicFonts': class PDFDictionary
|
||||
1 0 obj
|
||||
% The standard fonts dictionary
|
||||
<< /F1 2 0 R
|
||||
/F2 3 0 R
|
||||
/F3 4 0 R >>
|
||||
endobj
|
||||
% 'F1': class PDFType1Font
|
||||
2 0 obj
|
||||
% Font Helvetica
|
||||
<< /BaseFont /Helvetica
|
||||
/Encoding /WinAnsiEncoding
|
||||
/Name /F1
|
||||
/Subtype /Type1
|
||||
/Type /Font >>
|
||||
endobj
|
||||
% 'F2': class PDFType1Font
|
||||
3 0 obj
|
||||
% Font Helvetica-Bold
|
||||
<< /BaseFont /Helvetica-Bold
|
||||
/Encoding /WinAnsiEncoding
|
||||
/Name /F2
|
||||
/Subtype /Type1
|
||||
/Type /Font >>
|
||||
endobj
|
||||
% 'F3': class PDFType1Font
|
||||
4 0 obj
|
||||
% Font Times-Roman
|
||||
<< /BaseFont /Times-Roman
|
||||
/Encoding /WinAnsiEncoding
|
||||
/Name /F3
|
||||
/Subtype /Type1
|
||||
/Type /Font >>
|
||||
endobj
|
||||
% 'Page1': class PDFPage
|
||||
5 0 obj
|
||||
% Page dictionary
|
||||
<< /Contents 9 0 R
|
||||
/MediaBox [ 0
|
||||
0
|
||||
841.8898
|
||||
595.2756 ]
|
||||
/Parent 8 0 R
|
||||
/Resources << /Font 1 0 R
|
||||
/ProcSet [ /PDF
|
||||
/Text
|
||||
/ImageB
|
||||
/ImageC
|
||||
/ImageI ] >>
|
||||
/Rotate 0
|
||||
/Trans << >>
|
||||
/Type /Page >>
|
||||
endobj
|
||||
% 'R6': class PDFCatalog
|
||||
6 0 obj
|
||||
% Document Root
|
||||
<< /Outlines 10 0 R
|
||||
/PageMode /UseNone
|
||||
/Pages 8 0 R
|
||||
/Type /Catalog >>
|
||||
endobj
|
||||
% 'R7': class PDFInfo
|
||||
7 0 obj
|
||||
<< /Author (Generated by OpenERP, Fabien Pinckaers)
|
||||
/CreationDate (20100421145542)
|
||||
/Keywords ()
|
||||
/Producer (ReportLab http://www.reportlab.com)
|
||||
/Subject (\(unspecified\))
|
||||
/Title (Partner) >>
|
||||
endobj
|
||||
% 'R8': class PDFPages
|
||||
8 0 obj
|
||||
% page tree
|
||||
<< /Count 1
|
||||
/Kids [ 5 0 R ]
|
||||
/Type /Pages >>
|
||||
endobj
|
||||
% 'R9': class PDFStream
|
||||
9 0 obj
|
||||
% page stream
|
||||
<< /Filter [ /ASCII85Decode
|
||||
/FlateDecode ]
|
||||
/Length 524 >>
|
||||
stream
|
||||
Gat=(?#P<K'R_@f5MSc<`6.HPV2s@dQRlarfjrE>3i<Y4(hW<qY=/IHPo2nd;U2u=SpPc46=:icfCoF922oN\83q_*El(+<i)0C.\*qSa'orY`+p(cC^oTpn8t,B-+=I?_Q1#SGXQbKWJ5-M7"aXRSQCBTu'NHJF046Jno-.K&2kW+&Ddh9bXc1q%)-e?DSC(5(4%=lk+ql;XaX3m]F#7K:"]hph/QW?(0_J4kXQiP</;'9K=]Wd,jeGe.Ma6pqJ&iD]r%qkNclhVq5Q/gSmK+r&6mr`*Z[m8(n)Usu)MZo%TNta^h'I^g6m5Vp92+>e[>S,B2ME\)S7:@oo6@nF8`I+h##OY3a-n#Qm!>5jiD.9pQ@E1#Xj$=)27)F3RmD%fbqZh,T`gJd0/,?A3`0:_VVm`"l`>oOf9p&HGF7>WCGVJoD2&_+c#BDb)/&0>>rL5@]KY$9YOA<rrt#g)1a61mS([/:0_[`)!ctOhSA/p@bq]>qZHTJq8k]!o+?4a5\-KbB#NYJC'`~>endstream
|
||||
|
||||
endobj
|
||||
% 'R10': class PDFOutlines
|
||||
10 0 obj
|
||||
<< /Count 0
|
||||
/Type /Outlines >>
|
||||
endobj
|
||||
xref
|
||||
0 11
|
||||
0000000000 65535 f
|
||||
0000000113 00000 n
|
||||
0000000233 00000 n
|
||||
0000000398 00000 n
|
||||
0000000573 00000 n
|
||||
0000000740 00000 n
|
||||
0000001017 00000 n
|
||||
0000001152 00000 n
|
||||
0000001395 00000 n
|
||||
0000001500 00000 n
|
||||
0000002169 00000 n
|
||||
trailer
|
||||
<< /ID
|
||||
% ReportLab generated PDF document -- digest (http://www.reportlab.com)
|
||||
[(\210\344\006bE\230CUUi\010[\)Qif) (\210\344\006bE\230CUUi\010[\)Qif)]
|
||||
|
||||
/Info 7 0 R
|
||||
/Root 6 0 R
|
||||
/Size 11 >>
|
||||
startxref
|
||||
2221
|
||||
%%EOF
|
||||
@@ -1,5 +1,5 @@
|
||||
-
|
||||
create partner
|
||||
I create partner
|
||||
-
|
||||
!record {model: res.partner, id: res_partner_test33}:
|
||||
name: Ivan
|
||||
@@ -17,7 +17,7 @@
|
||||
company_id: base.main_company
|
||||
|
||||
-
|
||||
I am creating one Document to be stored in ".
|
||||
I am creating one Document to be attached in partner ".
|
||||
-
|
||||
!record {model: 'ir.attachment', id: document_4}:
|
||||
name : "My partner document"
|
||||
@@ -25,7 +25,7 @@
|
||||
type : binary
|
||||
|
||||
-
|
||||
Attach a pdf file in "My partner document"
|
||||
I attach a pdf file in "My partner document"
|
||||
-
|
||||
!python {model: 'ir.attachment'}: |
|
||||
import addons
|
||||
@@ -34,15 +34,14 @@
|
||||
self.write(cr, uid, [ref("document_4")], {'res_id':ref("res_partner_test33"), 'datas_fname': 'partner.pdf', 'datas' : base64.encodestring(pdf_file.read())}, context)
|
||||
|
||||
-
|
||||
Testing import and export
|
||||
I am Tesing of EDI functionality. so first export partner and than import it again.
|
||||
-
|
||||
|
||||
!python {model: ir.edi.document}: |
|
||||
partner_obj = self.pool.get('res.partner')
|
||||
partners = [partner_obj.browse(cr, uid, ref("res_partner_test33"))]
|
||||
tokens = self.export_edi(cr, uid, partners)
|
||||
for token in tokens:
|
||||
document = self.get_document(cr, uid, token, context=context)
|
||||
print document
|
||||
a = self.import_edi(cr, uid, edi_document = document)
|
||||
assert tokens, 'Token is not generated.'
|
||||
document = self.get_document(cr, uid, tokens[0], context=context)
|
||||
a = self.import_edi(cr, uid, edi_document = document)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user