Merge branch 'master' of git:~/gitrepos/cam-template
						commit
						f322e9da5b
					
				|  | @ -8,7 +8,7 @@ db_port = 5436 | ||||||
| db_user = False | db_user = False | ||||||
| db_password = False | db_password = False | ||||||
| 
 | 
 | ||||||
| addons_path = odoo/addons,ext/addons | addons_path = ext/odoo/addons,ext/custom-addons | ||||||
| timezone = Europe/Brussels | timezone = Europe/Brussels | ||||||
| 
 | 
 | ||||||
| dbfilter_test = ['.*',] | dbfilter_test = ['.*',] | ||||||
|  | @ -31,7 +31,7 @@ class res_company(osv.osv): | ||||||
|     def get_image(self, img): |     def get_image(self, img): | ||||||
|          |          | ||||||
|         def _get_dir(): |         def _get_dir(): | ||||||
|             styles_dir = 'pittoresk_reports/static/src/img' |             styles_dir = 'cam_custom/static/src/img' | ||||||
|             adps = addons.module.ad_paths         |             adps = addons.module.ad_paths         | ||||||
|             for adp in adps: |             for adp in adps: | ||||||
|                 dir = os.path.join(adp, styles_dir) |                 dir = os.path.join(adp, styles_dir) | ||||||
|  | @ -53,3 +53,24 @@ class res_company(osv.osv): | ||||||
|         fname = os.path.join(path, img)  |         fname = os.path.join(path, img)  | ||||||
|         img_data = _get_file_data(fname) |         img_data = _get_file_data(fname) | ||||||
|         return img_data |         return img_data | ||||||
|  |      | ||||||
|  |     def _get_rml_header(self, cr, uid, ids, _field_name, _args, context=None): | ||||||
|  |         result = dict.fromkeys(ids, False) | ||||||
|  |         # Get filename | ||||||
|  |         dirname = 'cam_reports/report' | ||||||
|  |         adps = addons.module.ad_paths         | ||||||
|  |         for adp in adps: | ||||||
|  |             dir = os.path.join(adp, dirname) | ||||||
|  |             if os.path.isdir(dir): | ||||||
|  |                 break | ||||||
|  |          | ||||||
|  |         if os.path.isdir(dir): | ||||||
|  |             filename = os.path.join(dir, 'page.rml')  | ||||||
|  |             f = open(filename , 'rb') | ||||||
|  |             data = f.read() | ||||||
|  |             result = dict.fromkeys(ids, data) | ||||||
|  |         return result | ||||||
|  |      | ||||||
|  |     _columns = { | ||||||
|  |         'rml_header': fields.function(_get_rml_header, type='text', string='RML Header'), | ||||||
|  |     }       | ||||||
|  | @ -71,6 +71,12 @@ def main(): | ||||||
|             'update_module',         |             'update_module',         | ||||||
|         ]  |         ]  | ||||||
| 
 | 
 | ||||||
|  |     if cmd == 'update_modules': | ||||||
|  |         methods = [ | ||||||
|  |             'login', | ||||||
|  |             'update_modules',      | ||||||
|  |         ]   | ||||||
|  |        | ||||||
| 
 | 
 | ||||||
|     if not methods: |     if not methods: | ||||||
|         _usage() |         _usage() | ||||||
|  |  | ||||||
|  | @ -11,18 +11,18 @@ class Config(): | ||||||
|          |          | ||||||
|         self.company_data = { |         self.company_data = { | ||||||
|             'name': 'Camadeus GmbH', |             'name': 'Camadeus GmbH', | ||||||
|             'street': 'Kriehubergasse 16', |             'street': 'Seeböckgasse 39', | ||||||
|             'street2': False, |             'street2': False, | ||||||
|             'city': 'Wien', |             'city': 'Wien', | ||||||
|             'zip': '1050', |             'zip': 'A-1160', | ||||||
|             'phone': '+43 1 78910 96 70', |             'phone': '+43 (0)1 486 36 49', | ||||||
|             'fax': False, |             'fax': False, | ||||||
|             'email': 'office@camadeus.at', |             'email': 'office@zeibich.at', | ||||||
|             'website': 'http://www.camadeus.at', |             'website': 'http://www.zeibich.at', | ||||||
|             'company_registry': '280076b ', |             'company_registry': '51835d ', | ||||||
|             'country_id': 'at', # "de" für deutschland |             'country_id': 'at', # "de" für deutschland | ||||||
|             'logo': False,        |             'logo': False,        | ||||||
|             'vat': 'ATU 62991855 ',      |             'vat': 'ATU14644107 ',      | ||||||
|             'rml_header1': False, |             'rml_header1': False, | ||||||
|             'vat_check_vies': True, |             'vat_check_vies': True, | ||||||
|             'tax_calculation_rounding_method': 'round_globally', |             'tax_calculation_rounding_method': 'round_globally', | ||||||
|  | @ -100,10 +100,10 @@ class Config(): | ||||||
|             'document', |             'document', | ||||||
|             'auth_crypt', |             'auth_crypt', | ||||||
|             'cam_testenv',             |             'cam_testenv',             | ||||||
|             #'cam_max_width', |             'cam_max_width', | ||||||
|             #'oerp_no_phoning_home', |             'oerp_no_phoning_home', | ||||||
|             #'cam_custom', |             'cam_custom', | ||||||
|             #'custom_reports',                                                 |             'custom_reports',                                                 | ||||||
|             #'crm', |             #'crm', | ||||||
|             #'sale', |             #'sale', | ||||||
|             #'cam_hr_overtime', |             #'cam_hr_overtime', | ||||||
|  |  | ||||||
|  | @ -29,7 +29,7 @@ class CamadeusFunctions(): | ||||||
|         payload = {'params': payload} |         payload = {'params': payload} | ||||||
|         json_data = json.dumps(payload) |         json_data = json.dumps(payload) | ||||||
|         headers = {'content-type': 'application/json'} |         headers = {'content-type': 'application/json'} | ||||||
|         r = requests.post('%s:%s/web/database/create' % (self.env.host,self.env.port), data=json_data, headers=headers, auth=self.env.basic_auth) |         r = requests.post('%s:%s/web/database/create' % (self.env.host,self.env.port), data=json_data, headers=headers, auth=self.env.basic_auth, verify=False) | ||||||
|         if r and r.json().get('result',False): |         if r and r.json().get('result',False): | ||||||
|             return True |             return True | ||||||
|         else: |         else: | ||||||
|  | @ -319,3 +319,9 @@ class CamadeusFunctions(): | ||||||
|         res = self._execute('base.module.upgrade', 'upgrade_module', mod_ids) |         res = self._execute('base.module.upgrade', 'upgrade_module', mod_ids) | ||||||
|         return True |         return True | ||||||
| 
 | 
 | ||||||
|  |     def update_modules(self): | ||||||
|  |         """Verfügbare Module updaten""" | ||||||
|  |          | ||||||
|  |         wizard_id = self._execute('base.module.update', 'create', {}) | ||||||
|  |         vals = self._execute('base.module.update', 'update_module', [wizard_id]) | ||||||
|  |         return True         | ||||||
		Loading…
	
		Reference in New Issue