[REF] pos*: namespace component templates, remove useless super calls
pos*: l10n_ae_pos, l10n_co_pos, l10n_fr_pos_cert, l10n_in_pos, point_of_sale, pos_discount, pos_epson_printer, pos_hr, pos_loyalty, pos_mercury, pos_restaurant, pos_sale, pos_sale_product_configurator, pos_six Previously, none of the templates of the pos were namespaced, this means that depending on context, you have to access them differently: in xpath the module prefix is necessary even if the template name itself isn't namespace, but in owl components you cannot use the namespaced version because owl doesn't have the notion of modules. This commit namespaces the component templates of all the pos modules so that it's consistent with the rest of the code base. It also removes some extraneous calls to super.setup() that were leftover and are not necessary for components extending directly owl's base Component. closes odoo/odoo#124069 Related: odoo/enterprise#42094 Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
<t t-name="OrderReceiptVAT" t-inherit="point_of_sale.OrderReceipt" t-inherit-mode="extension" owl="1">
|
||||
<t t-name="l10n_ae_pos.OrderReceiptVAT" t-inherit="point_of_sale.OrderReceipt" t-inherit-mode="extension" owl="1">
|
||||
<xpath expr="//div[@id='post_receipt_taxes_container']" position="replace">
|
||||
<div id='post_receipt_taxes_container'>
|
||||
<t t-if="pos.globalState.company.country.code == 'AE'">VAT</t>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<templates id="template" xml:space="preserve">
|
||||
<t t-name="OrderReceipt" t-inherit="point_of_sale.OrderReceipt" t-inherit-mode="extension" owl="1">
|
||||
<t t-name="l10n_co_pos.OrderReceipt" t-inherit="point_of_sale.OrderReceipt" t-inherit-mode="extension" owl="1">
|
||||
<xpath expr="//div[hasclass('pos-receipt-order-data')]" position="inside">
|
||||
<t t-if="receipt.l10n_co_dian !== false">
|
||||
<div style="word-wrap:break-word;"><t t-esc="receipt.l10n_co_dian"/></div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
<t t-name="OrderReceipt" t-inherit="point_of_sale.OrderReceipt" t-inherit-mode="extension" owl="1">
|
||||
<t t-name="l10n_fr_pos_cert.OrderReceipt" t-inherit="point_of_sale.OrderReceipt" t-inherit-mode="extension" owl="1">
|
||||
<xpath expr="//div[hasclass('pos-receipt-order-data')]" position="inside">
|
||||
<t t-if="receipt.l10n_fr_hash !== false">
|
||||
<br/>
|
||||
@@ -9,7 +9,7 @@
|
||||
</xpath>
|
||||
</t>
|
||||
|
||||
<t t-name="OrderLinesReceipt" t-inherit="point_of_sale.OrderLinesReceipt" t-inherit-mode="extension" owl="1">
|
||||
<t t-name="l10n_fr_pos_cert.OrderLinesReceipt" t-inherit="point_of_sale.OrderLinesReceipt" t-inherit-mode="extension" owl="1">
|
||||
<xpath expr="//t[@t-foreach='receipt.orderlines']" position="inside">
|
||||
<t t-if="receipt.l10n_fr_hash !== false and line.price_manually_set">
|
||||
<div class="pos-receipt-right-padding">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="Orderline" t-inherit="point_of_sale.Orderline" t-inherit-mode="extension" owl="1">
|
||||
<t t-name="l10n_fr_pos_cert.Orderline" t-inherit="point_of_sale.Orderline" t-inherit-mode="extension" owl="1">
|
||||
<xpath expr="//ul[hasclass('info-list')]" position="inside">
|
||||
<t t-if="pos.globalState.is_french_country() !== false and props.line.price_manually_set">
|
||||
<li class="info">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
<t t-name="OrderReceipt" t-inherit="point_of_sale.OrderReceipt" t-inherit-mode="extension" owl="1">
|
||||
<t t-name="l10n_in_pos.OrderReceipt" t-inherit="point_of_sale.OrderReceipt" t-inherit-mode="extension" owl="1">
|
||||
<xpath expr="//div[hasclass('orderlines')]" position="before">
|
||||
<t t-if="receipt.partner and pos.globalState.company.country and pos.globalState.company.country.code == 'IN'">
|
||||
<div class="pos-receipt-center-align">
|
||||
@@ -17,7 +17,7 @@
|
||||
</xpath>
|
||||
</t>
|
||||
|
||||
<t t-name="OrderLinesReceipt" t-inherit="point_of_sale.OrderLinesReceipt" t-inherit-mode="extension" owl="1">
|
||||
<t t-name="l10n_in_pos.OrderLinesReceipt" t-inherit="point_of_sale.OrderLinesReceipt" t-inherit-mode="extension" owl="1">
|
||||
<xpath expr="//t[@t-foreach='receipt.orderlines']" position="inside">
|
||||
<t t-if="line.l10n_in_hsn_code and pos.globalState.company.country and pos.globalState.company.country.code == 'IN'">
|
||||
<div class="pos-receipt-left-padding">
|
||||
|
||||
@@ -4,7 +4,7 @@ import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
|
||||
export class ErrorBarcodePopup extends ErrorPopup {
|
||||
static template = "ErrorBarcodePopup";
|
||||
static template = "point_of_sale.ErrorBarcodePopup";
|
||||
static defaultProps = {
|
||||
confirmText: _lt("Ok"),
|
||||
cancelText: _lt("Cancel"),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="ErrorBarcodePopup" owl="1">
|
||||
<t t-name="point_of_sale.ErrorBarcodePopup" owl="1">
|
||||
<div class="popup popup-barcode">
|
||||
<header class="title drag-handle">
|
||||
<span>Unknown Barcode</span>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="CustomerFacingDisplayHead" owl="1">
|
||||
<t t-name="point_of_sale.CustomerFacingDisplayHead" owl="1">
|
||||
<div class="resources">
|
||||
<base t-att-href="origin"/>
|
||||
<meta http-equiv="cache-control" content="no-cache" />
|
||||
@@ -12,14 +12,14 @@
|
||||
</div>
|
||||
</t>
|
||||
|
||||
<t t-name="CustomerFacingDisplayOrder" owl="1">
|
||||
<t t-name="point_of_sale.CustomerFacingDisplayOrder" owl="1">
|
||||
<!-- Header -->
|
||||
<t t-call="CustomerFacingDisplayHead"/>
|
||||
<t t-call="point_of_sale.CustomerFacingDisplayHead"/>
|
||||
|
||||
<div class="pos-customer_facing_display pos-palette_01">
|
||||
<!-- Orderlines -->
|
||||
<div class="pos-customer_products" name="Products list">
|
||||
<t t-call="CustomerFacingDisplayOrderLines"/>
|
||||
<t t-call="point_of_sale.CustomerFacingDisplayOrderLines"/>
|
||||
</div>
|
||||
|
||||
<div class="pos-payment_info">
|
||||
@@ -38,7 +38,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Paymentlines -->
|
||||
<t t-call="CustomerFacingDisplayPaymentLines"/>
|
||||
<t t-call="point_of_sale.CustomerFacingDisplayPaymentLines"/>
|
||||
|
||||
<!-- Odoo Logo -->
|
||||
<div class="pos-odoo_logo_container">
|
||||
@@ -49,7 +49,7 @@
|
||||
</div>
|
||||
</t>
|
||||
|
||||
<t t-name="CustomerFacingDisplayOrderLines" owl="1">
|
||||
<t t-name="point_of_sale.CustomerFacingDisplayOrderLines" owl="1">
|
||||
<div class="pos_orderlines">
|
||||
<div class="pos_orderlines_item pos_orderlines_header">
|
||||
<div/>
|
||||
@@ -70,7 +70,7 @@
|
||||
</div>
|
||||
</t>
|
||||
|
||||
<t t-name="CustomerFacingDisplayPaymentLines" owl="1">
|
||||
<t t-name="point_of_sale.CustomerFacingDisplayPaymentLines" owl="1">
|
||||
<div class="pos-paymentlines">
|
||||
<t t-if="order">
|
||||
<t t-foreach="order.get_paymentlines()" t-as="paymentline" t-key="paymentline_index">
|
||||
|
||||
@@ -15,7 +15,6 @@ export class DebugWidget extends Component {
|
||||
static template = "point_of_sale.DebugWidget";
|
||||
static props = { state: { type: Object, shape: { showWidget: Boolean } } };
|
||||
setup() {
|
||||
super.setup();
|
||||
this.pos = usePos();
|
||||
this.debug = useService("debug");
|
||||
this.popup = useService("popup");
|
||||
|
||||
@@ -4,7 +4,7 @@ import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaita
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
|
||||
export class OrderImportPopup extends AbstractAwaitablePopup {
|
||||
static template = "OrderImportPopup";
|
||||
static template = "point_of_sale.OrderImportPopup";
|
||||
static defaultProps = {
|
||||
confirmText: _lt("Ok"),
|
||||
cancelKey: false,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="OrderImportPopup" owl="1">
|
||||
<t t-name="point_of_sale.OrderImportPopup" owl="1">
|
||||
<div class="popup popup-import">
|
||||
<header class="title drag-handle">
|
||||
<span>Finished Importing Orders</span>
|
||||
|
||||
@@ -7,7 +7,7 @@ import { onMounted } from "@odoo/owl";
|
||||
|
||||
// formerly ErrorPopupWidget
|
||||
export class ErrorPopup extends AbstractAwaitablePopup {
|
||||
static template = "ErrorPopup";
|
||||
static template = "point_of_sale.ErrorPopup";
|
||||
static defaultProps = {
|
||||
confirmText: _lt("Ok"),
|
||||
title: _lt("Error"),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="ErrorPopup" owl="1">
|
||||
<t t-name="point_of_sale.ErrorPopup" owl="1">
|
||||
<div class="popup popup-error">
|
||||
<p class="title">
|
||||
<t t-esc="props.title" />
|
||||
|
||||
@@ -6,7 +6,7 @@ import { usePos } from "@point_of_sale/app/store/pos_hook";
|
||||
|
||||
// formerly ErrorTracebackPopupWidget
|
||||
export class ErrorTracebackPopup extends ErrorPopup {
|
||||
static template = "ErrorTracebackPopup";
|
||||
static template = "point_of_sale.ErrorTracebackPopup";
|
||||
static defaultProps = {
|
||||
confirmText: _lt("Ok"),
|
||||
cancelText: _lt("Cancel"),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="ErrorTracebackPopup" owl="1">
|
||||
<t t-name="point_of_sale.ErrorTracebackPopup" owl="1">
|
||||
<div class="popup popup-error">
|
||||
<header class="title">
|
||||
<t t-esc="props.title" />
|
||||
|
||||
@@ -9,7 +9,7 @@ import { _lt } from "@web/core/l10n/translation";
|
||||
* an option to not show it again.
|
||||
*/
|
||||
export class OfflineErrorPopup extends ErrorPopup {
|
||||
static template = "OfflineErrorPopup";
|
||||
static template = "point_of_sale.OfflineErrorPopup";
|
||||
static dontShow = false;
|
||||
static defaultProps = {
|
||||
confirmText: _lt("Continue with limited functionalities"),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="OfflineErrorPopup" owl="1">
|
||||
<t t-name="point_of_sale.OfflineErrorPopup" owl="1">
|
||||
<div class="popup offline">
|
||||
<header class="title">
|
||||
<t t-esc="props.title" />
|
||||
|
||||
@@ -5,10 +5,9 @@ import { useService } from "@web/core/utils/hooks";
|
||||
import { usePos } from "@point_of_sale/app/store/pos_hook";
|
||||
|
||||
export class BackButton extends Component {
|
||||
static template = "BackButton";
|
||||
static template = "point_of_sale.BackButton";
|
||||
|
||||
setup() {
|
||||
super.setup();
|
||||
this.pos = usePos();
|
||||
this.ui = useState(useService("ui"));
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="BackButton" owl="1">
|
||||
<t t-name="point_of_sale.BackButton" owl="1">
|
||||
<span
|
||||
class="order-button floor-button"
|
||||
t-on-click="backToFloorScreen"
|
||||
|
||||
@@ -6,7 +6,7 @@ import { useService } from "@web/core/utils/hooks";
|
||||
|
||||
// Previously UsernameWidget
|
||||
export class CashierName extends Component {
|
||||
static template = "CashierName";
|
||||
static template = "point_of_sale.CashierName";
|
||||
|
||||
setup() {
|
||||
this.pos = usePos();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="CashierName" owl="1">
|
||||
<t t-name="point_of_sale.CashierName" owl="1">
|
||||
<div t-att-class="cssClass">
|
||||
<span class="cashier-name"><img t-att-src="avatar" t-att-alt="username" class="avatar"/> <span t-if="!ui.isSmall" t-esc="username" class="username"/></span>
|
||||
</div>
|
||||
|
||||
@@ -16,7 +16,7 @@ import { sprintf } from "@web/core/utils/strings";
|
||||
|
||||
export class ClosePosPopup extends AbstractAwaitablePopup {
|
||||
static components = { SaleDetailsButton };
|
||||
static template = "ClosePosPopup";
|
||||
static template = "point_of_sale.ClosePosPopup";
|
||||
|
||||
setup() {
|
||||
super.setup();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="ClosePosPopup" owl="1">
|
||||
<t t-name="point_of_sale.ClosePosPopup" owl="1">
|
||||
<div class="popup close-pos-popup">
|
||||
<header>
|
||||
<div class="title">Closing Session</div>
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import { usePos } from "@point_of_sale/app/store/pos_hook";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
export class CustomerFacingDisplayButton extends Component {
|
||||
static template = "CustomerFacingDisplayButton";
|
||||
static template = "point_of_sale.CustomerFacingDisplayButton";
|
||||
setup() {
|
||||
this.pos = usePos();
|
||||
this.customerDisplay = useState(useService("customer_display"));
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="CustomerFacingDisplayButton" owl="1">
|
||||
<t t-name="point_of_sale.CustomerFacingDisplayButton" owl="1">
|
||||
<li class="menu-item navbar-button" t-on-click="() => customerDisplay.connect()">
|
||||
<span class="message"><t t-esc="message" /></span>
|
||||
<div t-if="customerDisplay.status === 'warning'" class="js_warning oe_icon oe_orange">
|
||||
|
||||
@@ -7,10 +7,9 @@ import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
// Previously ProxyStatusWidget
|
||||
export class ProxyStatus extends Component {
|
||||
static template = "ProxyStatus";
|
||||
static template = "point_of_sale.ProxyStatus";
|
||||
|
||||
setup() {
|
||||
super.setup();
|
||||
this.pos = usePos();
|
||||
this.ui = useState(useService("ui"));
|
||||
const hardwareProxy = useService("hardware_proxy");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="ProxyStatus" owl="1">
|
||||
<t t-name="point_of_sale.ProxyStatus" owl="1">
|
||||
<div class="oe_status js_proxy" t-on-click="() => this.pos.connectToProxy()">
|
||||
<span t-if="this.message and !ui.isSmall" class="js_msg">
|
||||
<t t-esc="this.message" />
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@ import { Component } from "@odoo/owl";
|
||||
import { usePos } from "@point_of_sale/app/store/pos_hook";
|
||||
|
||||
export class SaleDetailsButton extends Component {
|
||||
static template = "SaleDetailsButton";
|
||||
static template = "point_of_sale.SaleDetailsButton";
|
||||
|
||||
setup() {
|
||||
super.setup(...arguments);
|
||||
@@ -28,7 +28,7 @@ export class SaleDetailsButton extends Component {
|
||||
[false, false, false, [globalState.pos_session.id]]
|
||||
);
|
||||
const report = renderToElement(
|
||||
"SaleDetailsReport",
|
||||
"point_of_sale.SaleDetailsReport",
|
||||
Object.assign({}, saleDetails, {
|
||||
date: new Date().toLocaleString(),
|
||||
pos: globalState,
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="SaleDetailsButton" owl="1">
|
||||
<t t-name="point_of_sale.SaleDetailsButton" owl="1">
|
||||
<div t-att-class="{'oe_status': props.isHeaderButton }" t-on-click="onClick">
|
||||
<div class="js_connected oe_icon"
|
||||
title="Print a report with all the sales of the current PoS Session">
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="SaleDetailsReport" owl="1">
|
||||
<t t-name="point_of_sale.SaleDetailsReport" owl="1">
|
||||
<div class="pos-receipt">
|
||||
<t t-if="pos.company_logo_base64">
|
||||
<img class="pos-receipt-logo" t-att-src="pos.company_logo_base64" alt="Logo"/>
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Component } from "@odoo/owl";
|
||||
import { usePos } from "@point_of_sale/app/store/pos_hook";
|
||||
|
||||
export class SyncNotification extends Component {
|
||||
static template = "SyncNotification";
|
||||
static template = "point_of_sale.SyncNotification";
|
||||
|
||||
setup() {
|
||||
this.pos = usePos();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="SyncNotification" owl="1">
|
||||
<t t-name="point_of_sale.SyncNotification" owl="1">
|
||||
<div class="oe_status" t-on-click="onClick">
|
||||
<span t-if="sync.pending" class="js_msg">
|
||||
<t t-esc="sync.pending" />
|
||||
|
||||
@@ -12,7 +12,7 @@ import { reactive, Component, onMounted } from "@odoo/owl";
|
||||
* Chrome is the root component of the PoS App.
|
||||
*/
|
||||
export class Chrome extends Component {
|
||||
static template = "Chrome"; // FIXME POSREF namespace templates
|
||||
static template = "point_of_sale.Chrome";
|
||||
static components = { Transition, MainComponentsContainer, ErrorHandler, Navbar };
|
||||
static props = { disableLoader: Function };
|
||||
setup() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="Chrome" owl="1">
|
||||
<t t-name="point_of_sale.Chrome" owl="1">
|
||||
<div class="pos" t-att-class="{ 'big-scrollbars': pos.hasBigScrollBars }">
|
||||
<div class="pos-receipt-print"></div>
|
||||
<Navbar showCashMoveButton="showCashMoveButton"/>
|
||||
|
||||
+1
-2
@@ -8,10 +8,9 @@ import { Component } from "@odoo/owl";
|
||||
import { usePos } from "@point_of_sale/app/store/pos_hook";
|
||||
|
||||
export class PartnerDetailsEdit extends Component {
|
||||
static template = "PartnerDetailsEdit";
|
||||
static template = "point_of_sale.PartnerDetailsEdit";
|
||||
|
||||
setup() {
|
||||
super.setup();
|
||||
this.popup = useService("popup");
|
||||
this.pos = usePos();
|
||||
this.intFields = ["country_id", "state_id", "property_product_pricelist"];
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="PartnerDetailsEdit" owl="1">
|
||||
<t t-name="point_of_sale.PartnerDetailsEdit" owl="1">
|
||||
<section class="partner-details edit">
|
||||
<div class="partner-picture">
|
||||
<t t-if="partnerImageUrl">
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
import { Component } from "@odoo/owl";
|
||||
|
||||
export class PartnerLine extends Component {
|
||||
static template = "PartnerLine";
|
||||
static template = "point_of_sale.PartnerLine";
|
||||
|
||||
get highlight() {
|
||||
return this._isPartnerSelected ? "highlight" : "";
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="PartnerLine" owl="1">
|
||||
<t t-name="point_of_sale.PartnerLine" owl="1">
|
||||
<tr t-attf-class="partner-line {{highlight}}" t-att-data-id="props.partner.id"
|
||||
t-on-click="() => this.props.onClickPartner(props.partner)">
|
||||
<td>
|
||||
|
||||
@@ -27,10 +27,9 @@ import { sprintf } from "@web/core/utils/strings";
|
||||
*/
|
||||
export class PartnerListScreen extends Component {
|
||||
static components = { PartnerDetailsEdit, PartnerLine };
|
||||
static template = "PartnerListScreen";
|
||||
static template = "point_of_sale.PartnerListScreen";
|
||||
|
||||
setup() {
|
||||
super.setup();
|
||||
this.pos = usePos();
|
||||
this.ui = useState(useService("ui"));
|
||||
this.orm = useService("orm");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="PartnerListScreen" owl="1">
|
||||
<t t-name="point_of_sale.PartnerListScreen" owl="1">
|
||||
<div class="partnerlist-screen screen">
|
||||
<div class="screen-content">
|
||||
<div class="top-content">
|
||||
|
||||
@@ -6,10 +6,9 @@ import { useService } from "@web/core/utils/hooks";
|
||||
|
||||
export class PaymentScreenNumpad extends Component {
|
||||
static components = { PSNumpadInputButton };
|
||||
static template = "PaymentScreenNumpad";
|
||||
static template = "point_of_sale.PaymentScreenNumpad";
|
||||
|
||||
setup() {
|
||||
super.setup();
|
||||
this.decimalPoint = useService("localization").decimalPoint;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="PaymentScreenNumpad" owl="1">
|
||||
<t t-name="point_of_sale.PaymentScreenNumpad" owl="1">
|
||||
<div class="numpad">
|
||||
<PSNumpadInputButton value="'1'" />
|
||||
<PSNumpadInputButton value="'2'" />
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import { Component } from "@odoo/owl";
|
||||
import { useService } from "@web/core/utils/hooks";
|
||||
|
||||
export class PSNumpadInputButton extends Component {
|
||||
static template = "PSNumpadInputButton";
|
||||
static template = "point_of_sale.PSNumpadInputButton";
|
||||
|
||||
setup() {
|
||||
this.numberBuffer = useService("number_buffer");
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="PSNumpadInputButton" owl="1">
|
||||
<t t-name="point_of_sale.PSNumpadInputButton" owl="1">
|
||||
<button t-attf-class="{{ _class }}"
|
||||
t-on-click="() => this.numberBuffer.sendKey(props.value)">
|
||||
<t t-slot="default">
|
||||
|
||||
+1
-2
@@ -6,10 +6,9 @@ import { Component, useState } from "@odoo/owl";
|
||||
import { usePos } from "@point_of_sale/app/store/pos_hook";
|
||||
|
||||
export class PaymentScreenPaymentLines extends Component {
|
||||
static template = "PaymentScreenPaymentLines";
|
||||
static template = "point_of_sale.PaymentScreenPaymentLines";
|
||||
|
||||
setup() {
|
||||
super.setup();
|
||||
this.ui = useState(useService("ui"));
|
||||
this.popup = useService("popup");
|
||||
this.pos = usePos();
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="PaymentScreenPaymentLines" owl="1">
|
||||
<t t-name="point_of_sale.PaymentScreenPaymentLines" owl="1">
|
||||
<div class="paymentlines">
|
||||
<p class="title-category">Summary</p>
|
||||
<t t-foreach="props.paymentLines" t-as="line" t-key="line.cid">
|
||||
|
||||
@@ -19,7 +19,7 @@ import { Component, useState } from "@odoo/owl";
|
||||
import { sprintf } from "@web/core/utils/strings";
|
||||
|
||||
export class PaymentScreen extends Component {
|
||||
static template = "PaymentScreen";
|
||||
static template = "point_of_sale.PaymentScreen";
|
||||
static components = {
|
||||
PaymentScreenNumpad,
|
||||
PaymentScreenPaymentLines,
|
||||
@@ -27,7 +27,6 @@ export class PaymentScreen extends Component {
|
||||
};
|
||||
|
||||
setup() {
|
||||
super.setup();
|
||||
this.pos = usePos();
|
||||
this.ui = useState(useService("ui"));
|
||||
this.orm = useService("orm");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="PaymentScreen" owl="1">
|
||||
<t t-name="point_of_sale.PaymentScreen" owl="1">
|
||||
<div class="payment-screen screen" t-att-class="{ oe_hidden: !props.isShown }">
|
||||
<div class="screen-content">
|
||||
<t t-if="!ui.isSmall">
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
import { Component } from "@odoo/owl";
|
||||
|
||||
export class PaymentScreenStatus extends Component {
|
||||
static template = "PaymentScreenStatus";
|
||||
static template = "point_of_sale.PaymentScreenStatus";
|
||||
|
||||
get changeText() {
|
||||
return this.env.utils.formatCurrency(this.props.order.get_change());
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="PaymentScreenStatus" owl="1">
|
||||
<t t-name="point_of_sale.PaymentScreenStatus" owl="1">
|
||||
<div t-if="props.order.get_paymentlines().length === 0" class="paymentlines-empty">
|
||||
<div class="total">
|
||||
<t t-esc="totalDueText" />
|
||||
|
||||
@@ -8,7 +8,7 @@ import { useService } from "@web/core/utils/hooks";
|
||||
* @props partner
|
||||
*/
|
||||
export class ActionpadWidget extends Component {
|
||||
static template = "ActionpadWidget";
|
||||
static template = "point_of_sale.ActionpadWidget";
|
||||
static defaultProps = {
|
||||
isActionButtonHighlighted: false,
|
||||
};
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="ActionpadWidget" owl="1">
|
||||
<t t-name="point_of_sale.ActionpadWidget" owl="1">
|
||||
<div class="actionpad">
|
||||
<button class="button mobile-more-button" t-if="ui.isSmall" t-on-click="props.onClickMore">
|
||||
<span>More...</span>
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
import { Component } from "@odoo/owl";
|
||||
|
||||
export class CategoryButton extends Component {
|
||||
static template = "CategoryButton";
|
||||
static template = "point_of_sale.CategoryButton";
|
||||
|
||||
get imageUrl() {
|
||||
const category = this.props.category;
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="CategoryButton" owl="1">
|
||||
<t t-name="point_of_sale.CategoryButton" owl="1">
|
||||
<span class="category-button" t-on-click="() => this.props.switchCategory(props.category.id)">
|
||||
<div class="category-img">
|
||||
<img t-att-src="imageUrl" alt="Category" />
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaita
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
|
||||
export class ControlButtonPopup extends AbstractAwaitablePopup {
|
||||
static template = "ControlButtonPopup";
|
||||
static template = "point_of_sale.ControlButtonPopup";
|
||||
static defaultProps = {
|
||||
cancelText: _lt("Back"),
|
||||
controlButtons: [],
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="ControlButtonPopup" owl="1">
|
||||
<t t-name="point_of_sale.ControlButtonPopup" owl="1">
|
||||
<div class="popup popup-control-buttons">
|
||||
<!-- When one of the buttons is clicked, close this popup. -->
|
||||
<div class="control-buttons" t-on-click="cancel">
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import { Component } from "@odoo/owl";
|
||||
import { usePos } from "@point_of_sale/app/store/pos_hook";
|
||||
|
||||
export class OrderlineCustomerNoteButton extends Component {
|
||||
static template = "OrderlineCustomerNoteButton";
|
||||
static template = "point_of_sale.OrderlineCustomerNoteButton";
|
||||
|
||||
setup() {
|
||||
this.pos = usePos();
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="OrderlineCustomerNoteButton" owl="1">
|
||||
<t t-name="point_of_sale.OrderlineCustomerNoteButton" owl="1">
|
||||
<div class="control-button" t-on-click="() => this.onClick()">
|
||||
<i class="fa fa-sticky-note" />
|
||||
<span> </span>
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import { Component } from "@odoo/owl";
|
||||
import { usePos } from "@point_of_sale/app/store/pos_hook";
|
||||
|
||||
export class SetFiscalPositionButton extends Component {
|
||||
static template = "SetFiscalPositionButton";
|
||||
static template = "point_of_sale.SetFiscalPositionButton";
|
||||
|
||||
setup() {
|
||||
this.pos = usePos();
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="SetFiscalPositionButton" owl="1">
|
||||
<t t-name="point_of_sale.SetFiscalPositionButton" owl="1">
|
||||
<div class="control-button o_fiscal_position_button" t-on-click="() => this.click()">
|
||||
<i class="fa fa-book" role="img" aria-label="Set fiscal position"
|
||||
title="Set fiscal position" />
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import { Component } from "@odoo/owl";
|
||||
import { usePos } from "@point_of_sale/app/store/pos_hook";
|
||||
|
||||
export class SetPricelistButton extends Component {
|
||||
static template = "SetPricelistButton";
|
||||
static template = "point_of_sale.SetPricelistButton";
|
||||
|
||||
setup() {
|
||||
this.pos = usePos();
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="SetPricelistButton" owl="1">
|
||||
<t t-name="point_of_sale.SetPricelistButton" owl="1">
|
||||
<div class="control-button o_pricelist_button" t-on-click="() => this.click()">
|
||||
<i class="fa fa-th-list" role="img" aria-label="Price list" title="Price list" />
|
||||
<t t-esc="currentPricelistName" />
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import { Component } from "@odoo/owl";
|
||||
import { usePos } from "@point_of_sale/app/store/pos_hook";
|
||||
|
||||
export class ProductInfoButton extends Component {
|
||||
static template = "ProductInfoButton";
|
||||
static template = "point_of_sale.ProductInfoButton";
|
||||
|
||||
setup() {
|
||||
this.pos = usePos();
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="ProductInfoButton" owl="1">
|
||||
<t t-name="point_of_sale.ProductInfoButton" owl="1">
|
||||
<div class="control-button" t-on-click="() => this.click()">
|
||||
<i class="fa fa-info-circle" role="img" aria-label="Info" title="Info"/>
|
||||
Info
|
||||
|
||||
@@ -10,7 +10,7 @@ import { usePos } from "@point_of_sale/app/store/pos_hook";
|
||||
* @prop {boolean} disableSign
|
||||
*/
|
||||
export class NumpadWidget extends Component {
|
||||
static template = "NumpadWidget";
|
||||
static template = "point_of_sale.NumpadWidget";
|
||||
static defaultProps = {
|
||||
disabledModes: [],
|
||||
disableSign: false,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="NumpadWidget" owl="1">
|
||||
<t t-name="point_of_sale.NumpadWidget" owl="1">
|
||||
<div class="numpad">
|
||||
<button class="input-button number-char" t-on-click="() => this.sendInput('1')">1</button>
|
||||
<button class="input-button number-char" t-on-click="() => this.sendInput('2')">2</button>
|
||||
|
||||
@@ -10,10 +10,9 @@ import { usePos } from "@point_of_sale/app/store/pos_hook";
|
||||
|
||||
export class OrderWidget extends Component {
|
||||
static components = { Orderline, OrderSummary };
|
||||
static template = "OrderWidget";
|
||||
static template = "point_of_sale.OrderWidget";
|
||||
|
||||
setup() {
|
||||
super.setup();
|
||||
this.pos = usePos();
|
||||
this.popup = useService("popup");
|
||||
this.numberBuffer = useService("number_buffer");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="OrderWidget" owl="1">
|
||||
<t t-name="point_of_sale.OrderWidget" owl="1">
|
||||
<div class="order-container" t-ref="scrollable">
|
||||
<div class="order">
|
||||
<t t-if="orderlinesArray.length === 0" >
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import { usePos } from "@point_of_sale/app/store/pos_hook";
|
||||
import { floatIsZero } from "@web/core/utils/numbers";
|
||||
|
||||
export class OrderSummary extends Component {
|
||||
static template = "OrderSummary";
|
||||
static template = "point_of_sale.OrderSummary";
|
||||
|
||||
setup() {
|
||||
this.pos = usePos();
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="OrderSummary" owl="1">
|
||||
<t t-name="point_of_sale.OrderSummary" owl="1">
|
||||
<div class="summary clearfix">
|
||||
<t t-set="_total" t-value="getTotal()" />
|
||||
<t t-set="_tax" t-value="getTax()" />
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Component } from "@odoo/owl";
|
||||
import { usePos } from "@point_of_sale/app/store/pos_hook";
|
||||
|
||||
export class Orderline extends Component {
|
||||
static template = "Orderline";
|
||||
static template = "point_of_sale.Orderline";
|
||||
|
||||
/**
|
||||
* if doubleclick, change hasChange to skipChange
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="Orderline" owl="1">
|
||||
<t t-name="point_of_sale.Orderline" owl="1">
|
||||
<li t-on-click="selectLine" class="orderline" t-att-class="addedClasses">
|
||||
<span class="product-name">
|
||||
<t t-esc="props.line.get_full_product_name()"/>
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Component } from "@odoo/owl";
|
||||
import { usePos } from "@point_of_sale/app/store/pos_hook";
|
||||
|
||||
export class ProductItem extends Component {
|
||||
static template = "ProductItem";
|
||||
static template = "point_of_sale.ProductItem";
|
||||
|
||||
setup() {
|
||||
this.pos = usePos();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="ProductItem" owl="1">
|
||||
<t t-name="point_of_sale.ProductItem" owl="1">
|
||||
<article class="product" tabindex="0" t-on-keypress="spaceClickProduct"
|
||||
t-on-click="() => this.pos.addProductToCurrentOrder(props.product)"
|
||||
t-att-data-product-id="props.product.id"
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ import { usePos } from "@point_of_sale/app/store/pos_hook";
|
||||
* }
|
||||
*/
|
||||
export class ProductInfoPopup extends AbstractAwaitablePopup {
|
||||
static template = "ProductInfoPopup";
|
||||
static template = "point_of_sale.ProductInfoPopup";
|
||||
static defaultProps = { confirmKey: false };
|
||||
|
||||
setup() {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
<t t-name="ProductInfoPopup" owl="1">
|
||||
<t t-name="point_of_sale.ProductInfoPopup" owl="1">
|
||||
<div class="popup product-info-popup">
|
||||
<header class="title">
|
||||
Product information
|
||||
|
||||
+1
-2
@@ -10,10 +10,9 @@ import { useService } from "@web/core/utils/hooks";
|
||||
|
||||
export class ProductsWidgetControlPanel extends Component {
|
||||
static components = { CategoryButton };
|
||||
static template = "ProductsWidgetControlPanel";
|
||||
static template = "point_of_sale.ProductsWidgetControlPanel";
|
||||
|
||||
setup() {
|
||||
super.setup();
|
||||
this.pos = usePos();
|
||||
this.ui = useState(useService("ui"));
|
||||
this.notification = useService("pos_notification");
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="ProductsWidgetControlPanel" owl="1">
|
||||
<t t-name="point_of_sale.ProductsWidgetControlPanel" owl="1">
|
||||
<div class="products-widget-control" t-ref="products-widget-control">
|
||||
<div class="rightpane-header">
|
||||
<div class="search-bar-container sb-product">
|
||||
|
||||
+1
-2
@@ -13,14 +13,13 @@ import { OfflineErrorPopup } from "@point_of_sale/app/errors/popups/offline_erro
|
||||
|
||||
export class ProductsWidget extends Component {
|
||||
static components = { ProductItem, ProductsWidgetControlPanel };
|
||||
static template = "ProductsWidget";
|
||||
static template = "point_of_sale.ProductsWidget";
|
||||
|
||||
/**
|
||||
* @param {Object} props
|
||||
* @param {number?} props.startCategoryId
|
||||
*/
|
||||
setup() {
|
||||
super.setup();
|
||||
this.state = useState({
|
||||
previousSearchWord: "",
|
||||
currentOffset: 0,
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="ProductsWidget" owl="1">
|
||||
<t t-name="point_of_sale.ProductsWidget" owl="1">
|
||||
<div class="products-widget">
|
||||
<ProductsWidgetControlPanel
|
||||
updateProductList.bind="updateProductList"
|
||||
|
||||
@@ -22,7 +22,7 @@ import { ProductsWidget } from "@point_of_sale/app/screens/product_screen/produc
|
||||
import { ActionpadWidget } from "@point_of_sale/app/screens/product_screen/action_pad/action_pad";
|
||||
|
||||
export class ProductScreen extends ControlButtonsMixin(Component) {
|
||||
static template = "ProductScreen";
|
||||
static template = "point_of_sale.ProductScreen";
|
||||
static components = {
|
||||
ActionpadWidget,
|
||||
NumpadWidget,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="ProductScreen" owl="1">
|
||||
<t t-name="point_of_sale.ProductScreen" owl="1">
|
||||
<div class="product-screen screen" t-att-class="{ oe_hidden: !props.isShown }">
|
||||
<div class="screen-full-width">
|
||||
<div class="leftpane pane-border" t-if="!ui.isSmall || pos.globalState.mobile_pane === 'left'">
|
||||
|
||||
@@ -13,7 +13,6 @@ import { Component, useRef } from "@odoo/owl";
|
||||
*/
|
||||
export class AbstractReceiptScreen extends Component {
|
||||
setup() {
|
||||
super.setup();
|
||||
this.orderReceipt = useRef("order-receipt");
|
||||
this.popup = useService("popup");
|
||||
this.hardwareProxy = useService("hardware_proxy");
|
||||
|
||||
@@ -6,10 +6,9 @@ import { Component, onWillUpdateProps } from "@odoo/owl";
|
||||
|
||||
export class OrderReceipt extends Component {
|
||||
static components = { WrappedProductNameLines };
|
||||
static template = "OrderReceipt";
|
||||
static template = "point_of_sale.OrderReceipt";
|
||||
|
||||
setup() {
|
||||
super.setup();
|
||||
this.pos = usePos();
|
||||
this._receiptEnv = this.props.order.getOrderReceiptEnv();
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="OrderReceipt" owl="1">
|
||||
<t t-name="point_of_sale.OrderReceipt" owl="1">
|
||||
<div class="pos-receipt">
|
||||
<t t-if="receipt.company.logo">
|
||||
<img class="pos-receipt-logo" t-att-src="receipt.company.logo" alt="Logo"/>
|
||||
@@ -44,7 +44,7 @@
|
||||
<!-- Orderlines -->
|
||||
|
||||
<div class="orderlines">
|
||||
<t t-call="OrderLinesReceipt"/>
|
||||
<t t-call="point_of_sale.OrderLinesReceipt"/>
|
||||
</div>
|
||||
|
||||
<!-- Subtotal -->
|
||||
@@ -176,7 +176,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
<t t-name="OrderLinesReceipt" owl="1">
|
||||
<t t-name="point_of_sale.OrderLinesReceipt" owl="1">
|
||||
<t t-foreach="receipt.orderlines" t-as="line" t-key="line.id">
|
||||
<t t-if="isSimple(line)">
|
||||
<div class="responsive-price">
|
||||
|
||||
+1
-1
@@ -3,5 +3,5 @@
|
||||
import { Component } from "@odoo/owl";
|
||||
|
||||
export class WrappedProductNameLines extends Component {
|
||||
static template = "WrappedProductNameLines";
|
||||
static template = "point_of_sale.WrappedProductNameLines";
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="WrappedProductNameLines" owl="1">
|
||||
<t t-name="point_of_sale.WrappedProductNameLines" owl="1">
|
||||
<span>
|
||||
<t t-foreach="props.line.product_name_wrapped.slice(1)" t-as="wrapped_line" t-key="wrapped_line_index">
|
||||
<t t-esc="wrapped_line"/>
|
||||
|
||||
@@ -11,7 +11,7 @@ import { useService } from "@web/core/utils/hooks";
|
||||
import { BasePrinter } from "@point_of_sale/app/printer/base_printer";
|
||||
|
||||
export class ReceiptScreen extends AbstractReceiptScreen {
|
||||
static template = "ReceiptScreen";
|
||||
static template = "point_of_sale.ReceiptScreen";
|
||||
static components = { OrderReceipt };
|
||||
|
||||
setup() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="ReceiptScreen" owl="1">
|
||||
<t t-name="point_of_sale.ReceiptScreen" owl="1">
|
||||
<div class="receipt-screen screen">
|
||||
<div class="screen-content">
|
||||
<div class="top-content" t-if="!ui.isSmall">
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import { registry } from "@web/core/registry";
|
||||
import { OrderReceipt } from "@point_of_sale/app/screens/receipt_screen/receipt/receipt";
|
||||
|
||||
export class ReprintReceiptScreen extends AbstractReceiptScreen {
|
||||
static template = "ReprintReceiptScreen";
|
||||
static template = "point_of_sale.ReprintReceiptScreen";
|
||||
static components = { OrderReceipt };
|
||||
static storeOnOrder = false;
|
||||
setup() {
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="ReprintReceiptScreen" owl="1">
|
||||
<t t-name="point_of_sale.ReprintReceiptScreen" owl="1">
|
||||
<div class="receipt-screen screen">
|
||||
<div class="screen-content">
|
||||
<div class="top-content">
|
||||
|
||||
@@ -7,7 +7,7 @@ import { Component, onMounted, onWillUnmount, useExternalListener, useState } fr
|
||||
import { useService } from "@web/core/utils/hooks";
|
||||
|
||||
export class ScaleScreen extends Component {
|
||||
static template = "ScaleScreen";
|
||||
static template = "point_of_sale.ScaleScreen";
|
||||
|
||||
/**
|
||||
* @param {Object} props
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="ScaleScreen" owl="1">
|
||||
<t t-name="point_of_sale.ScaleScreen" owl="1">
|
||||
<div class="scale-screen screen">
|
||||
<div class="screen-content">
|
||||
<div class="top-content">
|
||||
|
||||
+1
-2
@@ -7,10 +7,9 @@ import { usePos } from "@point_of_sale/app/store/pos_hook";
|
||||
import { Component, useRef } from "@odoo/owl";
|
||||
|
||||
export class InvoiceButton extends Component {
|
||||
static template = "InvoiceButton";
|
||||
static template = "point_of_sale.InvoiceButton";
|
||||
|
||||
setup() {
|
||||
super.setup();
|
||||
this.pos = usePos();
|
||||
this.invoiceButton = useRef("invoice-button");
|
||||
this.popup = useService("popup");
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="InvoiceButton" owl="1">
|
||||
<t t-name="point_of_sale.InvoiceButton" owl="1">
|
||||
<div class="control-button" t-on-click="() => this.click()" t-ref="invoice-button">
|
||||
<i class="fa fa-file-pdf-o"></i>
|
||||
<span> </span>
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ import { Component } from "@odoo/owl";
|
||||
*/
|
||||
export class OrderDetails extends Component {
|
||||
static components = { OrderlineDetails };
|
||||
static template = "OrderDetails";
|
||||
static template = "point_of_sale.OrderDetails";
|
||||
|
||||
get order() {
|
||||
return this.props.order;
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="OrderDetails" owl="1">
|
||||
<t t-name="point_of_sale.OrderDetails" owl="1">
|
||||
<div class="order-container">
|
||||
<div t-ref="scrollable" class="order-scroller touch-scrollable">
|
||||
<div class="order">
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ import { usePos } from "@point_of_sale/app/store/pos_hook";
|
||||
* @props {pos.order.line} line
|
||||
*/
|
||||
export class OrderlineDetails extends Component {
|
||||
static template = "OrderlineDetails";
|
||||
static template = "point_of_sale.OrderlineDetails";
|
||||
|
||||
setup() {
|
||||
this.pos = usePos();
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="OrderlineDetails" owl="1">
|
||||
<t t-name="point_of_sale.OrderlineDetails" owl="1">
|
||||
<li class="orderline" t-on-click="() => this.props.onClickOrderline(props.line)" t-att-class="{ selected: props.isSelected }">
|
||||
<span class="product-name">
|
||||
<t t-esc="productName" />
|
||||
|
||||
+1
-2
@@ -4,10 +4,9 @@ import { usePos } from "@point_of_sale/app/store/pos_hook";
|
||||
import { Component } from "@odoo/owl";
|
||||
|
||||
export class ReprintReceiptButton extends Component {
|
||||
static template = "ReprintReceiptButton";
|
||||
static template = "point_of_sale.ReprintReceiptButton";
|
||||
|
||||
setup() {
|
||||
super.setup();
|
||||
this.pos = usePos();
|
||||
}
|
||||
async click() {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user