From a019cf0549f22c84ed0cabd36896af12c2262266 Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL Date: Thu, 18 Jan 2024 14:28:58 +0100 Subject: [PATCH 1/5] [FIX] eslint error 'no-shadow' in all modules --- pos_access_right/static/src/js/ActionpadWidget.js | 4 ++-- pos_access_right/static/src/js/NumpadWidget.js | 4 ++-- pos_access_right/static/src/js/TicketScreen.js | 4 ++-- pos_escpos_status/static/src/js/ProxyStatus.js | 4 ++-- pos_financial_risk/static/src/js/PaymentScreen.esm.js | 4 ++-- .../static/src/js/GlobalLineDiscount.js | 4 ++-- pos_lot_barcode/static/src/js/Popups/EditListPopup.js | 4 ++-- pos_lot_barcode/static/src/js/Screens/ProductScreen.js | 4 ++-- pos_lot_selection/static/src/js/EditListPopup.js | 4 ++-- pos_lot_selection/static/src/js/OrderWidget.js | 4 ++-- pos_lot_selection/static/src/js/ProductScreen.js | 4 ++-- pos_lot_selection/static/src/js/models.js | 4 ++-- pos_margin/static/src/js/models.esm.js | 8 ++++---- pos_order_remove_line/static/src/js/orderline.esm.js | 4 ++-- .../static/src/js/Popups/CreateOrderPopup.esm.js | 4 ++-- .../static/src/js/models.esm.js | 4 ++-- .../static/src/js/Popups/CreateOrderPopup.esm.js | 4 ++-- .../static/src/js/CreateOrderPopup.esm.js | 4 ++-- .../static/src/js/models.esm.js | 4 ++-- pos_partner_firstname/static/src/js/PartnerDetailsEdit.js | 4 ++-- pos_partner_firstname/static/src/js/PartnerScreen.js | 4 ++-- pos_payment_terminal/static/src/js/models.js | 8 ++++---- .../static/src/js/Screens/ProductScreen/ProductItem.js | 4 ++-- .../static/src/js/SaleOrderManagementScreen.esm.js | 4 ++-- .../static/src/js/pos_sale_order_print.esm.js | 4 ++-- .../src/js/Screens/ProductScreen/ProductItem.esm.js | 4 ++-- .../src/js/Screens/ProductScreen/ProductsWidget.esm.js | 4 ++-- 27 files changed, 58 insertions(+), 58 deletions(-) diff --git a/pos_access_right/static/src/js/ActionpadWidget.js b/pos_access_right/static/src/js/ActionpadWidget.js index 08d0914e31..2d41b6d3e8 100644 --- a/pos_access_right/static/src/js/ActionpadWidget.js +++ b/pos_access_right/static/src/js/ActionpadWidget.js @@ -4,8 +4,8 @@ odoo.define("pos_access_right.ActionpadWidget", function (require) { const Registries = require("point_of_sale.Registries"); const ActionpadWidget = require("point_of_sale.ActionpadWidget"); - const PosActionpadWidget = (ActionpadWidget) => - class extends ActionpadWidget { + const PosActionpadWidget = (OriginalActionpadWidget) => + class extends OriginalActionpadWidget { get hasPaymentControlRights() { return this.env.pos.user.hasGroupPayment; } diff --git a/pos_access_right/static/src/js/NumpadWidget.js b/pos_access_right/static/src/js/NumpadWidget.js index 931bce5e28..b5078df2fb 100644 --- a/pos_access_right/static/src/js/NumpadWidget.js +++ b/pos_access_right/static/src/js/NumpadWidget.js @@ -4,8 +4,8 @@ odoo.define("pos_access_right.NumpadWidget", function (require) { const Registries = require("point_of_sale.Registries"); const NumpadWidget = require("point_of_sale.NumpadWidget"); - const PosNumpadWidget = (NumpadWidget) => - class extends NumpadWidget { + const PosNumpadWidget = (OriginalNumpadWidget) => + class extends OriginalNumpadWidget { get hasManualDiscount() { const res = super.hasManualDiscount; if (res) { diff --git a/pos_access_right/static/src/js/TicketScreen.js b/pos_access_right/static/src/js/TicketScreen.js index 68e364987c..2daa8b5fac 100644 --- a/pos_access_right/static/src/js/TicketScreen.js +++ b/pos_access_right/static/src/js/TicketScreen.js @@ -4,8 +4,8 @@ odoo.define("pos_access_right.TicketScreen", function (require) { const Registries = require("point_of_sale.Registries"); const TicketScreen = require("point_of_sale.TicketScreen"); - const PosTicketScreen = (TicketScreen) => - class extends TicketScreen { + const PosTicketScreen = (OriginalTicketScreen) => + class extends OriginalTicketScreen { get hasNewOrdersControlRights() { return this.env.pos.user.hasGroupMultiOrder; } diff --git a/pos_escpos_status/static/src/js/ProxyStatus.js b/pos_escpos_status/static/src/js/ProxyStatus.js index 2f05332f17..e734e0e423 100644 --- a/pos_escpos_status/static/src/js/ProxyStatus.js +++ b/pos_escpos_status/static/src/js/ProxyStatus.js @@ -8,8 +8,8 @@ odoo.define("pos_escpos_status.ProxyStatus", function (require) { var Registries = require("point_of_sale.Registries"); var ProxyStatus = require("point_of_sale.ProxyStatus"); - const EscposProxyStatus = (ProxyStatus) => - class EscposProxyStatus extends ProxyStatus { + const EscposProxyStatus = (OriginalProxyStatus) => + class extends OriginalProxyStatus { _setStatus(newStatus) { if (newStatus.drivers.escpos) { newStatus.drivers.printer = newStatus.drivers.escpos; diff --git a/pos_financial_risk/static/src/js/PaymentScreen.esm.js b/pos_financial_risk/static/src/js/PaymentScreen.esm.js index f6c23b3048..1b5385f14c 100644 --- a/pos_financial_risk/static/src/js/PaymentScreen.esm.js +++ b/pos_financial_risk/static/src/js/PaymentScreen.esm.js @@ -3,8 +3,8 @@ import PaymentScreen from "point_of_sale.PaymentScreen"; import Registries from "point_of_sale.Registries"; -export const PaymentScreenRisk = (PaymentScreen) => - class PaymentScreenRisk extends PaymentScreen { +export const PaymentScreenRisk = (OriginalPaymentScreen) => + class extends OriginalPaymentScreen { setup() { super.setup(); this.paymentMethodsFromConfigBase = this.payment_methods_from_config; diff --git a/pos_global_discount_in_line/static/src/js/GlobalLineDiscount.js b/pos_global_discount_in_line/static/src/js/GlobalLineDiscount.js index 6f5dbd272d..1140fb6891 100644 --- a/pos_global_discount_in_line/static/src/js/GlobalLineDiscount.js +++ b/pos_global_discount_in_line/static/src/js/GlobalLineDiscount.js @@ -4,8 +4,8 @@ odoo.define("pos_global_discount_in_line.GlobalLineDiscount", function (require) const DiscountButton = require("pos_discount.DiscountButton"); const Registries = require("point_of_sale.Registries"); - const GlobalLineDiscount = (DiscountButton) => - class extends DiscountButton { + const GlobalLineDiscount = (OriginalDiscountButton) => + class extends OriginalDiscountButton { async onClick() { // Replaced to remove rounding var self = this; diff --git a/pos_lot_barcode/static/src/js/Popups/EditListPopup.js b/pos_lot_barcode/static/src/js/Popups/EditListPopup.js index 4dfd8d4e4f..e9803ee5a5 100644 --- a/pos_lot_barcode/static/src/js/Popups/EditListPopup.js +++ b/pos_lot_barcode/static/src/js/Popups/EditListPopup.js @@ -9,8 +9,8 @@ odoo.define("pos_lot_barcode.EditListPopup", function (require) { const Registries = require("point_of_sale.Registries"); const {useBarcodeReader} = require("point_of_sale.custom_hooks"); - const PosLotBarcodeEditListPopup = (EditListPopup) => - class extends EditListPopup { + const PosLotBarcodeEditListPopup = (OriginalEditListPopup) => + class extends OriginalEditListPopup { setup() { super.setup(); useBarcodeReader({ diff --git a/pos_lot_barcode/static/src/js/Screens/ProductScreen.js b/pos_lot_barcode/static/src/js/Screens/ProductScreen.js index 8baefa9988..cc5ccd6d85 100644 --- a/pos_lot_barcode/static/src/js/Screens/ProductScreen.js +++ b/pos_lot_barcode/static/src/js/Screens/ProductScreen.js @@ -11,8 +11,8 @@ odoo.define("pos_lot_barcode.ProductScreen", function (require) { const {isConnectionError} = require("point_of_sale.utils"); const {_lt} = require("@web/core/l10n/translation"); - const PosLotBarcodeProductScreen = (ProductScreen) => - class extends ProductScreen { + const PosLotBarcodeProductScreen = (OriginalProductScreen) => + class extends OriginalProductScreen { setup() { super.setup(); this.scan_lots_active = true; diff --git a/pos_lot_selection/static/src/js/EditListPopup.js b/pos_lot_selection/static/src/js/EditListPopup.js index 24950b0780..a2f8e468b6 100644 --- a/pos_lot_selection/static/src/js/EditListPopup.js +++ b/pos_lot_selection/static/src/js/EditListPopup.js @@ -8,8 +8,8 @@ odoo.define("pos_lot_selection.EditListPopup", function (require) { const EditListPopup = require("point_of_sale.EditListPopup"); const Registries = require("point_of_sale.Registries"); - const LotSelectEditListPopup = (EditListPopup) => - class extends EditListPopup { + const LotSelectEditListPopup = (OriginalEditListPopup) => + class extends OriginalEditListPopup { setup() { super.setup(); if (this.props.title === this.env._t("Lot/Serial Number(s) Required")) { diff --git a/pos_lot_selection/static/src/js/OrderWidget.js b/pos_lot_selection/static/src/js/OrderWidget.js index bcb65a5337..5e8aefa591 100644 --- a/pos_lot_selection/static/src/js/OrderWidget.js +++ b/pos_lot_selection/static/src/js/OrderWidget.js @@ -8,8 +8,8 @@ odoo.define("pos_lot_selection.CustomOrderWidget", function (require) { const Registries = require("point_of_sale.Registries"); const OrderWidget = require("point_of_sale.OrderWidget"); - const CustomOrderWidget = (OrderWidget) => - class extends OrderWidget { + const CustomOrderWidget = (OriginalOrderWidget) => + class extends OriginalOrderWidget { /** * @override */ diff --git a/pos_lot_selection/static/src/js/ProductScreen.js b/pos_lot_selection/static/src/js/ProductScreen.js index 434475d4f8..6ec7f5af4c 100644 --- a/pos_lot_selection/static/src/js/ProductScreen.js +++ b/pos_lot_selection/static/src/js/ProductScreen.js @@ -8,8 +8,8 @@ odoo.define("pos_lot_selection.ProductScreen", function (require) { const ProductScreen = require("point_of_sale.ProductScreen"); const Registries = require("point_of_sale.Registries"); - const PosLotSaleProductScreen = (ProductScreen) => - class extends ProductScreen { + const PosLotSaleProductScreen = (OriginalProductScreen) => + class extends OriginalProductScreen { /** * @override */ diff --git a/pos_lot_selection/static/src/js/models.js b/pos_lot_selection/static/src/js/models.js index 0356f7a263..13db59279b 100644 --- a/pos_lot_selection/static/src/js/models.js +++ b/pos_lot_selection/static/src/js/models.js @@ -8,8 +8,8 @@ odoo.define("pos_lot_selection.models", function (require) { const {PosGlobalState} = require("point_of_sale.models"); const Registries = require("point_of_sale.Registries"); - const LotSelectPosGlobalState = (PosGlobalState) => - class extends PosGlobalState { + const LotSelectPosGlobalState = (OriginalPosGlobalState) => + class extends OriginalPosGlobalState { async getProductLots(product) { try { return await this.env.services.rpc( diff --git a/pos_margin/static/src/js/models.esm.js b/pos_margin/static/src/js/models.esm.js index 15c059f170..12df725e6d 100644 --- a/pos_margin/static/src/js/models.esm.js +++ b/pos_margin/static/src/js/models.esm.js @@ -11,8 +11,8 @@ import field_utils from "web.field_utils"; // Overload models.Order // ///////////////////////////// -const OrderMargin = (Order) => - class extends Order { +const OrderMargin = (OriginalOrder) => + class extends OriginalOrder { get_margin() { return this.get_orderlines().reduce( (margin, line) => margin + line.get_margin(), @@ -35,8 +35,8 @@ Registries.Model.extend(Order, OrderMargin); // ///////////////////////////// // Overload models.OrderLine // ///////////////////////////// -const OrderLineMargin = (Orderline) => - class extends Orderline { +const OrderLineMargin = (OriginalOrderline) => + class extends OriginalOrderline { get_purchase_price() { // Overload the function to use another field that the default standard_price return this.product.standard_price; diff --git a/pos_order_remove_line/static/src/js/orderline.esm.js b/pos_order_remove_line/static/src/js/orderline.esm.js index ebcacbfd38..fe28a12dcf 100644 --- a/pos_order_remove_line/static/src/js/orderline.esm.js +++ b/pos_order_remove_line/static/src/js/orderline.esm.js @@ -7,8 +7,8 @@ import Orderline from "point_of_sale.Orderline"; import Registries from "point_of_sale.Registries"; -const PosOrderline = (Orderline) => - class extends Orderline { +const PosOrderline = (OriginalOrderline) => + class extends OriginalOrderline { async removeLine(ev) { ev.stopPropagation(); ev.preventDefault(); diff --git a/pos_order_to_sale_order_delivery/static/src/js/Popups/CreateOrderPopup.esm.js b/pos_order_to_sale_order_delivery/static/src/js/Popups/CreateOrderPopup.esm.js index fed0d5543d..ad0eca779d 100644 --- a/pos_order_to_sale_order_delivery/static/src/js/Popups/CreateOrderPopup.esm.js +++ b/pos_order_to_sale_order_delivery/static/src/js/Popups/CreateOrderPopup.esm.js @@ -5,8 +5,8 @@ import Registries from "point_of_sale.Registries"; const {useState} = owl; -const PosDeliveryCarrierCreateOrderPopup = (CreateOrderPopup) => - class extends CreateOrderPopup { +const PosDeliveryCarrierCreateOrderPopup = (OriginalCreateOrderPopup) => + class extends OriginalCreateOrderPopup { // @override setup() { super.setup(); diff --git a/pos_order_to_sale_order_delivery/static/src/js/models.esm.js b/pos_order_to_sale_order_delivery/static/src/js/models.esm.js index 08981bf82b..93397e2c21 100644 --- a/pos_order_to_sale_order_delivery/static/src/js/models.esm.js +++ b/pos_order_to_sale_order_delivery/static/src/js/models.esm.js @@ -3,8 +3,8 @@ import {Order} from "point_of_sale.models"; import Registries from "point_of_sale.Registries"; -const PosOrderToSaleOrderDeliveryOrder = (Order) => - class PosOrderToSaleOrderDeliveryOrder extends Order { +const PosOrderToSaleOrderDeliveryOrder = (OriginalOrder) => + class extends OriginalOrder { constructor() { super(...arguments); this.delivery_carrier = false; diff --git a/pos_order_to_sale_order_report/static/src/js/Popups/CreateOrderPopup.esm.js b/pos_order_to_sale_order_report/static/src/js/Popups/CreateOrderPopup.esm.js index a40e534bc7..601d9d21b4 100644 --- a/pos_order_to_sale_order_report/static/src/js/Popups/CreateOrderPopup.esm.js +++ b/pos_order_to_sale_order_report/static/src/js/Popups/CreateOrderPopup.esm.js @@ -3,8 +3,8 @@ import CreateOrderPopup from "point_of_sale.CreateOrderPopup"; import Registries from "point_of_sale.Registries"; -const PosSaleOrderReportCreateOrderPopup = (CreateOrderPopup) => - class extends CreateOrderPopup { +const PosSaleOrderReportCreateOrderPopup = (OriginalCreateOrderPopup) => + class extends OriginalCreateOrderPopup { async _downloadSaleOrderReport(saleOrderId) { try { const report = this.env.pos.config.iface_sale_order_report_id; diff --git a/pos_order_to_sale_order_sale_financial_risk/static/src/js/CreateOrderPopup.esm.js b/pos_order_to_sale_order_sale_financial_risk/static/src/js/CreateOrderPopup.esm.js index 224d179a69..f1bded78af 100644 --- a/pos_order_to_sale_order_sale_financial_risk/static/src/js/CreateOrderPopup.esm.js +++ b/pos_order_to_sale_order_sale_financial_risk/static/src/js/CreateOrderPopup.esm.js @@ -3,8 +3,8 @@ import CreateOrderPopup from "point_of_sale.CreateOrderPopup"; import Registries from "point_of_sale.Registries"; -export const CreateOrderPopupRisk = (CreateOrderPopup) => - class CreateOrderPopupRisk extends CreateOrderPopup { +export const CreateOrderPopupRisk = (OriginalCreateOrderPopup) => + class extends OriginalCreateOrderPopup { /** * Calculate risk amount by order * @returns {Promise<*>} order total diff --git a/pos_order_to_sale_order_sale_financial_risk/static/src/js/models.esm.js b/pos_order_to_sale_order_sale_financial_risk/static/src/js/models.esm.js index 62b51ddf5b..203d3a8c5b 100644 --- a/pos_order_to_sale_order_sale_financial_risk/static/src/js/models.esm.js +++ b/pos_order_to_sale_order_sale_financial_risk/static/src/js/models.esm.js @@ -3,8 +3,8 @@ import {Order} from "point_of_sale.models"; import Registries from "point_of_sale.Registries"; -const PosSaleFinancialRiskOrder = (Order) => - class PosSaleFinancialRiskOrder extends Order { +const PosSaleFinancialRiskOrder = (OriginalOrder) => + class extends OriginalOrder { constructor() { super(...arguments); this.bypass_risk = false; diff --git a/pos_partner_firstname/static/src/js/PartnerDetailsEdit.js b/pos_partner_firstname/static/src/js/PartnerDetailsEdit.js index 1cf0efdf31..3b8e927974 100644 --- a/pos_partner_firstname/static/src/js/PartnerDetailsEdit.js +++ b/pos_partner_firstname/static/src/js/PartnerDetailsEdit.js @@ -6,8 +6,8 @@ odoo.define("pos_partner_firstname.PartnerDetailsEdit", function (require) { const PartnerDetailsEdit = require("point_of_sale.PartnerDetailsEdit"); const Registries = require("point_of_sale.Registries"); - const PosPartnerDetailsEdit = (PartnerDetailsEdit) => - class extends PartnerDetailsEdit { + const PosPartnerDetailsEdit = (OriginalPartnerDetailsEdit) => + class extends OriginalPartnerDetailsEdit { setup() { super.setup(); this.changes = useState({ diff --git a/pos_partner_firstname/static/src/js/PartnerScreen.js b/pos_partner_firstname/static/src/js/PartnerScreen.js index a5874492ce..6f801784d8 100644 --- a/pos_partner_firstname/static/src/js/PartnerScreen.js +++ b/pos_partner_firstname/static/src/js/PartnerScreen.js @@ -4,8 +4,8 @@ odoo.define("pos_partner_firstname.PartnerListScreen", function (require) { const PartnerListScreen = require("point_of_sale.PartnerListScreen"); const Registries = require("point_of_sale.Registries"); - const PosPartnerListScreen = (PartnerListScreen) => - class extends PartnerListScreen { + const PosPartnerListScreen = (OriginalPartnerListScreen) => + class extends OriginalPartnerListScreen { back() { super.back(); if (this.props.partner) { diff --git a/pos_payment_terminal/static/src/js/models.js b/pos_payment_terminal/static/src/js/models.js index 2ee4345f9a..68e4a4ce65 100644 --- a/pos_payment_terminal/static/src/js/models.js +++ b/pos_payment_terminal/static/src/js/models.js @@ -19,8 +19,8 @@ odoo.define("pos_payment_terminal.models", function (require) { var OCAPaymentTerminal = require("pos_payment_terminal.payment"); models.register_payment_method("oca_payment_terminal", OCAPaymentTerminal); - const PosPaymentTerminalPosGlobalState = (PosGlobalState) => - class PosPaymentTerminalPosGlobalState extends PosGlobalState { + const PosPaymentTerminalPosGlobalState = (OriginalPosGlobalState) => + class extends OriginalPosGlobalState { // @override async after_load_server_data() { for (var payment_method_id in this.payment_methods) { @@ -34,8 +34,8 @@ odoo.define("pos_payment_terminal.models", function (require) { }; Registries.Model.extend(PosGlobalState, PosPaymentTerminalPosGlobalState); - const PosPaymentTerminalPayment = (Payment) => - class PosPaymentTerminalPayment extends Payment { + const PosPaymentTerminalPayment = (OriginalPayment) => + class extends OriginalPayment { constructor() { super(...arguments); // Id of the terminal transaction, used to find the payment diff --git a/pos_product_quick_info/static/src/js/Screens/ProductScreen/ProductItem.js b/pos_product_quick_info/static/src/js/Screens/ProductScreen/ProductItem.js index d5922c106b..6efa952173 100644 --- a/pos_product_quick_info/static/src/js/Screens/ProductScreen/ProductItem.js +++ b/pos_product_quick_info/static/src/js/Screens/ProductScreen/ProductItem.js @@ -4,8 +4,8 @@ odoo.define("pos_product_quick_info.ProductItem", function (require) { const ProductItem = require("point_of_sale.ProductItem"); const Registries = require("point_of_sale.Registries"); - const QuickInfoProductItem = (ProductItem) => - class QuickInfoProductItem extends ProductItem { + const QuickInfoProductItem = (OriginalProductItem) => + class extends OriginalProductItem { async onProductInfoClick(event) { event.stopPropagation(); return await super.onProductInfoClick(...arguments); diff --git a/pos_sale_order_print/static/src/js/SaleOrderManagementScreen.esm.js b/pos_sale_order_print/static/src/js/SaleOrderManagementScreen.esm.js index fe7c3107db..8852a6d0e5 100644 --- a/pos_sale_order_print/static/src/js/SaleOrderManagementScreen.esm.js +++ b/pos_sale_order_print/static/src/js/SaleOrderManagementScreen.esm.js @@ -3,8 +3,8 @@ import SaleOrderManagementScreen from "pos_sale.SaleOrderManagementScreen"; import Registries from "point_of_sale.Registries"; -const PrintSaleOrderManagementScreen = (SaleOrderManagementScreen) => - class PrintSaleOrderManagementScreen extends SaleOrderManagementScreen { +const PrintSaleOrderManagementScreen = (OriginalSaleOrderManagementScreen) => + class extends OriginalSaleOrderManagementScreen { async _onClickSaleOrder(event) { // Add a "Print" option to the selection list this.additionalSelectionList = [ diff --git a/pos_sale_order_print/static/src/js/pos_sale_order_print.esm.js b/pos_sale_order_print/static/src/js/pos_sale_order_print.esm.js index 8b948ff72c..3fb94160df 100644 --- a/pos_sale_order_print/static/src/js/pos_sale_order_print.esm.js +++ b/pos_sale_order_print/static/src/js/pos_sale_order_print.esm.js @@ -3,8 +3,8 @@ import {PosGlobalState} from "point_of_sale.models"; import Registries from "point_of_sale.Registries"; -const ReportPosGlobalState = (PosGlobalState) => - class ReportPosGlobalState extends PosGlobalState { +const ReportPosGlobalState = (OriginalPosGlobalState) => + class extends OriginalPosGlobalState { async _processData(loadedData) { await super._processData(...arguments); diff --git a/pos_stock_available_online/static/src/js/Screens/ProductScreen/ProductItem.esm.js b/pos_stock_available_online/static/src/js/Screens/ProductScreen/ProductItem.esm.js index e04c9d8af0..a3594430a1 100644 --- a/pos_stock_available_online/static/src/js/Screens/ProductScreen/ProductItem.esm.js +++ b/pos_stock_available_online/static/src/js/Screens/ProductScreen/ProductItem.esm.js @@ -5,8 +5,8 @@ import Registries from "point_of_sale.Registries"; import {format} from "web.field_utils"; import utils from "web.utils"; -const StockProductItem = (ProductItem) => - class StockProductItem extends ProductItem { +const StockProductItem = (OriginalProductItem) => + class extends OriginalProductItem { format_quantity(quantity) { const unit = this.env.pos.units_by_id[this.props.product.uom_id[0]]; var formattedQuantity = `${quantity}`; diff --git a/pos_stock_available_online/static/src/js/Screens/ProductScreen/ProductsWidget.esm.js b/pos_stock_available_online/static/src/js/Screens/ProductScreen/ProductsWidget.esm.js index e802f69a19..21c8594b29 100644 --- a/pos_stock_available_online/static/src/js/Screens/ProductScreen/ProductsWidget.esm.js +++ b/pos_stock_available_online/static/src/js/Screens/ProductScreen/ProductsWidget.esm.js @@ -3,8 +3,8 @@ import ProductsWidget from "point_of_sale.ProductsWidget"; import Registries from "point_of_sale.Registries"; -const StockProductsWidget = (ProductsWidget) => - class StockProductsWidget extends ProductsWidget { +const StockProductsWidget = (OriginalProductsWidget) => + class extends OriginalProductsWidget { setup() { super.setup(); this.env.services.bus_service.addChannel(this._getChannelName()); From c3540443a74f31a585ee33b4781b3a7f342282ed Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL Date: Thu, 18 Jan 2024 14:35:37 +0100 Subject: [PATCH 2/5] [FIX] eslint error 'no-param-reassign' in all modules --- pos_product_multi_barcode/static/src/js/db.js | 3 --- .../static/src/js/SaleOrderManagementScreen.esm.js | 5 +++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/pos_product_multi_barcode/static/src/js/db.js b/pos_product_multi_barcode/static/src/js/db.js index 075ed68c5c..5282421b62 100644 --- a/pos_product_multi_barcode/static/src/js/db.js +++ b/pos_product_multi_barcode/static/src/js/db.js @@ -16,9 +16,6 @@ odoo.define("pos_product_multi_barcode.db", function (require) { var res = this._super(products); var self = this; - if (!products instanceof Array) { - products = [products]; - } products.forEach(function (product) { var barcodes = JSON.parse(product.barcodes_json); diff --git a/pos_sale_order_print/static/src/js/SaleOrderManagementScreen.esm.js b/pos_sale_order_print/static/src/js/SaleOrderManagementScreen.esm.js index 8852a6d0e5..55208877bb 100644 --- a/pos_sale_order_print/static/src/js/SaleOrderManagementScreen.esm.js +++ b/pos_sale_order_print/static/src/js/SaleOrderManagementScreen.esm.js @@ -18,8 +18,9 @@ const PrintSaleOrderManagementScreen = (OriginalSaleOrderManagementScreen) => } async _printSaleOrder(confirmed, payload) { // Reset confirmed, payload, and additionalSelectionList - confirmed = false; - payload = false; + // eslint-disable-next-line no-param-reassign + confirmed = payload = false; + this.additionalSelectionList = false; if ( this.env.pos.config.print_sales_order_ids && From dbf3d3e2ec7ffee766b1610962a6dab3d5a1446d Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL Date: Thu, 18 Jan 2024 14:37:44 +0100 Subject: [PATCH 3/5] [FIX] eslint error 'eqeqeq' in all modules --- pos_payment_terminal/static/src/js/models.js | 4 +++- .../static/src/js/SaleOrderManagementScreen.esm.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pos_payment_terminal/static/src/js/models.js b/pos_payment_terminal/static/src/js/models.js index 68e4a4ce65..5face73931 100644 --- a/pos_payment_terminal/static/src/js/models.js +++ b/pos_payment_terminal/static/src/js/models.js @@ -25,7 +25,9 @@ odoo.define("pos_payment_terminal.models", function (require) { async after_load_server_data() { for (var payment_method_id in this.payment_methods) { var payment_method = this.payment_methods[payment_method_id]; - if (payment_method.use_payment_terminal == "oca_payment_terminal") { + if ( + payment_method.use_payment_terminal === "oca_payment_terminal" + ) { this.config.use_proxy = true; } } diff --git a/pos_sale_order_print/static/src/js/SaleOrderManagementScreen.esm.js b/pos_sale_order_print/static/src/js/SaleOrderManagementScreen.esm.js index 55208877bb..bfa19e6b93 100644 --- a/pos_sale_order_print/static/src/js/SaleOrderManagementScreen.esm.js +++ b/pos_sale_order_print/static/src/js/SaleOrderManagementScreen.esm.js @@ -79,7 +79,7 @@ const PrintSaleOrderManagementScreen = (OriginalSaleOrderManagementScreen) => return {confirmed, payload}; } showPopup(name, props) { - if (name == "SelectionPopup" && this.additionalSelectionList) { + if (name === "SelectionPopup" && this.additionalSelectionList) { props.list = [...props.list, ...this.additionalSelectionList]; } return super.showPopup(name, props).then(({confirmed, payload}) => { From 13b726e7af14edc885642b47561c4b167cd33fb1 Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL Date: Thu, 18 Jan 2024 14:40:00 +0100 Subject: [PATCH 4/5] [FIX] eslint error 'sort-imports' in all modules --- .../js/Screens/TicketScreen/ControlButtons/ReorderButton.esm.js | 2 +- .../static/src/js/SaleOrderManagementScreen.esm.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pos_order_reorder/static/src/js/Screens/TicketScreen/ControlButtons/ReorderButton.esm.js b/pos_order_reorder/static/src/js/Screens/TicketScreen/ControlButtons/ReorderButton.esm.js index 43726f206b..e63e4eb501 100644 --- a/pos_order_reorder/static/src/js/Screens/TicketScreen/ControlButtons/ReorderButton.esm.js +++ b/pos_order_reorder/static/src/js/Screens/TicketScreen/ControlButtons/ReorderButton.esm.js @@ -1,8 +1,8 @@ /** @odoo-module **/ +import {Orderline} from "point_of_sale.models"; import PosComponent from "point_of_sale.PosComponent"; import Registries from "point_of_sale.Registries"; -import {Orderline} from "point_of_sale.models"; class ReorderButton extends PosComponent { get isEmptyOrder() { diff --git a/pos_sale_order_print/static/src/js/SaleOrderManagementScreen.esm.js b/pos_sale_order_print/static/src/js/SaleOrderManagementScreen.esm.js index bfa19e6b93..69147db78d 100644 --- a/pos_sale_order_print/static/src/js/SaleOrderManagementScreen.esm.js +++ b/pos_sale_order_print/static/src/js/SaleOrderManagementScreen.esm.js @@ -1,7 +1,7 @@ /** @odoo-module **/ -import SaleOrderManagementScreen from "pos_sale.SaleOrderManagementScreen"; import Registries from "point_of_sale.Registries"; +import SaleOrderManagementScreen from "pos_sale.SaleOrderManagementScreen"; const PrintSaleOrderManagementScreen = (OriginalSaleOrderManagementScreen) => class extends OriginalSaleOrderManagementScreen { From 1f6aa17a19523ec6ffcca8f07393174572e42d4d Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL Date: Thu, 18 Jan 2024 14:41:40 +0100 Subject: [PATCH 5/5] [FIX] eslint error 'radix' in all modules --- .../static/src/js/Popups/ChooseDeliveryCarrierPopup.esm.js | 2 +- pos_partner_firstname/static/src/js/PartnerDetailsEdit.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pos_order_to_sale_order_delivery/static/src/js/Popups/ChooseDeliveryCarrierPopup.esm.js b/pos_order_to_sale_order_delivery/static/src/js/Popups/ChooseDeliveryCarrierPopup.esm.js index 88d0cc64d2..e263ac3b1e 100644 --- a/pos_order_to_sale_order_delivery/static/src/js/Popups/ChooseDeliveryCarrierPopup.esm.js +++ b/pos_order_to_sale_order_delivery/static/src/js/Popups/ChooseDeliveryCarrierPopup.esm.js @@ -13,7 +13,7 @@ class ChooseDeliveryCarrierPopup extends AbstractAwaitablePopup { } onChange(carrierId) { const selected = this.props.chooses.find( - (item) => parseInt(carrierId) === item.carrier_id[0] + (item) => parseInt(carrierId, 10) === item.carrier_id[0] ); this.state.choose = selected; } diff --git a/pos_partner_firstname/static/src/js/PartnerDetailsEdit.js b/pos_partner_firstname/static/src/js/PartnerDetailsEdit.js index 3b8e927974..d2c227d955 100644 --- a/pos_partner_firstname/static/src/js/PartnerDetailsEdit.js +++ b/pos_partner_firstname/static/src/js/PartnerDetailsEdit.js @@ -40,7 +40,7 @@ odoo.define("pos_partner_firstname.PartnerDetailsEdit", function (require) { const processedChanges = {}; for (const [key, value] of Object.entries(this.changes)) { if (this.intFields.includes(key)) { - processedChanges[key] = parseInt(value) || false; + processedChanges[key] = parseInt(value, 10) || false; } else { processedChanges[key] = value; }