diff --git a/__manifest__.py b/__manifest__.py
index 8728ada..ca9ccfa 100644
--- a/__manifest__.py
+++ b/__manifest__.py
@@ -26,12 +26,13 @@
'installable': True,
'assets': {
'point_of_sale.assets': [
- 'static/src/js/partner_access_popup.js',
'static/src/js/machine_access_sidebar.js',
'static/src/css/pos.css',
- #'static/src/js/debug.js',
],
},
'post_init_hook': 'run_migration',
-
+ 'description': """
+ Diese App erstellt Maschinenfreigaben basierend auf POS-Einweisungsprodukten.
+ Die App ist für den Einsatz in der Odoo-Version 13.0 konzipiert.
+ """,
}
diff --git a/models/ows_models.py b/models/ows_models.py
index fb8eda5..6e5a81f 100644
--- a/models/ows_models.py
+++ b/models/ows_models.py
@@ -82,7 +82,7 @@ class ResPartner(models.Model):
)
machine_access_html = fields.Html(
- string="Maschinenfreigaben",
+ string="Maschinenfreigabe",
compute="_compute_machine_access_html",
sanitize=False
)
diff --git a/static/src/css/pos.css b/static/src/css/pos.css
index 747de66..6a6f9a0 100644
--- a/static/src/css/pos.css
+++ b/static/src/css/pos.css
@@ -368,6 +368,7 @@ td {
.pos .new-order-button{
text-align: center;
width : 100%;
+ height: 48px;
background : #d3d3d3;
/* overflow: auto; */
}
@@ -377,7 +378,7 @@ td {
display: inline-block;
box-sizing: border-box;
-moz-box-sizing: border-box;
- height: 30px;
+ height: 48px;
padding-left: 6px;
margin: 2px;
background: #8b8b8b;
@@ -396,6 +397,15 @@ td {
margin-left: 0px;
}
+.pos .orders .order-button {
+ display: flex;
+ justify-content: flex-start; /* falls nötig */
+ flex-direction: row-reverse;
+ align-items: center;
+ gap: 0.5em;
+}
+
+
.pos .order-button.selected{
font-weight: 900;
background: #EEEEEE;
@@ -460,6 +470,7 @@ td {
}
.pos .orders {
+ width: 98%;
position: absolute;
vertical-align: top;
margin-left: 0px;
@@ -1687,31 +1698,13 @@ td {
background: rgb(227, 246, 237);
}
-.pos .clientlist-screen .client-details-grid {
+.pos .clientlist-screen {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 0px;
}
-.pos .clientlist-screen .client-details{
- padding: 16px;
- border-bottom: solid 5px rgb(110,200,155);
-}
-.pos .clientlist-screen .client-details-error{
- padding: 16px;
- border-bottom: solid 5px rgb(110,200,155);
- background: rgb(178, 34, 34);
-}
-/* .pos .clientlist-screen .client-details-vvow_briefing{
- color: rgb(128, 255, 0);
-} */
-.pos .clientlist-screen .client-details-vvow_briefing_error{
- color: rgb(255, 0, 0);
-}
-.pos .clientlist-screen .client-details-vvow_sec_briefing_error{
- color: rgb(255, 0, 0);
- font-size: xx-large;
-}
+
.pos .clientlist-screen .client-picture{
height: 64px;
width: 64px;
@@ -2557,6 +2550,8 @@ td {
z-index: 10;
}
+/* Sidebar für Einweisungen*/
+
.pos .machine-access-sidebar {
position: absolute;
top: 48px; /* unter der Topbar */
@@ -2573,10 +2568,15 @@ td {
.pos .machine-access-sidebar .access-content {
position: relative;
- top: 45px; /* unter der Topbar */
+ top: 0px; /* unter der Topbar */
background : #eeeeee;
}
+.pos .machine-access-sidebar .client-details-label {
+ font-size: 18px;
+ line-height: 48px;
+}
+
.pos .machine-access-sidebar h5 {
margin-top: 1em;
margin-bottom: 0.5em;
@@ -2588,4 +2588,24 @@ td {
.pos .machine-access-sidebar li {
margin-bottom: 0.3em;
+}
+
+.pos .clientlist-screen .client-details{
+ padding: 16px;
+ border-bottom: solid 5px rgb(110,200,155);
+}
+.pos .clientlist-screen .client-details-error{
+ padding: 16px;
+ border-bottom: solid 5px rgb(110,200,155);
+ background: rgb(178, 34, 34);
+}
+/* .pos .clientlist-screen .client-details-vvow_briefing{
+ color: rgb(128, 255, 0);
+} */
+.pos .clientlist-screen .client-details-vvow_briefing_error{
+ color: rgb(255, 0, 0);
+}
+.pos .clientlist-screen .client-details-vvow_sec_briefing_error{
+ color: rgb(255, 0, 0);
+ font-size: xx-large;
}
\ No newline at end of file
diff --git a/static/src/js/debug.js b/static/src/js/debug.js
deleted file mode 100644
index 20085e1..0000000
--- a/static/src/js/debug.js
+++ /dev/null
@@ -1,18 +0,0 @@
-odoo.define('open_workshop.debug', function (require) {
- "use strict";
- var models = require('point_of_sale.models');
- var screens = require('point_of_sale.screens');
-
-
- // Erweiterung von ClientListScreenWidget, um die Kundendetails anzuzeigen
- screens.ClientListScreenWidget.include({
- display_client_details: function(partner, clickpos) {
- this._super(partner, clickpos);
- console.log('ClientListScreenWidget Partner Daten:', partner);
- if (partner.ows_user_id.document_id) {
- console.log('partner.ows_user_id.document_id:', partner.ows_user_id.document_id);
- }
- },
- });
-
-});
diff --git a/static/src/js/machine_access_sidebar.js b/static/src/js/machine_access_sidebar.js
index 761882d..5ed8374 100644
--- a/static/src/js/machine_access_sidebar.js
+++ b/static/src/js/machine_access_sidebar.js
@@ -1,7 +1,7 @@
/* This file is based on the original code from the OrderWidget in Odoo Point of Sale module (screen.js).
* It has been modified to create a sidebar that displays machine access information for the selected customer.*/
-odoo.define('machine_access_sidebar', function (require) {
+odoo.define('open_workshop.machine_access_sidebar', function (require) {
"use strict";
var rpc = require('web.rpc');
@@ -106,3 +106,18 @@ odoo.define('machine_access_sidebar', function (require) {
}
});
});
+
+
+odoo.define('open_workshop.models', function (require) {
+ "use strict";
+ var models = require('point_of_sale.models');
+ var field_utils = require('web.field_utils');
+ models.load_fields('res.partner', 'create_date');
+
+ models.load_fields('res.partner', 'birthday');
+ models.load_fields('res.partner', 'security_briefing');
+ models.load_fields('res.partner', 'security_id');
+ models.load_fields('res.partner', 'rfid_card');
+
+
+});
\ No newline at end of file
diff --git a/static/src/js/partner_access_popup.js b/static/src/js/partner_access_popup.js
deleted file mode 100644
index ccaf8c4..0000000
--- a/static/src/js/partner_access_popup.js
+++ /dev/null
@@ -1,49 +0,0 @@
-odoo.define('open_workshop.models', function (require) {
- "use strict";
- var models = require('point_of_sale.models');
- var field_utils = require('web.field_utils');
- models.load_fields('res.partner', 'create_date');
-
- models.load_fields('res.partner', 'birthday');
- models.load_fields('res.partner', 'security_briefing');
- models.load_fields('res.partner', 'security_id');
- models.load_fields('res.partner', 'rfid_card');
-
-
-});
-
-/* odoo.define('open_workshop.partner_access_popup', function (require) {
- "use strict";
-
- var screens = require('point_of_sale.screens');
- var rpc = require('web.rpc');
- var core = require('web.core');
- var QWeb = core.qweb;
- console.log("✅ partner_access_popup.js wurde geladen");
-
-
- screens.ClientListScreenWidget.include({
- display_client_details: function (visibility,partner, clickpos) {
- this._super(visibility,partner, clickpos);
- var self = this;
- var client = this.pos.get_order().get_client();
-
- if (visibility !== 'show' || !partner) {
- console.log("⛔ Kein Partner oder nicht im show-Modus");
- return;
- }
- rpc.query({
- model: 'ows.machine',
- method: 'get_access_list_grouped',
- args: [partner.id],
- }).then(function (result) {
- console.log("✅ Maschinenfreigaben vom Server:", result);
-
- const html = QWeb.render('PartnerMachineAccessList', {
- areas: result || [],
- });
- // self.$('.client-details-right').html(html);
- });
- },
- });
-});*/
diff --git a/static/src/xml/ows_briefing_details.xml b/static/src/xml/ows_briefing_details.xml
index ae6e9de..5a6f357 100644
--- a/static/src/xml/ows_briefing_details.xml
+++ b/static/src/xml/ows_briefing_details.xml
@@ -72,7 +72,7 @@
Nein, bitte überprüfen!
- Id:
+ Id:
diff --git a/static/src/xml/ows_machine_sidebar.xml b/static/src/xml/ows_machine_sidebar.xml
index ca8e81e..5c0075b 100644
--- a/static/src/xml/ows_machine_sidebar.xml
+++ b/static/src/xml/ows_machine_sidebar.xml
@@ -3,26 +3,51 @@
+
+
+
+