261 lines
		
	
	
		
			10 KiB
		
	
	
	
		
			Python
		
	
	
			
		
		
	
	
			261 lines
		
	
	
		
			10 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': 'datenpol gmbh',
 | |
|             'street': 'Lederergasse 32',
 | |
|             'street2': False,
 | |
|             'city': 'Linz',
 | |
|             'zip': '4020',
 | |
|             'phone': '+43 732 997 035-0',
 | |
|             'fax': False,
 | |
|             'email': 'office@datenpol.at',
 | |
|             'website': 'http://www.datenpol.at/',
 | |
|             'company_registry': '359270p',
 | |
|             'country_id': 'at', # 'de' für Deutschland
 | |
|             'vat': 'ATU 66309611',
 | |
|             'rml_header1': False,
 | |
|             'vat_check_vies': True,
 | |
|             'tax_calculation_rounding_method': 'round_globally',
 | |
|             '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 = False
 | |
|         self.warehouse_code = False
 | |
| 
 | |
|         # 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)',
 | |
|         ]
 | |
| 
 | |
|         # Aktive Währungen
 | |
|         self.valid_currencies = [
 | |
|             'EUR',
 | |
|         ]
 | |
| 
 | |
|         # Allgemeine Einstellungen
 | |
|         self.base_config = {
 | |
|             'module_portal': False,      # Kundenportal
 | |
|             'alias_domain': False,       # False: keine Domainbezogenen E-Mails (wie z. B. Reply-To zur Alias-Adresse)
 | |
|         }
 | |
| 
 | |
|         # Einstellungen Verkauf
 | |
|         self.sale_config = {
 | |
|             'group_sale_delivery_address': 0,            # Verschiedene Adressen für Rechnung und Lieferung
 | |
|             'sale_pricelist_setting': 'fixed',           # Verkaufspreis: [fixed], [percentage], [formula]
 | |
|             'group_discount_per_so_line': 0,             # Rabatt auf Verkaufszeilen
 | |
|             'group_uom': 0,                              # Verwende Mengeneinheiten
 | |
|             'default_invoice_policy': 'order'            # Standardabrechnung: [order], [delivery]
 | |
|         }
 | |
|         self.order_policy = 'picking'                    # Erzeuge Rechnung: [manual], [picking], [prepaid]
 | |
| 
 | |
|         # Einstellungen Einkauf
 | |
|         self.purchase_config = {
 | |
|             'group_purchase_pricelist': True,            # Preislisten verwenden
 | |
|             'default_invoice_method': 'manual',          # [picking] - Rechnung von Lieferscheinen
 | |
|                                                          # [manual] - von Bestellpositionen
 | |
|                                                          # [order] - Vorabrechnungsentwurf durch Bestellung
 | |
|             'group_costing_method': True,                # Benutzen Sie 'Einkaufs-' oder 'Durchschnittspreis' zur Bestandsbewertung
 | |
|         }
 | |
| 
 | |
|         # Einstellungen Finanzen
 | |
|         self.finance_config = {
 | |
|             'group_multi_currency': False,               # Multiwährungsfunktion aktivieren
 | |
|             'default_sale_tax_id': 'XML:l10n_at.1_tax_at_mwst_10', # Standardsteuer Verkauf
 | |
|         }
 | |
| 
 | |
|         # Einstellungen Personal
 | |
|         self.hr_config = {
 | |
|             'module_hr_expense': True,                   # Spesen der Mitarbeiter verwalten
 | |
|             'module_hr_timesheet': False,                # Verwalten Sie Ihre Studenzettel
 | |
|             'group_hr_attendance': True,                 # Zuweisung der Berechtigung zur Arbeitszeiteingabe für alle Benutzer
 | |
|         }
 | |
| 
 | |
|         # Einstellungen Lager
 | |
|         self.stock_config = {
 | |
|             'warehouse_and_location_usage_level': 0,     # Warehouses and Locations usage level
 | |
|             'group_stock_tracking_lot': 0,               # Verpackungsgrößen bei der Verpackung: Paletten, Kisten, Behälter...
 | |
|             'group_stock_production_lot': 0,             # Verfolgen Sie Los- und Seriennummern
 | |
|             'group_stock_packaging': 0,                  # Manage available packaging options per products
 | |
|             'group_stock_adv_location': 0,               # Advanced routing of products using rules
 | |
|             'group_product_variant': 0,                  # Produkte können mehrere Attribute haben, die Varianten definieren
 | |
|         }
 | |
| 
 | |
|         # Einstellungen Fertigung
 | |
|         self.mrp_config = {
 | |
|             'group_mrp_routings': True,                  # Verwalte Arbeitspläne und Arbeitsaufträge
 | |
|             'module_mrp_operations': True,               # Detaillierte Planung von Arbeitsaufträgen vornehmen
 | |
|             'group_mrp_properties': False,               # Ermögliche Merkmale für verschiedene Stücklisten eines Produkts
 | |
|         }
 | |
| 
 | |
|         #self.removal_strategy = 'fefo'                  #[fifo], [lifo], [fefo]
 | |
| 
 | |
|         self.stock_cost_method = 'average'               # [standard], [average], [real]
 | |
| 
 | |
|         self.sequences = {
 | |
|             'sale.order': {
 | |
|                 # 'number_next_actual': 1,
 | |
|                 'prefix': '%(y)s',
 | |
|                 'padding': 4,
 | |
|                 'use_date_range': True
 | |
|             },
 | |
|             'account.invoice': {
 | |
|                 # 'number_next_actual': 0001,
 | |
|                 'prefix': '%(y)s%(month)s',
 | |
|                 'padding': 4,
 | |
|                 'use_date_range': True
 | |
|             },
 | |
|             # 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
 | |
|             },
 | |
|             #'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_meter': 'lfm',
 | |
|             #'product.product_uom_litre': 'l',
 | |
|             #'product.product_uom_hour': 'h',
 | |
|             #'product.product_uom_kgm': 'kg',
 | |
|         }
 | |
| 
 | |
|         #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',
 | |
|             'document',
 | |
|             'knowledge',
 | |
|             'auth_crypt',
 | |
|             'auth_admin_passkey',
 | |
|             'auth_brute_force',
 | |
|             'auth_session_timeout',
 | |
|             'disable_odoo_online',
 | |
|             'mass_editing',
 | |
|             'password_security',
 | |
|             'res_config_settings_enterprise_remove',
 | |
|             'scheduler_error_mailer',
 | |
|             'web_dialog_size',
 | |
|             'web_environment_ribbon',
 | |
|             'web_favicon',
 | |
|             'web_responsive',
 | |
|             'web_searchbar_full_width',
 | |
|             'web_sheet_full_width',
 | |
|             'web_shortcut',
 | |
|             'web_translate_dialog',
 | |
|             'web_tree_many2one_clickable',
 | |
|             #'website_no_crawler',
 | |
|             #'website_odoo_debranding',
 | |
|             'dp_custom',
 | |
|             'dp_reports',
 | |
|             'account_cancel',
 | |
|         ]
 | |
| 
 | |
|         # 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.report_saleorder': "((object.state in ('draft','sent') and 'KV_' or 'AB_') + object.name" + 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', 'service'),
 | |
|             #('product.template', 'type', 'XML:xmlid'),    #mit prefix "XML:" kann eine XML ID übergeben werden
 | |
|         ]
 | |
| 
 | |
|         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',
 | |
|         }
 |