diff --git a/patches/rml_align.patch b/patches/rml_align.patch new file mode 100644 index 00000000..4a688bf1 --- /dev/null +++ b/patches/rml_align.patch @@ -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: diff --git a/setup/lib/cli.py b/setup/lib/cli.py index 5230888c..5106df6b 100755 --- a/setup/lib/cli.py +++ b/setup/lib/cli.py @@ -49,6 +49,7 @@ def main(): 'login', 'uninstall_chat', 'install_modules', + 'set_warehouse', 'base_config', 'sale_config', 'set_date_format', diff --git a/setup/lib/config_at.py b/setup/lib/config_at.py index 5288e63c..c4922076 100644 --- a/setup/lib/config_at.py +++ b/setup/lib/config_at.py @@ -27,9 +27,13 @@ class Config(): 'vat_check_vies': True, 'tax_calculation_rounding_method': 'round_globally', #'rml_header' : './ext/addons/custom_reports/report/page.rml', # Report File - #'logo': './ext/addons/custom_reports/logo.png', + 'logo': './ext/addons/cam_reports/logo.png', } + # Nur für Lager + # Wenn nicht gesetzt, dann wird der Firmenname genommen + self.warehouse_name = False + self.valid_taxes = [ '20% MwSt', '10% MwSt', @@ -111,7 +115,7 @@ class Config(): 'cam_max_width', 'oerp_no_phoning_home', 'cam_custom', - 'custom_reports', + 'cam_reports', 'account_cancel', #'crm', #'sale', diff --git a/setup/lib/functions.py b/setup/lib/functions.py index dbe49b4f..a53d3a2b 100755 --- a/setup/lib/functions.py +++ b/setup/lib/functions.py @@ -358,3 +358,15 @@ class CamadeusFunctions(): res = self._execute('base.module.upgrade', 'upgrade_module', []) 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