257 lines
		
	
	
		
			10 KiB
		
	
	
	
		
			Python
		
	
	
			
		
		
	
	
			257 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',
 | |
|         }
 | |
| 
 | |
|         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': True,         # Verschiedene Adressen für Rechnung und Lieferung
 | |
|             'group_sale_pricelist': True,                # Preislisten verwenden
 | |
|             'group_discount_per_so_line': True,          # Rabatte verwenden
 | |
|             'group_uom': True,                           # Verwende Mengeneinheiten
 | |
|             'group_invoice_deli_orders': True,           # Erstelle Rechnungen durch Auslieferungen
 | |
|         }
 | |
|         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
 | |
|         }
 | |
| 
 | |
| 
 | |
|         self.finance_config = {
 | |
|             #'group_multi_currency':True
 | |
|         }
 | |
| 
 | |
| 
 | |
|         #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 = {
 | |
|             'group_stock_multiple_locations': True,      # Verwalten Sie mehrere Lager und Lagerorte
 | |
|             'group_stock_tracking_lot': False,           # Benutze Verpackungen: Paletten, Boxen, ...
 | |
|             'group_stock_production_lot': True,          # Verfolgen Sie Los- und Seriennummern.
 | |
|             'group_stock_packaging': False,              # Ermöglicht die Auswahl einer Verpackung
 | |
|             'group_stock_adv_location': True,            # Verwalten Sie erweiterte Routen im Lager
 | |
|         }
 | |
| 
 | |
|         # 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]
 | |
| 
 | |
|         # Wenn gesetzt, teilen sich Gutschriften und Rechnungen den selben Nummernkreis
 | |
|         self.refund_invoice_sequence = True
 | |
| 
 | |
|         self.sequences = {
 | |
|             'sale.order':  {
 | |
|                 'number_next_actual': 1,
 | |
|                 'prefix': 'A-',
 | |
|                 'padding': 5,
 | |
|             },
 | |
| #             'work.order':  {
 | |
| #                 'number_next_actual': 1,
 | |
| #                 'prefix': 'AS-',
 | |
| #                 'padding': 5,
 | |
| #             },
 | |
| #            'picking.out':  {
 | |
| #                #'number_next_actual': 1,
 | |
| #                'prefix': 'LS/',
 | |
| #                'padding': 4,
 | |
| #            },
 | |
| #            '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,
 | |
| #             },
 | |
| #             'account.invoice':  {
 | |
| #                 'number_next_actual': 2000,
 | |
| #                 'prefix': '15-',
 | |
| #                 'padding': 4,
 | |
| #             },
 | |
|         }
 | |
| 
 | |
|         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',
 | |
|             'cam_testenv',
 | |
|             'cam_max_width',
 | |
|             'oerp_no_phoning_home',
 | |
|             'cam_custom',
 | |
|             'cam_reports',
 | |
|             'account_cancel',
 | |
|             'cam_invoice_skonto',
 | |
|             'web_printscreen_zb',
 | |
|             'crm',
 | |
|             'sale',
 | |
|             'mail_follower_control',
 | |
|             #'cam_hr_overtime',
 | |
|             #'cam_hr',
 | |
|             #'sale_order_optional',
 | |
|             #'sale_order_reminder',
 | |
|         ]
 | |
| 
 | |
|         # 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,
 | |
|             'cam_reports.report_saleorder_ohne': "((object.state in ('draft','sent') and 'KV_' or 'AB_') + object.name" + timestamp,
 | |
|             'cam_reports.report_porto_anforderung': "('PV_' + object.name " + timestamp,
 | |
|             'cam_reports.report_porto_anforderung_ohne': "('PV_' + object.name " + timestamp,
 | |
|             'account.report_invoice': "(object.state in ('open','paid')) and ('RE_'+(object.number or '').replace('/','')" + timestamp,
 | |
|             'cam_reports.report_invoices_ohne': "(object.state in ('open','paid')) and ('RE_'+(object.number or '').replace('/','')" + timestamp,
 | |
|             'cam_reports.report_porto_rechnung': "(object.state in ('open','paid')) and ('RE_'+(object.number or '').replace('/','')" + timestamp,
 | |
|             'cam_reports.report_porto_rechnung_ohne': "(object.state in ('open','paid')) and ('RE_'+(object.number or '').replace('/','')" + timestamp,
 | |
|             'purchase.report_purchasequotation':  "('AN_' + object.name" + timestamp,
 | |
|             'purchase.report_purchaseorder': "('B_' + object.name" + timestamp,
 | |
|             'cam_reports.report_purchaseorder_ohne': "('B_' + 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': 'db', # [db] oder [file]
 | |
|             'database.expiration_date': '2038-01-19',
 | |
|         }
 |