2 In order to check dynamic folder functionality of document + FTP
4 I create two partners 'Partner1' and 'Partner2'.
5 I create three partner categories: 'none', 'pat1' and 'all'
6 I attach Partner1 to pat1, Partner1+Partner2 to 'all'
8 !record {model: res.partner.category, id: tpat_categ_none }:
11 !record {model: res.partner.category, id: tpat_categ_pat1 }:
14 !record {model: res.partner.category, id: tpat_categ_all }:
15 name: 'All Partner1+2'
17 !record {model: res.partner, id: tpartner1 }:
23 !record {model: res.partner, id: tpartner_2 }:
28 I create a resource folder of partners, by the (none, pat1, all)
31 !record {model: document.directory, id: dir_tests2 }:
32 name: Partners Testing
33 parent_id: document.dir_root
35 ressource_type_id: base.model_res_partner_category
38 I commit (because FTP operations are on different transaction)
40 !python {model: document.directory, id: }: |
43 I browse through ftp in the resource folder, checking that three
46 !python {model: ir.attachment}: |
47 from document_ftp import test_easyftp as te
48 ftp = te.get_ftp_folder(cr, uid, self, 'Documents/Partners Testing')
51 assert dirs == [ 'All Partner1+2', 'No partners', 'Pat 1' ]
53 I create a 'partners' folder by the first resource one.
55 I check through FTP that the correct partners are listed at each
58 I create an ir.attachment, attached (not related) to Partner1
61 I check that pat1/Partner1 folder has the file.
62 I check that all/Partner1 folder has the file
64 I place a file at the 'pat1'/Partner1 folder, through FTP
66 I check at the server that the file is attached to Partner1
68 I check that all/Partner1 also has the file
71 I create a 'Partner3' under 'all'