summaryrefslogtreecommitdiff
path: root/addons/document/test/document_test.yml
diff options
context:
space:
mode:
authorAntony Lesuisse <al@openerp.com>2015-07-12 02:22:21 +0200
committerAntony Lesuisse <al@openerp.com>2015-07-12 13:52:08 +0200
commit3ced0ff61bd5b48e8846c30dc8a972a81f1688f4 (patch)
tree5524dbb7827510a23fc19b345a031b342070cbe9 /addons/document/test/document_test.yml
parent81bf724c244c22b702fa0caa5b3740254ea719e3 (diff)
[REM] document directories
Keeping the attachments widget on form views and document indexation (currently limited to pdf/odt).
Diffstat (limited to 'addons/document/test/document_test.yml')
-rw-r--r--addons/document/test/document_test.yml50
1 files changed, 0 insertions, 50 deletions
diff --git a/addons/document/test/document_test.yml b/addons/document/test/document_test.yml
deleted file mode 100644
index 75fa74548d0..00000000000
--- a/addons/document/test/document_test.yml
+++ /dev/null
@@ -1,50 +0,0 @@
-- |
- In order to test the Document Management System In OpenERP.
--
- In order to test behaviour of resource Directory I will make one resource Directory "Partner Labels" in OpenERP having type "Other Resources" and Directory mapped to object "Partner"
--
- !record {model: 'document.directory', id: dir_partner_label}:
- name : "Partner Labels"
- type : ressource
- content_ids:
- - name: "Label"
- report_id : base.res_partner_address_report
--
- Assign "res.partner" object to ressource_type_id.
--
- !python {model: document.directory}: |
- ids = self.pool.get('ir.model').search(cr, uid, [('model','=','res.partner')])
- id = self.write(cr, uid, [ref("dir_partner_label")], {'ressource_type_id' : ids[0]}, context)
--
- In order to check static directory in OpenERP which is the real directory just like system's local folders,
- First I create a directory in OpenERP named "Directory 1" with type as "Static Directory"
--
- !record {model: 'document.directory', id: directory_1}:
- name : "Directory 1"
- type : directory
--
- In order to make a directory hierarchy in OpenERP I will make other static directory "Directory 2" and I put its Parent Item as "Directory 1",
- So I can see the directory hierarchy in OpenERP's client like :- Directory1 -> Directory2
--
- !record {model: 'document.directory', id: directory_2}:
- name : "Directory 2"
- type : directory
- parent_id : directory_1
--
- I am create a one Document Attachment name "My document" and select "Directory 2" as its Directory,
- And in order to put a File content.
--
- When I am creating the document then "Resource Title" is filled automatic with "My document".
--
- !record {model: 'ir.attachment', id: document_1}:
- name : "My document"
- parent_id : directory_2
--
- Attach a pdf file in "My document"
--
- !python {model: 'ir.attachment'}: |
- import tools
- import base64
- 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)
-