[REF] pos*: structure static files
pos*: l10n_ae_pos,l10n_co_pos,l10n_gcc_pos,l10n_in_pos, l10n_sa_pos,pos_adyen,pos_discount,pos_epson_printer, pos_hr,pos_hr_restaurant,pos_loyalty,pos_mercury, pos_restaurant,pos_restaurant_adyen,pos_restaurant_stripe,pos_sale, pos_sale_loyalty,pos_sale_product_configurator,pos_six,pos_stripe, The POS has a large number of add-on modules. As such, it is important that they all respect strict guidelines when it comes to file structures. Before, each module had more or less it's own rules when it came to this, apart from the fact that code was mostly organised into `js` and `xml` folders. In this PR, we move to a much more structured approach, in which each module follows the following pattern: src/ |-- app/ <-- the module's own new logic |-- overrides/ | |-- components | | |-- overridden_component_a | | | |-- overridden_component_a.js | | | |-- overridden_component_a.xml | | | |-- overridden_component_a.css | |-- models | | |-- overridden_model.js Apart from the structural changes, this PR introduces changes to file names, such that they respect the default pattern of snake_case naming. In this commit, we move the files. In the following one we make the needed changes in the code, such as adapting imports. Task: 3394192 closes odoo/odoo#127056 Related: odoo/enterprise#43594 Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
This commit is contained in:
@@ -14,7 +14,7 @@ United Arab Emirates POS Localization
|
||||
'license': 'LGPL-3',
|
||||
'assets': {
|
||||
'point_of_sale._assets_pos': [
|
||||
'l10n_ae_pos/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml',
|
||||
'l10n_ae_pos/static/src/**/*',
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
],
|
||||
'assets': {
|
||||
'point_of_sale._assets_pos': [
|
||||
'l10n_co_pos/static/src/js/**/*',
|
||||
'l10n_co_pos/static/src/xml/**/*',
|
||||
'l10n_co_pos/static/src/**/*',
|
||||
],
|
||||
},
|
||||
'license': 'LGPL-3',
|
||||
|
||||
@@ -37,9 +37,7 @@ The module adds following features:
|
||||
'post_init_hook': '_setup_inalterability',
|
||||
'assets': {
|
||||
'point_of_sale._assets_pos': [
|
||||
'l10n_fr_pos_cert/static/src/js/**/*',
|
||||
'l10n_fr_pos_cert/static/src/css/pos.css',
|
||||
'l10n_fr_pos_cert/static/src/xml/**/*',
|
||||
'l10n_fr_pos_cert/static/src/**/*',
|
||||
],
|
||||
},
|
||||
'license': 'LGPL-3',
|
||||
|
||||
@@ -11,9 +11,7 @@ GCC POS Localization
|
||||
'depends': ['point_of_sale', 'l10n_gcc_invoice'],
|
||||
'assets': {
|
||||
'point_of_sale._assets_pos': [
|
||||
'l10n_gcc_pos/static/src/js/OrderReceipt.js',
|
||||
'l10n_gcc_pos/static/src/css/OrderReceipt.css',
|
||||
'l10n_gcc_pos/static/src/xml/OrderReceipt.xml',
|
||||
'l10n_gcc_pos/static/src/**/*',
|
||||
]
|
||||
},
|
||||
'auto_install': True,
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
'auto_install': True,
|
||||
'assets': {
|
||||
'point_of_sale._assets_pos': [
|
||||
'l10n_in_pos/static/src/js/**/*',
|
||||
'l10n_in_pos/static/src/xml/**/*',
|
||||
'l10n_in_pos/static/src/**/*',
|
||||
],
|
||||
},
|
||||
'license': 'LGPL-3',
|
||||
|
||||
@@ -16,8 +16,7 @@ K.S.A. POS Localization
|
||||
'assets': {
|
||||
'point_of_sale._assets_pos': [
|
||||
'web/static/lib/zxing-library/zxing-library.js',
|
||||
'l10n_sa_pos/static/src/js/models.js',
|
||||
'l10n_sa_pos/static/src/xml/OrderReceipt.xml',
|
||||
'l10n_sa_pos/static/src/**/*',
|
||||
]
|
||||
},
|
||||
'auto_install': True,
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
/** @odoo-module */
|
||||
import { register_payment_method } from "@point_of_sale/app/store/pos_store";
|
||||
import { Payment } from "@point_of_sale/app/store/models";
|
||||
import { PaymentAdyen } from "@pos_adyen/js/payment_adyen";
|
||||
import { PaymentAdyen } from "@pos_adyen/app/payment_adyen";
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
|
||||
register_payment_method("adyen", PaymentAdyen);
|
||||
@@ -22,8 +22,7 @@ discount to a customer.
|
||||
'installable': True,
|
||||
'assets': {
|
||||
'point_of_sale._assets_pos': [
|
||||
'pos_discount/static/src/js/**/*',
|
||||
'pos_discount/static/src/xml/**/*',
|
||||
'pos_discount/static/src/**/*',
|
||||
],
|
||||
},
|
||||
'license': 'LGPL-3',
|
||||
|
||||
@@ -22,8 +22,7 @@ Use Epson ePOS Printers without the IoT Box in the Point of Sale
|
||||
'auto_install': True,
|
||||
'assets': {
|
||||
'point_of_sale._assets_pos': [
|
||||
'pos_epson_printer/static/src/js/**/*',
|
||||
'pos_epson_printer/static/src/xml/**/*',
|
||||
'pos_epson_printer/static/src/**/*',
|
||||
],
|
||||
},
|
||||
'license': 'LGPL-3',
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import { PosStore } from "@point_of_sale/app/store/pos_store";
|
||||
import { EpsonPrinter } from "@pos_epson_printer/js/epson_printer";
|
||||
import { EpsonPrinter } from "@pos_epson_printer/app/epson_printer";
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
|
||||
patch(PosStore.prototype, "pos_epson_printer.PosStore", {
|
||||
@@ -23,14 +23,7 @@ The actual till still requires one user but an unlimited number of employees can
|
||||
'auto_install': True,
|
||||
'assets': {
|
||||
'point_of_sale._assets_pos': [
|
||||
'pos_hr/static/src/css/pos.css',
|
||||
'pos_hr/static/src/js/models.js',
|
||||
'pos_hr/static/src/js/SelectCashierMixin.js',
|
||||
'pos_hr/static/src/js/CashierName.js',
|
||||
'pos_hr/static/src/js/LoginScreen.js',
|
||||
'pos_hr/static/src/js/PaymentScreen.js',
|
||||
'pos_hr/static/src/xml/**/*',
|
||||
'pos_hr/static/src/app/**/*',
|
||||
'pos_hr/static/src/**/*',
|
||||
],
|
||||
'web.assets_tests': [
|
||||
'pos_hr/static/tests/**/*',
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import { useCashierSelector } from "@pos_hr/js/SelectCashierMixin";
|
||||
import { useCashierSelector } from "@pos_hr/app/select_cashier_mixin";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { usePos } from "@point_of_sale/app/store/pos_hook";
|
||||
import { Component } from "@odoo/owl";
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
import { CashierName } from "@point_of_sale/app/navbar/cashier_name/cashier_name";
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
import { useCashierSelector } from "@pos_hr/js/SelectCashierMixin";
|
||||
import { useCashierSelector } from "@pos_hr/app/select_cashier_mixin";
|
||||
|
||||
patch(CashierName.prototype, "pos_hr.CashierName", {
|
||||
setup() {
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
/* @odoo-module alias=pos_restaurant_hr.chrome */
|
||||
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
import "@pos_restaurant/app/pos_store";
|
||||
import "@pos_restaurant/overrides/models/pos_store";
|
||||
import { PosStore } from "@point_of_sale/app/store/pos_store";
|
||||
|
||||
patch(PosStore.prototype, "pos_hr_restaurant.PosStore", {
|
||||
@@ -2,3 +2,4 @@
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from . import models
|
||||
from . import tests
|
||||
|
||||
@@ -26,13 +26,10 @@
|
||||
'auto_install': True,
|
||||
'assets': {
|
||||
'point_of_sale._assets_pos': [
|
||||
'pos_loyalty/static/src/css/Loyalty.scss',
|
||||
'pos_loyalty/static/src/app/**/*',
|
||||
'pos_loyalty/static/src/js/**/*',
|
||||
'pos_loyalty/static/src/xml/**/*',
|
||||
'pos_loyalty/static/src/**/*',
|
||||
],
|
||||
'web.assets_tests': [
|
||||
'pos_loyalty/static/src/tours/**/*',
|
||||
'pos_loyalty/static/tests/tours/**/*',
|
||||
],
|
||||
},
|
||||
'license': 'LGPL-3',
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
import { PaymentScreen } from "@point_of_sale/app/screens/payment_screen/payment_screen";
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
import { PosLoyaltyCard } from "@pos_loyalty/js/Loyalty";
|
||||
import { PosLoyaltyCard } from "@pos_loyalty/overrides/models/loyalty";
|
||||
import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup";
|
||||
|
||||
patch(PaymentScreen.prototype, "pos_loyalty.PaymentScreen", {
|
||||
+1
-1
@@ -8,7 +8,7 @@ import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup";
|
||||
import { TextInputPopup } from "@point_of_sale/app/utils/input_popups/text_input_popup";
|
||||
import { Domain, InvalidDomainError } from "@web/core/domain";
|
||||
import { sprintf } from "@web/core/utils/strings";
|
||||
import { PosLoyaltyCard } from "@pos_loyalty/js/Loyalty";
|
||||
import { PosLoyaltyCard } from "@pos_loyalty/overrides/models/loyalty";
|
||||
|
||||
const COUPON_CACHE_MAX_SIZE = 4096; // Maximum coupon cache size, prevents long run memory issues and (to some extent) invalid data
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { PosLoyalty } from "@pos_loyalty/tours/PosLoyaltyTourMethods";
|
||||
import { PosLoyalty } from "@pos_loyalty/../tests/tours/PosLoyaltyTourMethods";
|
||||
import { ProductScreen } from "@point_of_sale/../tests/tours/helpers/ProductScreenTourMethods";
|
||||
import { TicketScreen } from "@point_of_sale/../tests/tours/helpers/TicketScreenTourMethods";
|
||||
import { Chrome } from "@point_of_sale/../tests/tours/helpers/ChromeTourMethods";
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { PosLoyalty } from "@pos_loyalty/tours/PosLoyaltyTourMethods";
|
||||
import { PosLoyalty } from "@pos_loyalty/../tests/tours/PosLoyaltyTourMethods";
|
||||
import { ProductScreen } from "@point_of_sale/../tests/tours/helpers/ProductScreenTourMethods";
|
||||
import { TextInputPopup } from "@point_of_sale/../tests/tours/helpers/TextInputPopupTourMethods";
|
||||
import { getSteps, startSteps } from "@point_of_sale/../tests/tours/helpers/utils";
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { PosLoyalty } from "@pos_loyalty/tours/PosLoyaltyTourMethods";
|
||||
import { PosLoyalty } from "@pos_loyalty/../tests/tours/PosLoyaltyTourMethods";
|
||||
import { ProductScreen } from "@point_of_sale/../tests/tours/helpers/ProductScreenTourMethods";
|
||||
import { SelectionPopup } from "@point_of_sale/../tests/tours/helpers/SelectionPopupTourMethods";
|
||||
import { getSteps, startSteps } from "@point_of_sale/../tests/tours/helpers/utils";
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { PosLoyalty } from "@pos_loyalty/tours/PosLoyaltyTourMethods";
|
||||
import { PosLoyalty } from "@pos_loyalty/../tests/tours/PosLoyaltyTourMethods";
|
||||
import { ProductScreen } from "@point_of_sale/../tests/tours/helpers/ProductScreenTourMethods";
|
||||
import { getSteps, startSteps } from "@point_of_sale/../tests/tours/helpers/utils";
|
||||
import { registry } from "@web/core/registry";
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { PosLoyalty } from "@pos_loyalty/tours/PosLoyaltyTourMethods";
|
||||
import { PosLoyalty } from "@pos_loyalty/../tests/tours/PosLoyaltyTourMethods";
|
||||
import { ProductScreen } from "@point_of_sale/../tests/tours/helpers/ProductScreenTourMethods";
|
||||
import { SelectionPopup } from "@point_of_sale/../tests/tours/helpers/SelectionPopupTourMethods";
|
||||
import { getSteps, startSteps } from "@point_of_sale/../tests/tours/helpers/utils";
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { PosLoyalty } from "@pos_loyalty/tours/PosLoyaltyTourMethods";
|
||||
import { PosLoyalty } from "@pos_loyalty/../tests/tours/PosLoyaltyTourMethods";
|
||||
import { ProductScreen } from "@point_of_sale/../tests/tours/helpers/ProductScreenTourMethods";
|
||||
import { getSteps, startSteps } from "@point_of_sale/../tests/tours/helpers/utils";
|
||||
import { registry } from "@web/core/registry";
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { PosLoyalty } from "@pos_loyalty/tours/PosLoyaltyTourMethods";
|
||||
import { PosLoyalty } from "@pos_loyalty/../tests/tours/PosLoyaltyTourMethods";
|
||||
import { ProductScreen } from "@point_of_sale/../tests/tours/helpers/ProductScreenTourMethods";
|
||||
import { getSteps, startSteps } from "@point_of_sale/../tests/tours/helpers/utils";
|
||||
import { registry } from "@web/core/registry";
|
||||
@@ -35,14 +35,7 @@ following:
|
||||
'installable': True,
|
||||
'assets': {
|
||||
'point_of_sale._assets_pos': [
|
||||
'pos_mercury/static/src/js/pos_mercury.js',
|
||||
'pos_mercury/static/src/js/OrderReceipt.js',
|
||||
'pos_mercury/static/src/js/PaymentScreen.js',
|
||||
'pos_mercury/static/src/js/PaymentScreenPaymentLines.js',
|
||||
'pos_mercury/static/src/js/PaymentTransactionPopup.js',
|
||||
'pos_mercury/static/src/js/ProductScreen.js',
|
||||
'pos_mercury/static/src/css/pos_mercury.css',
|
||||
'pos_mercury/static/src/xml/**/*',
|
||||
'pos_mercury/static/src/**/*',
|
||||
],
|
||||
},
|
||||
'license': 'LGPL-3',
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import { patch } from "@web/core/utils/patch";
|
||||
import { PaymentScreen } from "@point_of_sale/app/screens/payment_screen/payment_screen";
|
||||
import { useBarcodeReader } from "@point_of_sale/app/barcode/barcode_reader_hook";
|
||||
import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup";
|
||||
import { PaymentTransactionPopup } from "@pos_mercury/js/PaymentTransactionPopup";
|
||||
import { PaymentTransactionPopup } from "@pos_mercury/app/payment_transaction_popup/payment_transaction_popup";
|
||||
import { SelectionPopup } from "@point_of_sale/app/utils/input_popups/selection_popup";
|
||||
|
||||
// Lookup table to store status and error messages
|
||||
@@ -32,10 +32,8 @@ This module adds several features to the Point of Sale that are specific to rest
|
||||
'installable': True,
|
||||
'assets': {
|
||||
'point_of_sale._assets_pos': [
|
||||
'pos_restaurant/static/src/js/**/*.js',
|
||||
'pos_restaurant/static/src/**/*',
|
||||
('after', 'point_of_sale/static/src/scss/pos.scss', 'pos_restaurant/static/src/scss/restaurant.scss'),
|
||||
'pos_restaurant/static/src/xml/**/*',
|
||||
'pos_restaurant/static/src/app/**/*',
|
||||
],
|
||||
'web.assets_backend': [
|
||||
'point_of_sale/static/src/scss/pos_dashboard.scss',
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
import { Order } from "@point_of_sale/app/store/models";
|
||||
|
||||
import { SplitOrderline } from "@pos_restaurant/js/Screens/SplitBillScreen/SplitOrderline";
|
||||
import { SplitOrderline } from "@pos_restaurant/app/split_bill_screen/split_orderline/split_orderline";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { usePos } from "@point_of_sale/app/store/pos_hook";
|
||||
import { Component, useState } from "@odoo/owl";
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user