update script, testenv
							parent
							
								
									bde3c1fe59
								
							
						
					
					
						commit
						21b24b2983
					
				|  | @ -35,11 +35,8 @@ Test Environment | |||
|     'author': 'camadeus Consulting GmbH', | ||||
|     'website': 'http://www.camadeus.at', | ||||
|     'depends': ['web','base'],  | ||||
|     'js': [ | ||||
|         'static/src/js/testenv.js', | ||||
|     ], | ||||
|     'css': [ | ||||
|         'static/src/css/testenv.css', | ||||
|     'data': [ | ||||
|         'views/cam_testenv.xml', | ||||
|     ], | ||||
|     'update_xml': [], | ||||
|     'demo_xml': [], | ||||
|  |  | |||
|  | @ -48,7 +48,7 @@ class WebClient(http.Controller): | |||
|         if db: | ||||
|             h = req.httprequest.environ['HTTP_HOST'].split(':')[0] | ||||
|             d = h.split('.')[0]             | ||||
|             r = openerp.tools.config.get('dbfilter_test', 'test*').replace('%h', h).replace('%d', d) | ||||
|             r = openerp.tools.config.get('dbfilter_test', 'test.*').replace('%h', h).replace('%d', d) | ||||
|             try: | ||||
|                 pattern_list = eval(r) | ||||
|                 if not hasattr(pattern_list, '__iter__'): | ||||
|  |  | |||
|  | @ -0,0 +1,13 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <!-- vim:fdn=3: | ||||
| --> | ||||
| <openerp> | ||||
|     <data> | ||||
|         <template id="assets_backend" name="testenv_assets" inherit_id="web.assets_backend"> | ||||
|             <xpath expr="." position="inside"> | ||||
|                 <link rel="stylesheet" href="/cam_testenv/static/src/css/testenv.css"/> | ||||
|                 <script type="text/javascript" src="/cam_testenv/static/src/js/testenv.js"></script> | ||||
|             </xpath> | ||||
|         </template> | ||||
|     </data> | ||||
| </openerp> | ||||
|  | @ -56,6 +56,7 @@ def main(): | |||
|             'set_taxes',     | ||||
|             'set_uom',     | ||||
|             'set_steuerzuordnung',      | ||||
|             'setup_journals',           | ||||
|         ] | ||||
| 
 | ||||
|     if cmd == 'rollout': | ||||
|  |  | |||
|  | @ -11,18 +11,18 @@ class Config(): | |||
|          | ||||
|         self.company_data = { | ||||
|             'name': 'Camadeus GmbH', | ||||
|             'street': 'Seeböckgasse 39', | ||||
|             'street': 'Kriehubergasse 16', | ||||
|             'street2': False, | ||||
|             'city': 'Wien', | ||||
|             'zip': 'A-1160', | ||||
|             'phone': '+43 (0)1 486 36 49', | ||||
|             'zip': '1050', | ||||
|             'phone': '+43 1 78910 96 70', | ||||
|             'fax': False, | ||||
|             'email': 'office@zeibich.at', | ||||
|             'website': 'http://www.zeibich.at', | ||||
|             'company_registry': '51835d ', | ||||
|             'email': 'office@camadeus.at', | ||||
|             'website': 'http://www.camadeus.at', | ||||
|             'company_registry': '280076b ', | ||||
|             'country_id': 'at', # "de" für deutschland | ||||
|             'logo': False,        | ||||
|             'vat': 'ATU14644107 ',      | ||||
|             'vat': 'ATU 62991855 ',      | ||||
|             'rml_header1': False, | ||||
|             'vat_check_vies': True, | ||||
|             'tax_calculation_rounding_method': 'round_globally', | ||||
|  | @ -72,6 +72,11 @@ class Config(): | |||
|                 'prefix': 'A-', | ||||
|                 'padding': 5, | ||||
|             }, | ||||
| #             'work.order':  {  | ||||
| #                 'number_next_actual': 100,  | ||||
| #                 'prefix': 'AS-', | ||||
| #                 'padding': 5, | ||||
| #             },                            | ||||
| #             'picking.out':  {  | ||||
| #                 'number_next_actual': 2000,  | ||||
| #                 'prefix': 'L-', | ||||
|  | @ -96,6 +101,9 @@ class Config(): | |||
|             #'product.product_uom_hour': 'h', | ||||
|         }         | ||||
|          | ||||
|         # Soll das Ändern einer Rechnung im Nachhinein erlaubt sein? | ||||
|         self.allow_cancel_invoice = True | ||||
|          | ||||
|         self.modules = [ | ||||
|             'document', | ||||
|             'auth_crypt', | ||||
|  | @ -104,6 +112,7 @@ class Config(): | |||
|             'oerp_no_phoning_home', | ||||
|             'cam_custom', | ||||
|             'custom_reports',       | ||||
|             'account_cancel',                                           | ||||
|             #'crm', | ||||
|             #'sale', | ||||
|             #'cam_hr_overtime', | ||||
|  |  | |||
|  | @ -184,6 +184,14 @@ class CamadeusFunctions(): | |||
|             if not self._execute('ir.sequence', 'write', s_ids, seq_dict.get('sale.order')): | ||||
|                 return False | ||||
| 
 | ||||
|         # Arbeitsschein | ||||
|         if seq_dict.get('work.order',False): | ||||
|             s_ids = self._execute('ir.sequence', 'search', [('code','=','work.order')]) | ||||
|             if len(s_ids) != 1: | ||||
|                 return False | ||||
|             if not self._execute('ir.sequence', 'write', s_ids, seq_dict.get('work.order')): | ||||
|                 return False  | ||||
|          | ||||
|         # EK-Angebot | ||||
|         if seq_dict.get('purchase.order',False): | ||||
|             s_ids = self._execute('ir.sequence', 'search', [('code','=','purchase.order')]) | ||||
|  | @ -325,3 +333,16 @@ class CamadeusFunctions(): | |||
|         wizard_id = self._execute('base.module.update', 'create', {}) | ||||
|         vals = self._execute('base.module.update', 'update_module', [wizard_id]) | ||||
|         return True      | ||||
|      | ||||
|     def setup_journals(self): | ||||
|         """Update journals""" | ||||
|         # Verkauf- und Gutschriftenjournal | ||||
|         j_ids = self._execute('account.journal', 'search', [('code','in',['VK','GSV','SAJ','SCNJ'])]) | ||||
|         if len(j_ids) != 2: | ||||
|             return False | ||||
|         vals = { | ||||
|             'update_posted': self.config.allow_cancel_invoice | ||||
|         } | ||||
|         if not self._execute('account.journal', 'write', j_ids, vals): | ||||
|             return False    | ||||
|         return True  | ||||
		Loading…
	
		Reference in New Issue