Commit Graph

159 Commits

Author SHA1 Message Date
641bfb3ade DokuWiki Integration: Neue Namespace-Struktur mit odoo-status
BREAKING CHANGES:
- Namespace-Struktur komplett überarbeitet
- ausruestung → ausstattung (konfigurierbar über dokuwiki.equipment_namespace)
- Neue Struktur: ausstattung:odoo-status/ für Odoo-generierte Status-Seiten
- Odoo erstellt KEINE Benutzer-Seiten mehr in {bereich}/ Namespaces

Neue Systemparameter:
- dokuwiki.equipment_namespace = werkstatt:ausstattung (Basis-Namespace)
- dokuwiki.central_documentation_namespace = werkstatt:ausstattung:odoo-status

Workflow-Änderung:
1. Odoo synchronisiert → erstellt nur start und odoo-status/ Seiten
2. Übersichtstabelle verlinkt auf {bereich}/{equipment_id} → Links sind rot
3. Benutzer klickt roten Link → DokuWiki bietet Seitenerstellung an
4. Benutzer erstellt Seite mit {{page>odoo-status:equipment_id}}

Vorteile:
- Klare Trennung: odoo-status/ (nur Odoo) vs. {bereich}/ (nur Benutzer)
- Keine Überschreibgefahr - Odoo und Benutzer haben getrennte Namespaces
- Benutzer entscheiden selbst ob/wann sie Dokumentation erstellen
- ACL-Schutz: odoo-status/ nur von odoo.odoo schreibbar
2025-12-27 16:56:17 +01:00
a73c0cb299 Integration Plan für automatisierte DokuWiki-Report-Generierung
Roadmap für vollautomatische monatliche PNG-Export-Generierung:
- Graph-Renderer mit Matplotlib/Plotly (alle Metabase-Features möglich)
- Scheduled Action (Cron) für monatliche Ausführung
- DokuWiki XML-RPC Upload Integration
- 5 Diagramm-Typen: Tagesansicht, Jahresvergleich, Trends, Wiederholungstäter
- Aufwand: 5-7 Stunden Implementierung

Vorteil: Vollautomatisch, professionelle Visualisierung mit Beschriftungen,
kein manueller Metabase-Export mehr nötig
2025-12-26 23:47:24 +01:00
4626379d6e Korrektur Ø Nutzer/Tag Berechnung und finale Verbesserungen
- Ø Nutzer/Tag Formel korrigiert: Buchungen/Tage statt Nutzer/Tage
- Jahr/Monat Felder zu DailyStats hinzugefügt für flexible Gruppierung
- Alle 2034 Datensätze neu generiert mit korrekten Werten
- show_measures zu allen Graph-Views hinzugefügt (Odoo-Limitation: funktioniert nicht)

LIMITIERUNG: Weitere Verbesserungen gegenüber Metabase nicht möglich
- Odoo Graph-Views können keine Werte auf Balken anzeigen
- 100% gestapelte Diagramme nicht möglich
- Komplexe Visualisierungen wie Häufigkeitsverteilungen nicht realisierbar
- Für Präsentationen und Export: Metabase bleibt überlegen

