Feedback 1639: Standardsteuern 20%

develop
Ahmed Aly 2018-04-19 14:50:05 +02:00
parent f610fc3ecb
commit 3b5127f2a3
94 changed files with 16 additions and 8 deletions

View File

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@ -118,6 +118,7 @@ def main():
'login',
'install_modules',
'set_default_settings',
'set_default_tax_settings',
#'set_warehouse',
#'stock_set_cost_method',
#'set_incoterms',

View File

@ -7,8 +7,8 @@ class Config(object):
self.module_name = None
self.lang = 'de_DE' # de_DE, en_US
self.default_sales_tax = '20% MwSt'
self.default_supplier_tax = '20% VSt'
self.default_sales_tax = '20% MwSt.'
self.default_supplier_tax = '20% VSt.'
self.price_decimals = 2 # Nachkommastellen Preis
self.uom_decimals = 3 # Nachkommastellen Mengeneinheiten
@ -147,8 +147,8 @@ class Config(object):
'website_form_project',
'contacts',
'dp_style',
'dp_show_company'
'dp_show_company',
'mass_editing'
]
# Setze das Feld "Attachment" im Report (wenn gesetzt wird das PDF in den Anhängen gespeichert)

View File

@ -95,21 +95,27 @@ class DatenpolFunctions(object):
return res_settings.execute(wizard_id)
def set_default_tax_settings(self):
"""Systemeinstellungen konfigurieren"""
"""Set default tax"""
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'))])
[
('name', '=', self.config.tax_settings.get('default_sale_tax_id')),
('company_id', '=', self.company_id.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'))])
[
('name', '=', self.config.tax_settings.get('default_purchase_tax_id')),
('company_id', '=', self.company_id.id)
])
self.config.tax_settings.update({
"default_purchase_tax_id": purchase_tax_ids,
@ -319,7 +325,8 @@ class DatenpolFunctions(object):
return False
# Hole Journal für Ausgangsrechnungen
j_ids = self.odoo.env['account.journal'].search([('code', '=', 'Re.:'), ('company_id', '=', self.company_id.id)])
j_ids = self.odoo.env['account.journal'].search(
[('code', '=', 'Re.:'), ('company_id', '=', self.company_id.id)])
if not j_ids:
j_ids = self.odoo.env['account.journal'].search([('code', '=', 'Re.:')])
if len(j_ids) != 1: