diff --git a/ext/custom-addons/dp_reports_account/reports/invoice.xml b/ext/custom-addons/dp_reports_account/reports/invoice.xml index 14755cdd..1c0678de 100644 --- a/ext/custom-addons/dp_reports_account/reports/invoice.xml +++ b/ext/custom-addons/dp_reports_account/reports/invoice.xml @@ -105,9 +105,11 @@ - - - + + - + + - diff --git a/setup/lib/config_glaser.py b/setup/lib/config_glaser.py index 7a24606f..b70e39ae 100644 --- a/setup/lib/config_glaser.py +++ b/setup/lib/config_glaser.py @@ -32,6 +32,10 @@ class ConfigGlaser(Config): self.warehouse_name = 'Glaser' self.warehouse_code = 'Glaser' + self.tax_settings = { + 'default_sale_tax_id': self.default_sales_tax + } + self.sequences = { 'sale.order': { # 'number_next_actual': 1, diff --git a/setup/lib/config_tza.py b/setup/lib/config_tza.py index 13988907..48fb0b76 100644 --- a/setup/lib/config_tza.py +++ b/setup/lib/config_tza.py @@ -33,6 +33,10 @@ class ConfigTZA(Config): self.warehouse_name = 'TZA' self.warehouse_code = 'TZA' + self.tax_settings = { + 'default_sale_tax_id': self.default_sales_tax + } + self.sequences = { 'sale.order': { # 'number_next_actual': 1, diff --git a/setup/lib/environments.py b/setup/lib/environments.py index 3959ed8e..c734585d 100644 --- a/setup/lib/environments.py +++ b/setup/lib/environments.py @@ -41,8 +41,9 @@ ENVIRONMENTS = { 'br-glaser' : Environment('http://localhost', '8080', 'tz-austria_1', 'glaser-admin', 'x', 'admin', config = ConfigGlaser()), 'aa' : Environment('http://localhost', '8080', 'tz-austria_1', 'admin', 'x', 'admin', config = ConfigTZA()), - 'aa-tz' : Environment('http://localhost', '8080', 'tz-austria_1', 'tz-admin', 'x', 'admin', config = ConfigTZA()), - 'aa-glaser' : Environment('http://localhost', '8080', 'tz-austria_1', 'glaser-admin', 'x', 'admin', config = ConfigGlaser()), + 'aa2' : Environment('http://localhost', '8080', 'tz-austria_2', 'admin', 'x', 'admin', config = ConfigTZA()), + 'aa-tz' : Environment('http://localhost', '8080', 'tz-austria_2', 'tz-admin', 'x', 'admin', config = ConfigTZA()), + 'aa-glaser' : Environment('http://localhost', '8080', 'tz-austria_2', 'glaser-admin', 'x', 'admin', config = ConfigGlaser()), 'rw' : Environment('http://localhost', '8080', 'tz-austria_1', 'admin', 'x', 'admin', config = ConfigTZA()), 'rw-tz' : Environment('http://localhost', '8080', 'tz-austria_1', 'tz-admin', 'x', 'admin', config = ConfigTZA()), diff --git a/setup/lib/functions.py b/setup/lib/functions.py index b28fdc28..03ba2026 100644 --- a/setup/lib/functions.py +++ b/setup/lib/functions.py @@ -94,6 +94,31 @@ class DatenpolFunctions(object): wizard_id = res_settings.create(vals) return res_settings.execute(wizard_id) + def set_default_tax_settings(self): + """Systemeinstellungen konfigurieren""" + + res_settings = self.odoo.env['res.config.settings'] + vals = res_settings.default_get([]) + + if self.config.tax_settings.get('default_sale_tax_id', False): + sales_tax_ids = self.odoo.env['account.tax'].search( + [('name', '=', self.config.tax_settings.get('default_sale_tax_id'))]) + + self.config.tax_settings.update({ + "default_sale_tax_id": sales_tax_ids, + }) + if self.config.tax_settings.get('default_purchase_tax_id', False): + purchase_tax_ids = self.odoo.env['account.tax'].search( + [('name', '=', self.config.tax_settings.get('default_purchase_tax_id'))]) + + self.config.tax_settings.update({ + "default_purchase_tax_id": purchase_tax_ids, + }) + + vals.update(self.config.tax_settings) + wizard_id = res_settings.create(vals) + return res_settings.execute(wizard_id) + def _readAndReturnFile(self, filename, encode=''): fi = open(filename, 'rb') content = ''