Empfehlung: Odoo für operative Arbeit, Metabase für Präsentationen nutzen
2025-12-26 23:40:42 +01:00
9be8f320f7 Tägliche Statistiken mit Drill-Down und Jahresvergleich
- Tägliche Statistiken (DailyStats) implementiert mit 2034 Datensätzen
- Wochenende vs. Wochentag farblich unterschieden in Tagesansicht
- Jahr/Monat Felder für Jahresvergleich hinzugefügt
- Button 'Tagesansicht' in Kanban-Dashboard für Drill-Down zu täglichen Statistiken
- Alle Dashboard-Graphen auf Jahresvergleich umgestellt (Monat × Jahr, nicht gestapelt)
- Jahresvergleich, Ø Nutzer/Tag, Wiederholungstäter, Nutzer pro Monat - alle mit Jahresvergleich
2025-12-26 21:35:22 +01:00
d6a98cfbd0 initiale Version von Open Workshop Report 2025-12-26 19:14:17 +01:00
0135035a54 DokuWiki Integration: Performance-Optimierung und Best Practices
- Connection Caching: Wiederverwendung von DokuWiki-Verbindungen (von 12min auf 20s für 50 Equipment)
- Template Caching: Template nur einmal laden statt pro Equipment
- Dokumentation: Best Practices für erweiterbare DokuWiki-Seitenstruktur (page.txt + page/ ohne start.txt)
- Catlist-Syntax dokumentiert für automatische Unterseiten-Auflistung
2025-12-24 14:13:59 +01:00
f79e126c8c DokuWiki Integration: wiki_doku_id aus Name+Modell, zentraler Namespace konfigurierbar
- wiki_doku_id wird nun aus equipment.name und equipment.model kombiniert generiert
- Systemparameter 'dokuwiki.central_documentation_namespace' für konfigurierbaren Namespace
- Verbessertes Error-Handling in dokuwiki_client mit detaillierteren Fehlermeldungen
- Docker-Netzwerk Unterstützung dokumentiert
- Gelöschte veraltete WordPress-API Dateien
2025-12-23 14:48:44 +01:00
253d289633 feat(dokuwiki): Flexible overview table with configurable columns
- Made overview table columns fully configurable via system parameters
- Added wiki_page_id placeholder for internal DokuWiki links
- Removed DokuWiki template dependency for overview table
- Added _register_hook to initialize parameters on module load/update
- Updated README with new configuration approach
- System parameters: overview_page_id, overview_title, overview_columns, overview_column_data
- Default columns: Name (with link), Status, Security Category, Area, Location, Image
2025-12-20 12:49:58 +01:00
de317f46e6 feat(dokuwiki): Add equipment overview table with DataTables
- Add _generate_overview_table_row() to generate table row per equipment
- Add action_sync_overview_table() for fast overview page sync
- Add new sync mode 'Übersichtstabelle aktualisieren' in wizard
- Add config parameters for overview page and template IDs
- Add overview_url field to wizard result view
- Columns: Name (linked), Status, Security Category, Area, Location, Image
- Performance: Single page update without iterating all equipment
- Include DokuWiki template and setup documentation
- Requires DokuWiki DataTables plugin for sortable/filterable table
- Fix: Use status_id instead of equipment_status_id
2025-12-19 20:40:29 +01:00
8ae586cca6 feat: Auto-create ows.machine on equipment import/create
- Add @api.model_create_multi hook to MaintenanceEquipment.create()
- Add load() override to handle Excel/CSV import correctly
- Add _create_missing_ows_machines() helper with recursion prevention
- Modify OwsMachine.create() to only create equipment if equipment_id not provided
- Use context flag 'skip_ows_machine_creation' to prevent infinite recursion
- Fixes: Equipment import now auto-creates ows.machine and displays OWS tab
- Migration tested: Compatible with SQL-based post-migration (23/23 machines migrated)
2025-12-19 20:12:54 +01:00
e18f2880a4 Make post-migration.py more robust when setting default status
- Check if status 'In Betrieb' exists before setting it
- Add warning if status not found instead of SQL error
- Status records are created automatically via XML data file
2025-12-18 20:56:14 +01:00
43cf5754fd Add automated maintenance equipment status creation with smileys
- open_workshop_base: Create 4 status records (In Betrieb, Defekt, Wartung, Ausgemustert) via XML data
- open_workshop_dokuwiki: Add smiley field to status model and populate with DokuWiki smileys/emojis
- Use noupdate=1 to prevent overwriting user customizations
- Status data loads automatically during module installation
2025-12-18 20:53:04 +01:00
4c048b5ca9 fix(ows_models): Update create() to use @api.model_create_multi for Odoo 18
Fixed DeprecationWarning by updating OwsMachine.create() method:
- Changed from @api.model with single vals parameter
- To @api.model_create_multi with vals_list parameter
- Now supports batch creation of multiple records
- Removed duplicate empty OwsMachineArea class definition

