-
+
-
- Change
-
-
diff --git a/addons/point_of_sale/static/src/app/main.js b/addons/point_of_sale/static/src/app/main.js
index e3a74fbc67c..c1f3d002a4d 100644
--- a/addons/point_of_sale/static/src/app/main.js
+++ b/addons/point_of_sale/static/src/app/main.js
@@ -3,7 +3,7 @@
import { Chrome } from "@point_of_sale/app/pos_app";
import { Loader } from "@point_of_sale/app/loader/loader";
import { setLoadXmlDefaultApp, templates } from "@web/core/assets";
-import { App, mount, reactive, whenReady } from "@odoo/owl";
+import { App, mount, reactive, whenReady, Component } from "@odoo/owl";
import { _t } from "@web/core/l10n/translation";
import { hasTouch } from "@web/core/browser/feature_detection";
import { localization } from "@web/core/l10n/localization";
@@ -25,6 +25,20 @@ whenReady(() => {
server_version_info: session.server_version_info,
isEnterprise: session.server_version_info.slice(-1)[0] === "e",
};
+
+ // Wait for all templates
+ await odoo.ready(/\.bundle\.xml/);
+ // Make a temporary app to be able to use renderToString method before the main app is available.
+ const renderToStringApp = new App(Component, {
+ name: "renderToString app",
+ templates,
+ dev: !!odoo.debug,
+ warnIfNoStaticProps: true,
+ translatableAttributes: ["data-tooltip"],
+ translateFn: _t,
+ });
+ renderToString.app = renderToStringApp;
+
// setup environment
const env = makeEnv();
await startServices(env);
diff --git a/addons/point_of_sale/static/src/app/navbar/closing_popup/closing_popup.js b/addons/point_of_sale/static/src/app/navbar/closing_popup/closing_popup.js
index 9f930c5da9b..541e8d2cd5c 100644
--- a/addons/point_of_sale/static/src/app/navbar/closing_popup/closing_popup.js
+++ b/addons/point_of_sale/static/src/app/navbar/closing_popup/closing_popup.js
@@ -25,6 +25,7 @@ export class ClosePosPopup extends AbstractAwaitablePopup {
this.orm = useService("orm");
this.report = useService("report");
this.hardwareProxy = useService("hardware_proxy");
+ this.customerDisplay = useService("customer_display");
this.manualInputCashCount = false;
this.cashControl = this.pos.globalState.config.cash_control;
this.closeSessionClicked = false;
@@ -133,6 +134,10 @@ export class ClosePosPopup extends AbstractAwaitablePopup {
if (!this.closeSessionClicked) {
this.closeSessionClicked = true;
+ if (this.customerDisplay) {
+ this.customerDisplay.update({ closeUI: true });
+ }
+
if (this.cashControl) {
const response = await this.orm.call(
"pos.session",
diff --git a/addons/point_of_sale/static/src/app/navbar/customer_facing_display_button/customer_facing_display_button.js b/addons/point_of_sale/static/src/app/navbar/customer_facing_display_button/customer_facing_display_button.js
index a66b0fa53da..b43496e9789 100644
--- a/addons/point_of_sale/static/src/app/navbar/customer_facing_display_button/customer_facing_display_button.js
+++ b/addons/point_of_sale/static/src/app/navbar/customer_facing_display_button/customer_facing_display_button.js
@@ -10,13 +10,32 @@ export class CustomerFacingDisplayButton extends Component {
setup() {
this.pos = usePos();
this.customerDisplay = useState(useService("customer_display"));
+ this.notification = useService("pos_notification");
}
get message() {
- return {
+ const msg = {
success: "",
warning: _t("Connected, Not Owned"),
failure: _t("Disconnected"),
not_found: _t("Customer Screen Unsupported. Please upgrade the IoT Box"),
}[this.customerDisplay.status];
+
+ if (
+ this.previousDisplayedStatus &&
+ this.previousDisplayedStatus != this.customerDisplay.status
+ ) {
+ this.displayMessage(msg);
+ this.previousDisplayedStatus = this.customerDisplay.status;
+ }
+
+ return msg;
+ }
+ displayMessage(message) {
+ if (this.notification) {
+ if (message.length == 0) {
+ message = "Connected";
+ }
+ this.notification.add("Customer Display : " + message, 3000);
+ }
}
}
diff --git a/addons/point_of_sale/static/src/app/navbar/customer_facing_display_button/customer_facing_display_button.xml b/addons/point_of_sale/static/src/app/navbar/customer_facing_display_button/customer_facing_display_button.xml
index 05fd8e93e55..25130c48484 100644
--- a/addons/point_of_sale/static/src/app/navbar/customer_facing_display_button/customer_facing_display_button.xml
+++ b/addons/point_of_sale/static/src/app/navbar/customer_facing_display_button/customer_facing_display_button.xml
@@ -2,19 +2,20 @@
-
diff --git a/addons/point_of_sale/static/src/app/store/models.js b/addons/point_of_sale/static/src/app/store/models.js
index 292452940ec..58ae94d1a11 100644
--- a/addons/point_of_sale/static/src/app/store/models.js
+++ b/addons/point_of_sale/static/src/app/store/models.js
@@ -945,11 +945,25 @@ export class PosGlobalState extends PosModel {
*
* @returns {string}
*/
- async customerDisplayHTML() {
- const order = this.get_order();
- if (!order) {
- return;
+ async customerDisplayHTML(closeUI = false) {
+ const backgroundImageBase64 =
+ this.config.iface_customer_facing_display_background_image_1920;
+ let backgroundImageCSSValue;
+ if (backgroundImageBase64) {
+ backgroundImageCSSValue = "url('data:image/png;base64," + backgroundImageBase64 + "')";
+ } else {
+ backgroundImageCSSValue = "none";
}
+
+ const order = this.get_order();
+ if (closeUI || !order) {
+ return renderToString("point_of_sale.CustomerFacingDisplayNoOrder", {
+ pos: this,
+ origin: window.location.origin,
+ backgroundImageCSSValue,
+ });
+ }
+
const orderLines = order.get_orderlines();
const productImages = Object.fromEntries(
await Promise.all(
@@ -964,6 +978,7 @@ export class PosGlobalState extends PosModel {
pos: this,
formatCurrency: this.env.utils.formatCurrency,
origin: window.location.origin,
+ backgroundImageCSSValue,
order,
productImages,
});
@@ -3970,6 +3985,9 @@ export class Order extends PosModel {
set_screen_data(value) {
this.screen_data["value"] = value;
}
+ get_current_screen_data() {
+ return this.screen_data["value"] ?? { name: "ProductScreen" };
+ }
//see set_screen_data
get_screen_data() {
const screen = this.screen_data["value"];
diff --git a/addons/point_of_sale/static/src/app/store/pos_store.js b/addons/point_of_sale/static/src/app/store/pos_store.js
index 7abfd1518dc..539617d0820 100644
--- a/addons/point_of_sale/static/src/app/store/pos_store.js
+++ b/addons/point_of_sale/static/src/app/store/pos_store.js
@@ -127,6 +127,11 @@ export class PosStore extends Reactive {
}
async closePos() {
+ const customerDisplayService = this.globalState.env.services.customer_display;
+ if (customerDisplayService) {
+ customerDisplayService.update({ closeUI: true });
+ }
+
// If pos is not properly loaded, we just go back to /web without
// doing anything in the order data.
if (!this.globalState || this.globalState.db.get_orders().length === 0) {
diff --git a/addons/point_of_sale/static/src/css/customer_facing_display.css b/addons/point_of_sale/static/src/css/customer_facing_display.css
index 1e059e60561..916dd364def 100644
--- a/addons/point_of_sale/static/src/css/customer_facing_display.css
+++ b/addons/point_of_sale/static/src/css/customer_facing_display.css
@@ -46,11 +46,14 @@ body .pos-customer_facing_display {
-ms-flex-direction: row;
-o-flex-direction: row;
flex-direction: row;
+ overflow: hidden;
+}
+body .pos-customer_facing_display .pos-customer_products {
+ overflow: auto;
+ padding: 1%;
}
body .pos-customer_facing_display .pos-customer_products,
body .pos-customer_facing_display .pos-payment_info {
- height: 100%;
- padding: 2%;
-webkit-display: flex;
-moz-display: flex;
-ms-display: flex;
@@ -67,6 +70,119 @@ body .pos-customer_facing_display .pos-payment_info {
-ms-flex-positive: 1;
flex-grow: 1;
}
+
+.pos-customer_facing_display .pos_orderlines_list {
+ -webkit-display: flex;
+ -moz-display: flex;
+ -ms-display: flex;
+ -o-display: flex;
+ display: flex;
+ -webkit-flex-direction: column;
+ -moz-flex-direction: column;
+ -ms-flex-direction: column;
+ -o-flex-direction: column;
+ flex-direction: column;
+ height: 100%;
+}
+
+.pos-customer_facing_display .pos-order_top_bar {
+ border-radius: 0.2rem;
+ padding: 0.5rem 1rem 0.3rem 1.3rem;
+ color: white;
+ font-weight: bold;
+ font-size: max(min(3.2vh, 3.2vw), 1rem);
+ background-color: #343A40;
+}
+
+.pos-customer_facing_display .pos_orderlines_list table {
+ text-align: center;
+ vertical-align: middle;
+ border-collapse: separate;
+ border-spacing: 0 10px;
+ width: 100%;
+}
+
+.pos-customer_facing_display .pos_orderlines_list table th {
+ position: sticky;
+ top: 0;
+ padding: 0.5rem;
+ color: #212529;
+ font-weight: 590;
+ font-size: max(min(2vh, 2vw), 1rem);
+}
+
+.pos-customer_facing_display .pos_orderlines_list table th.pos-product-th {
+ text-align: left;
+}
+
+.pos-customer_facing_display .pos_orderlines_list table th.pos-product-th span {
+ margin-left: 1rem;
+}
+
+.pos-customer_facing_display .pos_orderlines_list table td {
+ word-wrap: break-word;
+ max-width: min(13vw, 8rem);
+ padding: 0 0.3vw;
+ font-size: max(min(3vh, 3vw), 1rem);
+ font-weight: bold;
+}
+
+.pos-customer_facing_display .pos_orderlines_list table td.product_img {
+ padding: 1vh 1vh;
+ max-width: unset;
+}
+
+.pos-customer_facing_display .pos_orderlines_list table td.product_img img {
+ width: min(10vh, 10vw);
+ height: min(10vh, 10vw);
+ border-radius: 10%;
+}
+
+.pos-customer_facing_display .pos_orderlines_list table td.product_text_info {
+ min-width: 15vw;
+ max-width: 30vw;
+}
+
+.pos-customer_facing_display .pos_orderlines_list table .product_text_info ul {
+ text-align: left;
+ margin: 0;
+ list-style-type: none;
+ padding: 0;
+}
+
+.pos-customer_facing_display .pos_orderlines_list table td .product_details i.fa{
+ margin-right: 0.5rem;
+ color: gray;
+}
+
+.pos-customer_facing_display .pos_orderlines_list table td .product_details {
+ font-size: max(min(2.5vh, 2.5vw), 0.8rem);
+}
+
+.pos-customer_facing_display .pos_orderlines_list table td.product_quantity > span + span {
+ margin-left: .3rem;
+ word-wrap: unset;
+ white-space: nowrap;
+ word-break: break-word;
+}
+
+.gray {
+ color: gray;
+}
+
+.pos-customer_facing_display .order-empty {
+ text-align: center;
+ margin: auto;
+}
+
+.pos-customer_facing_display .order-empty .fa {
+ font-size: min(max(8vw, 2.3rem), 4.3rem);
+}
+
+.pos-customer_facing_display .order-empty h1 {
+ font-size: min(max(4vw, 1.3rem), 2.3rem);
+}
+
body .pos-customer_facing_display .pos_orderlines {
width: 100%;
height: 100%;
@@ -83,94 +199,43 @@ body .pos-customer_facing_display .pos_orderlines {
}
body .pos-customer_facing_display .pos_orderlines .pos_orderlines_list {
overflow-y: scroll;
+ scroll-snap-type: y mandatory;
padding-right: 1.5vw;
position: relative;
height: 100%;
}
+.pos-customer_facing_display .pos_orderlines .pos_orderlines_item td:first-child {
+ border-left-style: solid;
+ border-top-left-radius: 0.9vw;
+ border-bottom-left-radius: 0.9vw;
+}
+.pos-customer_facing_display .pos_orderlines .pos_orderlines_item td:last-child {
+ border-left-style: solid;
+ border-top-right-radius: 0.9vw;
+ border-bottom-right-radius: 0.9vw;
+}
body .pos-customer_facing_display .pos_orderlines .pos_orderlines_item {
- margin-bottom: 1vw;
padding: 1%;
- border-radius: 0.3vw;
- height: auto;
- -webkit-box-flex: 0 1 auto;
- -webkit-flex: 0 1 auto;
- -moz-box-flex: 0 1 auto;
- -ms-flex: 0 1 auto;
- flex: 0 1 auto;
- -webkit-display: flex;
- -moz-display: flex;
- -ms-display: flex;
- -o-display: flex;
- display: flex;
- -webkit-flex-direction: row;
- -moz-flex-direction: row;
- -ms-flex-direction: row;
- -o-flex-direction: row;
- flex-direction: row;
- -webkit-box-align: center;
- -webkit-align-items: center;
- -moz-box-align: center;
- -ms-flex-align: center;
- -ms-grid-row-align: center;
- align-items: center;
+ border-radius: 0.9vw;
}
-body .pos-customer_facing_display .pos_orderlines .pos_orderlines_item:last-of-type {
- animation: item_in 1s ease;
+body .pos-customer_facing_display .pos_orderlines_list.backend_product_screen .selected_orderline {
+ scroll-snap-align: center;
+ animation: item_in 1s ease;
}
-body .pos-customer_facing_display .pos_orderlines .pos_orderlines_item.pos_orderlines_header {
- background-color: transparent;
- box-shadow: none;
- animation: none;
-}
-body .pos-customer_facing_display .pos_orderlines .pos_orderlines_item.pos_orderlines_header > div, body .pos-customer_facing_display .pos_orderlines .pos_orderlines_item.pos_orderlines_header > div:last-child {
- border-left-width: 0;
- text-align: center;
- font-size: 70%;
- font-weight: normal;
-}
-body .pos-customer_facing_display .pos_orderlines .pos_orderlines_item.pos_orderlines_header > div:last-child {
- text-align: left;
-}
-body .pos-customer_facing_display .pos_orderlines .pos_orderlines_item > div {
- width: 5%;
- text-align: left;
- margin-right: 4%;
- font-size: 80%;
- -webkit-box-flex: 1;
- -webkit-flex-grow: 1;
- -moz-box-flex: 1;
- -ms-flex-positive: 1;
- flex-grow: 1;
-}
-body .pos-customer_facing_display .pos_orderlines .pos_orderlines_item > div:first-child {
- margin-right: 2%;
- -webkit-box-flex: 1 1 1%;
- -webkit-flex: 1 1 1%;
- -moz-box-flex: 1 1 1%;
- -ms-flex: 1 1 1%;
- flex: 1 1 1%;
-}
-body .pos-customer_facing_display .pos_orderlines .pos_orderlines_item > div:nth-child(2) {
- width: 40%;
- border-left: 1px solid;
- padding-left: 2%;
-}
-body .pos-customer_facing_display .pos_orderlines .pos_orderlines_item > div:nth-child(3) {
- text-align: center;
-}
-body .pos-customer_facing_display .pos_orderlines .pos_orderlines_item > div:last-child {
- margin-right: 0;
- font-weight: bold;
-}
-body .pos-customer_facing_display .pos_orderlines .pos_orderlines_item > div div {
- background-position: center;
- background-size: cover;
- padding-top: 75%;
- display: block;
+body .pos-customer_facing_display .pos-thank-you-message {
+ -webkit-display: flex;
+ -moz-display: flex;
+ -ms-display: flex;
+ -o-display: flex;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ height: 100%;
+ font-size: min(max(4vw, 1.3rem), 2.3rem);
+ text-align: center;
}
body .pos-customer_facing_display .pos-payment_info {
max-width: 30%;
- padding: 2% 2% 1% 2%;
-webkit-flex-direction: column;
-moz-flex-direction: column;
-ms-flex-direction: column;
@@ -182,35 +247,14 @@ body .pos-customer_facing_display .pos-payment_info {
-ms-flex-pack: space-between;
justify-content: space-between;
}
-body .pos-customer_facing_display .pos-payment_info .pos-adv,
-body .pos-customer_facing_display .pos-payment_info .pos-company_logo {
- background-position: center top;
- background-size: contain;
- background-repeat: no-repeat;
+body .pos-customer_facing_display .pos-company_logo {
+ background-image: url(/logo);
+ background-size: contain;
+ background-repeat: no-repeat;
}
-body .pos-customer_facing_display .pos-payment_info .pos-adv[style*="url(http://placehold.it"],
-body .pos-customer_facing_display .pos-payment_info .pos-company_logo[style*="url(http://placehold.it"] {
+body .pos-customer_facing_display .pos-company_logo[style*="url(http://placehold.it"] {
background-color: #ccc;
}
-body .pos-customer_facing_display .pos-payment_info .pos-company_logo {
- background-image: url(/logo);
- margin-bottom: 10%;
- -webkit-box-flex: 0 0 20%;
- -webkit-flex: 0 0 20%;
- -moz-box-flex: 0 0 20%;
- -ms-flex: 0 0 20%;
- flex: 0 0 20%;
-}
-body .pos-customer_facing_display .pos-payment_info .pos-adv {
- margin-bottom: 5%;
- border-bottom: 10px solid transparent;
- box-shadow: 0 1px rgba(246, 246, 246, 0.2);
- -webkit-box-flex: 1 1 60%;
- -webkit-flex: 1 1 60%;
- -moz-box-flex: 1 1 60%;
- -ms-flex: 1 1 60%;
- flex: 1 1 60%;
-}
body .pos-customer_facing_display .pos-payment_info .pos-payment_info_details .pos-total,
body .pos-customer_facing_display .pos-payment_info .pos-payment_info_details .pos-paymentlines {
-webkit-flex-direction: row;
@@ -238,43 +282,137 @@ body .pos-customer_facing_display .pos-payment_info .pos-payment_info_details .p
-ms-grid-row-align: baseline;
align-items: baseline;
}
-body .pos-customer_facing_display .pos-payment_info .pos-payment_info_details .pos-total > div,
-body .pos-customer_facing_display .pos-payment_info .pos-payment_info_details .pos-paymentlines > div {
- -webkit-box-flex: 1 0 48%;
- -webkit-flex: 1 0 48%;
- -moz-box-flex: 1 0 48%;
- -ms-flex: 1 0 48%;
- flex: 1 0 48%;
-}
-body .pos-customer_facing_display .pos-payment_info .pos-payment_info_details .pos-total > div:nth-child(even),
-body .pos-customer_facing_display .pos-payment_info .pos-payment_info_details .pos-paymentlines > div:nth-child(even) {
- font-weight: bold;
- font-size: 120%;
- margin-right: 0;
-}
body .pos-customer_facing_display .pos-payment_info .pos-payment_info_details .pos-total {
- font-size: 2vw;
+ font-size: min(max(3.7vw, 1rem), 2rem);
+ font-weight: bold;
+}
+body .pos-customer_facing_display .pos-payment_info .pos-payment_info_details .pos-amount-container {
+ width: 100%;
+}
+body .pos-customer_facing_display .pos-payment_info .pos-payment_info_details .pos-spaced-line-container {
+ -webkit-display: flex;
+ -moz-display: flex;
+ -ms-display: flex;
+ -o-display: flex;
+ display: flex;
+ -webkit-flex-wrap: wrap;
+ -ms-flex-wrap: wrap;
+ flex-wrap: wrap;
+ flex-grow: 1;
+ flex-direction: row;
+}
+body .pos-customer_facing_display .pos-payment_info .pos-payment_info_details .pos-amount-container.pos-spaced-line-container .name {
+ min-width: unset;
+ max-width: unset;
+ width: fit-content;
+ min-height: unset;
+ max-height: unset;
+ height: fit-content;
+ flex: unset;
+ margin-right: .3rem;
+}
+body .pos-customer_facing_display .pos-payment_info .pos-payment_info_details .pos-spaced-line-container .spacer {
+ flex-grow: 1;
+}
+body .pos-customer_facing_display .pos-payment_info .pos-payment_info_details .pos-amount-container.pos-spaced-line-container .amount {
+ word-break: break-all;
+ white-space: break-spaces;
+ word-wrap: break-word;
+ text-align: left;
+ min-width: fit-content;
+ max-width: fit-content;
+ width: unset;
+ align-self: flex-end;
+}
+body .pos-customer_facing_display .pos-payment_info .pos-payment_info_details .pos-total .pos-total_amount {
+ font-size: min(max(4vw, 1.3rem), 2.3rem);
+ font-weight: bold;
}
body .pos-customer_facing_display .pos-payment_info .pos-payment_info_details .pos-paymentlines {
margin-top: 2%;
- font-size: 1.5vw;
+ font-size: min(max(2vw, .9rem), 1.6rem);
+ font-weight: normal;
line-height: 1.3;
+ color: #DEE2E6;
}
-body .pos-customer_facing_display .pos-payment_info .pos-payment_info_details .pos-odoo_logo_container {
- background-image: url(/web/static/img/logo_inverse_white_206px.png);
- background-position: right top;
- background-size: contain;
- background-repeat: no-repeat;
- height: 1.5vw;
- margin-top: 10%;
- display: flex;
- justify-content: end;
- align-items: flex-end;
+body .pos-customer_facing_display .pos-payment_info .pos-odoo_logo_container {
+ background: #212529;
+ opacity: .9;
+ border-top: gray solid 1px;
+ height: max(min(3.1vh, 2.1rem), 1.1rem);
+ width: 100%;
+ -webkit-display: flex;
+ -moz-display: flex;
+ -ms-display: flex;
+ -o-display: flex;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ text-align: center;
}
-body .pos-customer_facing_display .pos-payment_info .pos-payment_info_details .pos-odoo_logo_container span {
- margin-right: 5vw;
- font-size: 1vw;
+body .pos-customer_facing_display .pos-payment_info .pos-odoo_logo_container .logo {
+ height: max(min(min(2vh, 2vw), 2rem), .8rem);
+ width: max(min(min(6vh, 6vw), 6rem), 2.6rem);
+ margin-left: .3rem;
+ background-image: url(/web/static/img/logo_inverse_white_206px.png);
+ background-position: right top;
+ background-size: contain;
+ background-repeat: no-repeat;
}
+body .pos-customer_facing_display .pos-payment_info .pos-odoo_logo_container span {
+ font-size: max(min(2vw, 1rem), .8rem);
+ color: rgba(255, 255, 255, 0.4);
+}
+
+body .pos-customer_facing_display .pos-payment_info .pos-payment_info_details .pos-paymentlines::after {
+ height: 2vw; /* this empty element gives space between the paymentlines and the Odoo logo footer only if there is enough space (depending on the amount of paymentlines) */
+ content: '';
+ display: block;
+ width: 100%;
+}
+
+/* properties for default orientation (landscape): */
+body .pos-customer_facing_display .pos-portrait-top {
+ display: none;
+}
+
+body .pos-customer_facing_display .pos-no-order {
+ display: block;
+ width: 100%;
+ height: 100%;
+ background-size: cover;
+ background-color: #343A40;
+}
+
+body .pos-customer_facing_display .pos-no-order .pos-company_logo {
+ display: block;
+ background-position: center top;
+ margin-top: 5vh;
+ height: max(10vh, 3rem);
+ width: auto;
+}
+
+body .pos-customer_facing_display .pos-payment_info .pos-company_logo {
+ display: initial;
+ background-position: center top;
+ margin: 10%;
+ -webkit-box-flex: 1 0 20%;
+ -webkit-flex: 1 0 20%;
+ -moz-box-flex: 1 0 20%;
+ -ms-flex: 1 0 20%;
+ flex: 1 0 20%;
+}
+
+body .pos-customer_facing_display .pos-payment_info {
+ background-size: cover; /* background image displayed */
+}
+
+body .pos-customer_facing_display .pos-customer_products,
+body .pos-customer_facing_display .pos-payment_info {
+ height: 100%;
+}
+/* end of properties for default orientation (landscape) */
+
@media all and (orientation: portrait) {
body .pos-customer_facing_display {
font-size: 2vh;
@@ -285,38 +423,40 @@ body .pos-customer_facing_display .pos-payment_info .pos-payment_info_details .p
-o-flex-direction: column;
flex-direction: column;
}
- body .pos-customer_facing_display:before {
- content: "";
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 17vh;
- }
- body .pos-customer_facing_display .pos-payment_info .pos-adv {
- position: fixed;
- top: 0;
- left: 0;
- height: 15vh;
- width: 99vw;
- margin: 0.5vh;
- border-width: 0;
+ body .pos-customer_facing_display .pos-portrait-top {
-webkit-display: flex;
-moz-display: flex;
-ms-display: flex;
-o-display: flex;
display: flex;
+ height: 15vh;
+ padding: 1% 1% 0 1%;
}
- body .pos-customer_facing_display.pos-js_no_ADV:before {
- display: none;
+ body .pos-customer_facing_display .pos-portrait-top .pos-header {
+ background-image: var(--pos-bg-img);
+ background-size: cover;
+ border-radius: 0.2rem 0.2rem 0 0;
+ height: 100%;
+ width: 100%;
+ padding: 1% 30%;
+ background-color: #343A40;
}
- body .pos-customer_facing_display.pos-js_no_ADV .pos-customer_products {
- padding-top: 0;
+ body .pos-customer_facing_display .pos-portrait-top .pos-company_logo {
+ height: 100%;
+ background-position: center;
}
body .pos-customer_facing_display .pos-customer_products {
- padding-top: 17vh;
- height: 72vw;
- overflow: hidden;
+ flex-grow: 1;
+ overflow: auto;
+ padding-top: 0;
+ height: unset;
+ }
+ body .pos-customer_facing_display .pos_orderlines_list table th {
+ font-size: min(5vw, 1rem);
+ }
+ body .pos-customer_facing_display .pos-order_top_bar {
+ border-radius: 0 0 0.2rem 0.2rem;
+ border-top: solid gray 1px;
}
body .pos-customer_facing_display .pos-customer_products .pos_orderlines {
-webkit-box-flex: 1 0 auto;
@@ -325,12 +465,6 @@ body .pos-customer_facing_display .pos-payment_info .pos-payment_info_details .p
-ms-flex: 1 0 auto;
flex: 1 0 auto;
}
- body .pos-customer_facing_display .pos-customer_products .pos_orderlines .pos_orderlines_item > div:nth-child(2) {
- width: 30%;
- }
- body .pos-customer_facing_display .pos-customer_products .pos_orderlines .pos_orderlines_item.pos_orderlines_header div {
- font-size: 90%;
- }
body .pos-customer_facing_display .pos-customer_products .pos_orderlines .pos_orderlines_list {
padding-right: 1.5vh;
height: auto;
@@ -339,107 +473,32 @@ body .pos-customer_facing_display .pos-payment_info .pos-payment_info_details .p
box-shadow: 0 0.1vh 0.1vh #dddddd;
margin-bottom: 1vh;
}
- body .pos-customer_facing_display .pos-customer_products .pos_orderlines .pos_orderlines_list .pos_orderlines_item > div {
- font-size: 100%;
- }
body .pos-customer_facing_display .pos-payment_info {
+ background-size: 0 0; /* background image hidden */
max-width: 100%;
- overflow: hidden;
- padding-top: 0;
- min-height: 120px;
- -webkit-box-flex: 0 1 23vw;
- -webkit-flex: 0 1 23vw;
- -moz-box-flex: 0 1 23vw;
- -ms-flex: 0 1 23vw;
- flex: 0 1 23vw;
- -webkit-flex-direction: row;
- -moz-flex-direction: row;
- -ms-flex-direction: row;
- -o-flex-direction: row;
- flex-direction: row;
- -webkit-box-align: center;
- -webkit-align-items: center;
- -moz-box-align: center;
- -ms-flex-align: center;
- -ms-grid-row-align: center;
- align-items: center;
- -webkit-box-pack: space-between;
- -webkit-justify-content: space-between;
- -moz-box-pack: space-between;
- -ms-flex-pack: space-between;
- justify-content: space-between;
+ width: 100%;
+ max-height: 40vh;
+ height: unset;
+ flex-grow: 0;
}
body .pos-customer_facing_display .pos-payment_info .pos-company_logo {
- margin: 0;
- background-position: left center;
- margin-right: 5%;
- height: 100%;
- padding: 0;
- -webkit-box-flex: 1 1 20%;
- -webkit-flex: 1 1 20%;
- -moz-box-flex: 1 1 20%;
- -ms-flex: 1 1 20%;
- flex: 1 1 20%;
+ display: none;
}
body .pos-customer_facing_display .pos-payment_info .pos-payment_info_details {
- -webkit-box-flex: 0 1 50%;
- -webkit-flex: 0 1 50%;
- -moz-box-flex: 0 1 50%;
- -ms-flex: 0 1 50%;
- flex: 0 1 50%;
- -webkit-flex-direction: column;
- -moz-flex-direction: column;
- -ms-flex-direction: column;
- -o-flex-direction: column;
- flex-direction: column;
- min-width: 170px;
- }
- body .pos-customer_facing_display .pos-payment_info .pos-payment_info_details .pos-total {
- font-size: 3vw;
- }
- body .pos-customer_facing_display .pos-payment_info .pos-payment_info_details .pos-total .pos_total-amount {
- font-size: 3.5vw;
+ flex-grow: 1;
}
body .pos-customer_facing_display .pos-payment_info .pos-payment_info_details .pos-paymentlines {
margin-top: 2%;
- font-size: 80%;
- line-height: 1.2;
- }
- body .pos-customer_facing_display .pos-payment_info .pos-payment_info_details .pos-odoo_logo_container {
- position: absolute;
- right: 3%;
- bottom: 1%;
+ font-size: max(2.5vw, .7rem);
}
}
-@media all and (orientation: portrait) and (max-width: 340px) {
- body .pos-customer_facing_display .pos-customer_products .pos_orderlines .pos_orderlines_list {
- padding-right: 0;
- }
- body .pos-customer_facing_display .pos-customer_products .pos_orderlines .pos_orderlines_list .pos_orderlines_item > div {
- font-size: 70%;
- }
- body .pos-customer_facing_display .pos-customer_products .pos_orderlines .pos_orderlines_header > div {
- font-size: 60%;
- }
- body .pos-customer_facing_display .pos-customer_products .pos_orderlines .pos_orderlines_header > div:last-child {
- text-align: center;
- }
- body .pos-customer_facing_display .pos-payment_info .pos-company_logo {
- display: none !important;
- }
- body .pos-customer_facing_display .pos-payment_info .pos-payment_info_details {
- -webkit-box-flex: 1 0 100%;
- -webkit-flex: 1 0 100%;
- -moz-box-flex: 1 0 100%;
- -ms-flex: 1 0 100%;
- flex: 1 0 100%;
- }
- body .pos-customer_facing_display .pos-payment_info .pos-payment_info_details .pos-total {
- font-size: 6vw;
- }
- body .pos-customer_facing_display .pos-payment_info .pos-payment_info_details .pos-total .pos_total-amount {
- font-size: 6.5vw;
- }
+
+body .pos-customer_facing_display .pos-payment_info .pos-payment_info_details {
+ background: #212529;
+ opacity: .9;
+ padding: 1% 6%;
+ flex-grow: 0;
+ overflow: hidden;
}
body .pos-hidden {
@@ -447,21 +506,21 @@ body .pos-hidden {
}
.pos-palette_01 .pos-payment_info {
- background: #3E3E3E;
+ background: #343A40;
color: #f6f6f6;
}
.pos-palette_01 .pos-customer_products {
background: #f6f6f6;
color: #585858;
}
+.pos-palette_01.pos-customer_facing_display .pos_orderlines_list table th {
+ background-color: #f6f6f6;
+}
.pos-palette_01 .pos-customer_products .pos_orderlines_list .pos_orderlines_item {
background-color: white;
color: #3E3E3E;
box-shadow: 0 0.1vh 0.1vh #aaaaaa;
}
-.pos-palette_01 .pos-customer_products .pos_orderlines_list .pos_orderlines_item div:nth-child(2) {
- border-color: rgba(62, 62, 62, 0.3);
-}
@media all and (orientation: portrait) {
.pos-palette_01:before {
background: #3E3E3E;
@@ -476,14 +535,14 @@ body .pos-hidden {
background: #ecf2f6;
color: #364152;
}
+.pos-palette_02.pos-customer_facing_display .pos_orderlines_list table th {
+ background-color: #ecf2f6;
+}
.pos-palette_02 .pos-customer_products .pos_orderlines_list .pos_orderlines_item {
background-color: white;
color: #3E3E3E;
box-shadow: 0 0.1vh 0.1vh #364152;
}
-.pos-palette_02 .pos-customer_products .pos_orderlines_list .pos_orderlines_item div:nth-child(2) {
- border-color: rgba(62, 62, 62, 0.3);
-}
@media all and (orientation: portrait) {
.pos-palette_02:before {
background: #364152;
@@ -498,14 +557,14 @@ body .pos-hidden {
background: #ececec;
color: #585858;
}
+.pos-palette_03.pos-customer_facing_display .pos_orderlines_list table th {
+ background-color: #ececec;
+}
.pos-palette_03 .pos-customer_products .pos_orderlines_list .pos_orderlines_item {
background-color: white;
color: #3E3E3E;
box-shadow: 0 0.1vh 0.1vh #a0a0a0;
}
-.pos-palette_03 .pos-customer_products .pos_orderlines_list .pos_orderlines_item div:nth-child(2) {
- border-color: rgba(62, 62, 62, 0.3);
-}
@media all and (orientation: portrait) {
.pos-palette_03:before {
background: #1BA39C;
@@ -520,14 +579,14 @@ body .pos-hidden {
background: #efeeec;
color: #585858;
}
+.pos-palette_04.pos-customer_facing_display .pos_orderlines_list table th {
+ background-color: #efeeec;
+}
.pos-palette_04 .pos-customer_products .pos_orderlines_list .pos_orderlines_item {
background-color: white;
color: #3E3E3E;
box-shadow: 0 0.1vh 0.1vh #a9a499;
}
-.pos-palette_04 .pos-customer_products .pos_orderlines_list .pos_orderlines_item div:nth-child(2) {
- border-color: rgba(62, 62, 62, 0.3);
-}
@media all and (orientation: portrait) {
.pos-palette_04:before {
background: #0b7b6c;
@@ -542,14 +601,14 @@ body .pos-hidden {
background: #ececec;
color: #585858;
}
+.pos-palette_05.pos-customer_facing_display .pos_orderlines_list table th {
+ background-color: #ececec;
+}
.pos-palette_05 .pos-customer_products .pos_orderlines_list .pos_orderlines_item {
background-color: white;
color: #3E3E3E;
box-shadow: 0 0.1vh 0.1vh #a0a0a0;
}
-.pos-palette_05 .pos-customer_products .pos_orderlines_list .pos_orderlines_item div:nth-child(2) {
- border-color: rgba(62, 62, 62, 0.3);
-}
@media all and (orientation: portrait) {
.pos-palette_05:before {
background: #E26868;
@@ -564,14 +623,14 @@ body .pos-hidden {
background: #f6f6f6;
color: #585858;
}
+.pos-palette_06.pos-customer_facing_display .pos_orderlines_list table th {
+ background-color: #f6f6f6;
+}
.pos-palette_06 .pos-customer_products .pos_orderlines_list .pos_orderlines_item {
background-color: white;
color: #3E3E3E;
box-shadow: 0 0.1vh 0.1vh #aaaaaa;
}
-.pos-palette_06 .pos-customer_products .pos_orderlines_list .pos_orderlines_item div:nth-child(2) {
- border-color: rgba(62, 62, 62, 0.3);
-}
@media all and (orientation: portrait) {
.pos-palette_06:before {
background: #9E373B;
@@ -586,14 +645,14 @@ body .pos-hidden {
background: #ececec;
color: #585858;
}
+.pos-palette_07.pos-customer_facing_display .pos_orderlines_list table th {
+ background-color: #ececec;
+}
.pos-palette_07 .pos-customer_products .pos_orderlines_list .pos_orderlines_item {
background-color: white;
color: #3E3E3E;
box-shadow: 0 0.1vh 0.1vh #a0a0a0;
}
-.pos-palette_07 .pos-customer_products .pos_orderlines_list .pos_orderlines_item div:nth-child(2) {
- border-color: rgba(62, 62, 62, 0.3);
-}
@media all and (orientation: portrait) {
.pos-palette_07:before {
background: #ce9934;
@@ -608,14 +667,14 @@ body .pos-hidden {
background: #ececec;
color: #585858;
}
+.pos-palette_08.pos-customer_facing_display .pos_orderlines_list table th {
+ background-color: #ececec;
+}
.pos-palette_08 .pos-customer_products .pos_orderlines_list .pos_orderlines_item {
background-color: white;
color: #3E3E3E;
box-shadow: 0 0.1vh 0.1vh #a0a0a0;
}
-.pos-palette_08 .pos-customer_products .pos_orderlines_list .pos_orderlines_item div:nth-child(2) {
- border-color: rgba(62, 62, 62, 0.3);
-}
@media all and (orientation: portrait) {
.pos-palette_08:before {
background: #a48c77;
@@ -630,14 +689,14 @@ body .pos-hidden {
background: #ececec;
color: #585858;
}
+.pos-palette_09.pos-customer_facing_display .pos_orderlines_list table th {
+ background-color: #ececec;
+}
.pos-palette_09 .pos-customer_products .pos_orderlines_list .pos_orderlines_item {
background-color: white;
color: #3E3E3E;
box-shadow: 0 0.1vh 0.1vh #a0a0a0;
}
-.pos-palette_09 .pos-customer_products .pos_orderlines_list .pos_orderlines_item div:nth-child(2) {
- border-color: rgba(62, 62, 62, 0.3);
-}
@media all and (orientation: portrait) {
.pos-palette_09:before {
background: linear-gradient(30deg, #014d43, #127e71);
@@ -652,14 +711,14 @@ body .pos-hidden {
background: #ececec;
color: #585858;
}
+.pos-palette_10.pos-customer_facing_display .pos_orderlines_list table th {
+ background-color: #ececec;
+}
.pos-palette_10 .pos-customer_products .pos_orderlines_list .pos_orderlines_item {
background-color: white;
color: #3E3E3E;
box-shadow: 0 0.1vh 0.1vh #a0a0a0;
}
-.pos-palette_10 .pos-customer_products .pos_orderlines_list .pos_orderlines_item div:nth-child(2) {
- border-color: rgba(62, 62, 62, 0.3);
-}
@media all and (orientation: portrait) {
.pos-palette_10:before {
background: linear-gradient(30deg, #e2316c, #ea4c89);
@@ -674,14 +733,14 @@ body .pos-hidden {
background: #ececec;
color: #585858;
}
+.pos-palette_11.pos-customer_facing_display .pos_orderlines_list table th {
+ background-color: #ececec;
+}
.pos-palette_11 .pos-customer_products .pos_orderlines_list .pos_orderlines_item {
background-color: white;
color: #3E3E3E;
box-shadow: 0 0.1vh 0.1vh #a0a0a0;
}
-.pos-palette_11 .pos-customer_products .pos_orderlines_list .pos_orderlines_item div:nth-child(2) {
- border-color: rgba(62, 62, 62, 0.3);
-}
@media all and (orientation: portrait) {
.pos-palette_11:before {
background: linear-gradient(30deg, #362b3d, #5b4a63);
@@ -696,14 +755,14 @@ body .pos-hidden {
background: #5b5b5b;
color: #bdb9b9;
}
+.pos-palette_12.pos-customer_facing_display .pos_orderlines_list table th {
+ background-color: #5b5b5b;
+}
.pos-palette_12 .pos-customer_products .pos_orderlines_list .pos_orderlines_item {
background-color: #f5f5f5;
color: #3E3E3E;
box-shadow: 0 0.1vh 0.1vh #0f0f0f;
}
-.pos-palette_12 .pos-customer_products .pos_orderlines_list .pos_orderlines_item div:nth-child(2) {
- border-color: rgba(62, 62, 62, 0.3);
-}
@media all and (orientation: portrait) {
.pos-palette_12:before {
background: #434343;
@@ -718,14 +777,14 @@ body .pos-hidden {
background: #a2a2ab;
color: #f6f6f6;
}
+.pos-palette_13.pos-customer_facing_display .pos_orderlines_list table th {
+ background-color: #a2a2ab;
+}
.pos-palette_13 .pos-customer_products .pos_orderlines_list .pos_orderlines_item {
background-color: #f6f6f6;
color: #3E3E3E;
box-shadow: 0 0.1vh 0.1vh #55555f;
}
-.pos-palette_13 .pos-customer_products .pos_orderlines_list .pos_orderlines_item div:nth-child(2) {
- border-color: rgba(62, 62, 62, 0.3);
-}
@media all and (orientation: portrait) {
.pos-palette_13:before {
background: linear-gradient(30deg, #1a1b1f, #3d3f45);
diff --git a/addons/point_of_sale/views/pos_config_view.xml b/addons/point_of_sale/views/pos_config_view.xml
index 9f57757a755..fd15eed7b4c 100644
--- a/addons/point_of_sale/views/pos_config_view.xml
+++ b/addons/point_of_sale/views/pos_config_view.xml
@@ -79,6 +79,10 @@
diff --git a/addons/point_of_sale/views/res_config_settings_views.xml b/addons/point_of_sale/views/res_config_settings_views.xml
index 741a37be85d..28ab837557d 100644
--- a/addons/point_of_sale/views/res_config_settings_views.xml
+++ b/addons/point_of_sale/views/res_config_settings_views.xml
@@ -303,6 +303,10 @@