2
load all user rights files
4
!python {model: user.access.configurator}: |
5
import addons, base64, logging
7
files = ['user_rights_01_10-lines-removed_all-groups.xml',
8
'user_rights_01_10-lines-removed_no-cashier_no-productManager.xml',
9
'user_rights_01_all-lines_all-groups_misformed_no-header.xml',
10
'user_rights_01_all-lines_all-groups_misformed_only_group_columns.xml',
11
'user_rights_01_all-lines_all-groups.xml',
12
'user_rights_01_all-lines_no-cashier_no-productManager.xml',
13
'user_rights_01_all-lines_no-groups.xml',
14
'user_rights_01_no-lines_all-groups.xml',
15
'user_rights_01_no-lines_no-groups.xml']
17
logging.getLogger('tests').log(logging.TEST, 'We load %s.'%file)
18
wizard_id = self.create(cr, uid, {}, context=context)
20
file_path = addons.get_module_resource('msf_profile','test','user_rights_test_files', file)
21
file = open(file_path, 'r')
22
file64 = base64.b64encode(file.read())
23
self.write(cr, uid, [wizard_id], {'file_to_import_uac': file64}, context=context)
24
self.do_process_uac(cr, uid, [wizard_id], context=context)