This resolves the Odoo 18 deprecation warning about create method not supporting batch operations.
2025-12-15 20:55:36 +01:00
686b201792 docs(migration): Add comments explaining related field synchronization
Added documentation to clarify:
- Why store=True is used for related fields (performance for filtering/searching)
- Why manual synchronization is needed in migration (related fields don't auto-sync during SQL INSERT)

No functional changes, only improved code documentation.
2025-12-15 20:46:14 +01:00
bd235e3ca0 fix(migration): Synchronize related fields (area_id, category) from ows.machine to maintenance.equipment
The related fields in maintenance.equipment with store=True were not automatically
synchronized during migration. Added explicit SQL UPDATE statements to copy values:
- ows_area_id from area_id
- ows_category from category

This ensures the maintenance.equipment records have all the OWS-specific data
from the original ows.machine records after migration.
2025-12-15 20:36:41 +01:00
a5f8fd32c3 feat(dokuwiki): Add partner fields, editable smileys, category icon, and mass sync wizard
- Add partner_id and partner_ref template placeholders for supplier information
- Implement editable status smiley field in maintenance.equipment.status
- Add UI views for editing smileys in Odoo (Wartung → Konfiguration → Equipment Status)
- Fix category field bug: use ows_category instead of category_id for security category
- Add category_icon placeholder displaying emoji indicators (🔴/🟡/🟢)
- Implement mass synchronization wizard (Wartung → Konfiguration → Wiki-Synchronisation)
  - Sync all equipment or filter by area
  - Sync only unsynchronized equipment
  - Force-sync option to overwrite existing documentation pages
  - Statistics display with error reporting
- Add security access rules for wizard
- Update README with new placeholders
2025-12-14 20:55:21 +01:00
3fa050f153 feat(dokuwiki): Add wiki-based template system and image upload
- Implemented wiki-based template system using c_template
  - Template loaded from werkstatt:ausruestung:c_template
  - Placeholder replacement for all equipment and related fields
  - Fallback to hardcoded content if template unavailable
  - Only view pages use templates, central doku page unchanged

- Added image upload capability for equipment
  - New field: image_1920 (Image field, max 1920x1920px)
  - View integration: Positioned as avatar before button_box
  - Upload to DokuWiki media directory during sync
  - Temporary file approach for dokuwiki.py library compatibility

- Extended template placeholders:
  - status: Equipment status from status_id
  - odoo_link: Formatted link back to Odoo equipment form
  - odoo_url: Direct URL to equipment in Odoo
  - image: Equipment image (300px width)
  - image_large: Equipment image (original size)
  - image_id: Media path for custom DokuWiki syntax

- Updated documentation with all available placeholders
2025-12-13 23:02:49 +01:00
e53c4028c9 feat(dokuwiki): Implement single-page DokuWiki integration
- Simplified architecture: ONE central documentation page per equipment
- Wiki ID generation from equipment name (e.g., 'sabako-laser')
- Namespace structure: werkstatt:ausruestung:doku:{name}
- View pages by area: werkstatt:ausruestung:{area}:{name}
- Smart page protection: central doku only created once, not overwritten
- View pages update on each sync (shows current Odoo metadata)
- Template detection: distinguishes real content from DokuWiki auto-templates
- JSONB multilingual name field handling
- Include Plugin integration for embedded content display
- Automatic sync option via write() override
- Configuration via System Parameters (url, user, password)
- Settings page in General Settings for easy credential management
2025-12-13 21:50:19 +01:00
5057985024 docs(feature-plan): Change namespace to werkstatt:ausruestung and add initial ACL phase
- Changed namespace from ausruestung:* to werkstatt:ausruestung:*
  - Main pages: werkstatt:ausruestung:bereich:maschinenname
  - Doku pages: werkstatt:ausruestung:bereich:maschinenname:doku

- Added two-phase ACL approach:
  - Phase 1: Only @odoo has access (initial setup/testing)
    - werkstatt:ausruestung:* @odoo 8
    - werkstatt:ausruestung:* @ALL 0
  - Phase 2: Werkstatt gets read/edit access (later rollout)
    - Main pages: @werkstatt read-only
    - Doku pages: @werkstatt editable

- Updated all code examples with new namespace
- Updated ACL permission table
- Added phased rollout advantage
2025-12-13 19:23:11 +01:00
00f33faebe docs(feature-plan): Refine DokuWiki architecture - inverted include approach
- Changed from marker-based sync to inverted include architecture:
  - Odoo generates read-only main page with equipment data
  - Main page includes user-editable :doku subpage via Include Plugin
  - Clear separation: Odoo owns structure, users own documentation

- Two-page system per equipment:
  - ausruestung:bereich:maschine (Odoo-generated, read-only)
  - ausruestung:bereich:maschine:doku (user-editable)

- Generisches ACL-System (maintenance-free):
  - ausruestung:*:doku @werkstatt 2 (editable)
  - ausruestung:* @werkstatt 1 (read-only)
  - Works automatically for all equipment

- Simplified sync algorithm:
  - Odoo completely overwrites main page (no marker parsing)
  - User content protected on separate page
  - Include renders both seamlessly

- Added detailed Python code examples
- Documented ACL wildcard matching rules
- Added table showing permission resolution

Benefits:
- No risk of users deleting sync markers
- Users cannot accidentally break Odoo data
- Self-healing: Odoo always regenerates correct structure
- Scalable: Works for 1000+ equipment pages
2025-12-13 18:16:33 +01:00
2eff81ce54 docs(feature-plan): Clarify sync mechanism - unidirectional with protected sections
- Changed 'bidirektional' to 'unidirektional' (Odoo → DokuWiki)
- Clarified data ownership:
  - Odoo = Master for structured data (name, serial_no, area, category)
  - DokuWiki = Master for freetext documentation (manuals, tips)

- Added sync marker system:
  - <- Ensures POS functionality is activated after ODOO_SYNC_START: section_name -->
  - <- Ensures POS functionality is activated after ODOO_SYNC_END: section_name -->
  - Only content between markers gets updated by Odoo
  - All other sections (Bedienung, Tipps & Tricks) remain untouched

- Documented sync algorithm with Python code example
- Users can freely edit wiki without fear of data loss
- DokuWiki versioning preserves all changes
2025-12-13 17:53:54 +01:00
92490aeb9c docs(feature-plan): Replace WordPress with DokuWiki integration
- Replaced open_workshop_api (WordPress REST API) with open_workshop_dokuwiki
- DokuWiki chosen for equipment documentation:
  - File-based, no separate database needed
  - Built-in versioning and history
  - Wiki syntax perfect for technical docs
  - Granular ACL (Odoo writable, all readable)
  - XML-RPC API for bidirectional sync

- Planned DokuWiki features:
  - Automatic wiki page per equipment
  - Namespace structure: ausruestung:bereich:maschinenname
  - Template system with equipment data
  - Smart button 'Wiki öffnen' in Equipment form
  - Auto-sync on equipment changes

- WordPress integration now optional:
  - Can be added later for public presentation
  - DokuWiki handles documentation (priority)
  - WordPress for marketing/SEO (future)

- Updated architecture diagram and implementation status
- open_workshop_api moved to 'optional' status
2025-12-13 17:50:51 +01:00
1b203eeb10 feat(equipment-view): Integrate OWS into Maintenance menu with Equipment-centric views
- Extended maintenance.equipment model with Related fields to ows.machine
  - ows_machine_id: One2many inverse relation
  - ows_category: Related to machine category (editable, stored)
  - ows_area_id: Related to machine area (editable, stored)
  - ows_product_ids: Related One2many for usage products
  - ows_training_ids: Related One2many for training products

- Equipment Form View Extensions:
  - Added ows_area_id and ows_category after location field
  - New 'Offene Werkstatt (Hobbyhimmel)' notebook page with:
    - Security section (category icon, category, area)
    - Usage products section (Nutzungsprodukte)
    - Training products section (Einweisungsprodukte)
  - Page visibility controlled by ows_machine_id existence

- Equipment List/Search View Extensions:
  - Added ows_category_icon and ows_area_id columns
  - Added OWS search fields (area, category)
  - Added category filters (green/yellow/red)
  - Added OWS grouping options (by area, by category)

- Menu Structure Migration:
  - Removed standalone 'Ausrüstung' top-level menu
  - Integrated all OWS config into Maintenance → Configuration:
    - Bereiche (Areas)
    - Zuordnungen (Assignments) container
      - Nutzungsprodukte (Usage Products)
      - Einweisungsprodukte (Training Products)

- Created simplified tree views for Equipment context:
  - view_ows_machine_product_tree_simple (no machine_id column)
  - view_ows_machine_training_tree_simple (no machine_id column)

- Freed location field from automatic area synchronization:
  - Removed area → location mapping in create()/write()
  - location now available for detailed physical location info
  - ows_area_id provides workspace area assignment

BREAKING CHANGE: Standalone OWS menu removed, all features now in Maintenance app
UX IMPROVEMENT: Single Equipment view shows all data, no split views needed
2025-12-13 17:43:07 +01:00
ed339b0e2e feat(open_workshop_base): Erweiterte Search-View und Gruppierung
- Füge maintenance.equipment Felder zur Suche hinzu (model, partner_id, location, company_id)
- Erweitere Gruppierungsoptionen (Hersteller, Techniker, Standort)
- Standard-Gruppierung nach Bereich aktiviert
- Dokumentation: _inherits Pattern erklärt in Feature Plan
2025-12-13 14:38:42 +01:00
e1feeb6d75 feat(aspl_equipment_qrcode_generator): Fix QR-code generation and PDF rendering
- Move QR-code generation from report to wizard (before PDF generation)
- Add attachment=True to qr_code Binary field for filestore storage
- Simplify report class - only provides data, no QR generation
- Change template from t-field to <img> with base64 data URL for proper PDF rendering
- Fix JSONB field extraction (name, category) for de_DE/en_US
- Add equipment_ids field to wizard form (invisible)
- Apply changes to all 3 label formats (2x5, 2x7, 4x7)

QR-codes now display correctly in generated PDFs and contain equipment
details plus direct link to Odoo equipment record.
2025-12-11 21:53:21 +01:00
550cdac1eb fix: Set company_id in equipment migration to fix serial number generation
- Add default company_id to equipment records during migration
- Fixes 'Generate Serial Number' button not working for migrated equipment
- Equipment without company_id could not generate serial numbers
2025-12-11 19:22:52 +01:00
b68ac293c8 added qrcode for equipment modul 2025-12-11 19:19:02 +01:00
42db76a9c7 feat: Improve equipment creation flow and UX
- Made location field readonly in maintenance.equipment view
- Hide equipment_id field in machine form (auto-created)
- Name and serial_no now directly editable in machine form
- Area is now required field
- Location automatically synced from area to equipment
- Equipment auto-created on machine save with all fields
- Renamed menu from 'Maschinen' to 'Ausrüstung'
- Improved user flow: No need to switch between views

Changes:
- Added maintenance_equipment_views.xml for readonly location
- Updated create() to always auto-create equipment
- Enhanced write() to sync name/serial_no changes to equipment
- Menu labels updated to 'Ausrüstung'
2025-12-07 21:33:06 +01:00
f87755e7d0 Merge branch '18.0-MultiModulOpenWorkshop' into 18.0
Integration of maintenance.equipment with automated migration workflow
2025-12-07 21:10:35 +01:00
8fb58c744e feat: Migrate to maintenance.equipment with automated OpenUpgrade workflow
- Integrated maintenance.equipment using _inherits pattern in open_workshop_base
- Removed duplicate fields (code, description, storage_location, purchase_price, purchase_date)
- Delegated equipment management to OCA maintenance module
- Added Smart Button UI pattern for equipment details
- Implemented automated migration workflow:
  * SQL script renames module open_workshop → open_workshop_base
  * Pre-migration: Installs maintenance, adds equipment_id column
  * Post-migration: Migrates 23 machines with proper JSONB names and locations
- Restored old open_workshop module (installable=False) for DB compatibility
- Updated CI/CD workflow with migration steps
- Area mapping corrected: area.name → equipment.location
- JSONB handling: Using SQL jsonb_build_object() for proper storage
- Serial numbers: From old code field or generated as OWS-{id}

Tested and verified:
 23 machines successfully migrated
 JSONB names extractable: name->>'de_DE' and name->>'en_US'
 Locations correctly mapped: Fablab, Holzbereich, etc.
 equipment_id linkage functional
2025-12-07 21:09:35 +01:00
ceb8af7e48 Fix: POS Template - duplicate key error in ows_pos_customer_sidebar
- t-key fallback: order.uid || order.id || order_index
- Verhindert 'undefined' duplicate key error im POS
- Asset-Bundle korrigiert: point_of_sale._assets_pos
2025-12-07 17:18:09 +01:00
71c6ba56ed Kapitel 3+4: POS-Code in separates Modul ausgelagert
- 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.
2025-12-07 16:43:51 +01:00
744b7b3234 Merge branch '18.0-MultiModulOpenWorkshop': Migration open_workshop → open_workshop_base 2025-12-07 16:01:51 +01:00
3619526af0 Migration: open_workshop → open_workshop_base
- Modul umbenannt von open_workshop zu open_workshop_base
- Alle Referenzen im Code aktualisiert (Templates, Views, Assets)
- SQL-Migrationsskript für automatische DB-Migration erstellt
- post_init_hook hinzugefügt
- Version auf 18.0.1.0.3 erhöht
- Vorbereitung für modulare Architektur (Base, POS, API)

Fixes für Gitea Action Integration:
- SQL-Skript in open_workshop_base/migrations/
- Alter open_workshop/ Ordner entfernt
- Migrations-Workflow getestet auf hh18
2025-12-07 15:45:03 +01:00
bb3d1bf7c9 removed unused files 2025-12-07 15:00:15 +01:00
bf605539fa final feature request 2 2025-12-07 14:53:06 +01:00
12d5902e3c final feature request 1 2025-12-07 14:50:36 +01:00
977aa2d1b3 final feature request 2025-12-07 14:46:09 +01:00
58c7e8f258 Open Workshop Multi Module Refactoring 2025-12-07 14:03:32 +01:00
7cd458b72f This now a multi modul odoo repository, open_workshop moved to open_workshop_base 2025-12-06 20:45:29 +01:00
dff2de1755 FIX: pos: wenn auf - gedrückt wird um eine Order zu entfernen, wurde nicht
die Order nicht gefunden. -> behoben
- IMP: "einfachere" Debug Möglichkeit mit odoo-18-dev container. README.md in .vscode
  hinzugefügt.
2025-10-25 14:10:25 +02:00
d56ae65b56 fixed missing dependency 2025-10-24 20:15:44 +02:00
bc0459ab9b IMP: added work_email to admin employee 2025-10-11 11:23:50 +02:00
7230bcb6f8 fix: anonymize_for_testsystem now supports archived admin account 2025-10-10 19:56:49 +02:00
f07f9dd8b3 Fix Odoo 18 compatibility: Enable notebook widget and fix context references
- Uncomment and activate notebook widget in machine form view
- Fix context reference from 'active_id' to 'id' for Odoo 18 compatibility
- Remove duplicate category_icon field in form group
- Clean up XML structure and indentation
- Enable "Nutzungsprodukte" and "Einweisungsprodukte" tabs with editable lists
- Resolve access rights inconsistency error for product_ids field

Fixes module upgrade error: "Field 'active_id' does not exist in model 'ows.machine'"
2025-10-09 22:17:09 +02:00
5c7fd4330d removed debugpy 2025-10-07 18:27:40 +02:00
ab696db035 Duplicate Warning Patch 2025-10-07 17:34:34 +02:00
1069630e86 FIX: Add VS Code debugging configuration and fix pos_order.py
- Added .vscode/launch.json with remote debugging setup for Odoo development
- Configured debugpy attachment on port 4338 with path mappings
- Added workspace settings for Python development with Odoo
- Fixed issues in pos_order.py for improved POS functionality
- Enhanced development workflow with breakpoint support for custom code and Odoo core
2025-10-06 19:54:24 +02:00
558dff276a debugpy option 2025-10-05 20:52:04 +02:00
e0a9205fea [fix] res.partner.remove.duplicate.bank.warning 2025-08-07 19:30:26 +02:00