237 lines
		
	
	
		
			8.9 KiB
		
	
	
	
		
			Python
		
	
	
			
		
		
	
	
			237 lines
		
	
	
		
			8.9 KiB
		
	
	
	
		
			Python
		
	
	
# -*- coding: utf-8 -*-
 | 
						||
 | 
						||
class Config():
 | 
						||
    def __init__(self):
 | 
						||
        self.dump_file = 'odoo_backup.dump'
 | 
						||
 | 
						||
        self.module_name = None
 | 
						||
        self.lang = 'de_DE' # de_DE, en_US
 | 
						||
        self.chart_of_accounts = 'l10n_at'
 | 
						||
        self.sales_tax = '20% MwSt'
 | 
						||
        self.purchase_tax = '20% VSt'
 | 
						||
        self.chart_template_id = 2 # Austrian Chart of Account
 | 
						||
        self.price_decimals = 2 # Nachkommastellen Preis
 | 
						||
        self.uom_decimals = 3 # Nachkommastellen Mengeneinheiten
 | 
						||
 | 
						||
        self.company_data = {
 | 
						||
            'name': 'TZ Tischlerzentrum GesmbH',
 | 
						||
            'street': 'Neugasse 36',
 | 
						||
            'street2': False,
 | 
						||
            'city': 'Spannberg',
 | 
						||
            'zip': '2244',
 | 
						||
            'phone': '+43 2538/8628 – 0',
 | 
						||
            'email': 'office@tzaustria.com',
 | 
						||
            'website': 'https://www.tzaustria.com/',
 | 
						||
            'company_registry': 'FN 224119m',
 | 
						||
            'country_id': 'at', # 'de' für Deutschland
 | 
						||
            'vat': 'ATU 54619104',
 | 
						||
            'vat_check_vies': True,
 | 
						||
            'logo': '../ext/custom-addons/dp_custom/static/src/img/logo.png',
 | 
						||
            #'favicon_backend': '../ext/custom-addons/dp_custom/static/src/img/favicon.ico',
 | 
						||
            #'favicon_backend_mimetype': 'image/x-icon'
 | 
						||
        }
 | 
						||
 | 
						||
        self.mail_server = {
 | 
						||
            'name': 'test',
 | 
						||
            'sequence': 0,
 | 
						||
            'smtp_host': 'smtp.1und1.de',
 | 
						||
            'smtp_port': '465',
 | 
						||
            'smtp_encryption': 'ssl',
 | 
						||
            'smtp_user': 'test',
 | 
						||
            'smtp_pass': 'test',
 | 
						||
        }
 | 
						||
 | 
						||
        # Nur für Lager
 | 
						||
        # Wenn nicht gesetzt, dann wird der Firmenname genommen
 | 
						||
        self.warehouse_name = 'TZA'
 | 
						||
        self.warehouse_code = 'TZA'
 | 
						||
 | 
						||
        # Anzahl der Schritte beim Ausliefern
 | 
						||
        # [ship_only] Direkt vom Lager liefern
 | 
						||
        # [pick_ship] Liefere vor Auslieferung zuerst in Versandlager (Pick + Ship)
 | 
						||
        # [pick_pack_ship] Verpacken Sie die Produkte an einer Pack-Station bevor Sie den Versand vornehmen
 | 
						||
        self.delivery_steps = 'ship_only'
 | 
						||
 | 
						||
        self.valid_taxes = [
 | 
						||
            '20% MwSt',
 | 
						||
            '10% MwSt',
 | 
						||
            '20% VSt',
 | 
						||
            '10% VSt',
 | 
						||
        ]
 | 
						||
 | 
						||
        # Aktive Steuerzuordnungen
 | 
						||
        self.valid_fiscal_positions = [
 | 
						||
            #'Lieferant EU (ohne Ust-ID)',
 | 
						||
            #'Lieferant EU Unternehmen (mit USt-ID)',
 | 
						||
            #'Lieferant Ausland',
 | 
						||
            'Kunde Ausland',
 | 
						||
            'Kunde EU (ohne USt-ID)',
 | 
						||
            'Kunde EU Unternehmen (mit USt-ID)',
 | 
						||
        ]
 | 
						||
 | 
						||
        self.settings = {
 | 
						||
            # Einstellungen Allgemein
 | 
						||
            'auth_signup_reset_passwort': True,
 | 
						||
            'group_multi_company': True,
 | 
						||
 | 
						||
            # Einstellungen Verkauf
 | 
						||
            'group_product_variant': False,                 # Produkte können mehrere Attribute haben, die Varianten definieren
 | 
						||
            'group_uom': True,                             # Verwende Mengeneinheiten
 | 
						||
            'group_discount_per_so_line': True,            # Rabatt auf Verkaufszeilen
 | 
						||
            'multi_sales_price': True,
 | 
						||
            'module_sale_margin': False,
 | 
						||
            'use_sale_note': True,
 | 
						||
            'group_sale_layout': False,
 | 
						||
            'group_proforma_sales': True,
 | 
						||
            'group_sale_delivery_address': True,           # Verschiedene Adressen für Rechnung und Lieferung
 | 
						||
            'group_warning_sale': False,
 | 
						||
            'auto_done_setting': False,
 | 
						||
            'module_delivery': False,
 | 
						||
            'group_display_incoterm': True,
 | 
						||
            'module_sale_order_dates': False,
 | 
						||
            'group_route_so_lines': False,
 | 
						||
 | 
						||
            # Einstellungen Lager
 | 
						||
            'group_warning_stock': False,
 | 
						||
            'group_stock_production_lot': True,            # Verfolgen Sie Los- und Seriennummern
 | 
						||
            'default_picking_policy': 'direct',
 | 
						||
            'group_stock_multi_locations': False,
 | 
						||
            'group_stock_multi_warehouses': False,
 | 
						||
            'group_stock_adv_location': False,              # Advanced routing of products using rules
 | 
						||
            'use_security_lead': False,
 | 
						||
            'security_lead': 0,
 | 
						||
 | 
						||
            # Einstellungen Finanzen
 | 
						||
            'tax_calculation_rounding_method': 'round_per_line',
 | 
						||
            'vat_check_vies': True,
 | 
						||
            'group_multi_currency': True,                  # Multiwährungsfunktion aktivieren
 | 
						||
            'module_account_reports_followup': False,
 | 
						||
            'group_warning_account': False,
 | 
						||
 | 
						||
            # Einstellungen Fertigung
 | 
						||
            'module_mrp_repair': False,
 | 
						||
            'module_mrp_byproduct': False,
 | 
						||
            'use_manufacturing_lead': False,
 | 
						||
            'manufacturing_lead': 0,
 | 
						||
        }
 | 
						||
 | 
						||
        self.removal_strategy = 'fifo'                      #[fifo], [lifo], [fefo]
 | 
						||
        self.stock_cost_method = 'standard'                 # [standard], [average], [real]
 | 
						||
 | 
						||
        self.sequences = {
 | 
						||
            'sale.order': {
 | 
						||
                # 'number_next_actual': 1,
 | 
						||
                'prefix': '%(y)s',
 | 
						||
                'padding': 4,
 | 
						||
                'use_date_range': True,
 | 
						||
                'monthly_date_range': False
 | 
						||
            },
 | 
						||
            'account.invoice': {
 | 
						||
                # 'number_next_actual': 0001,
 | 
						||
                'prefix': '%(y)s%(month)s',
 | 
						||
                'padding': 4,
 | 
						||
                'use_date_range': True,
 | 
						||
                'monthly_date_range': False
 | 
						||
            },
 | 
						||
            # Wenn 'account.invoice_refund' auskommentiert ist, dann wird
 | 
						||
            # für die Gutschrift der selbe Nummernkreis verwendet
 | 
						||
            'account.invoice_refund': {
 | 
						||
                # 'number_next_actual': 0001,
 | 
						||
                'name': 'Gutschriften',
 | 
						||
                'implementation': 'no_gap',
 | 
						||
                'prefix': '%(y)s',
 | 
						||
                'padding': 4,
 | 
						||
                'use_date_range': True,
 | 
						||
                'monthly_date_range': False
 | 
						||
            },
 | 
						||
            # 'picking.out': {
 | 
						||
            #    # 'number_next_actual': 1,
 | 
						||
            #    'prefix': 'LS-',
 | 
						||
            #    'padding': 5,
 | 
						||
            # },
 | 
						||
            #            'picking.in':  {
 | 
						||
            #                #'number_next_actual': 1,
 | 
						||
            #                'prefix': 'LS/IN/',
 | 
						||
            #                'padding': 4,
 | 
						||
            #            },
 | 
						||
            #            'picking.int':  {
 | 
						||
            #                #'number_next_actual': 1,
 | 
						||
            #                'prefix': 'LS/INT/',
 | 
						||
            #                'padding': 4,
 | 
						||
            #            },
 | 
						||
            #             'purchase.order':  {
 | 
						||
            #                 'number_next_actual': 1,
 | 
						||
            #                 'prefix': 'B-',
 | 
						||
            #                 'padding': 5,
 | 
						||
            #             },
 | 
						||
        }
 | 
						||
 | 
						||
        self.active_uoms = {
 | 
						||
            'product.product_uom_unit': 'Stk.',
 | 
						||
            'product.product_uom_kgm': 'kg',
 | 
						||
            'product.product_uom_meter': 'm',
 | 
						||
            # 'product.product_uom_litre': 'l',
 | 
						||
            # 'product.product_uom_hour': 'h',,
 | 
						||
        }
 | 
						||
 | 
						||
        # Lieferbedingungen
 | 
						||
        self.incoterms = {
 | 
						||
            ('Ab Werk', 'ABW'),
 | 
						||
            ('Botendienst', 'BOT'),
 | 
						||
            ('Zustellung', 'ZUS'),
 | 
						||
        }
 | 
						||
 | 
						||
        # Soll das Ändern einer Rechnung im Nachhinein erlaubt sein?
 | 
						||
        self.allow_cancel_invoice = True
 | 
						||
 | 
						||
        self.modules = [
 | 
						||
            'base_iban',
 | 
						||
            'base_vat',
 | 
						||
            'document',
 | 
						||
            'auth_crypt',
 | 
						||
            'sale_management',
 | 
						||
            'l10n_at',
 | 
						||
            'dp_custom',
 | 
						||
            'dp_custom_reports_sale',
 | 
						||
            'dp_custom_reports_account',
 | 
						||
            # 'dp_reports_purchase',
 | 
						||
            # 'dp_reports_stock',
 | 
						||
            'account_cancel',
 | 
						||
            'stock',
 | 
						||
        ]
 | 
						||
 | 
						||
