[REF] *: stop using assets_backend in the pos

*: l10n_ae_pos, l10n_co_pos, l10n_fr_pos_cert, l10n_gcc_pos,
l10n_in_pos, l10n_sa_pos, point_of_sale, pos_adyen, pos_discount,
pos_epson_printer, pos_epson_printer_restaurant, 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, web

Previously, the pos assets included almost the entirety of the
assets_backend. Most of the contents of the assets_backend is completely
useless in the PoS, meaning that the PoS will load slower because it
loads much more JS than it needs. It also means that it gets all the
side effects of this bundle (global event listeners, among other things)
that we don't want.

This commit removes the dependency of the pos assets on the
assets_backend to solve these issues. The pos assets are now their own
bundle with only what is needed in the PoS.

As for the unit testing bundle, the same logic applies but
unfortunately, because the unit testing code from web that we want to
use (eg automatic cleanups, cleaning of registries, etc) depends on the
legacy code, we need to include a lot more files than would otherwise be
needed. This situation will probably be improved as legacy code is
removed from web, but in the mean time, it is not very important for
this bundle to be lean, as it's a test bundle and loading speed is less
important.

Linked to: odoo/enterprise#40502

closes odoo/odoo#120070

Related: odoo/upgrade#4626
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
This commit is contained in:
Samuel Degueldre
2023-05-05 17:06:38 +02:00
parent 7f8266c5e5
commit c313f5912f
31 changed files with 229 additions and 148 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ United Arab Emirates POS Localization
'auto_install': True,
'license': 'LGPL-3',
'assets': {
'point_of_sale.assets': [
'point_of_sale._assets_pos': [
'l10n_ae_pos/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml',
],
},
+1 -1
View File
@@ -16,7 +16,7 @@
'views/res_config_settings_views.xml'
],
'assets': {
'point_of_sale.assets': [
'point_of_sale._assets_pos': [
'l10n_co_pos/static/src/js/**/*',
'l10n_co_pos/static/src/xml/**/*',
],
+1 -1
View File
@@ -36,7 +36,7 @@ The module adds following features:
],
'post_init_hook': '_setup_inalterability',
'assets': {
'point_of_sale.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/**/*',
+1 -1
View File
@@ -10,7 +10,7 @@ GCC POS Localization
'license': 'LGPL-3',
'depends': ['point_of_sale', 'l10n_gcc_invoice'],
'assets': {
'point_of_sale.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',
+1 -1
View File
@@ -16,7 +16,7 @@
],
'auto_install': True,
'assets': {
'point_of_sale.assets': [
'point_of_sale._assets_pos': [
'l10n_in_pos/static/src/js/**/*',
'l10n_in_pos/static/src/xml/**/*',
],
+1 -1
View File
@@ -13,7 +13,7 @@ K.S.A. POS Localization
'l10n_sa',
],
'assets': {
'point_of_sale.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',
+137 -73
View File
@@ -18,7 +18,6 @@
'wizard/pos_close_session_wizard.xml',
'wizard/pos_session_check_product_wizard.xml',
'wizard/pos_daily_sales_reports.xml',
'views/pos_assets_common.xml',
'views/pos_assets_index.xml',
'views/pos_assets_qunit.xml',
'views/point_of_sale_report.xml',
@@ -54,28 +53,17 @@
'website': 'https://www.odoo.com/app/point-of-sale-shop',
'assets': {
## In general, you DON'T NEED to declare new assets here, just put the files in the proper directory.
## NOTABLE EXCEPTION: List the new .css files in the `point_of_sale.assets` bundle taking into consideration
## the order of the .css files.
##
## 1. When defining new component, put the .js files in `point_of_sale/static/src/js/`
## and the corresponding .xml files in `point_of_sale/static/src/xml/`
## * POS is setup to automatically include the .xml and `.js` files in `point_of_sale.assets`.
## 2. When adding new tour tests, put the .js files in `point_of_sale/static/tests/tours/`.
## 3. When adding new qunit tests, put the .js files in `point_of_sale/static/tests/unit/`.
##
## If your use case doesn't fit anything above, you might need to properly understand each "asset bundle"
## defined here and check how they are used in the following "index templates":
## 1. point_of_sale.index
## -> This is the POS UI, accessible by opening a session.
## 2. point_of_sale.qunit_suite
## -> This is the unit test, accessible by clicking the "Run Point of Sale JS Tests" button
## in the "debug" button from the backend interface.
#####################################
## Augmentation of existing assets ##
#####################################
# In general, you DON'T NEED to declare new assets here, just put the
# files in the proper directory. In rare cases, the order of scss files
# matter and in that case you'll need to add it to the bundle in the
# correct spot.
#
# Files in /static/src/backend will be loaded in the backend
# Files in /static/src/app will be loaded in the PoS UI and unit tests
# Files in /static/tests/tours will be loaded in the backend in test mode
# Files in /static/tests/unit will be loaded in the qunit tests (/pos/ui/tests)
# web assets
'web.assets_backend': [
'point_of_sale/static/src/scss/pos_dashboard.scss',
'point_of_sale/static/src/backend/tours/point_of_sale.js',
@@ -85,72 +73,149 @@
'point_of_sale/static/tests/tours/**/*',
],
####################################################
## Exclusive POS Assets 1: For running the POS UI ##
####################################################
# PoS assets
'point_of_sale.pos_assets_backend_style': [
"web/static/src/core/ui/**/*.scss",
],
# TODO: We need to control this asset bundle.
# We can reduce the size of loaded assets in POS UI by selectively
# loading the `web` assets. We should only include what POS needs.
'point_of_sale.pos_assets_backend': [
('include', 'web.assets_backend'),
('remove', 'web/static/src/core/errors/error_handlers.js'),
('remove', 'web/static/src/legacy/legacy_rpc_error_handler.js'),
],
# This bundle includes the main pos assets.
'point_of_sale.assets': [
# Main PoS assets, they are loaded in the PoS UI and in the PoS unit tests
'point_of_sale._assets_pos': [
# scss variables and utilities
'point_of_sale/static/src/scss/pos_variables_extra.scss',
('include', 'web._assets_helpers'),
('include', 'web._assets_backend_helpers'),
('include', 'web._assets_primary_variables'),
'web/static/lib/bootstrap/scss/_functions.scss',
'web/static/src/scss/bootstrap_overridden.scss',
'web/static/src/scss/pre_variables.scss',
'web/static/lib/bootstrap/scss/_variables.scss',
'web/static/fonts/fonts.scss',
'web/static/src/libs/fontawesome/css/font-awesome.css',
'point_of_sale/static/src/scss/pos.scss',
'point_of_sale/static/src/css/pos_receipts.css',
'point_of_sale/static/src/css/popups/product_info_popup.css',
'point_of_sale/static/src/css/popups/common.css',
'point_of_sale/static/src/css/popups/cash_opening_popup.css',
'point_of_sale/static/src/css/popups/closing_pos_popup.css',
'point_of_sale/static/src/css/popups/money_details_popup.css',
'point_of_sale/static/src/css/popups/text_area_popup.css',
'web/static/src/legacy/scss/fontawesome_overridden.scss',
# Here includes the lib and POS UI assets.
'point_of_sale/static/lib/**/*.js',
# JS framework
'web/static/src/boot.js',
'web/static/src/session.js',
'web/static/src/env.js',
'web/static/src/core/utils/transitions.scss', # needs to be loaded before other scss files
'web/static/src/core/**/*',
('remove', 'web/static/src/core/errors/error_handlers.js'), # error handling in PoS is different from the webclient
# formatMonetary
'web/static/src/views/fields/formatters.js',
# barcode scanner
'barcodes/static/src/barcode_service.js',
'barcodes/static/src/js/barcode_parser.js',
'web/static/src/legacy/js/core/class.js',
'web/static/src/views/fields/parsers.js',
'web/static/src/webclient/barcode/barcode_scanner.js',
'web/static/src/webclient/barcode/ZXingBarcodeDetector.js',
'web/static/src/webclient/barcode/crop_overlay.js',
# report download utils
'web/static/src/webclient/actions/reports/utils.js',
# libs
'point_of_sale/static/lib/**/*',
'web/static/lib/luxon/luxon.js',
'web/static/lib/owl/owl.js',
'web/static/lib/owl/odoo_module.js',
'web_editor/static/lib/html2canvas.js',
'point_of_sale/static/src/js/**/*.js',
'web/static/lib/zxing-library/zxing-library.js',
'point_of_sale/static/src/xml/**/*.xml',
'point_of_sale/static/src/utils.js',
'point_of_sale/static/src/app/**/*',
# PoS files
'point_of_sale/static/src/**/*',
('remove', 'point_of_sale/static/src/backend/**/*'),
('remove', 'point_of_sale/static/src/entry/**/*'), # entry is only included in the prod bundle
# tour system FIXME: can this be added only in test mode? Are there any onboarding tours in PoS?
'web/static/lib/jquery/jquery.js',
'web_tour/static/src/tour_pointer/**/*',
'web_tour/static/src/tour_service/**/*',
# FIXME POSREF legacy dependencies to remove
'web/static/lib/moment/moment.js',
'web/static/lib/underscore/underscore.js',
'web/static/src/legacy/js/promise_extension.js',
'web/static/src/legacy/js/core/concurrency.js',
'web/static/src/legacy/js/core/owl_dialog.js', # needed by barcode_scanner
'web/static/src/legacy/legacy_component.js', # needed by owl_dialog
],
# This bundle contains the code responsible for starting the POS UI.
# It is practically the entry point.
'point_of_sale.assets_backend_prod_only': [
# Bundle that starts the pos, loaded on /pos/ui
'point_of_sale.assets_prod': [
('include', 'point_of_sale._assets_pos'),
'point_of_sale/static/src/entry/main.js',
'web/static/src/start.js',
'web/static/src/legacy/legacy_setup.js',
],
#########################################################
## Exclusive POS Assets 2: For running the QUnit tests ##
#########################################################
# This bundle includes the helper assets for the unit testing.
'point_of_sale.tests_assets': [
# Bundle for the unit tests at /pos/ui/tests
'point_of_sale.assets_qunit_tests': [
('include', 'point_of_sale._assets_pos'),
# dependencies of web.tests_assets (in the web tests, these come from assets_backend)
'web/static/src/owl2_compatibility/app.js',
'web/static/lib/jquery/jquery.js',
'web/static/lib/jquery/jquery.browser.js',
'web/static/lib/jquery.ba-bbq/jquery.ba-bbq.js',
'web/static/lib/qweb/qweb2.js',
'web/static/lib/py.js/lib/py.js',
'web/static/src/legacy/js/**/*',
('remove', 'web/static/src/legacy/js/libs/**/*'),
('remove', 'web/static/src/legacy/js/public/**/*'),
'web/static/src/legacy/action_adapters.js',
'web/static/src/legacy/backend_utils.js',
'web/static/src/legacy/js/views/action_model.js',
'web/static/src/legacy/legacy_load_views.js',
'web/static/src/legacy/legacy_service_provider.js',
'web/static/src/legacy/utils.js',
'web/static/src/search/**/*',
'web/static/src/views/fields/field_tooltip.js',
'web/static/src/views/fields/field.js',
'web/static/src/views/onboarding_banner.js',
'web/static/src/views/utils.js',
'web/static/src/views/view_hook.js',
'web/static/src/views/view_service.js',
'web/static/src/views/view.js',
'web/static/src/webclient/actions/action_container.js',
'web/static/src/webclient/actions/action_dialog.js',
'web/static/src/webclient/actions/action_hook.js',
'web/static/src/webclient/actions/action_service.js',
'web/static/src/webclient/actions/reports/report_action.js',
'web/static/src/webclient/actions/reports/report_hook.js',
'web/static/src/webclient/menus/menu_service.js',
'web/static/src/webclient/navbar/navbar.js',
'web/static/src/webclient/webclient.js',
'web/static/src/views/view_dialogs/form_view_dialog.js',
'web/static/src/views/view_dialogs/select_create_dialog.js',
'web/static/src/legacy/js/libs/download.js',
'web/static/src/legacy/js/libs/content-disposition.js',
# BEGIN copy of web.tests_assets. We don't 'include' it because other modules add their
# own test helpers in this module that depend on files that they add in assets_backend
'web/static/lib/qunit/qunit-2.9.1.css',
'web/static/lib/qunit/qunit-2.9.1.js',
'web/static/tests/legacy/helpers/**/*',
('remove', 'web/static/tests/legacy/helpers/test_utils_tests.js'),
'web/static/tests/legacy/legacy_setup.js',
'web/static/lib/fullcalendar/core/main.css',
'web/static/lib/fullcalendar/daygrid/main.css',
'web/static/lib/fullcalendar/timegrid/main.css',
'web/static/lib/fullcalendar/list/main.css',
'web/static/lib/fullcalendar/core/main.js',
'web/static/lib/fullcalendar/moment/main.js',
'web/static/lib/fullcalendar/interaction/main.js',
'web/static/lib/fullcalendar/daygrid/main.js',
'web/static/lib/fullcalendar/timegrid/main.js',
'web/static/lib/fullcalendar/list/main.js',
'web/static/lib/fullcalendar/luxon/main.js',
'web/static/lib/zxing-library/zxing-library.js',
'web/static/lib/ace/ace.js',
'web/static/lib/ace/javascript_highlight_rules.js',
'web/static/lib/ace/mode-python.js',
'web/static/lib/ace/mode-xml.js',
'web/static/lib/ace/mode-js.js',
'web/static/lib/ace/mode-qweb.js',
'web/static/lib/nearest/jquery.nearest.js',
'web/static/lib/daterangepicker/daterangepicker.js',
'web/static/src/legacy/js/libs/daterangepicker.js',
'web/static/lib/stacktracejs/stacktrace.js',
'web/static/lib/Chart/Chart.js',
'/web/static/lib/daterangepicker/daterangepicker.js',
# 'web/static/tests/legacy/main_tests.js',
'web/static/tests/helpers/**/*.js',
'web/static/tests/views/helpers.js',
'web/static/tests/search/helpers.js',
'web/static/tests/views/calendar/helpers.js',
'web/static/tests/webclient/**/helpers.js',
'web/static/tests/qunit.js',
'web/static/tests/main.js',
'web/static/tests/setup.js',
@@ -164,11 +229,10 @@
'web/static/lib/bootstrap/scss/_variables.scss',
('include', 'web.frontend_legacy'),
],
# This bundle includes the unit tests.
'point_of_sale.qunit_suite_tests': [
("include", "web.assets_backend_legacy_lazy"),
## END copy of web.tests_assets
# pos unit tests
'point_of_sale/static/tests/unit/**/*',
'point_of_sale/static/tests/*.js',
],
},
'license': 'LGPL-3',
+49 -5
View File
@@ -1,11 +1,15 @@
/** @odoo-module */
import { startWebClient } from "@web/start";
import { Chrome } from "@point_of_sale/js/Chrome";
import { Loader } from "@point_of_sale/app/loader/loader";
import { templates } from "@web/core/assets";
import { mount, reactive, whenReady } from "@odoo/owl";
import { setLoadXmlDefaultApp, templates } from "@web/core/assets";
import { App, mount, reactive, whenReady } 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";
import { renderToString } from "@web/core/utils/render";
import { makeEnv, startServices } from "@web/env";
import { session } from "@web/session";
const loader = reactive({ isShown: true });
whenReady(() => {
@@ -13,5 +17,45 @@ whenReady(() => {
// as some services load data over RPC and this is why we want to show a loader.
mount(Loader, document.body, { templates, translateFn: _t, props: { loader } });
});
// FIXME POSREF stop using startWebclient?: this is not a web client.
startWebClient(Chrome, { disableLoader: () => (loader.isShown = false) });
// The following is mostly a copy of startWebclient but without any of the legacy stuff
(async function startPosApp() {
odoo.info = {
db: session.db,
server_version: session.server_version,
server_version_info: session.server_version_info,
isEnterprise: session.server_version_info.slice(-1)[0] === "e",
};
// setup environment
const env = makeEnv();
await startServices(env);
// start application
await whenReady();
const app = new App(Chrome, {
name: "Odoo Point of Sale",
env,
templates,
dev: env.debug,
warnIfNoStaticProps: true,
translatableAttributes: ["data-tooltip"],
translateFn: _t,
props: { disableLoader: () => (loader.isShown = false) },
});
renderToString.app = app;
setLoadXmlDefaultApp(app);
const root = await app.mount(document.body);
const classList = document.body.classList;
if (localization.direction === "rtl") {
classList.add("o_rtl");
}
if (env.services.user.userId === 1) {
classList.add("o_is_superuser");
}
if (env.debug) {
classList.add("o_debug");
}
if (hasTouch()) {
classList.add("o_touch_device");
}
// delete odoo.debug; // FIXME: some legacy code rely on this
odoo.__WOWL_DEBUG__ = { root };
})();
@@ -0,0 +1,16 @@
body {
position: relative;
:not(.debug) .modal-backdrop, :not(.debug) .modal, :not(.debug) .ui-autocomplete {
opacity: 0 !important;
}
}
#qunit-testrunner-toolbar label {
font-weight: inherit;
margin-bottom: inherit;
}
#qunit-testrunner-toolbar input[type=text] {
width: inherit;
display: inherit;
}
@@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="point_of_sale.assets_common" name="POS Assets Common">
<t t-call-assets="point_of_sale.pos_assets_backend_style" t-js="false"/>
<t t-call-assets="point_of_sale.assets" t-js="false" />
<t t-call-assets="web.assets_common" t-css="false" />
<t t-call-assets="point_of_sale.pos_assets_backend" t-css="false" />
<t t-call-assets="point_of_sale.assets" t-css="false" />
</template>
</odoo>
@@ -38,9 +38,8 @@
odoo.loadMenusPromise = Promise.resolve();
</script>
<t t-call="point_of_sale.assets_common"/>
<t t-call="web.conditional_assets_tests"/>
<t t-call-assets="point_of_sale.assets_backend_prod_only" />
<t t-call-assets="point_of_sale.assets_prod" />
</head>
<body class="pos">
</body>
@@ -1,33 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="point_of_sale.qunit_suite_assets">
<t t-if="request.httprequest.cookies.get('color_scheme') == 'dark'">
<t t-call-assets="web.dark_mode_assets_backend" t-js="false"/>
</t>
<t t-else="">
<t t-call-assets="web.assets_backend" t-js="false"/>
</t>
<t t-call-assets="point_of_sale.tests_assets" t-js="false"/>
<t t-call-assets="point_of_sale.tests_assets" t-css="false"/>
<style>
body {
position: relative;
}
body:not(.debug) .modal-backdrop, body:not(.debug) .modal, body:not(.debug) .ui-autocomplete {
opacity: 0 !important;
}
#qunit-testrunner-toolbar label {
font-weight: inherit;
margin-bottom: inherit;
}
#qunit-testrunner-toolbar input[type=text] {
width: inherit;
display: inherit;
}
</style>
</template>
<template id="point_of_sale.qunit_suite">
<t t-call="web.layout">
<t t-set="html_data" t-value="{'style': 'height: 100%;'}"/>
@@ -43,9 +16,7 @@
})"/>;
</script>
<t t-call="point_of_sale.assets_common" />
<t t-call="point_of_sale.qunit_suite_assets" />
<t t-call-assets="point_of_sale.qunit_suite_tests" />
<t t-call-assets="point_of_sale.assets_qunit_tests" />
</t>
<div id="qunit"/>
+1 -1
View File
@@ -13,7 +13,7 @@
'depends': ['point_of_sale'],
'installable': True,
'assets': {
'point_of_sale.assets': [
'point_of_sale._assets_pos': [
'pos_adyen/static/**/*',
],
},
+1 -1
View File
@@ -21,7 +21,7 @@ discount to a customer.
],
'installable': True,
'assets': {
'point_of_sale.assets': [
'point_of_sale._assets_pos': [
'pos_discount/static/src/js/**/*',
'pos_discount/static/src/xml/**/*',
],
+1 -1
View File
@@ -21,7 +21,7 @@ Use Epson ePOS Printers without the IoT Box in the Point of Sale
'installable': True,
'auto_install': True,
'assets': {
'point_of_sale.assets': [
'point_of_sale._assets_pos': [
'pos_epson_printer/static/src/js/**/*',
'pos_epson_printer/static/src/xml/**/*',
],
+1 -1
View File
@@ -22,7 +22,7 @@ The actual till still requires one user but an unlimited number of employees can
'installable': True,
'auto_install': True,
'assets': {
'point_of_sale.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',
+1 -1
View File
@@ -13,7 +13,7 @@ This module adapts the behavior of the PoS when the pos_hr and pos_restaurant ar
'depends': ['pos_hr', 'pos_restaurant'],
'auto_install': True,
'assets': {
'point_of_sale.assets': [
'point_of_sale._assets_pos': [
'pos_hr_restaurant/static/src/**/*',
],
},
+1 -1
View File
@@ -25,7 +25,7 @@
'installable': True,
'auto_install': True,
'assets': {
'point_of_sale.assets': [
'point_of_sale._assets_pos': [
'pos_loyalty/static/src/css/Loyalty.scss',
'pos_loyalty/static/src/app/**/*',
'pos_loyalty/static/src/js/**/*',
+1 -1
View File
@@ -34,7 +34,7 @@ following:
],
'installable': True,
'assets': {
'point_of_sale.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',
+1 -1
View File
@@ -29,7 +29,7 @@ This module adds several features to the Point of Sale that are specific to rest
],
'installable': True,
'assets': {
'point_of_sale.assets': [
'point_of_sale._assets_pos': [
'pos_restaurant/static/lib/**/*.js',
'pos_restaurant/static/src/js/**/*.js',
('after', 'point_of_sale/static/src/scss/pos.scss', 'pos_restaurant/static/src/scss/restaurant.scss'),
+1 -1
View File
@@ -13,7 +13,7 @@
],
'auto_install': True,
'assets': {
'point_of_sale.assets': [
'point_of_sale._assets_pos': [
'pos_restaurant_adyen/static/**/*',
],
},
+1 -1
View File
@@ -10,7 +10,7 @@
'depends': ['pos_stripe', 'pos_restaurant', 'payment_stripe'],
'auto_install': True,
'assets': {
'point_of_sale.assets': [
'point_of_sale._assets_pos': [
'pos_restaurant_stripe/static/**/*',
],
},
+1 -1
View File
@@ -27,7 +27,7 @@ This module adds a custom Sales Team for the Point of Sale. This enables you to
'installable': True,
'auto_install': True,
'assets': {
'point_of_sale.assets': [
'point_of_sale._assets_pos': [
'pos_sale/static/src/css/pos_sale.css',
'pos_sale/static/src/js/models.js',
'pos_sale/static/src/js/SetSaleOrderButton.js',
+1 -1
View File
@@ -15,7 +15,7 @@ This module correct some behaviors when both module are installed.
'installable': True,
'auto_install': True,
'assets': {
'point_of_sale.assets': [
'point_of_sale._assets_pos': [
'pos_sale_loyalty/static/src/js/**/*.js',
],
},
@@ -14,7 +14,7 @@ This module adds features depending on both modules.
'installable': True,
'auto_install': True,
'assets': {
'point_of_sale.assets': [
'point_of_sale._assets_pos': [
'pos_sale_product_configurator/static/src/js/models.js',
'pos_sale_product_configurator/static/src/css/popups/product_info_popup.css',
'pos_sale_product_configurator/static/src/xml/**/*'
+1 -1
View File
@@ -13,7 +13,7 @@
'installable': True,
'license': 'LGPL-3',
'assets': {
'point_of_sale.assets': [
'point_of_sale._assets_pos': [
'pos_six/static/lib/six_timapi/timapi.js',
'pos_six/static/src/js/BalanceButton.js',
'pos_six/static/src/js/models.js',
+1 -1
View File
@@ -13,7 +13,7 @@
'depends': ['point_of_sale', 'payment_stripe'],
'installable': True,
'assets': {
'point_of_sale.assets': [
'point_of_sale._assets_pos': [
'pos_stripe/static/**/*',
],
},
@@ -108,7 +108,7 @@ export class PaymentStripe extends PaymentInterface {
}
}
this._showError(
_.str.sprintf(
sprintf(
_t("Stripe readers %s not listed in your account"),
this.payment_method.stripe_serial_number
)
+2 -2
View File
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="stripe" inherit_id="point_of_sale.assets_common">
<xpath expr="." position="inside">
<template id="stripe" inherit_id="point_of_sale.index">
<xpath expr="//head" position="inside">
<!-- As the following link does not end with '.js', it's not loaded when
placed in __manifest__.py. The following declaration fix this problem -->
<script src="https://js.stripe.com/terminal/v1/"></script>
+1 -2
View File
@@ -19,7 +19,7 @@ import { App, whenReady } from "@odoo/owl";
*
* @param {Component} Webclient
*/
export async function startWebClient(Webclient, props = {}) {
export async function startWebClient(Webclient) {
odoo.info = {
db: session.db,
server_version: session.server_version,
@@ -39,7 +39,6 @@ export async function startWebClient(Webclient, props = {}) {
const app = new App(Webclient, {
name: "Odoo Web Client",
env,
props,
templates,
dev: env.debug,
warnIfNoStaticProps: true,