From 83aff9a249289341a3c30b3b2623615711e04b88 Mon Sep 17 00:00:00 2001 From: Christian Hattemer Date: Tue, 8 Nov 2016 18:44:44 +0100 Subject: [PATCH 1/8] =?UTF-8?q?Aufr=C3=A4umen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ext/config/odoo-server.conf | 2 +- ext/custom-addons/dp_custom/__init__.py | 5 +- ext/custom-addons/dp_custom/__openerp__.py | 10 +- .../dp_custom/data/dp_custom_data.xml | 225 +++++++++--------- .../dp_custom/views/dp_custom_view.xml | 8 +- ext/custom-addons/dp_report/__init__.py | 2 +- ext/custom-addons/dp_report/__openerp__.py | 8 +- .../dp_report/models/__init__.py | 2 +- .../dp_report/views/delivery.xml | 144 +++++------ ext/custom-addons/dp_report/views/invoice.xml | 118 ++++----- ext/custom-addons/dp_report/views/layouts.xml | 102 ++++---- .../dp_report/views/saleorder.xml | 156 ++++++------ 12 files changed, 389 insertions(+), 393 deletions(-) diff --git a/ext/config/odoo-server.conf b/ext/config/odoo-server.conf index 7a2599d6..d2b1242e 100644 --- a/ext/config/odoo-server.conf +++ b/ext/config/odoo-server.conf @@ -38,4 +38,4 @@ limit_memory_hard = 10000000000 # Use a new worker for the next request if 400MB is reached # The worker will be recycled after the current request -limit_memory_soft = 400000000 \ No newline at end of file +limit_memory_soft = 400000000 diff --git a/ext/custom-addons/dp_custom/__init__.py b/ext/custom-addons/dp_custom/__init__.py index 34585445..f6229e8e 100644 --- a/ext/custom-addons/dp_custom/__init__.py +++ b/ext/custom-addons/dp_custom/__init__.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- ############################################################################## # -# OpenERP, Open Source Management Solution -# Copyright (C) 20014-2016 Camadeus GmbH (). +# datenpol gmbh +# Copyright (C) 2013-TODAY datenpol gmbh () # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -22,4 +22,3 @@ import models # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/ext/custom-addons/dp_custom/__openerp__.py b/ext/custom-addons/dp_custom/__openerp__.py index 5a2657d0..3c2124e1 100644 --- a/ext/custom-addons/dp_custom/__openerp__.py +++ b/ext/custom-addons/dp_custom/__openerp__.py @@ -2,7 +2,7 @@ ############################################################################## # # datenpol gmbh -# Copyright (C) 2013-TODAY datenpol gmbh() +# Copyright (C) 2013-TODAY datenpol gmbh () # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -22,12 +22,14 @@ { 'name': 'datenpol Anpassungen', - 'category': 'Custom', + 'category': 'Custom', 'version': '1.0', 'description': """Individuelle Anpassungen""", 'author': 'datenpol gmbh', - 'website': 'http://www.datenpol.at', - 'depends': ['base'], + 'website': 'http://www.datenpol.at/', + 'depends': [ + 'base', + ], 'data': [ 'data/dp_custom_data.xml', 'views/dp_custom_view.xml', diff --git a/ext/custom-addons/dp_custom/data/dp_custom_data.xml b/ext/custom-addons/dp_custom/data/dp_custom_data.xml index 458fac35..601791f4 100644 --- a/ext/custom-addons/dp_custom/data/dp_custom_data.xml +++ b/ext/custom-addons/dp_custom/data/dp_custom_data.xml @@ -1,127 +1,122 @@ - - - - + + - - - Stück - - - - - 100 Stk. - - bigger - - - - - 1000 Stk. - - bigger - + + + Stück + + + + + 100 Stk. + + bigger + + + + + 1000 Stk. + + bigger + - - - - Rolle(n) - + + + + Rolle(n) + - - - - Satz - + + + + Satz + - - - - Arbeitstag - + + + + Arbeitstag + - - - - - mm - - smaller - - - - - Quadratm. - - - - - - - - - - - Kubikm. - - - - Kubikm. - - - - + + + + mm + + smaller + - - - Paket(e) - - - - + + + Quadratm. + + + + + + + + - - - Paar(e) - - - - + + + Kubikm. + + + + Kubikm. + + + + - - - - min - - - - - - Größe - radio - - - - - - - - - - - - - + + + Paket(e) + + + + + + + + Paar(e) + + + + + + + + + min + + + + + + Größe + radio + + + + + + + + + + diff --git a/ext/custom-addons/dp_custom/views/dp_custom_view.xml b/ext/custom-addons/dp_custom/views/dp_custom_view.xml index b24d2621..b3570a73 100644 --- a/ext/custom-addons/dp_custom/views/dp_custom_view.xml +++ b/ext/custom-addons/dp_custom/views/dp_custom_view.xml @@ -1,10 +1,6 @@ - + - - + - - - diff --git a/ext/custom-addons/dp_report/__init__.py b/ext/custom-addons/dp_report/__init__.py index 5305644d..cde864ba 100644 --- a/ext/custom-addons/dp_report/__init__.py +++ b/ext/custom-addons/dp_report/__init__.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- -from . import models \ No newline at end of file +from . import models diff --git a/ext/custom-addons/dp_report/__openerp__.py b/ext/custom-addons/dp_report/__openerp__.py index 8b51bdec..4a35b19b 100644 --- a/ext/custom-addons/dp_report/__openerp__.py +++ b/ext/custom-addons/dp_report/__openerp__.py @@ -1,14 +1,16 @@ # -*- coding: utf-8 -*- { - 'name': 'datepol Report Anpassungen', + 'name': 'datepol Report-Anpassungen', 'category': 'Custom', 'version': '1.0', 'summary': """Individuelle Report Anpassungen""", 'description': """Individuelle Report Anpassungen""", 'author': 'datenpol gmbh', - 'website': 'http://www.datenpol.at', - 'depends': ['base'], + 'website': 'http://www.datenpol.at/', + 'depends': [ + 'base', + ], 'data': [ # 'security/ir.model.access.csv', 'views/layouts.xml', diff --git a/ext/custom-addons/dp_report/models/__init__.py b/ext/custom-addons/dp_report/models/__init__.py index 7c68785e..40a96afc 100644 --- a/ext/custom-addons/dp_report/models/__init__.py +++ b/ext/custom-addons/dp_report/models/__init__.py @@ -1 +1 @@ -# -*- coding: utf-8 -*- \ No newline at end of file +# -*- coding: utf-8 -*- diff --git a/ext/custom-addons/dp_report/views/delivery.xml b/ext/custom-addons/dp_report/views/delivery.xml index 8063c308..c36cf0f7 100644 --- a/ext/custom-addons/dp_report/views/delivery.xml +++ b/ext/custom-addons/dp_report/views/delivery.xml @@ -1,75 +1,77 @@ - - - - - \ No newline at end of file + + + + + + + + + + diff --git a/ext/custom-addons/dp_report/views/invoice.xml b/ext/custom-addons/dp_report/views/invoice.xml index 436df4e1..7ed20a8f 100644 --- a/ext/custom-addons/dp_report/views/invoice.xml +++ b/ext/custom-addons/dp_report/views/invoice.xml @@ -1,65 +1,65 @@ - - - - - \ No newline at end of file + + + + + + + + + + diff --git a/ext/custom-addons/dp_report/views/layouts.xml b/ext/custom-addons/dp_report/views/layouts.xml index ecd180e0..313ceead 100644 --- a/ext/custom-addons/dp_report/views/layouts.xml +++ b/ext/custom-addons/dp_report/views/layouts.xml @@ -1,58 +1,58 @@ - - + + - - - - + + diff --git a/ext/custom-addons/dp_report/views/saleorder.xml b/ext/custom-addons/dp_report/views/saleorder.xml index 4526105b..a2009e9b 100644 --- a/ext/custom-addons/dp_report/views/saleorder.xml +++ b/ext/custom-addons/dp_report/views/saleorder.xml @@ -1,85 +1,85 @@ - - - - - \ No newline at end of file + + + + + + + + + + From 1a391b5527ca9aaf946e81fc63a771632a839f13 Mon Sep 17 00:00:00 2001 From: Christian Hattemer Date: Thu, 10 Nov 2016 14:54:56 +0100 Subject: [PATCH 2/8] Feld "This database will expire" verschwinden lassen --- setup/lib/config_at.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/lib/config_at.py b/setup/lib/config_at.py index 00f1f29b..563f8ec3 100644 --- a/setup/lib/config_at.py +++ b/setup/lib/config_at.py @@ -25,7 +25,6 @@ class Config(): 'website': 'http://www.datenpol.at/', 'company_registry': '359270p', 'country_id': 'at', # 'de' für Deutschland - 'logo': False, 'vat': 'ATU 66309611', 'rml_header1': False, 'vat_check_vies': True, @@ -253,4 +252,5 @@ class Config(): self.system_parameters = { 'ir_attachment.location': 'db', # [db] oder [file] + 'database.expiration_date': '2038-01-19', } From 3ac31cc25b51610a3103780284e58968eefac3c1 Mon Sep 17 00:00:00 2001 From: Christian Hattemer Date: Thu, 10 Nov 2016 15:52:43 +0100 Subject: [PATCH 3/8] Odoo-Touren auf konsumiert setzen --- setup/lib/cli.py | 3 ++- setup/lib/functions.py | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/setup/lib/cli.py b/setup/lib/cli.py index f2ee06fb..c15d234f 100755 --- a/setup/lib/cli.py +++ b/setup/lib/cli.py @@ -127,7 +127,8 @@ def main(): #'update_special_values', 'set_sys_params', #'setup_reports', - ] + 'consume_tours', + ] if cmd == 'setup': methods = setup_methods diff --git a/setup/lib/functions.py b/setup/lib/functions.py index 0b28b55e..9691dfc7 100644 --- a/setup/lib/functions.py +++ b/setup/lib/functions.py @@ -909,6 +909,25 @@ class DatenpolFunctions(): # except: # print "Fehler Anlage ExtID " + 'cust_account_mapp_' + acc + return True + def consume_tours(self): + """Odoo-Touren auf konsumiert setzen""" + + tours = [ + 'crm_tour', + 'mail_tour', + 'sale_tour', + 'rte', + 'rte_inline', + ] + + for uid in self._execute('res.users', 'search', []): + for t in tours: + vals = { + 'name': t, + 'user_id': uid, + } + self._execute('web_tour.tour', 'create', vals) return True From d767a01dd19c8a1192989fc8df0c8739cc0b62ed Mon Sep 17 00:00:00 2001 From: Christian Hattemer Date: Thu, 10 Nov 2016 18:26:33 +0100 Subject: [PATCH 4/8] An Standard anpassen --- .../dp_custom/models/ir_ui_menu.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/ext/custom-addons/dp_custom/models/ir_ui_menu.py b/ext/custom-addons/dp_custom/models/ir_ui_menu.py index d2652712..e6dc3961 100644 --- a/ext/custom-addons/dp_custom/models/ir_ui_menu.py +++ b/ext/custom-addons/dp_custom/models/ir_ui_menu.py @@ -2,7 +2,7 @@ ############################################################################## # # datenpol gmbh -# Copyright (C) 2013-TODAY datenpol gmbh() +# Copyright (C) 2013-TODAY datenpol gmbh () # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -24,31 +24,30 @@ from openerp import api from openerp.tools.translate import _ from openerp import SUPERUSER_ID from openerp import tools -from lxml import etree DISABLED_MENUS = [ ] class ir_ui_menu(models.Model): _inherit = 'ir.ui.menu' - + @tools.ormcache(skiparg=2) def get_disabled_menu_ids(self, cr, uid, context=None): data_obj = self.pool.get('ir.model.data') - + menu_ids = [] for menu in DISABLED_MENUS: - module,xml_id = menu.split('.') + module, xml_id = menu.split('.') menu = data_obj.get_object(cr, uid, module, xml_id) if menu: menu_ids.append(menu.id) - return menu_ids - def _filter_visible_menus(self, cr, uid, ids, context=None): - if uid != 1: + return menu_ids + + def _filter_visible_menus(self, cr, uid, ids, context=None): + if uid != 1: disabled_ids = self.get_disabled_menu_ids(cr, uid) - ids = [id for id in ids if id not in disabled_ids] - + ids = super(ir_ui_menu, self)._filter_visible_menus(cr, uid, ids, context) return ids From 45f818bc867d5af6b83f1db35d39443ed65c73c8 Mon Sep 17 00:00:00 2001 From: Christian Hattemer Date: Thu, 10 Nov 2016 19:04:36 +0100 Subject: [PATCH 5/8] Views-Datei laut Odoo-Guidelines benennen --- ext/custom-addons/dp_custom/__openerp__.py | 2 +- .../dp_custom/views/{dp_custom_view.xml => dp_custom_views.xml} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename ext/custom-addons/dp_custom/views/{dp_custom_view.xml => dp_custom_views.xml} (100%) diff --git a/ext/custom-addons/dp_custom/__openerp__.py b/ext/custom-addons/dp_custom/__openerp__.py index 3c2124e1..ffbd410c 100644 --- a/ext/custom-addons/dp_custom/__openerp__.py +++ b/ext/custom-addons/dp_custom/__openerp__.py @@ -32,7 +32,7 @@ ], 'data': [ 'data/dp_custom_data.xml', - 'views/dp_custom_view.xml', + 'views/dp_custom_views.xml', 'security/ir.model.access.csv', ], 'installable': True, diff --git a/ext/custom-addons/dp_custom/views/dp_custom_view.xml b/ext/custom-addons/dp_custom/views/dp_custom_views.xml similarity index 100% rename from ext/custom-addons/dp_custom/views/dp_custom_view.xml rename to ext/custom-addons/dp_custom/views/dp_custom_views.xml From 75c8dfdcfbf1a7f38cab1ce117b7f3acedca7c95 Mon Sep 17 00:00:00 2001 From: Christian Hattemer Date: Mon, 14 Nov 2016 14:48:16 +0100 Subject: [PATCH 6/8] =?UTF-8?q?Anpassungen=20f=C3=BCr=20Odoo=2010?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup/lib/cli.py | 1 - setup/lib/config_at.py | 39 ++++++++++++++++++++------------------- setup/lib/functions.py | 42 +++++++++++++++++++++++------------------- 3 files changed, 43 insertions(+), 39 deletions(-) diff --git a/setup/lib/cli.py b/setup/lib/cli.py index c15d234f..e9f27e56 100755 --- a/setup/lib/cli.py +++ b/setup/lib/cli.py @@ -82,7 +82,6 @@ def main(): 'login', 'install_module_sale', #'setup_accounting', - #'setup_accounting2', 'set_admin_rights', ] diff --git a/setup/lib/config_at.py b/setup/lib/config_at.py index 563f8ec3..315c9887 100644 --- a/setup/lib/config_at.py +++ b/setup/lib/config_at.py @@ -83,13 +83,13 @@ class Config(): # 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 + '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] + self.order_policy = 'picking' # Erzeuge Rechnung: [manual], [picking], [prepaid] # Einstellungen Einkauf self.purchase_config = { @@ -100,26 +100,27 @@ class Config(): 'group_costing_method': True, # Benutzen Sie 'Einkaufs-' oder 'Durchschnittspreis' zur Bestandsbewertung } - + # Einstellungen Finanzen self.finance_config = { - #'group_multi_currency':True + 'group_multi_currency': False, # Multiwährungsfunktion aktivieren + 'default_sale_tax_id': 'XML:l10n_at.1_tax_at_mwst_10', # Standardsteuer Verkauf } - - #Einstellungen Personal + # 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 + '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 + # 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 + '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 diff --git a/setup/lib/functions.py b/setup/lib/functions.py index 9691dfc7..1aa09195 100644 --- a/setup/lib/functions.py +++ b/setup/lib/functions.py @@ -95,6 +95,26 @@ class DatenpolFunctions(): fi.close() return content + def resolve_xml_id(self, value): + # In case the value starts with 'XML:' then take the remaining string + # as an XML-Id, resolve it and return that. Otherwise return value + # unchanged. + if type(value) != str or value[:4] != 'XML:': + return value + + xml_id = value[4:] + res_id = self._execute('ir.model.data', 'xmlid_to_res_id', xml_id) + if not res_id: + raise Exception('XML-Id "%s" nicht vorhanden!' % xml_id) + return res_id + + def resolve_xml_ids(self, data): + # Resolve all XML-Ids in the dict data + # Note: This happens in-place, the original dict is returned + for k, v in data.iteritems(): + data[k] = self.resolve_xml_id(v) + return data + def set_company(self): """Setze Unternehmensdaten (Allgemein, RML, Logo)""" @@ -344,15 +364,6 @@ class DatenpolFunctions(): return self._execute('res.users', 'write', [user_id], vals) def setup_accounting(self): - """Konfiguration Buchhaltung""" - - vals = self._execute('account.installer', 'default_get', []) - vals['charts'] = self.config.chart_of_accounts - wizard_id = self._execute('account.installer', 'create', vals) - self._execute('account.installer', 'action_next', [wizard_id]) - return True - - def setup_accounting2(self): """Konfiguration Kontenplan""" c = self.config @@ -397,7 +408,7 @@ class DatenpolFunctions(): return True def uninstall_chat(self): - """Chat-Modul deinstallieren """ + """Chat-Modul deinstallieren""" modules = ['im_chat', 'im_odoo_support', 'bus'] modules_to_install = self._execute('ir.module.module', 'search', [('name', 'in', modules)]) @@ -690,14 +701,7 @@ class DatenpolFunctions(): """Defaultwerte für Dokumente setzen""" for model, field, value in self.config.default_values: - # Falls XML ID (prefix "XML:") dann die DB ID holen - if value[0:4] == 'XML:': - xml_id = value[4:] - dummy, dummy2, res_id = self._execute('ir.model.data', 'xmlid_lookup', xml_id) - if not res_id: - raise Exception('Defaultwerte anlegen: XML ID %s nicht vorhanden!' % (xml_id)) - value = res_id - + value = self.resolve_xml_id(value) vals = { 'name': field, 'model': model, @@ -800,7 +804,7 @@ class DatenpolFunctions(): if hasattr(self.config, 'finance_config'): vals = self._execute('account.config.settings', 'default_get', []) - vals.update(self.config.finance_config) + vals.update(self.resolve_xml_ids(self.config.finance_config)) wizard_id = self._execute('account.config.settings', 'create', vals) return self._execute('account.config.settings', 'execute', [wizard_id]) return True From 358e09aad218e4f9bd0537f479842f9438e1a587 Mon Sep 17 00:00:00 2001 From: Christian Hattemer Date: Mon, 14 Nov 2016 17:29:23 +0100 Subject: [PATCH 7/8] Implementierungsplaner-Fortschrittsbalken ausblenden --- setup/lib/cli.py | 1 + setup/lib/functions.py | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/setup/lib/cli.py b/setup/lib/cli.py index e9f27e56..873eba69 100755 --- a/setup/lib/cli.py +++ b/setup/lib/cli.py @@ -127,6 +127,7 @@ def main(): 'set_sys_params', #'setup_reports', 'consume_tours', + 'disable_planners', ] if cmd == 'setup': diff --git a/setup/lib/functions.py b/setup/lib/functions.py index 1aa09195..da95df3d 100644 --- a/setup/lib/functions.py +++ b/setup/lib/functions.py @@ -935,3 +935,12 @@ class DatenpolFunctions(): self._execute('web_tour.tour', 'create', vals) return True + + def disable_planners(self): + """Implementierungsplaner deaktivieren""" + + # The dashboard widget itself remains. It can be removed in the + # module web_settings_dashboard in dashboard.xml and dashboard.js. + + planner_ids = self._execute('web.planner', 'search', []) + return self._execute('web.planner', 'write', planner_ids, {'active': False}) From d52735465ccc3c063939fa6ad7084d8b9b80386f Mon Sep 17 00:00:00 2001 From: Christian Hattemer Date: Tue, 15 Nov 2016 13:54:31 +0100 Subject: [PATCH 8/8] __openerp__ auf __manifest__ umbenennen --- ext/custom-addons/dp_custom/{__openerp__.py => __manifest__.py} | 0 ext/custom-addons/dp_report/{__openerp__.py => __manifest__.py} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename ext/custom-addons/dp_custom/{__openerp__.py => __manifest__.py} (100%) rename ext/custom-addons/dp_report/{__openerp__.py => __manifest__.py} (100%) diff --git a/ext/custom-addons/dp_custom/__openerp__.py b/ext/custom-addons/dp_custom/__manifest__.py similarity index 100% rename from ext/custom-addons/dp_custom/__openerp__.py rename to ext/custom-addons/dp_custom/__manifest__.py diff --git a/ext/custom-addons/dp_report/__openerp__.py b/ext/custom-addons/dp_report/__manifest__.py similarity index 100% rename from ext/custom-addons/dp_report/__openerp__.py rename to ext/custom-addons/dp_report/__manifest__.py