From 71c6ba56edbcea258c0f616cfc1921f5025980b8 Mon Sep 17 00:00:00 2001 From: "matthias.lotz" Date: Sun, 7 Dec 2025 16:43:51 +0100 Subject: [PATCH] Kapitel 3+4: POS-Code in separates Modul ausgelagert MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Neues Modul open_workshop_pos erstellt - POS JavaScript, XML Templates und CSS verschoben - open_workshop_base bereinigt: keine POS-Abhängigkeit mehr - open_workshop_base Version 18.0.1.0.4 - open_workshop_pos Version 18.0.1.0.0 - Kategorie von 'Point of Sale' zu 'Manufacturing' geändert - Alle Template-Referenzen aktualisiert (open_workshop_base → open_workshop_pos) Module getestet und erfolgreich installiert in hh18 Datenbank. --- open_workshop_base/__manifest__.py | 34 ++++++------ open_workshop_pos/__init__.py | 2 + open_workshop_pos/__manifest__.py | 55 +++++++++++++++++++ open_workshop_pos/models/__init__.py | 2 + .../static/src/css/pos.css | 0 .../static/src/js/ows_machine_access_list.js | 4 +- .../static/src/js/ows_pos_customer_sidebar.js | 2 +- .../static/src/js/ows_pos_sidebar.js | 2 +- .../js/ows_product_screen_template_patch.js | 0 .../src/xml/ows_machine_access_list.xml | 2 +- .../src/xml/ows_pos_customer_sidebar.xml | 2 +- .../static/src/xml/ows_pos_sidebar.xml | 2 +- .../xml/ows_product_screen_template_patch.xml | 0 13 files changed, 83 insertions(+), 24 deletions(-) create mode 100644 open_workshop_pos/__init__.py create mode 100644 open_workshop_pos/__manifest__.py create mode 100644 open_workshop_pos/models/__init__.py rename {open_workshop_base => open_workshop_pos}/static/src/css/pos.css (100%) rename {open_workshop_base => open_workshop_pos}/static/src/js/ows_machine_access_list.js (92%) rename {open_workshop_base => open_workshop_pos}/static/src/js/ows_pos_customer_sidebar.js (96%) rename {open_workshop_base => open_workshop_pos}/static/src/js/ows_pos_sidebar.js (85%) rename {open_workshop_base => open_workshop_pos}/static/src/js/ows_product_screen_template_patch.js (100%) rename {open_workshop_base => open_workshop_pos}/static/src/xml/ows_machine_access_list.xml (98%) rename {open_workshop_base => open_workshop_pos}/static/src/xml/ows_pos_customer_sidebar.xml (95%) rename {open_workshop_base => open_workshop_pos}/static/src/xml/ows_pos_sidebar.xml (81%) rename {open_workshop_base => open_workshop_pos}/static/src/xml/ows_product_screen_template_patch.xml (100%) diff --git a/open_workshop_base/__manifest__.py b/open_workshop_base/__manifest__.py index 27ca633..d4b7fcc 100644 --- a/open_workshop_base/__manifest__.py +++ b/open_workshop_base/__manifest__.py @@ -1,11 +1,11 @@ { 'name': 'Open Workshop Base', 'license': 'AGPL-3', - 'version': '18.0.1.0.3', - 'summary': 'Erstellt Maschinenfreigaben basierend auf POS-Einweisungsprodukten', - 'depends': ['base', 'account', 'hr','product','sale','contacts','point_of_sale'], + 'version': '18.0.1.0.4', + 'summary': 'Kern-Modul für Maschinenfreigaben und Einweisungslogik', + 'depends': ['base', 'account', 'hr','product','sale','contacts'], 'author': 'matthias.lotz', - 'category': 'Point of Sale', + 'category': 'Manufacturing', 'data': [ 'security/ir.model.access.csv', @@ -21,21 +21,21 @@ 'web.assets_backend': [ 'open_workshop_base/static/src/css/category_color.css', ], - 'point_of_sale._assets_pos': [ - 'open_workshop_base/static/src/css/pos.css', - 'open_workshop_base/static/src/js/ows_machine_access_list.js', - 'open_workshop_base/static/src/js/ows_pos_customer_sidebar.js', - 'open_workshop_base/static/src/js/ows_pos_sidebar.js', - 'open_workshop_base/static/src/js/ows_product_screen_template_patch.js', - 'open_workshop_base/static/src/xml/ows_machine_access_list.xml', - 'open_workshop_base/static/src/xml/ows_pos_customer_sidebar.xml', - 'open_workshop_base/static/src/xml/ows_pos_sidebar.xml', - 'open_workshop_base/static/src/xml/ows_product_screen_template_patch.xml', - ], }, 'description': """ - Diese App erstellt Maschinenfreigaben basierend auf POS-Einweisungsprodukten. - Die App ist für den Einsatz in der Odoo-Version 18.0 konzipiert. +Open Workshop Base - Kernmodul +================================ + +Dieses Modul stellt die Basis-Funktionalität für Open Workshop bereit: + +* Maschinenmodelle (ows.machine) +* Bereiche (ows.machine.area) +* Einweisungslogik und Freigaben +* Produktverknüpfungen für Einweisungen +* Backend-UI (Form, Tree, Kanban) + +Für POS-Integration installiere: open_workshop_pos +Für API-Zugriff installiere: open_workshop_api (erforderlich für WordPress Frontend) """, 'post_init_hook': 'post_init_hook', } diff --git a/open_workshop_pos/__init__.py b/open_workshop_pos/__init__.py new file mode 100644 index 0000000..a0fdc10 --- /dev/null +++ b/open_workshop_pos/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +from . import models diff --git a/open_workshop_pos/__manifest__.py b/open_workshop_pos/__manifest__.py new file mode 100644 index 0000000..0c1b897 --- /dev/null +++ b/open_workshop_pos/__manifest__.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +{ + 'name': 'Open Workshop POS', + 'version': '18.0.1.0.0', + 'category': 'Point of Sale', + 'summary': 'POS Integration für Open Workshop - Machine Access & Customer UI', + 'description': """ +Open Workshop POS Integration +============================== + +Dieses Modul erweitert den Odoo Point of Sale um Open Workshop Funktionalität: + +* Machine Access List - Anzeige verfügbarer Maschinen +* Customer Sidebar - Kundenspezifische Maschinenfreigaben +* POS Sidebar - Maschinenauswahl und Status +* Product Screen Patches - Integration in POS Workflow + +Abhängigkeiten: +* open_workshop_base - Kernfunktionalität +* point_of_sale - Odoo POS System + +Autor: HobbyHimmel + """, + 'author': 'HobbyHimmel', + 'website': 'https://hobbyhimmel.de', + 'license': 'LGPL-3', + 'depends': [ + 'open_workshop_base', + 'point_of_sale', + ], + 'data': [ + # Views + ], + 'assets': { + 'point_of_sale.assets': [ + # JavaScript + 'open_workshop_pos/static/src/js/ows_pos_sidebar.js', + 'open_workshop_pos/static/src/js/ows_pos_customer_sidebar.js', + 'open_workshop_pos/static/src/js/ows_machine_access_list.js', + 'open_workshop_pos/static/src/js/ows_product_screen_template_patch.js', + + # XML Templates + 'open_workshop_pos/static/src/xml/ows_pos_sidebar.xml', + 'open_workshop_pos/static/src/xml/ows_pos_customer_sidebar.xml', + 'open_workshop_pos/static/src/xml/ows_machine_access_list.xml', + 'open_workshop_pos/static/src/xml/ows_product_screen_template_patch.xml', + + # CSS + 'open_workshop_pos/static/src/css/pos.css', + ], + }, + 'installable': True, + 'application': False, + 'auto_install': False, +} diff --git a/open_workshop_pos/models/__init__.py b/open_workshop_pos/models/__init__.py new file mode 100644 index 0000000..f234647 --- /dev/null +++ b/open_workshop_pos/models/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +# POS-spezifische Modelle (falls benötigt) diff --git a/open_workshop_base/static/src/css/pos.css b/open_workshop_pos/static/src/css/pos.css similarity index 100% rename from open_workshop_base/static/src/css/pos.css rename to open_workshop_pos/static/src/css/pos.css diff --git a/open_workshop_base/static/src/js/ows_machine_access_list.js b/open_workshop_pos/static/src/js/ows_machine_access_list.js similarity index 92% rename from open_workshop_base/static/src/js/ows_machine_access_list.js rename to open_workshop_pos/static/src/js/ows_machine_access_list.js index 6bcd0ee..06532c8 100644 --- a/open_workshop_base/static/src/js/ows_machine_access_list.js +++ b/open_workshop_pos/static/src/js/ows_machine_access_list.js @@ -7,7 +7,7 @@ import { rpc } from "@web/core/network/rpc"; import { registry } from "@web/core/registry"; export class OwsMachineAccessList extends Component { - static template = 'open_workshop_base.OwsMachineAccessList'; + static template = 'open_workshop_pos.OwsMachineAccessList'; setup() { this.pos = usePos(); @@ -68,5 +68,5 @@ export class OwsMachineAccessList extends Component { -registry.category("templates").add("open_workshop_base.OwsMachineAccessList", OwsMachineAccessList); +registry.category("templates").add("open_workshop_pos.OwsMachineAccessList", OwsMachineAccessList); diff --git a/open_workshop_base/static/src/js/ows_pos_customer_sidebar.js b/open_workshop_pos/static/src/js/ows_pos_customer_sidebar.js similarity index 96% rename from open_workshop_base/static/src/js/ows_pos_customer_sidebar.js rename to open_workshop_pos/static/src/js/ows_pos_customer_sidebar.js index 3c9e987..3625817 100644 --- a/open_workshop_base/static/src/js/ows_pos_customer_sidebar.js +++ b/open_workshop_pos/static/src/js/ows_pos_customer_sidebar.js @@ -7,7 +7,7 @@ import { _t } from "@web/core/l10n/translation"; import { ask } from "@web/core/confirmation_dialog/confirmation_dialog"; export class OwsPosCustomerSidebar extends Component { - static template = "open_workshop_base.OwsPosCustomerSidebar"; + static template = "open_workshop_pos.OwsPosCustomerSidebar"; setup() { this.pos = usePos(); // ✅ Holt dir Zugriff auf den zentralen POS-Store diff --git a/open_workshop_base/static/src/js/ows_pos_sidebar.js b/open_workshop_pos/static/src/js/ows_pos_sidebar.js similarity index 85% rename from open_workshop_base/static/src/js/ows_pos_sidebar.js rename to open_workshop_pos/static/src/js/ows_pos_sidebar.js index 962fe7a..2c384fa 100644 --- a/open_workshop_base/static/src/js/ows_pos_sidebar.js +++ b/open_workshop_pos/static/src/js/ows_pos_sidebar.js @@ -6,6 +6,6 @@ import { OwsPosCustomerSidebar } from "./ows_pos_customer_sidebar"; import { OwsMachineAccessList } from "./ows_machine_access_list"; export class OwsPosSidebar extends Component { - static template = "open_workshop_base.OwsPosSidebar"; + static template = "open_workshop_pos.OwsPosSidebar"; static components = { OwsPosCustomerSidebar, OwsMachineAccessList }; } \ No newline at end of file diff --git a/open_workshop_base/static/src/js/ows_product_screen_template_patch.js b/open_workshop_pos/static/src/js/ows_product_screen_template_patch.js similarity index 100% rename from open_workshop_base/static/src/js/ows_product_screen_template_patch.js rename to open_workshop_pos/static/src/js/ows_product_screen_template_patch.js diff --git a/open_workshop_base/static/src/xml/ows_machine_access_list.xml b/open_workshop_pos/static/src/xml/ows_machine_access_list.xml similarity index 98% rename from open_workshop_base/static/src/xml/ows_machine_access_list.xml rename to open_workshop_pos/static/src/xml/ows_machine_access_list.xml index 0b2f64f..1a76bfc 100644 --- a/open_workshop_base/static/src/xml/ows_machine_access_list.xml +++ b/open_workshop_pos/static/src/xml/ows_machine_access_list.xml @@ -1,4 +1,4 @@ - +
diff --git a/open_workshop_base/static/src/xml/ows_pos_customer_sidebar.xml b/open_workshop_pos/static/src/xml/ows_pos_customer_sidebar.xml similarity index 95% rename from open_workshop_base/static/src/xml/ows_pos_customer_sidebar.xml rename to open_workshop_pos/static/src/xml/ows_pos_customer_sidebar.xml index fc6a596..562112c 100644 --- a/open_workshop_base/static/src/xml/ows_pos_customer_sidebar.xml +++ b/open_workshop_pos/static/src/xml/ows_pos_customer_sidebar.xml @@ -1,6 +1,6 @@ - +
diff --git a/open_workshop_base/static/src/xml/ows_pos_sidebar.xml b/open_workshop_pos/static/src/xml/ows_pos_sidebar.xml similarity index 81% rename from open_workshop_base/static/src/xml/ows_pos_sidebar.xml rename to open_workshop_pos/static/src/xml/ows_pos_sidebar.xml index 5aa83dc..fcfa5d0 100644 --- a/open_workshop_base/static/src/xml/ows_pos_sidebar.xml +++ b/open_workshop_pos/static/src/xml/ows_pos_sidebar.xml @@ -1,6 +1,6 @@ - +
diff --git a/open_workshop_base/static/src/xml/ows_product_screen_template_patch.xml b/open_workshop_pos/static/src/xml/ows_product_screen_template_patch.xml similarity index 100% rename from open_workshop_base/static/src/xml/ows_product_screen_template_patch.xml rename to open_workshop_pos/static/src/xml/ows_product_screen_template_patch.xml