# Setze das Feld "Attachment" im Report (wenn gesetzt wird das PDF in den Anhängen gespeichert)
 | 
						||
        timestamp = " + '_' +  time.strftime('%Y-%m-%d-%H%M') + '.pdf')"
 | 
						||
        self.reports = {
 | 
						||
            'sale.action_report_saleorder': "((object.state in ('draft','sent') and 'KV_' or 'AB_') + object.name" + timestamp,
 | 
						||
            'stock.action_report_delivery': "LS- + object.name" + timestamp,
 | 
						||
            'account.account_invoices': "(object.state in ('open', 'paid')) and ('INV' + (object.number or '').replace('/', ''))" + timestamp
 | 
						||
        }
 | 
						||
 | 
						||
        self.users_file = 'res.users.csv'
 | 
						||
 | 
						||
        self.translation_files = [ # Reihenfolge!
 | 
						||
                                 #'auto_translated2.po',
 | 
						||
                                 'ir.translation.csv',
 | 
						||
                                 #'auto_translated.po',
 | 
						||
                                 #'auto_translated3.po',
 | 
						||
                                  ]
 | 
						||
 | 
						||
        self.default_values = [   # ir.values
 | 
						||
            # ('product.template', 'type', 'product'),
 | 
						||
            #('product.template', 'type', 'service'),
 | 
						||
        ]
 | 
						||
 | 
						||
        self.order_policy = 'order'
 | 
						||
 | 
						||
        self.data_updates = {
 | 
						||
            #'mrp.route_warehouse0_manufacture': {'name': 'Produzieren'},
 | 
						||
            #'purchase.route_warehouse0_buy': {'name': 'Einkaufen'},
 | 
						||
            #'stock.route_warehouse0_mto': {'name': 'Beschaffe von Auftrag'},
 | 
						||
        }
 | 
						||
 | 
						||
        self.system_parameters = {
 | 
						||
            'ir_attachment.location': 'file', # [db] oder [file]
 | 
						||
            'database.expiration_date': '2038-01-19',
 | 
						||
        }
 |