Merge
						commit
						d31f92f107
					
				|  | @ -0,0 +1,15 @@ | ||||||
|  | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||||||
|  | <launchConfiguration type="org.python.pydev.debug.regularLaunchConfigurationType"> | ||||||
|  | <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||||||
|  | <listEntry value="/INSTANCE/ext/odoo/odoo.py"/> | ||||||
|  | </listAttribute> | ||||||
|  | <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||||||
|  | <listEntry value="1"/> | ||||||
|  | </listAttribute> | ||||||
|  | <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:INSTANCE/ext/odoo/odoo.py}"/> | ||||||
|  | <stringAttribute key="org.eclipse.ui.externaltools.ATTR_OTHER_WORKING_DIRECTORY" value=""/> | ||||||
|  | <stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-c dev/odoo-server-dev-${env_var:CAM_USER}.conf --db-filter="^INSTANCE.*""/> | ||||||
|  | <stringAttribute key="org.python.pydev.debug.ATTR_INTERPRETER" value="__default"/> | ||||||
|  | <stringAttribute key="org.python.pydev.debug.ATTR_PROJECT" value="INSTANCE"/> | ||||||
|  | <stringAttribute key="process_factory_id" value="org.python.pydev.debug.processfactory.PyProcessFactory"/> | ||||||
|  | </launchConfiguration> | ||||||
|  | @ -35,12 +35,9 @@ Test Environment | ||||||
|     'author': 'camadeus Consulting GmbH', |     'author': 'camadeus Consulting GmbH', | ||||||
|     'website': 'http://www.camadeus.at', |     'website': 'http://www.camadeus.at', | ||||||
|     'depends': ['web','base'],  |     'depends': ['web','base'],  | ||||||
|     'js': [ |     'data': [ | ||||||
|         'static/src/js/testenv.js', |         'views/cam_testenv.xml', | ||||||
|     ], |     ], | ||||||
|     'css': [ |  | ||||||
|         'static/src/css/testenv.css', |  | ||||||
|     ],   |  | ||||||
|     'update_xml': [], |     'update_xml': [], | ||||||
|     'demo_xml': [], |     'demo_xml': [], | ||||||
|     'installable': True, |     'installable': True, | ||||||
|  |  | ||||||
|  | @ -47,8 +47,8 @@ class WebClient(http.Controller): | ||||||
|              |              | ||||||
|         if db: |         if db: | ||||||
|             h = req.httprequest.environ['HTTP_HOST'].split(':')[0] |             h = req.httprequest.environ['HTTP_HOST'].split(':')[0] | ||||||
|             d = h.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: |             try: | ||||||
|                 pattern_list = eval(r) |                 pattern_list = eval(r) | ||||||
|                 if not hasattr(pattern_list, '__iter__'): |                 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> | ||||||
|  | @ -0,0 +1,11 @@ | ||||||
|  | --- ext/odoo/openerp/report/render/rml2pdf/trml2pdf.py	2014-01-14 14:18:12.302306370 +0100
 | ||||||
|  | +++ ext/odoo/openerp/report/render/rml2pdf/trml2pdf.py	2014-01-14 14:18:16.770419846 +0100
 | ||||||
|  | @@ -740,7 +740,7 @@
 | ||||||
|  |              rowheights = [utils.unit_get(f.strip()) for f in node.get('rowHeights').split(',')] | ||||||
|  |              if len(rowheights) == 1: | ||||||
|  |                  rowheights = rowheights[0] | ||||||
|  | -        table = platypus.LongTable(data = data, colWidths=colwidths, rowHeights=rowheights, **(utils.attr_get(node, ['splitByRow'] ,{'repeatRows':'int','repeatCols':'int'})))
 | ||||||
|  | +        table = platypus.LongTable(data = data, colWidths=colwidths, rowHeights=rowheights, **(utils.attr_get(node, ['splitByRow'] ,{'repeatRows':'int','repeatCols':'int', 'hAlign':'str'})))
 | ||||||
|  |          if node.get('style'): | ||||||
|  |              table.setStyle(self.styles.table_styles[node.get('style')]) | ||||||
|  |          for s in styles: | ||||||
|  | @ -49,13 +49,15 @@ def main(): | ||||||
|             'login', |             'login', | ||||||
|             'uninstall_chat', |             'uninstall_chat', | ||||||
|             'install_modules', |             'install_modules', | ||||||
|  |             'set_warehouse', | ||||||
|             'base_config', |             'base_config', | ||||||
|             'sale_config', |             'sale_config', | ||||||
|             'set_date_format',  |             'set_date_format',  | ||||||
|             'set_company',  |             'set_company',  | ||||||
|             'set_taxes',     |             'set_taxes',     | ||||||
|             'set_uom',     |             'set_uom',     | ||||||
|             'set_steuerzuordnung',                |             'set_steuerzuordnung',      | ||||||
|  |             'setup_journals',           | ||||||
|         ] |         ] | ||||||
| 
 | 
 | ||||||
|     if cmd == 'rollout': |     if cmd == 'rollout': | ||||||
|  |  | ||||||
|  | @ -11,25 +11,29 @@ class Config(): | ||||||
|          |          | ||||||
|         self.company_data = { |         self.company_data = { | ||||||
|             'name': 'Camadeus GmbH', |             'name': 'Camadeus GmbH', | ||||||
|             'street': 'Seeböckgasse 39', |             'street': 'Kriehubergasse 16', | ||||||
|             'street2': False, |             'street2': False, | ||||||
|             'city': 'Wien', |             'city': 'Wien', | ||||||
|             'zip': 'A-1160', |             'zip': '1050', | ||||||
|             'phone': '+43 (0)1 486 36 49', |             'phone': '+43 1 78910 96 70', | ||||||
|             'fax': False, |             'fax': False, | ||||||
|             'email': 'office@zeibich.at', |             'email': 'office@camadeus.at', | ||||||
|             'website': 'http://www.zeibich.at', |             'website': 'http://www.camadeus.at', | ||||||
|             'company_registry': '51835d ', |             'company_registry': '280076b ', | ||||||
|             'country_id': 'at', # "de" für deutschland |             'country_id': 'at', # "de" für deutschland | ||||||
|             'logo': False,        |             'logo': False,        | ||||||
|             'vat': 'ATU14644107 ',      |             'vat': 'ATU 62991855 ',      | ||||||
|             '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', | ||||||
|             #'rml_header' : './ext/addons/custom_reports/report/page.rml', # Report File |             #'rml_header' : './ext/addons/custom_reports/report/page.rml', # Report File | ||||||
|             #'logo': './ext/addons/custom_reports/logo.png', |             'logo': '../ext/custom-addons/cam_reports/logo.png', | ||||||
|         } |         } | ||||||
|          |          | ||||||
|  |         # Nur für Lager | ||||||
|  |         # Wenn nicht gesetzt, dann wird der Firmenname genommen | ||||||
|  |         self.warehouse_name = False         | ||||||
|  |          | ||||||
|         self.valid_taxes = [ |         self.valid_taxes = [ | ||||||
|             '20% MwSt', |             '20% MwSt', | ||||||
|             '10% MwSt', |             '10% MwSt', | ||||||
|  | @ -72,6 +76,11 @@ class Config(): | ||||||
|                 'prefix': 'A-', |                 'prefix': 'A-', | ||||||
|                 'padding': 5, |                 'padding': 5, | ||||||
|             }, |             }, | ||||||
|  | #             'work.order':  {  | ||||||
|  | #                 'number_next_actual': 100,  | ||||||
|  | #                 'prefix': 'AS-', | ||||||
|  | #                 'padding': 5, | ||||||
|  | #             },                            | ||||||
| #             'picking.out':  {  | #             'picking.out':  {  | ||||||
| #                 'number_next_actual': 2000,  | #                 'number_next_actual': 2000,  | ||||||
| #                 'prefix': 'L-', | #                 'prefix': 'L-', | ||||||
|  | @ -96,6 +105,9 @@ class Config(): | ||||||
|             #'product.product_uom_hour': 'h', |             #'product.product_uom_hour': 'h', | ||||||
|         }         |         }         | ||||||
|          |          | ||||||
|  |         # Soll das Ändern einer Rechnung im Nachhinein erlaubt sein? | ||||||
|  |         self.allow_cancel_invoice = True | ||||||
|  |          | ||||||
|         self.modules = [ |         self.modules = [ | ||||||
|             'document', |             'document', | ||||||
|             'auth_crypt', |             'auth_crypt', | ||||||
|  | @ -103,7 +115,8 @@ class Config(): | ||||||
|             'cam_max_width', |             'cam_max_width', | ||||||
|             'oerp_no_phoning_home', |             'oerp_no_phoning_home', | ||||||
|             'cam_custom', |             'cam_custom', | ||||||
|             'custom_reports', |             'cam_reports', | ||||||
|  |             'account_cancel', | ||||||
|             'cam_invoice_skonto',                                                 |             'cam_invoice_skonto',                                                 | ||||||
|             #'crm', |             #'crm', | ||||||
|             #'sale', |             #'sale', | ||||||
|  |  | ||||||
|  | @ -183,6 +183,14 @@ class CamadeusFunctions(): | ||||||
|                 return False |                 return False | ||||||
|             if not self._execute('ir.sequence', 'write', s_ids, seq_dict.get('sale.order')): |             if not self._execute('ir.sequence', 'write', s_ids, seq_dict.get('sale.order')): | ||||||
|                 return False |                 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 |         # EK-Angebot | ||||||
|         if seq_dict.get('purchase.order',False): |         if seq_dict.get('purchase.order',False): | ||||||
|  | @ -199,7 +207,7 @@ class CamadeusFunctions(): | ||||||
|                 return False |                 return False | ||||||
|             journals = self._execute('account.journal', 'read', j_ids, ['sequence_id']) |             journals = self._execute('account.journal', 'read', j_ids, ['sequence_id']) | ||||||
|             s_ids = [t['sequence_id'][0] for t in journals] |             s_ids = [t['sequence_id'][0] for t in journals] | ||||||
|             if not self._execute('ir.sequence', 'write', s_ids, seq_dict.get('account.invoicer')): |             if not self._execute('ir.sequence', 'write', s_ids, seq_dict.get('account.invoice')): | ||||||
|                 return False  |                 return False  | ||||||
| 
 | 
 | ||||||
|         return True |         return True | ||||||
|  | @ -220,6 +228,7 @@ class CamadeusFunctions(): | ||||||
|          |          | ||||||
|         vals = { |         vals = { | ||||||
|             'groups_id': groups, |             'groups_id': groups, | ||||||
|  |             'tz': 'Europe/Vienna', | ||||||
|         } |         } | ||||||
|          |          | ||||||
|         return self._execute('res.users', 'write', [user_id], vals) |         return self._execute('res.users', 'write', [user_id], vals) | ||||||
|  | @ -324,8 +333,21 @@ class CamadeusFunctions(): | ||||||
|          |          | ||||||
|         wizard_id = self._execute('base.module.update', 'create', {}) |         wizard_id = self._execute('base.module.update', 'create', {}) | ||||||
|         vals = self._execute('base.module.update', 'update_module', [wizard_id]) |         vals = self._execute('base.module.update', 'update_module', [wizard_id]) | ||||||
|         return True         |         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  | ||||||
|  |      | ||||||
|     def update_all(self): |     def update_all(self): | ||||||
|         """Aktualisiere Modul""" |         """Aktualisiere Modul""" | ||||||
|         for module_name in self.config.modules: |         for module_name in self.config.modules: | ||||||
|  | @ -336,3 +358,16 @@ class CamadeusFunctions(): | ||||||
|              |              | ||||||
|         res = self._execute('base.module.upgrade', 'upgrade_module', []) |         res = self._execute('base.module.upgrade', 'upgrade_module', []) | ||||||
|         return True     |         return True     | ||||||
|  | 
 | ||||||
|  |     def set_warehouse(self): | ||||||
|  |         """Name des Zentrallagers setzen""" | ||||||
|  |          | ||||||
|  |         is_installed = self._execute('ir.module.module', 'search', [('name','=','stock'),('state','=','installed')]) | ||||||
|  |         if is_installed: | ||||||
|  |             vals = { | ||||||
|  |                 'name': self.config.warehouse_name or self.config.company_data.get('name','Mein Unternehmen') | ||||||
|  |             } | ||||||
|  |             warehouse_ids = self._execute('stock.warehouse', 'search', []) | ||||||
|  |             return self._execute('stock.warehouse', 'write', warehouse_ids, vals) | ||||||
|  |         else: | ||||||
|  |             return True | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue