diff --git a/barcode_camera/__manifest__.py b/barcode_camera/__manifest__.py index c79b28a..061d022 100644 --- a/barcode_camera/__manifest__.py +++ b/barcode_camera/__manifest__.py @@ -11,10 +11,10 @@ "barcode_scanner", ], "assets": { - "web.assets_backend": [ - "barcode_camera/static/src/scss/barcode_camera.scss", - "barcode_camera/static/src/xml/camera_fab.xml", - "barcode_camera/static/src/js/camera_fab.esm.js", + "barcode_scanner.assets": [ + "barcode_camera/static/src/components/**/*.esm.js", + "barcode_camera/static/src/components/**/*.xml", + "barcode_camera/static/src/components/**/*.scss", ], "web.assets_unit_tests": [ "barcode_camera/static/tests/**/*", diff --git a/barcode_camera/static/src/js/camera_fab.esm.js b/barcode_camera/static/src/components/camera_fab/camera_fab.esm.js similarity index 97% rename from barcode_camera/static/src/js/camera_fab.esm.js rename to barcode_camera/static/src/components/camera_fab/camera_fab.esm.js index 00eb72b..550687f 100644 --- a/barcode_camera/static/src/js/camera_fab.esm.js +++ b/barcode_camera/static/src/components/camera_fab/camera_fab.esm.js @@ -1,6 +1,6 @@ import {Component, useState} from "@odoo/owl"; import {BarcodeDialog} from "@web/core/barcode/barcode_dialog"; -import {barcodeAppWidgets} from "@barcode_scanner/js/registries.esm"; +import {barcodeAppWidgets} from "@barcode_scanner/registries.esm"; import {isBarcodeScannerSupported} from "@web/core/barcode/barcode_video_scanner"; import {useService} from "@web/core/utils/hooks"; diff --git a/barcode_camera/static/src/scss/barcode_camera.scss b/barcode_camera/static/src/components/camera_fab/camera_fab.scss similarity index 100% rename from barcode_camera/static/src/scss/barcode_camera.scss rename to barcode_camera/static/src/components/camera_fab/camera_fab.scss diff --git a/barcode_camera/static/src/xml/camera_fab.xml b/barcode_camera/static/src/components/camera_fab/camera_fab.xml similarity index 100% rename from barcode_camera/static/src/xml/camera_fab.xml rename to barcode_camera/static/src/components/camera_fab/camera_fab.xml diff --git a/barcode_camera/static/tests/camera_fab.test.js b/barcode_camera/static/tests/camera_fab.test.js index cf3ecc6..f891099 100644 --- a/barcode_camera/static/tests/camera_fab.test.js +++ b/barcode_camera/static/tests/camera_fab.test.js @@ -1,17 +1,17 @@ +import {Component, useState, xml} from "@odoo/owl"; +import {animationFrame, click, waitFor, waitForNone} from "@odoo/hoot-dom"; +import {describe, expect, test} from "@odoo/hoot"; import { getService, mockService, mountWithCleanup, patchWithCleanup, } from "@web/../tests/web_test_helpers"; -import {Component, useState, xml} from "@odoo/owl"; -import {animationFrame, click, waitFor, waitForNone} from "@odoo/hoot-dom"; -import {describe, expect, test} from "@odoo/hoot"; import {BarcodeDialog} from "@web/core/barcode/barcode_dialog"; -import {CameraFab} from "@barcode_camera/js/camera_fab.esm"; -import {barcodeAppWidgets} from "@barcode_scanner/js/registries.esm"; +import {CameraFab} from "@barcode_camera/components/camera_fab/camera_fab.esm"; +import {barcodeAppWidgets} from "@barcode_scanner/registries.esm"; import {browser} from "@web/core/browser/browser"; -import {useBarcodeHandler} from "@barcode_scanner/js/hooks/use_barcode_handler.esm"; +import {useBarcodeHandler} from "@barcode_scanner/hooks/use_barcode_handler.esm"; // A browser that can open the camera. function withCamera() { diff --git a/barcode_gs1/__manifest__.py b/barcode_gs1/__manifest__.py index 65ddd98..f1f7d03 100644 --- a/barcode_gs1/__manifest__.py +++ b/barcode_gs1/__manifest__.py @@ -12,10 +12,8 @@ "barcodes_gs1_nomenclature", ], "assets": { - "web.assets_backend": [ - "barcode_gs1/static/src/js/gs1_nomenclature.esm.js", - "barcode_gs1/static/src/js/gs1_parser.esm.js", - "barcode_gs1/static/src/js/gs1_startup.esm.js", + "barcode_scanner.assets": [ + "barcode_gs1/static/src/**/*.esm.js", ], "web.assets_unit_tests": [ "barcode_gs1/static/tests/**/*", diff --git a/barcode_gs1/static/src/js/gs1_nomenclature.esm.js b/barcode_gs1/static/src/utils/gs1_nomenclature.esm.js similarity index 100% rename from barcode_gs1/static/src/js/gs1_nomenclature.esm.js rename to barcode_gs1/static/src/utils/gs1_nomenclature.esm.js diff --git a/barcode_gs1/static/src/js/gs1_parser.esm.js b/barcode_gs1/static/src/utils/gs1_parser.esm.js similarity index 99% rename from barcode_gs1/static/src/js/gs1_parser.esm.js rename to barcode_gs1/static/src/utils/gs1_parser.esm.js index d55fed6..3784284 100644 --- a/barcode_gs1/static/src/js/gs1_parser.esm.js +++ b/barcode_gs1/static/src/utils/gs1_parser.esm.js @@ -1,11 +1,12 @@ -import {barcodeParsers} from "@barcode_scanner/js/registries.esm"; import { compileGs1Rule, getGs1Nomenclature, hasValidCheckDigit, -} from "@barcode_gs1/js/gs1_nomenclature.esm"; +} from "./gs1_nomenclature.esm"; +import {barcodeParsers} from "@barcode_scanner/registries.esm"; -const GS1_SEPARATOR = String.fromCharCode(29); // FNC1 (, 0x1D) +// FNC1 (, 0x1D) +const GS1_SEPARATOR = String.fromCharCode(29); // The symbology identifiers the GS1 carriers prefix their data with: GS1-128, // DataBar, GS1 DataMatrix, GS1 QR and GS1 DotCode. Their presence is itself diff --git a/barcode_gs1/static/src/js/gs1_startup.esm.js b/barcode_gs1/static/src/utils/gs1_startup.esm.js similarity index 71% rename from barcode_gs1/static/src/js/gs1_startup.esm.js rename to barcode_gs1/static/src/utils/gs1_startup.esm.js index 827885a..ee7ba25 100644 --- a/barcode_gs1/static/src/js/gs1_startup.esm.js +++ b/barcode_gs1/static/src/utils/gs1_startup.esm.js @@ -1,5 +1,5 @@ -import {barcodeStartupTasks} from "@barcode_scanner/js/registries.esm"; -import {loadGs1Nomenclature} from "@barcode_gs1/js/gs1_nomenclature.esm"; +import {barcodeStartupTasks} from "@barcode_scanner/registries.esm"; +import {loadGs1Nomenclature} from "./gs1_nomenclature.esm"; /** * Read the GS1 nomenclature once, when the app starts, so the parser — which diff --git a/barcode_gs1/static/tests/gs1_parser.test.js b/barcode_gs1/static/tests/gs1_parser.test.js index 980231b..98d8fff 100644 --- a/barcode_gs1/static/tests/gs1_parser.test.js +++ b/barcode_gs1/static/tests/gs1_parser.test.js @@ -1,15 +1,15 @@ /** @odoo-module **/ import {afterEach, describe, expect, test} from "@odoo/hoot"; -import {gtinVariants, isGS1Barcode, parseGs1} from "@barcode_gs1/js/gs1_parser.esm"; +import {gtinVariants, isGS1Barcode, parseGs1} from "@barcode_gs1/utils/gs1_parser.esm"; import { compileGs1Nomenclature, getGs1Nomenclature, hasValidCheckDigit, loadGs1Nomenclature, setGs1Nomenclature, -} from "@barcode_gs1/js/gs1_nomenclature.esm"; -import {parseBarcode} from "@barcode_scanner/js/barcode_parser.esm"; +} from "@barcode_gs1/utils/gs1_nomenclature.esm"; +import {parseBarcode} from "@barcode_scanner/utils/barcode_parser.esm"; // FNC1 (, 0x1D), the separator a scanner sends between variable-length AIs. const GS = String.fromCharCode(29); diff --git a/barcode_gs1_stock/__manifest__.py b/barcode_gs1_stock/__manifest__.py index 9ee3f63..bce5964 100644 --- a/barcode_gs1_stock/__manifest__.py +++ b/barcode_gs1_stock/__manifest__.py @@ -12,8 +12,8 @@ "barcode_stock", ], "assets": { - "web.assets_backend": [ - "barcode_gs1_stock/static/src/js/gs1_stock_quantity.esm.js", + "barcode_scanner.assets": [ + "barcode_gs1_stock/static/src/utils/gs1_stock_quantity.esm.js", ], "web.assets_unit_tests": [ "barcode_gs1_stock/static/tests/**/*", diff --git a/barcode_gs1_stock/static/src/js/gs1_stock_quantity.esm.js b/barcode_gs1_stock/static/src/utils/gs1_stock_quantity.esm.js similarity index 97% rename from barcode_gs1_stock/static/src/js/gs1_stock_quantity.esm.js rename to barcode_gs1_stock/static/src/utils/gs1_stock_quantity.esm.js index 61967ce..805cd85 100644 --- a/barcode_gs1_stock/static/src/js/gs1_stock_quantity.esm.js +++ b/barcode_gs1_stock/static/src/utils/gs1_stock_quantity.esm.js @@ -1,6 +1,6 @@ import {roundDecimals, roundPrecision} from "@web/core/utils/numbers"; -import {BarcodeScannerState} from "@barcode_stock/js/services/barcode_scanner_state.esm"; -import {barcodeStartupTasks} from "@barcode_scanner/js/registries.esm"; +import {BarcodeScannerState} from "@barcode_stock/services/barcode_scanner_state.esm"; +import {barcodeStartupTasks} from "@barcode_scanner/registries.esm"; import {patch} from "@web/core/utils/patch"; // Logistic measures (AI 330n-349n: the gross weight, dimensions and volume of diff --git a/barcode_gs1_stock/static/tests/gs1_stock_quantity.test.js b/barcode_gs1_stock/static/tests/gs1_stock_quantity.test.js index 8cb0b9f..98b1ebf 100644 --- a/barcode_gs1_stock/static/tests/gs1_stock_quantity.test.js +++ b/barcode_gs1_stock/static/tests/gs1_stock_quantity.test.js @@ -1,11 +1,11 @@ -import "@barcode_gs1_stock/js/gs1_stock_quantity.esm"; +import "@barcode_gs1_stock/utils/gs1_stock_quantity.esm"; import {afterEach, describe, expect, test} from "@odoo/hoot"; import { compileGs1Nomenclature, setGs1Nomenclature, -} from "@barcode_gs1/js/gs1_nomenclature.esm"; -import {BarcodeScannerState} from "@barcode_stock/js/services/barcode_scanner_state.esm"; -import {parseGs1} from "@barcode_gs1/js/gs1_parser.esm"; +} from "@barcode_gs1/utils/gs1_nomenclature.esm"; +import {BarcodeScannerState} from "@barcode_stock/services/barcode_scanner_state.esm"; +import {parseGs1} from "@barcode_gs1/utils/gs1_parser.esm"; // Units of measure as a stock database ships them: `factor` is how many of the // unit make one unit of its category's reference (a kilogram is 1000 grams), diff --git a/barcode_inventory/__manifest__.py b/barcode_inventory/__manifest__.py index 54fc891..3755785 100644 --- a/barcode_inventory/__manifest__.py +++ b/barcode_inventory/__manifest__.py @@ -13,13 +13,10 @@ "stock_inventory", ], "assets": { - "web.assets_backend": [ - "barcode_inventory/static/src/scss/inventory.scss", - "barcode_inventory/static/src/xml/inventory_templates.xml", - "barcode_inventory/static/src/js/screens/inventory_location_screen.esm.js", - "barcode_inventory/static/src/js/screens/inventory_product_selector_screen.esm.js", - "barcode_inventory/static/src/js/screens/inventory_count_screen.esm.js", - "barcode_inventory/static/src/js/tiles/inventory_menu_tiles.esm.js", + "barcode_scanner.assets": [ + "barcode_inventory/static/src/**/*.scss", + "barcode_inventory/static/src/**/*.esm.js", + "barcode_inventory/static/src/**/*.xml", ], "web.assets_unit_tests": [ "barcode_inventory/static/tests/**/*", diff --git a/barcode_inventory/static/src/js/screens/inventory_count_screen.esm.js b/barcode_inventory/static/src/components/inventory_count_screen/inventory_count_screen.esm.js similarity index 98% rename from barcode_inventory/static/src/js/screens/inventory_count_screen.esm.js rename to barcode_inventory/static/src/components/inventory_count_screen/inventory_count_screen.esm.js index a84cea9..7ce58df 100644 --- a/barcode_inventory/static/src/js/screens/inventory_count_screen.esm.js +++ b/barcode_inventory/static/src/components/inventory_count_screen/inventory_count_screen.esm.js @@ -1,11 +1,11 @@ import {Component, onWillStart, useState} from "@odoo/owl"; import {ConfirmationDialog} from "@web/core/confirmation_dialog/confirmation_dialog"; import {_t} from "@web/core/l10n/translation"; -import {barcodeMatchAnyDomain} from "@barcode_scanner/js/utils/scan_match.esm"; -import {barcodeScreens} from "@barcode_scanner/js/registries.esm"; +import {barcodeMatchAnyDomain} from "@barcode_scanner/utils/scan_match.esm"; +import {barcodeScreens} from "@barcode_scanner/registries.esm"; import {formatFloat} from "@web/core/utils/numbers"; -import {useBarcodeHandler} from "@barcode_scanner/js/hooks/use_barcode_handler.esm"; -import {useBarcodeScanner} from "@barcode_scanner/js/hooks/use_inventory.esm"; +import {useBarcodeHandler} from "@barcode_scanner/hooks/use_barcode_handler.esm"; +import {useBarcodeScanner} from "@barcode_scanner/hooks/use_inventory.esm"; import {useService} from "@web/core/utils/hooks"; /** diff --git a/barcode_inventory/static/src/components/inventory_count_screen/inventory_count_screen.scss b/barcode_inventory/static/src/components/inventory_count_screen/inventory_count_screen.scss new file mode 100644 index 0000000..a7510b1 --- /dev/null +++ b/barcode_inventory/static/src/components/inventory_count_screen/inventory_count_screen.scss @@ -0,0 +1,18 @@ +// Difference between the counted quantity and the stock, under the count. +.ilx-inv-diff { + font-size: 0.8rem; + font-weight: 600; + + &.ilx-inv-diff-up { + color: var(--ilx-success); + } + + &.ilx-inv-diff-down { + color: var(--ilx-error); + } + + &.ilx-inv-diff-none { + color: var(--ilx-on-surface-variant); + font-weight: normal; + } +} diff --git a/barcode_inventory/static/src/xml/inventory_templates.xml b/barcode_inventory/static/src/components/inventory_count_screen/inventory_count_screen.xml similarity index 57% rename from barcode_inventory/static/src/xml/inventory_templates.xml rename to barcode_inventory/static/src/components/inventory_count_screen/inventory_count_screen.xml index 68e2363..2c57403 100644 --- a/barcode_inventory/static/src/xml/inventory_templates.xml +++ b/barcode_inventory/static/src/components/inventory_count_screen/inventory_count_screen.xml @@ -1,77 +1,5 @@ - - -
-
- -

Inventory Adjustment

-
- -
-
- - Only inventory administrators can apply a count. -
- - -

SELECT A LOCATION TO COUNT

-
- -
Loading locations...
-
- - -
-
-
-
- -
-
-
-
- - - -
-
- -
-
-
-
No internal locations found.
-
-
-
-
-
-
@@ -211,60 +139,4 @@
- - -
-
- -

Add Product

-
- -
- - -

PRODUCTS

-
- -
Loading products...
-
- - -
-
- - - -
-
- -
-
-
-
No products found.
-
-
-
-
-
-
diff --git a/barcode_inventory/static/src/js/screens/inventory_location_screen.esm.js b/barcode_inventory/static/src/components/inventory_location_screen/inventory_location_screen.esm.js similarity index 90% rename from barcode_inventory/static/src/js/screens/inventory_location_screen.esm.js rename to barcode_inventory/static/src/components/inventory_location_screen/inventory_location_screen.esm.js index 32f91ff..68cc23a 100644 --- a/barcode_inventory/static/src/js/screens/inventory_location_screen.esm.js +++ b/barcode_inventory/static/src/components/inventory_location_screen/inventory_location_screen.esm.js @@ -1,9 +1,9 @@ import {Component, onWillStart, useState} from "@odoo/owl"; import {_t} from "@web/core/l10n/translation"; -import {barcodeMatchDomain} from "@barcode_scanner/js/utils/scan_match.esm"; -import {barcodeScreens} from "@barcode_scanner/js/registries.esm"; -import {useBarcodeHandler} from "@barcode_scanner/js/hooks/use_barcode_handler.esm"; -import {useBarcodeScanner} from "@barcode_scanner/js/hooks/use_inventory.esm"; +import {barcodeMatchDomain} from "@barcode_scanner/utils/scan_match.esm"; +import {barcodeScreens} from "@barcode_scanner/registries.esm"; +import {useBarcodeHandler} from "@barcode_scanner/hooks/use_barcode_handler.esm"; +import {useBarcodeScanner} from "@barcode_scanner/hooks/use_inventory.esm"; import {useService} from "@web/core/utils/hooks"; import {user} from "@web/core/user"; diff --git a/barcode_inventory/static/src/components/inventory_location_screen/inventory_location_screen.scss b/barcode_inventory/static/src/components/inventory_location_screen/inventory_location_screen.scss new file mode 100644 index 0000000..9da9687 --- /dev/null +++ b/barcode_inventory/static/src/components/inventory_location_screen/inventory_location_screen.scss @@ -0,0 +1,11 @@ +// Shown instead of the locations to an operator who cannot apply a count. +.ilx-inv-no-access { + display: flex; + align-items: center; + gap: 10px; + padding: 12px 14px; + border-radius: 12px; + background: var(--ilx-warning-bg); + color: var(--ilx-on-surface); + font-size: 0.9rem; +} diff --git a/barcode_inventory/static/src/components/inventory_location_screen/inventory_location_screen.xml b/barcode_inventory/static/src/components/inventory_location_screen/inventory_location_screen.xml new file mode 100644 index 0000000..9793687 --- /dev/null +++ b/barcode_inventory/static/src/components/inventory_location_screen/inventory_location_screen.xml @@ -0,0 +1,74 @@ + + + + +
+
+ +

Inventory Adjustment

+
+ +
+
+ + Only inventory administrators can apply a count. +
+ + +

SELECT A LOCATION TO COUNT

+
+ +
Loading locations...
+
+ + +
+
+
+
+ +
+
+
+
+ + + +
+
+ +
+
+
+
No internal locations found.
+
+
+
+
+
+
diff --git a/barcode_inventory/static/src/js/screens/inventory_product_selector_screen.esm.js b/barcode_inventory/static/src/components/inventory_product_selector_screen/inventory_product_selector_screen.esm.js similarity index 91% rename from barcode_inventory/static/src/js/screens/inventory_product_selector_screen.esm.js rename to barcode_inventory/static/src/components/inventory_product_selector_screen/inventory_product_selector_screen.esm.js index 13c3563..3b2b6e8 100644 --- a/barcode_inventory/static/src/js/screens/inventory_product_selector_screen.esm.js +++ b/barcode_inventory/static/src/components/inventory_product_selector_screen/inventory_product_selector_screen.esm.js @@ -1,13 +1,13 @@ import { COUNTABLE_PRODUCTS, notStorableMessage, -} from "@barcode_inventory/js/screens/inventory_count_screen.esm"; +} from "../inventory_count_screen/inventory_count_screen.esm"; import {Component, onWillStart, useState} from "@odoo/owl"; import {_t} from "@web/core/l10n/translation"; -import {barcodeMatchDomain} from "@barcode_scanner/js/utils/scan_match.esm"; -import {barcodeScreens} from "@barcode_scanner/js/registries.esm"; -import {useBarcodeHandler} from "@barcode_scanner/js/hooks/use_barcode_handler.esm"; -import {useBarcodeScanner} from "@barcode_scanner/js/hooks/use_inventory.esm"; +import {barcodeMatchDomain} from "@barcode_scanner/utils/scan_match.esm"; +import {barcodeScreens} from "@barcode_scanner/registries.esm"; +import {useBarcodeHandler} from "@barcode_scanner/hooks/use_barcode_handler.esm"; +import {useBarcodeScanner} from "@barcode_scanner/hooks/use_inventory.esm"; import {useService} from "@web/core/utils/hooks"; /** diff --git a/barcode_inventory/static/src/components/inventory_product_selector_screen/inventory_product_selector_screen.xml b/barcode_inventory/static/src/components/inventory_product_selector_screen/inventory_product_selector_screen.xml new file mode 100644 index 0000000..2899412 --- /dev/null +++ b/barcode_inventory/static/src/components/inventory_product_selector_screen/inventory_product_selector_screen.xml @@ -0,0 +1,58 @@ + + + +
+
+ +

Add Product

+
+ +
+ + +

PRODUCTS

+
+ +
Loading products...
+
+ + +
+
+ + + +
+
+ +
+
+
+
No products found.
+
+
+
+
+
+ +
diff --git a/barcode_inventory/static/src/scss/inventory.scss b/barcode_inventory/static/src/scss/inventory.scss deleted file mode 100644 index 9aa4576..0000000 --- a/barcode_inventory/static/src/scss/inventory.scss +++ /dev/null @@ -1,33 +0,0 @@ -// Count screens. Reuses the shared design tokens (--ilx-*) defined by -// barcode_scanner so the look matches the rest of the suite. - -// Difference between the counted quantity and the stock, under the count. -.ilx-inv-diff { - font-size: 0.8rem; - font-weight: 600; - - &.ilx-inv-diff-up { - color: var(--ilx-success); - } - - &.ilx-inv-diff-down { - color: var(--ilx-error); - } - - &.ilx-inv-diff-none { - color: var(--ilx-on-surface-variant); - font-weight: normal; - } -} - -// Shown instead of the locations to an operator who cannot apply a count. -.ilx-inv-no-access { - display: flex; - align-items: center; - gap: 10px; - padding: 12px 14px; - border-radius: 12px; - background: var(--ilx-warning-bg); - color: var(--ilx-on-surface); - font-size: 0.9rem; -} diff --git a/barcode_inventory/static/src/js/tiles/inventory_menu_tiles.esm.js b/barcode_inventory/static/src/tiles/inventory_menu_tiles.esm.js similarity index 86% rename from barcode_inventory/static/src/js/tiles/inventory_menu_tiles.esm.js rename to barcode_inventory/static/src/tiles/inventory_menu_tiles.esm.js index 77e3a07..016f367 100644 --- a/barcode_inventory/static/src/js/tiles/inventory_menu_tiles.esm.js +++ b/barcode_inventory/static/src/tiles/inventory_menu_tiles.esm.js @@ -1,5 +1,5 @@ import {_t} from "@web/core/l10n/translation"; -import {barcodeMenuTiles} from "@barcode_scanner/js/registries.esm"; +import {barcodeMenuTiles} from "@barcode_scanner/registries.esm"; /** * Home-screen tile for inventory adjustments. Registers into the scanner core diff --git a/barcode_inventory/static/tests/inventory_count.test.js b/barcode_inventory/static/tests/inventory_count.test.js index 4ef082c..101fb51 100644 --- a/barcode_inventory/static/tests/inventory_count.test.js +++ b/barcode_inventory/static/tests/inventory_count.test.js @@ -1,17 +1,17 @@ import { COUNTABLE_PRODUCTS, InventoryCountScreen, -} from "@barcode_inventory/js/screens/inventory_count_screen.esm"; +} from "@barcode_inventory/components/inventory_count_screen/inventory_count_screen.esm"; import {beforeEach, describe, expect, test} from "@odoo/hoot"; import { makeMockEnv, patchTranslations, patchWithCleanup, } from "@web/../tests/web_test_helpers"; -import {InventoryLocationScreen} from "@barcode_inventory/js/screens/inventory_location_screen.esm"; -import {InventoryProductSelectorScreen} from "@barcode_inventory/js/screens/inventory_product_selector_screen.esm"; +import {InventoryLocationScreen} from "@barcode_inventory/components/inventory_location_screen/inventory_location_screen.esm"; +import {InventoryProductSelectorScreen} from "@barcode_inventory/components/inventory_product_selector_screen/inventory_product_selector_screen.esm"; import {getTemplate} from "@web/core/templates"; -import {parseBarcode} from "@barcode_scanner/js/barcode_parser.esm"; +import {parseBarcode} from "@barcode_scanner/utils/barcode_parser.esm"; import {user} from "@web/core/user"; const UNTRACKED = { diff --git a/barcode_purchase/__manifest__.py b/barcode_purchase/__manifest__.py index 175bf8c..6400cc3 100644 --- a/barcode_purchase/__manifest__.py +++ b/barcode_purchase/__manifest__.py @@ -16,16 +16,10 @@ "views/purchase_order_views.xml", ], "assets": { - "web.assets_backend": [ - "barcode_purchase/static/src/scss/purchase.scss", - "barcode_purchase/static/src/xml/purchase_templates.xml", - "barcode_purchase/static/src/js/utils/avatar.esm.js", - "barcode_purchase/static/src/js/screens/supplier_selector_screen.esm.js", - "barcode_purchase/static/src/js/screens/buyer_selector_screen.esm.js", - "barcode_purchase/static/src/js/screens/location_selector_screen.esm.js", - "barcode_purchase/static/src/js/screens/product_selector_screen.esm.js", - "barcode_purchase/static/src/js/screens/purchase_screen.esm.js", - "barcode_purchase/static/src/js/tiles/purchase_menu_tiles.esm.js", + "barcode_scanner.assets": [ + "barcode_purchase/static/src/**/*.esm.js", + "barcode_purchase/static/src/**/*.xml", + "barcode_purchase/static/src/**/*.scss", ], "web.assets_unit_tests": [ "barcode_purchase/static/tests/**/*", diff --git a/barcode_purchase/static/src/js/screens/buyer_selector_screen.esm.js b/barcode_purchase/static/src/components/buyer_selector_screen/buyer_selector_screen.esm.js similarity index 91% rename from barcode_purchase/static/src/js/screens/buyer_selector_screen.esm.js rename to barcode_purchase/static/src/components/buyer_selector_screen/buyer_selector_screen.esm.js index 1a0c6e3..1d8346b 100644 --- a/barcode_purchase/static/src/js/screens/buyer_selector_screen.esm.js +++ b/barcode_purchase/static/src/components/buyer_selector_screen/buyer_selector_screen.esm.js @@ -1,9 +1,9 @@ -import {barcodeScreens} from "@barcode_scanner/js/registries.esm"; +import {barcodeScreens} from "@barcode_scanner/registries.esm"; import {Component, onWillStart, useState} from "@odoo/owl"; import {useService} from "@web/core/utils/hooks"; -import {useBarcodeScanner} from "@barcode_scanner/js/hooks/use_inventory.esm"; -import {useBarcodeHandler} from "@barcode_scanner/js/hooks/use_barcode_handler.esm"; -import {recordImageUrl} from "@barcode_purchase/js/utils/avatar.esm"; +import {useBarcodeScanner} from "@barcode_scanner/hooks/use_inventory.esm"; +import {useBarcodeHandler} from "@barcode_scanner/hooks/use_barcode_handler.esm"; +import {recordImageUrl} from "../../utils/avatar.esm"; /** * Pick the buyer for a purchase order -- Odoo's native `user_id` on diff --git a/barcode_purchase/static/src/components/buyer_selector_screen/buyer_selector_screen.xml b/barcode_purchase/static/src/components/buyer_selector_screen/buyer_selector_screen.xml new file mode 100644 index 0000000..a22906d --- /dev/null +++ b/barcode_purchase/static/src/components/buyer_selector_screen/buyer_selector_screen.xml @@ -0,0 +1,95 @@ + + + +
+
+ +

Select Buyer

+
+
+ +
+ + +

USERS

+ +
+ +
Loading users...
+
+ + +
+
+
+ + + + +
+ +
+
+
+
+
+ + + + + + +
+
+ + + + + + +
+
+
+
+ No users found. +
+
+
+
+ +
+ +
+
+
+
diff --git a/barcode_purchase/static/src/js/screens/location_selector_screen.esm.js b/barcode_purchase/static/src/components/location_selector_screen/location_selector_screen.esm.js similarity index 91% rename from barcode_purchase/static/src/js/screens/location_selector_screen.esm.js rename to barcode_purchase/static/src/components/location_selector_screen/location_selector_screen.esm.js index 38127d5..7fffeb2 100644 --- a/barcode_purchase/static/src/js/screens/location_selector_screen.esm.js +++ b/barcode_purchase/static/src/components/location_selector_screen/location_selector_screen.esm.js @@ -1,9 +1,9 @@ -import {barcodeScreens} from "@barcode_scanner/js/registries.esm"; +import {barcodeScreens} from "@barcode_scanner/registries.esm"; import {Component, onWillStart, useState} from "@odoo/owl"; import {useService} from "@web/core/utils/hooks"; -import {useBarcodeScanner} from "@barcode_scanner/js/hooks/use_inventory.esm"; -import {useBarcodeHandler} from "@barcode_scanner/js/hooks/use_barcode_handler.esm"; -import {barcodeMatchDomain} from "@barcode_scanner/js/utils/scan_match.esm"; +import {useBarcodeScanner} from "@barcode_scanner/hooks/use_inventory.esm"; +import {useBarcodeHandler} from "@barcode_scanner/hooks/use_barcode_handler.esm"; +import {barcodeMatchDomain} from "@barcode_scanner/utils/scan_match.esm"; /** * Pick the destination location for a purchase receipt. The candidate list is diff --git a/barcode_purchase/static/src/components/location_selector_screen/location_selector_screen.xml b/barcode_purchase/static/src/components/location_selector_screen/location_selector_screen.xml new file mode 100644 index 0000000..74ed8ff --- /dev/null +++ b/barcode_purchase/static/src/components/location_selector_screen/location_selector_screen.xml @@ -0,0 +1,82 @@ + + + +
+
+ +

Select Destination

+
+
+ +
+ + +

INCOMING LOCATIONS

+ +
+ +
Loading locations...
+
+ + +
+
+
+
+ +
+
+
+
+ + + +
+
+ + + + + + +
+
+
+
+ No locations found. +
+
+
+
+ +
+ +
+
+
+
diff --git a/barcode_purchase/static/src/js/screens/product_selector_screen.esm.js b/barcode_purchase/static/src/components/product_selector_screen/product_selector_screen.esm.js similarity index 89% rename from barcode_purchase/static/src/js/screens/product_selector_screen.esm.js rename to barcode_purchase/static/src/components/product_selector_screen/product_selector_screen.esm.js index 499c48e..5b42155 100644 --- a/barcode_purchase/static/src/js/screens/product_selector_screen.esm.js +++ b/barcode_purchase/static/src/components/product_selector_screen/product_selector_screen.esm.js @@ -1,13 +1,13 @@ import { PRODUCT_FIELDS, PURCHASABLE_PRODUCTS, -} from "@barcode_purchase/js/screens/purchase_screen.esm"; +} from "../purchase_screen/purchase_screen.esm"; import {Component, onWillStart, useState} from "@odoo/owl"; -import {barcodeMatchAnyDomain} from "@barcode_scanner/js/utils/scan_match.esm"; -import {barcodeScreens} from "@barcode_scanner/js/registries.esm"; -import {recordImageUrl} from "@barcode_purchase/js/utils/avatar.esm"; -import {useBarcodeHandler} from "@barcode_scanner/js/hooks/use_barcode_handler.esm"; -import {useBarcodeScanner} from "@barcode_scanner/js/hooks/use_inventory.esm"; +import {barcodeMatchAnyDomain} from "@barcode_scanner/utils/scan_match.esm"; +import {barcodeScreens} from "@barcode_scanner/registries.esm"; +import {recordImageUrl} from "../../utils/avatar.esm"; +import {useBarcodeHandler} from "@barcode_scanner/hooks/use_barcode_handler.esm"; +import {useBarcodeScanner} from "@barcode_scanner/hooks/use_inventory.esm"; import {useService} from "@web/core/utils/hooks"; /** diff --git a/barcode_purchase/static/src/components/product_selector_screen/product_selector_screen.xml b/barcode_purchase/static/src/components/product_selector_screen/product_selector_screen.xml new file mode 100644 index 0000000..53b083d --- /dev/null +++ b/barcode_purchase/static/src/components/product_selector_screen/product_selector_screen.xml @@ -0,0 +1,81 @@ + + + +
+
+ +

Add Product

+
+
+ +
+ + +

PRODUCTS

+ +
+ +
Loading products...
+
+ + +
+
+
+ + + + +
+ +
+
+
+
+
+ + + + + + +
+
+ +
+
+
+
+ No products found. +
+
+
+
+
+
+
diff --git a/barcode_purchase/static/src/js/screens/purchase_screen.esm.js b/barcode_purchase/static/src/components/purchase_screen/purchase_screen.esm.js similarity index 98% rename from barcode_purchase/static/src/js/screens/purchase_screen.esm.js rename to barcode_purchase/static/src/components/purchase_screen/purchase_screen.esm.js index 18c9b2a..ecc9fc4 100644 --- a/barcode_purchase/static/src/js/screens/purchase_screen.esm.js +++ b/barcode_purchase/static/src/components/purchase_screen/purchase_screen.esm.js @@ -1,12 +1,12 @@ import { barcodeMatchAnyDomain, barcodeMatchDomain, -} from "@barcode_scanner/js/utils/scan_match.esm"; +} from "@barcode_scanner/utils/scan_match.esm"; import {Component, onWillStart, useState} from "@odoo/owl"; import {_t} from "@web/core/l10n/translation"; -import {barcodeScreens} from "@barcode_scanner/js/registries.esm"; -import {useBarcodeHandler} from "@barcode_scanner/js/hooks/use_barcode_handler.esm"; -import {useBarcodeScanner} from "@barcode_scanner/js/hooks/use_inventory.esm"; +import {barcodeScreens} from "@barcode_scanner/registries.esm"; +import {useBarcodeHandler} from "@barcode_scanner/hooks/use_barcode_handler.esm"; +import {useBarcodeScanner} from "@barcode_scanner/hooks/use_inventory.esm"; import {roundPrecision} from "@web/core/utils/numbers"; import {useService} from "@web/core/utils/hooks"; diff --git a/barcode_purchase/static/src/components/purchase_screen/purchase_screen.scss b/barcode_purchase/static/src/components/purchase_screen/purchase_screen.scss new file mode 100644 index 0000000..2b32954 --- /dev/null +++ b/barcode_purchase/static/src/components/purchase_screen/purchase_screen.scss @@ -0,0 +1,294 @@ +.ilx-po-v2-screen { + position: absolute; + inset: 0; + background-color: var(--ilx-surface); + display: flex; + flex-direction: column; + overflow: hidden; + + .ilx-po-v2-header { + display: flex; + align-items: center; + justify-content: space-between; + padding: 1.2rem 1.5rem; + background: var(--ilx-surface-container-lowest); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02); + margin-bottom: 1.5rem; + } + .ilx-po-v2-back-btn { + background: none; + border: none; + color: var(--ilx-primary); + font-size: 1.25rem; + min-height: 48px; + min-width: 48px; + display: flex; + align-items: center; + justify-content: center; + } + .ilx-po-v2-header-title { + margin: 0; + font-size: 1.125rem; + font-weight: 700; + color: var(--ilx-primary); + flex: 1; + text-align: center; + } + + .ilx-po-v2-main { + flex: 1; + padding: 0 1.5rem; + max-width: 600px; + margin: 0 auto; + width: 100%; + display: flex; + flex-direction: column; + gap: 1.5rem; + overflow-y: auto; + } + + .ilx-po-v2-card { + background: var(--ilx-surface-container-lowest); + border-radius: 12px; + padding: 1.25rem; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); + } + + .ilx-po-v2-field-group { + margin-bottom: 1.25rem; + } + .ilx-po-v2-label { + display: block; + font-size: 0.7rem; + font-weight: 600; + color: var(--ilx-on-surface-variant); + letter-spacing: 0.05em; + margin-bottom: 0.5rem; + } + .ilx-po-v2-input-box { + display: flex; + align-items: center; + background: var(--ilx-surface-container-low); + border-radius: 8px; + padding: 0.85rem 1rem; + border: 1px solid var(--ilx-surface-container-high); + } + .ilx-po-v2-input-icon { + font-size: 1.1rem; + color: var(--ilx-primary); + margin-right: 12px; + } + .ilx-po-v2-input-text { + flex: 1; + font-size: 0.95rem; + color: var(--ilx-on-surface); + } + .ilx-po-v2-input-chevron { + color: var(--ilx-on-surface-variant); + } + .ilx-po-v2-raw-input { + background: transparent; + border: none; + flex: 1; + font-size: 0.95rem; + color: var(--ilx-on-surface); + outline: none; + } + .ilx-po-v2-raw-input::placeholder { + color: var(--ilx-on-surface-variant); + } + + .ilx-po-v2-grid-2 { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 12px; + } + + .ilx-po-v2-lines-header { + display: flex; + justify-content: space-between; + align-items: center; + } + .ilx-po-v2-badge { + background: var(--ilx-primary-container); + color: var(--ilx-on-primary-container); + font-size: 0.7rem; + font-weight: 700; + padding: 4px 8px; + border-radius: 4px; + } + + .ilx-po-v2-lines-container { + display: flex; + flex-direction: column; + gap: 12px; + } + .ilx-po-v2-line-card { + background: var(--ilx-surface-container-lowest); + border-radius: 12px; + padding: 1.25rem; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); + } + .ilx-po-v2-line-top { + display: flex; + justify-content: space-between; + align-items: flex-start; + margin-bottom: 1rem; + } + .ilx-po-v2-line-title h4 { + margin: 0 0 4px 0; + font-size: 1rem; + font-weight: 700; + color: var(--ilx-on-surface); + } + .ilx-po-v2-sku { + font-family: monospace; + font-size: 0.75rem; + color: var(--ilx-on-surface-variant); + } + .ilx-po-v2-delete { + background: none; + border: none; + color: var(--ilx-error); + font-size: 1.2rem; + padding: 0; + } + + .ilx-po-v2-line-table { + display: flex; + justify-content: space-between; + align-items: flex-end; + } + .ilx-po-v2-col { + display: flex; + flex-direction: column; + gap: 6px; + } + .ilx-po-v2-col-header { + font-size: 0.65rem; + font-weight: 700; + color: var(--ilx-on-surface-variant); + } + .ilx-po-v2-col-val { + font-size: 0.95rem; + font-weight: 600; + color: var(--ilx-on-surface); + } + .ilx-po-v2-subtotal { + color: var(--ilx-primary); + font-weight: 800; + font-size: 1.05rem; + } + .ilx-po-v2-input-inline { + background: transparent; + border: none; + outline: none; + width: 50px; + padding: 0; + border-bottom: 1px dashed var(--ilx-outline-variant); + color: var(--ilx-on-surface); + } + .ilx-po-v2-input-inline:focus { + border-bottom: 1px solid var(--ilx-primary); + } + + .ilx-po-v2-add-btn { + width: 100%; + background: transparent; + border: 2px dashed var(--ilx-outline-variant); + color: var(--ilx-primary); + border-radius: var(--ilx-radius-xl, 0.75rem); + padding: 1rem; + font-weight: 600; + font-size: 1rem; + display: flex; + justify-content: center; + align-items: center; + gap: 8px; + cursor: pointer; + } + + .ilx-po-v2-checkbox-wrapper { + display: flex; + align-items: center; + gap: 10px; + margin-top: 1rem; + padding: 0.5rem 0; + } + .ilx-po-v2-checkbox { + appearance: none; + -webkit-appearance: none; + width: 22px; + height: 22px; + border: 2px solid var(--ilx-outline-variant); + border-radius: 4px; + background-color: var(--ilx-surface-container-lowest); + margin: 0; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + transition: all 0.2s; + } + .ilx-po-v2-checkbox:checked { + background-color: var(--ilx-primary); + border-color: var(--ilx-primary); + } + .ilx-po-v2-checkbox:checked::after { + content: "\f00c"; // FontAwesome check + font-family: "FontAwesome"; + color: var(--ilx-on-primary); + font-size: 13px; + } + .ilx-po-v2-checkbox-label { + font-size: 0.95rem; + color: var(--ilx-on-surface-variant); + cursor: pointer; + user-select: none; + } + + .ilx-po-v2-footer { + flex-shrink: 0; + background: var(--ilx-surface-container-lowest); + padding: 1rem 1.5rem calc(env(safe-area-inset-bottom) + 1rem); + max-width: 600px; + margin: 0 auto; + width: 100%; + display: flex; + align-items: center; + justify-content: space-between; + gap: 12px; + box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.03); + } + .ilx-po-v2-draft-btn { + background: transparent; + border: none; + font-weight: 600; + color: var(--ilx-on-surface); + display: flex; + align-items: center; + gap: 8px; + font-size: 0.95rem; + } + .ilx-po-v2-confirm-btn { + background: var(--ilx-primary); + color: var(--ilx-on-primary); + border: none; + border-radius: 8px; + padding: 0.8rem 1.5rem; + font-weight: 700; + font-size: 0.9rem; + display: flex; + align-items: center; + gap: 8px; + } + .ilx-po-v2-confirm-btn:disabled { + opacity: 0.6; + } + + // The purchase unit a line is ordered in, under its quantity. + .ilx-po-v2-uom { + font-size: 0.75rem; + color: var(--ilx-on-surface-variant); + } +} diff --git a/barcode_purchase/static/src/components/purchase_screen/purchase_screen.xml b/barcode_purchase/static/src/components/purchase_screen/purchase_screen.xml new file mode 100644 index 0000000..f797555 --- /dev/null +++ b/barcode_purchase/static/src/components/purchase_screen/purchase_screen.xml @@ -0,0 +1,194 @@ + + + +
+
+ +

Create Purchase Order

+
+
+ +
+
+
+ +
+ + + + + + Select supplier + + +
+
+ +
+
+ +
+ + + + + + Select location + +
+
+
+ +
+ + + + + + Select buyer + +
+
+
+ +
+ +
+ +
+
+
+ +
+ ORDER LINES +
ITEMS
+
+ +
+ +
+
+
+

+ +

+ SKU: +
+ +
+ +
+
+ QTY + + +
+
+ PRICE + +
+
+ LOT + + + +
+
+ SUBTOTAL + + + +
+
+
+
+
+ No products yet. Scan or add one. +
+
+ + + +
+ + +
+
+ +
+ + +
+
+
+
diff --git a/barcode_purchase/static/src/js/screens/supplier_selector_screen.esm.js b/barcode_purchase/static/src/components/supplier_selector_screen/supplier_selector_screen.esm.js similarity index 90% rename from barcode_purchase/static/src/js/screens/supplier_selector_screen.esm.js rename to barcode_purchase/static/src/components/supplier_selector_screen/supplier_selector_screen.esm.js index 6f37510..c3ffcfc 100644 --- a/barcode_purchase/static/src/js/screens/supplier_selector_screen.esm.js +++ b/barcode_purchase/static/src/components/supplier_selector_screen/supplier_selector_screen.esm.js @@ -1,10 +1,10 @@ -import {barcodeScreens} from "@barcode_scanner/js/registries.esm"; +import {barcodeScreens} from "@barcode_scanner/registries.esm"; import {Component, onWillStart, useState} from "@odoo/owl"; import {useService} from "@web/core/utils/hooks"; -import {useBarcodeScanner} from "@barcode_scanner/js/hooks/use_inventory.esm"; -import {useBarcodeHandler} from "@barcode_scanner/js/hooks/use_barcode_handler.esm"; -import {barcodeMatchDomain} from "@barcode_scanner/js/utils/scan_match.esm"; -import {recordImageUrl} from "@barcode_purchase/js/utils/avatar.esm"; +import {useBarcodeScanner} from "@barcode_scanner/hooks/use_inventory.esm"; +import {useBarcodeHandler} from "@barcode_scanner/hooks/use_barcode_handler.esm"; +import {barcodeMatchDomain} from "@barcode_scanner/utils/scan_match.esm"; +import {recordImageUrl} from "../../utils/avatar.esm"; // `bin_size` keeps the images themselves off the wire -- see recordImageUrl. const AVATAR_FIELDS = ["name", "image_128", "city", "country_id", "write_date"]; diff --git a/barcode_purchase/static/src/components/supplier_selector_screen/supplier_selector_screen.xml b/barcode_purchase/static/src/components/supplier_selector_screen/supplier_selector_screen.xml new file mode 100644 index 0000000..745dfe1 --- /dev/null +++ b/barcode_purchase/static/src/components/supplier_selector_screen/supplier_selector_screen.xml @@ -0,0 +1,95 @@ + + + +
+
+ +

Select Supplier

+
+
+ +
+ + +

VENDORS

+ +
+ +
Loading suppliers...
+
+ + +
+
+
+ + + + +
+ +
+
+
+
+
+ + + + + + +
+
+ + + + + + +
+
+
+
+ No suppliers found. +
+
+
+
+ +
+ +
+
+
+
diff --git a/barcode_purchase/static/src/scss/purchase.scss b/barcode_purchase/static/src/scss/purchase.scss deleted file mode 100644 index 2f26b58..0000000 --- a/barcode_purchase/static/src/scss/purchase.scss +++ /dev/null @@ -1,305 +0,0 @@ -// Styles for the barcode Purchase screen. The selector screens reuse the core -// `ilx-emp-v2-*` classes, so only the purchase-order layout and the home-tile -// icon live here. Colours come from the core `--ilx-*` design tokens. - -.ilx-icon-purchase { - // Soft pastel ground with the accent on the glyph, matching the other - // home-tile icons instead of a strong filled background. - background: var(--ilx-surface-container-low); - color: var(--ilx-primary); -} - -.ilx-po-v2-screen { - position: absolute; - inset: 0; - background-color: var(--ilx-surface); - display: flex; - flex-direction: column; - overflow: hidden; -} - -.ilx-po-v2-header { - display: flex; - align-items: center; - justify-content: space-between; - padding: 1.2rem 1.5rem; - background: var(--ilx-surface-container-lowest); - box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02); - margin-bottom: 1.5rem; -} -.ilx-po-v2-back-btn { - background: none; - border: none; - color: var(--ilx-primary); - font-size: 1.25rem; - min-height: 48px; - min-width: 48px; - display: flex; - align-items: center; - justify-content: center; -} -.ilx-po-v2-header-title { - margin: 0; - font-size: 1.125rem; - font-weight: 700; - color: var(--ilx-primary); - flex: 1; - text-align: center; -} - -.ilx-po-v2-main { - flex: 1; - padding: 0 1.5rem; - max-width: 600px; - margin: 0 auto; - width: 100%; - display: flex; - flex-direction: column; - gap: 1.5rem; - overflow-y: auto; -} - -.ilx-po-v2-card { - background: var(--ilx-surface-container-lowest); - border-radius: 12px; - padding: 1.25rem; - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); -} - -.ilx-po-v2-field-group { - margin-bottom: 1.25rem; -} -.ilx-po-v2-label { - display: block; - font-size: 0.7rem; - font-weight: 600; - color: var(--ilx-on-surface-variant); - letter-spacing: 0.05em; - margin-bottom: 0.5rem; -} -.ilx-po-v2-input-box { - display: flex; - align-items: center; - background: var(--ilx-surface-container-low); - border-radius: 8px; - padding: 0.85rem 1rem; - border: 1px solid var(--ilx-surface-container-high); -} -.ilx-po-v2-input-icon { - font-size: 1.1rem; - color: var(--ilx-primary); - margin-right: 12px; -} -.ilx-po-v2-input-text { - flex: 1; - font-size: 0.95rem; - color: var(--ilx-on-surface); -} -.ilx-po-v2-input-chevron { - color: var(--ilx-on-surface-variant); -} -.ilx-po-v2-raw-input { - background: transparent; - border: none; - flex: 1; - font-size: 0.95rem; - color: var(--ilx-on-surface); - outline: none; -} -.ilx-po-v2-raw-input::placeholder { - color: var(--ilx-on-surface-variant); -} - -.ilx-po-v2-grid-2 { - display: grid; - grid-template-columns: 1fr 1fr; - gap: 12px; -} - -.ilx-po-v2-lines-header { - display: flex; - justify-content: space-between; - align-items: center; -} -.ilx-po-v2-badge { - background: var(--ilx-primary-container); - color: var(--ilx-on-primary-container); - font-size: 0.7rem; - font-weight: 700; - padding: 4px 8px; - border-radius: 4px; -} - -.ilx-po-v2-lines-container { - display: flex; - flex-direction: column; - gap: 12px; -} -.ilx-po-v2-line-card { - background: var(--ilx-surface-container-lowest); - border-radius: 12px; - padding: 1.25rem; - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); -} -.ilx-po-v2-line-top { - display: flex; - justify-content: space-between; - align-items: flex-start; - margin-bottom: 1rem; -} -.ilx-po-v2-line-title h4 { - margin: 0 0 4px 0; - font-size: 1rem; - font-weight: 700; - color: var(--ilx-on-surface); -} -.ilx-po-v2-sku { - font-family: monospace; - font-size: 0.75rem; - color: var(--ilx-on-surface-variant); -} -.ilx-po-v2-delete { - background: none; - border: none; - color: var(--ilx-error); - font-size: 1.2rem; - padding: 0; -} - -.ilx-po-v2-line-table { - display: flex; - justify-content: space-between; - align-items: flex-end; -} -.ilx-po-v2-col { - display: flex; - flex-direction: column; - gap: 6px; -} -.ilx-po-v2-col-header { - font-size: 0.65rem; - font-weight: 700; - color: var(--ilx-on-surface-variant); -} -.ilx-po-v2-col-val { - font-size: 0.95rem; - font-weight: 600; - color: var(--ilx-on-surface); -} -.ilx-po-v2-subtotal { - color: var(--ilx-primary); - font-weight: 800; - font-size: 1.05rem; -} -.ilx-po-v2-input-inline { - background: transparent; - border: none; - outline: none; - width: 50px; - padding: 0; - border-bottom: 1px dashed var(--ilx-outline-variant); - color: var(--ilx-on-surface); -} -.ilx-po-v2-input-inline:focus { - border-bottom: 1px solid var(--ilx-primary); -} - -.ilx-po-v2-add-btn { - width: 100%; - background: transparent; - border: 2px dashed var(--ilx-outline-variant); - color: var(--ilx-primary); - border-radius: var(--ilx-radius-xl, 0.75rem); - padding: 1rem; - font-weight: 600; - font-size: 1rem; - display: flex; - justify-content: center; - align-items: center; - gap: 8px; - cursor: pointer; -} - -.ilx-po-v2-checkbox-wrapper { - display: flex; - align-items: center; - gap: 10px; - margin-top: 1rem; - padding: 0.5rem 0; -} -.ilx-po-v2-checkbox { - appearance: none; - -webkit-appearance: none; - width: 22px; - height: 22px; - border: 2px solid var(--ilx-outline-variant); - border-radius: 4px; - background-color: var(--ilx-surface-container-lowest); - margin: 0; - cursor: pointer; - display: flex; - align-items: center; - justify-content: center; - transition: all 0.2s; -} -.ilx-po-v2-checkbox:checked { - background-color: var(--ilx-primary); - border-color: var(--ilx-primary); -} -.ilx-po-v2-checkbox:checked::after { - content: "\f00c"; // FontAwesome check - font-family: "FontAwesome"; - color: var(--ilx-on-primary); - font-size: 13px; -} -.ilx-po-v2-checkbox-label { - font-size: 0.95rem; - color: var(--ilx-on-surface-variant); - cursor: pointer; - user-select: none; -} - -.ilx-po-v2-footer { - flex-shrink: 0; - background: var(--ilx-surface-container-lowest); - padding: 1rem 1.5rem calc(env(safe-area-inset-bottom) + 1rem); - max-width: 600px; - margin: 0 auto; - width: 100%; - display: flex; - align-items: center; - justify-content: space-between; - gap: 12px; - box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.03); -} -.ilx-po-v2-draft-btn { - background: transparent; - border: none; - font-weight: 600; - color: var(--ilx-on-surface); - display: flex; - align-items: center; - gap: 8px; - font-size: 0.95rem; -} -.ilx-po-v2-confirm-btn { - background: var(--ilx-primary); - color: var(--ilx-on-primary); - border: none; - border-radius: 8px; - padding: 0.8rem 1.5rem; - font-weight: 700; - font-size: 0.9rem; - display: flex; - align-items: center; - gap: 8px; -} -.ilx-po-v2-confirm-btn:disabled { - opacity: 0.6; -} - -// The purchase unit a line is ordered in, under its quantity. -.ilx-po-v2-uom { - font-size: 0.75rem; - color: var(--ilx-on-surface-variant); -} diff --git a/barcode_purchase/static/src/js/tiles/purchase_menu_tiles.esm.js b/barcode_purchase/static/src/tiles/purchase_menu_tiles.esm.js similarity index 86% rename from barcode_purchase/static/src/js/tiles/purchase_menu_tiles.esm.js rename to barcode_purchase/static/src/tiles/purchase_menu_tiles.esm.js index c441c4a..5b248f7 100644 --- a/barcode_purchase/static/src/js/tiles/purchase_menu_tiles.esm.js +++ b/barcode_purchase/static/src/tiles/purchase_menu_tiles.esm.js @@ -1,5 +1,5 @@ import {_t} from "@web/core/l10n/translation"; -import {barcodeMenuTiles} from "@barcode_scanner/js/registries.esm"; +import {barcodeMenuTiles} from "@barcode_scanner/registries.esm"; /** * Home-screen tile for creating purchase orders. Registers into the scanner diff --git a/barcode_purchase/static/src/tiles/purchase_menu_tiles.scss b/barcode_purchase/static/src/tiles/purchase_menu_tiles.scss new file mode 100644 index 0000000..d7d9ad8 --- /dev/null +++ b/barcode_purchase/static/src/tiles/purchase_menu_tiles.scss @@ -0,0 +1,6 @@ +.ilx-icon-purchase { + // Soft pastel ground with the accent on the glyph, matching the other + // home-tile icons instead of a strong filled background. + background: var(--ilx-surface-container-low); + color: var(--ilx-primary); +} diff --git a/barcode_purchase/static/src/js/utils/avatar.esm.js b/barcode_purchase/static/src/utils/avatar.esm.js similarity index 100% rename from barcode_purchase/static/src/js/utils/avatar.esm.js rename to barcode_purchase/static/src/utils/avatar.esm.js diff --git a/barcode_purchase/static/src/xml/purchase_templates.xml b/barcode_purchase/static/src/xml/purchase_templates.xml deleted file mode 100644 index ad00e6c..0000000 --- a/barcode_purchase/static/src/xml/purchase_templates.xml +++ /dev/null @@ -1,541 +0,0 @@ - - - - -
-
- -

Create Purchase Order

-
-
- -
-
-
- -
- - - - - - Select supplier - - -
-
- -
-
- -
- - - - - - Select location - -
-
-
- -
- - - - - - Select buyer - -
-
-
- -
- -
- -
-
-
- -
- ORDER LINES -
ITEMS
-
- -
- -
-
-
-

- -

- SKU: -
- -
- -
-
- QTY - - -
-
- PRICE - -
-
- LOT - - - -
-
- SUBTOTAL - - - -
-
-
-
-
- No products yet. Scan or add one. -
-
- - - -
- - -
-
- -
- - -
-
-
- - -
-
- -

Select Supplier

-
-
- -
- - -

VENDORS

- -
- -
Loading suppliers...
-
- - -
-
-
- - - - -
- -
-
-
-
-
- - - - - - -
-
- - - - - - -
-
-
-
- No suppliers found. -
-
-
-
- -
- -
-
-
- - -
-
- -

Select Buyer

-
-
- -
- - -

USERS

- -
- -
Loading users...
-
- - -
-
-
- - - - -
- -
-
-
-
-
- - - - - - -
-
- - - - - - -
-
-
-
- No users found. -
-
-
-
- -
- -
-
-
- - -
-
- -

Select Destination

-
-
- -
- - -

INCOMING LOCATIONS

- -
- -
Loading locations...
-
- - -
-
-
-
- -
-
-
-
- - - -
-
- - - - - - -
-
-
-
- No locations found. -
-
-
-
- -
- -
-
-
- - -
-
- -

Add Product

-
-
- -
- - -

PRODUCTS

- -
- -
Loading products...
-
- - -
-
-
- - - - -
- -
-
-
-
-
- - - - - - -
-
- -
-
-
-
- No products found. -
-
-
-
-
-
- -
diff --git a/barcode_purchase/static/tests/purchase_screen.test.js b/barcode_purchase/static/tests/purchase_screen.test.js index 3e31c93..0259afa 100644 --- a/barcode_purchase/static/tests/purchase_screen.test.js +++ b/barcode_purchase/static/tests/purchase_screen.test.js @@ -2,9 +2,9 @@ import { PRODUCT_FIELDS, PURCHASABLE_PRODUCTS, PurchaseScreen, -} from "@barcode_purchase/js/screens/purchase_screen.esm"; +} from "@barcode_purchase/components/purchase_screen/purchase_screen.esm"; import {beforeEach, describe, expect, test} from "@odoo/hoot"; -import {PurchaseProductSelectorScreen} from "@barcode_purchase/js/screens/product_selector_screen.esm"; +import {PurchaseProductSelectorScreen} from "@barcode_purchase/components/product_selector_screen/product_selector_screen.esm"; import {patchTranslations} from "@web/../tests/web_test_helpers"; // Units of measure as a database holds them; a dozen is a twelfth of a unit. diff --git a/barcode_scanner/README.rst b/barcode_scanner/README.rst index b9ad687..f19e19e 100644 --- a/barcode_scanner/README.rst +++ b/barcode_scanner/README.rst @@ -150,9 +150,15 @@ Authors Contributors ------------ -- `Antonio David Ruban Espinal `__ -- `Zuzanna Elzbieta Szalaty - Szalaty `__ +- `Binhex Cloud `__: + + - `Antonio David Ruban Espinal `__ + - `Zuzanna Elzbieta Szalaty + Szalaty `__ + +- `Dixmit `__: + + - Enric Tobella Maintainers ----------- diff --git a/barcode_scanner/__manifest__.py b/barcode_scanner/__manifest__.py index 460b679..27225bd 100644 --- a/barcode_scanner/__manifest__.py +++ b/barcode_scanner/__manifest__.py @@ -17,24 +17,23 @@ ], "assets": { "web.assets_backend": [ - "barcode_scanner/static/src/scss/barcode_scanner.scss", - "barcode_scanner/static/src/xml/barcode_scanner_templates.xml", - "barcode_scanner/static/src/js/registries.esm.js", - "barcode_scanner/static/src/js/barcode_parser.esm.js", - "barcode_scanner/static/src/js/utils/scan_match.esm.js", - "barcode_scanner/static/src/js/barcode.esm.js", - "barcode_scanner/static/src/js/api.esm.js", - "barcode_scanner/static/src/js/router.esm.js", - "barcode_scanner/static/src/js/store.esm.js", - "barcode_scanner/static/src/js/app.esm.js", - "barcode_scanner/static/src/js/services/feedback_service.esm.js", - "barcode_scanner/static/src/js/hooks/use_barcode.esm.js", - "barcode_scanner/static/src/js/hooks/use_barcode_handler.esm.js", - "barcode_scanner/static/src/js/hooks/use_barcode_dispatcher.esm.js", - "barcode_scanner/static/src/js/hooks/use_inventory.esm.js", - "barcode_scanner/static/src/js/screens/main_screen.esm.js", + "barcode_scanner/static/src/assets_backend/*.esm.js", + ], + "barcode_scanner.variables": [ + ("include", "web._assets_helpers"), + ("include", "web._assets_primary_variables"), + "barcode_scanner/static/src/scss/primary_variables.scss", + ], + "barcode_scanner.assets": [ + ("include", "barcode_scanner.variables"), + "barcode_scanner/static/src/scss/parameters.scss", + "barcode_scanner/static/src/**/*.esm.js", + "barcode_scanner/static/src/components/**/*.scss", + "barcode_scanner/static/src/components/**/*.xml", + ("remove", "barcode_scanner/static/src/assets_backend/*.esm.js"), ], "web.assets_unit_tests": [ + ("include", "barcode_scanner.assets"), "barcode_scanner/static/tests/**/*", ], }, diff --git a/barcode_scanner/readme/CONTRIBUTORS.md b/barcode_scanner/readme/CONTRIBUTORS.md index 7a07748..efa3874 100644 --- a/barcode_scanner/readme/CONTRIBUTORS.md +++ b/barcode_scanner/readme/CONTRIBUTORS.md @@ -1,2 +1,5 @@ -* [Antonio David Ruban Espinal](https://github.com/antoniodavid) -* [Zuzanna Elzbieta Szalaty Szalaty](https://github.com/szalatyzuzanna) +- [Binhex Cloud](https://www.binhex.cloud/): + - [Antonio David Ruban Espinal](https://github.com/antoniodavid) + - [Zuzanna Elzbieta Szalaty Szalaty](https://github.com/szalatyzuzanna) +- [Dixmit](https://dixmit.com): + - Enric Tobella diff --git a/barcode_scanner/static/description/index.html b/barcode_scanner/static/description/index.html index c906dea..77779df 100644 --- a/barcode_scanner/static/description/index.html +++ b/barcode_scanner/static/description/index.html @@ -483,10 +483,17 @@

Authors

Maintainers

diff --git a/barcode_scanner/static/src/assets_backend/barcode_scanner_app.esm.js b/barcode_scanner/static/src/assets_backend/barcode_scanner_app.esm.js new file mode 100644 index 0000000..9bfdca8 --- /dev/null +++ b/barcode_scanner/static/src/assets_backend/barcode_scanner_app.esm.js @@ -0,0 +1,49 @@ +import {_t} from "@web/core/l10n/translation"; +import {registry} from "@web/core/registry"; +import {loadBundle} from "@web/core/assets"; + +const actionRegistry = registry.category("actions"); + +/** + * Add a new function client action which loads the spreadsheet bundle, then + * launch the actual action. + * The action should be redefine in the bundle with `{ force: true }` + * and the actual action component or function + * @param {String} actionName + * @param {String} [path] + * @param {String} [displayName] + */ +export function addBarcodeActionLazyLoader(actionName, path, displayName) { + const actionLazyLoader = async (env, action) => { + // Load the bundle which should redefine the action in the registry + await loadBundle("barcode_scanner.assets"); + + if (actionRegistry.get(actionName) === actionLazyLoader) { + // At this point, the real spreadsheet client action should be loaded and have + // replaced this function in the action registry. If it's not the case, + // it probably means that there was a crash in the bundle (e.g. syntax + // error). In this case, this action will remain in the registry, which + // will lead to an infinite loop. To prevent that, we push another action + // in the registry. + actionRegistry.add( + actionName, + () => { + const msg = _t("%s couldn't be loaded", actionName); + env.services.notification.add(msg, {type: "danger"}); + }, + {force: true} + ); + } + // Then do the action again, with the actual definition registered + return action; + }; + if (path) { + actionLazyLoader.path = path; + } + if (displayName) { + actionLazyLoader.displayName = displayName; + } + actionRegistry.add(actionName, actionLazyLoader); +} + +addBarcodeActionLazyLoader("barcode_scanner_app"); diff --git a/barcode_scanner/static/src/js/app.esm.js b/barcode_scanner/static/src/components/app/app.esm.js similarity index 89% rename from barcode_scanner/static/src/js/app.esm.js rename to barcode_scanner/static/src/components/app/app.esm.js index 2a4467b..0956486 100644 --- a/barcode_scanner/static/src/js/app.esm.js +++ b/barcode_scanner/static/src/components/app/app.esm.js @@ -2,13 +2,11 @@ import {Component, onMounted, onWillStart, onWillUnmount, useState} from "@odoo/ import {registry} from "@web/core/registry"; import {useService} from "@web/core/utils/hooks"; -import "@barcode_scanner/js/services/feedback_service.esm"; - import { barcodeAppWidgets, barcodeScreens, barcodeStartupTasks, -} from "@barcode_scanner/js/registries.esm"; +} from "../../registries.esm"; export class BarcodeScannerApp extends Component { setup() { @@ -19,7 +17,7 @@ export class BarcodeScannerApp extends Component { if (!this.router.currentRoute) { this.router.navigate("main"); } - onWillStart(() => this.runStartupTasks()); + onWillStart(async () => this.runStartupTasks()); // Capture scans (incl. Android IME/soft-input PDAs) only while the app // is open, so it never steals focus on the rest of the back office. onMounted(() => this.barcode.activate()); @@ -63,4 +61,6 @@ export class BarcodeScannerApp extends Component { BarcodeScannerApp.template = "barcode_scanner.App"; -registry.category("actions").add("barcode_scanner_app", BarcodeScannerApp); +registry + .category("actions") + .add("barcode_scanner_app", BarcodeScannerApp, {force: true}); diff --git a/barcode_scanner/static/src/scss/barcode_scanner.scss b/barcode_scanner/static/src/components/app/app.scss similarity index 98% rename from barcode_scanner/static/src/scss/barcode_scanner.scss rename to barcode_scanner/static/src/components/app/app.scss index a7a725b..68c26ab 100644 --- a/barcode_scanner/static/src/scss/barcode_scanner.scss +++ b/barcode_scanner/static/src/components/app/app.scss @@ -1,38 +1,3 @@ -:root { - --ilx-surface: #fdf8fd; - --ilx-surface-container-low: #f7f2f8; - --ilx-surface-container-high: #ece7ec; - --ilx-on-surface: #1c1b1f; - --ilx-on-surface-variant: #48454f; - --ilx-primary: #63558f; - --ilx-primary-container: #7c6eaa; - --ilx-on-primary: #ffffff; - --ilx-secondary: #615b74; - --ilx-tertiary: #685f12; - --ilx-tertiary-container: #b8ad59; - --ilx-error: #ba1a1a; - --ilx-outline: #797580; - --ilx-outline-variant: #cac4d0; - --ilx-background: #fdf8fd; - --ilx-surface-container-lowest: #ffffff; - --ilx-radius-default: 0.5rem; - --ilx-radius-sm: 0.25rem; - --ilx-radius-md: 0.75rem; - --ilx-radius-lg: 1rem; - --ilx-radius-xl: 1.5rem; - --ilx-primary-dark: #4b3e76; - --ilx-shadow: 0px 1px 4px rgba(28, 27, 31, 0.06); - --ilx-error-container: #ffdad6; - --ilx-on-error-container: #93000a; - --ilx-success: #28a745; - --ilx-success-bg: #e8f5e9; - --ilx-warning: #f0ad4e; - --ilx-warning-bg: #fff3e0; - --ilx-info: #17a2b8; - --ilx-info-bg: #e3f2fd; - --ilx-danger-bg: #fdecea; -} - .barcode-app-root, .barcode-main-wrapper, .barcode-wrapper { diff --git a/barcode_scanner/static/src/components/app/app.xml b/barcode_scanner/static/src/components/app/app.xml new file mode 100644 index 0000000..60580fd --- /dev/null +++ b/barcode_scanner/static/src/components/app/app.xml @@ -0,0 +1,18 @@ + + + +
+ + + +
+ + + +
+
+ diff --git a/barcode_scanner/static/src/js/screens/main_screen.esm.js b/barcode_scanner/static/src/components/main_screen/main_screen.esm.js similarity index 91% rename from barcode_scanner/static/src/js/screens/main_screen.esm.js rename to barcode_scanner/static/src/components/main_screen/main_screen.esm.js index db6f555..ebe229f 100644 --- a/barcode_scanner/static/src/js/screens/main_screen.esm.js +++ b/barcode_scanner/static/src/components/main_screen/main_screen.esm.js @@ -3,8 +3,8 @@ import {_t} from "@web/core/l10n/translation"; import {useService} from "@web/core/utils/hooks"; import {user} from "@web/core/user"; import {imageUrl} from "@web/core/utils/urls"; -import {useBarcodeDispatcher} from "@barcode_scanner/js/hooks/use_barcode_dispatcher.esm"; -import {barcodeMenuTiles, barcodeScreens} from "@barcode_scanner/js/registries.esm"; +import {useBarcodeDispatcher} from "../../hooks/use_barcode_dispatcher.esm"; +import {barcodeMenuTiles, barcodeScreens} from "../../registries.esm"; export class MainScreen extends Component { setup() { diff --git a/barcode_scanner/static/src/xml/barcode_scanner_templates.xml b/barcode_scanner/static/src/components/main_screen/main_screen.xml similarity index 76% rename from barcode_scanner/static/src/xml/barcode_scanner_templates.xml rename to barcode_scanner/static/src/components/main_screen/main_screen.xml index b4d09db..3e09864 100644 --- a/barcode_scanner/static/src/xml/barcode_scanner_templates.xml +++ b/barcode_scanner/static/src/components/main_screen/main_screen.xml @@ -1,21 +1,5 @@ - -
- - - -
- - - -
-
-
diff --git a/barcode_scanner/static/src/js/hooks/use_barcode.esm.js b/barcode_scanner/static/src/hooks/use_barcode.esm.js similarity index 100% rename from barcode_scanner/static/src/js/hooks/use_barcode.esm.js rename to barcode_scanner/static/src/hooks/use_barcode.esm.js diff --git a/barcode_scanner/static/src/js/hooks/use_barcode_dispatcher.esm.js b/barcode_scanner/static/src/hooks/use_barcode_dispatcher.esm.js similarity index 88% rename from barcode_scanner/static/src/js/hooks/use_barcode_dispatcher.esm.js rename to barcode_scanner/static/src/hooks/use_barcode_dispatcher.esm.js index a145bef..ffaf5ab 100644 --- a/barcode_scanner/static/src/js/hooks/use_barcode_dispatcher.esm.js +++ b/barcode_scanner/static/src/hooks/use_barcode_dispatcher.esm.js @@ -1,8 +1,8 @@ import {useEnv} from "@odoo/owl"; import {_t} from "@web/core/l10n/translation"; import {useService} from "@web/core/utils/hooks"; -import {useBarcodeHandler} from "@barcode_scanner/js/hooks/use_barcode_handler.esm"; -import {barcodeScanHandlers} from "@barcode_scanner/js/registries.esm"; +import {useBarcodeHandler} from "./use_barcode_handler.esm"; +import {barcodeScanHandlers} from "../registries.esm"; /** * Runs a scanned barcode through the registered scan handlers, in `sequence` diff --git a/barcode_scanner/static/src/js/hooks/use_barcode_handler.esm.js b/barcode_scanner/static/src/hooks/use_barcode_handler.esm.js similarity index 77% rename from barcode_scanner/static/src/js/hooks/use_barcode_handler.esm.js rename to barcode_scanner/static/src/hooks/use_barcode_handler.esm.js index 58dfca2..0bb637c 100644 --- a/barcode_scanner/static/src/js/hooks/use_barcode_handler.esm.js +++ b/barcode_scanner/static/src/hooks/use_barcode_handler.esm.js @@ -1,4 +1,4 @@ -import {useBarcode} from "@barcode_scanner/js/hooks/use_barcode.esm"; +import {useBarcode} from "./use_barcode.esm"; export function useBarcodeHandler({onScan}) { useBarcode((ev) => { diff --git a/barcode_scanner/static/src/js/hooks/use_inventory.esm.js b/barcode_scanner/static/src/hooks/use_inventory.esm.js similarity index 100% rename from barcode_scanner/static/src/js/hooks/use_inventory.esm.js rename to barcode_scanner/static/src/hooks/use_inventory.esm.js diff --git a/barcode_scanner/static/src/js/registries.esm.js b/barcode_scanner/static/src/registries.esm.js similarity index 100% rename from barcode_scanner/static/src/js/registries.esm.js rename to barcode_scanner/static/src/registries.esm.js diff --git a/barcode_scanner/static/src/scss/parameters.scss b/barcode_scanner/static/src/scss/parameters.scss new file mode 100644 index 0000000..e7c365e --- /dev/null +++ b/barcode_scanner/static/src/scss/parameters.scss @@ -0,0 +1,34 @@ +:root { + --ilx-surface: #{$barcode-scanner-surface}; + --ilx-surface-container-low: #{$barcode-scanner-surface-container-low}; + --ilx-surface-container-high: #{$barcode-scanner-surface-container-high}; + --ilx-on-surface: #{$barcode-scanner-on-surface}; + --ilx-on-surface-variant: #{$barcode-scanner-on-surface-variant}; + --ilx-primary: #{$barcode-scanner-primary}; + --ilx-primary-container: #{$barcode-scanner-primary-container}; + --ilx-on-primary: #{$barcode-scanner-on-primary}; + --ilx-secondary: #{$barcode-scanner-secondary}; + --ilx-tertiary: #{$barcode-scanner-tertiary}; + --ilx-tertiary-container: #{$barcode-scanner-tertiary-container}; + --ilx-error: #{$barcode-scanner-error}; + --ilx-outline: #{$barcode-scanner-outline}; + --ilx-outline-variant: #{$barcode-scanner-outline-variant}; + --ilx-background: #{$barcode-scanner-background}; + --ilx-surface-container-lowest: #{$barcode-scanner-surface-container-lowest}; + --ilx-radius-default: #{$barcode-scanner-radius-default}; + --ilx-radius-sm: #{$barcode-scanner-radius-sm}; + --ilx-radius-md: #{$barcode-scanner-radius-md}; + --ilx-radius-lg: #{$barcode-scanner-radius-lg}; + --ilx-radius-xl: #{$barcode-scanner-radius-xl}; + --ilx-primary-dark: #{$barcode-scanner-primary-dark}; + --ilx-shadow: #{$barcode-scanner-shadow}; + --ilx-error-container: #{$barcode-scanner-error-container}; + --ilx-on-error-container: #{$barcode-scanner-on-error-container}; + --ilx-success: #{$barcode-scanner-success}; + --ilx-success-bg: #{$barcode-scanner-success-bg}; + --ilx-warning: #{$barcode-scanner-warning}; + --ilx-warning-bg: #{$barcode-scanner-warning-bg}; + --ilx-info: #{$barcode-scanner-info}; + --ilx-info-bg: #{$barcode-scanner-info-bg}; + --ilx-danger-bg: #{$barcode-scanner-error-bg}; +} diff --git a/barcode_scanner/static/src/scss/primary_variables.scss b/barcode_scanner/static/src/scss/primary_variables.scss new file mode 100644 index 0000000..84d32be --- /dev/null +++ b/barcode_scanner/static/src/scss/primary_variables.scss @@ -0,0 +1,43 @@ +$barcode-scanner-primary: $o-brand-primary; +$barcode-scanner-primary-container: lighten($barcode-scanner-primary, 5%); +$barcode-scanner-on-primary: $o-white; + +$barcode-scanner-secondary: $o-brand-secondary; + +$barcode-scanner-tertiary: #685f12; +$barcode-scanner-tertiary-container: mix($barcode-scanner-tertiary, $o-white, 60%); + +$barcode-scanner-surface: mix($barcode-scanner-primary, $o-white, 3%); +$barcode-scanner-surface-container-lowest: $o-white; +$barcode-scanner-surface-container-low: mix($barcode-scanner-primary, $o-white, 6%); +$barcode-scanner-surface-container-high: mix($barcode-scanner-primary, $o-white, 12%); +$barcode-scanner-on-surface: $o-gray-900; +$barcode-scanner-on-surface-variant: $o-gray-700; + +$barcode-scanner-background: $barcode-scanner-surface; + +$barcode-scanner-outline: $o-gray-600; +$barcode-scanner-outline-variant: $o-gray-400; + +$barcode-scanner-primary-dark: darken($o-brand-primary, 10%); +$barcode-scanner-shadow: 0px 1px 4px rgba(28, 27, 31, 0.06); + +$barcode-scanner-error: $o-danger; +$barcode-scanner-error-bg: mix($barcode-scanner-error, $o-white, 12%); +$barcode-scanner-error-container: mix($barcode-scanner-error, $o-white, 20%); +$barcode-scanner-on-error-container: darken($barcode-scanner-error, 25%); + +$barcode-scanner-success: $o-success; +$barcode-scanner-success-bg: mix($barcode-scanner-success, $o-white, 12%); + +$barcode-scanner-warning: $o-warning; +$barcode-scanner-warning-bg: mix($barcode-scanner-warning, $o-white, 12%); + +$barcode-scanner-info: $o-info; +$barcode-scanner-info-bg: mix($barcode-scanner-info, $o-white, 12%); + +$barcode-scanner-radius-sm: $o-border-radius; +$barcode-scanner-radius-default: $o-border-radius * 2; +$barcode-scanner-radius-md: $o-border-radius * 3; +$barcode-scanner-radius-lg: $o-border-radius * 4; +$barcode-scanner-radius-xl: $o-border-radius * 6; diff --git a/barcode_scanner/static/src/js/api.esm.js b/barcode_scanner/static/src/services/api_service.esm.js similarity index 100% rename from barcode_scanner/static/src/js/api.esm.js rename to barcode_scanner/static/src/services/api_service.esm.js diff --git a/barcode_scanner/static/src/js/barcode.esm.js b/barcode_scanner/static/src/services/barcode_service.esm.js similarity index 99% rename from barcode_scanner/static/src/js/barcode.esm.js rename to barcode_scanner/static/src/services/barcode_service.esm.js index 02c9b76..3d68499 100644 --- a/barcode_scanner/static/src/js/barcode.esm.js +++ b/barcode_scanner/static/src/services/barcode_service.esm.js @@ -1,7 +1,7 @@ import {EventBus, reactive} from "@odoo/owl"; import {registry} from "@web/core/registry"; import {session} from "@web/session"; -import {parseBarcode} from "@barcode_scanner/js/barcode_parser.esm"; +import {parseBarcode} from "../utils/barcode_parser.esm"; /** * Barcode capture for the scanning SPA, built for the Munbyn Android PDAs used diff --git a/barcode_scanner/static/src/js/store.esm.js b/barcode_scanner/static/src/services/barcode_store_service.esm.js similarity index 100% rename from barcode_scanner/static/src/js/store.esm.js rename to barcode_scanner/static/src/services/barcode_store_service.esm.js diff --git a/barcode_scanner/static/src/js/services/feedback_service.esm.js b/barcode_scanner/static/src/services/feedback_service.esm.js similarity index 100% rename from barcode_scanner/static/src/js/services/feedback_service.esm.js rename to barcode_scanner/static/src/services/feedback_service.esm.js diff --git a/barcode_scanner/static/src/js/router.esm.js b/barcode_scanner/static/src/services/router_service.esm.js similarity index 98% rename from barcode_scanner/static/src/js/router.esm.js rename to barcode_scanner/static/src/services/router_service.esm.js index e0dac3d..2601504 100644 --- a/barcode_scanner/static/src/js/router.esm.js +++ b/barcode_scanner/static/src/services/router_service.esm.js @@ -1,7 +1,7 @@ import {Reactive} from "@web/core/utils/reactive"; import {browser} from "@web/core/browser/browser"; import {registry} from "@web/core/registry"; -import {barcodeScreens} from "@barcode_scanner/js/registries.esm"; +import {barcodeScreens} from "../registries.esm"; const HISTORY_LIMIT = 50; diff --git a/barcode_scanner/static/src/js/barcode_parser.esm.js b/barcode_scanner/static/src/utils/barcode_parser.esm.js similarity index 92% rename from barcode_scanner/static/src/js/barcode_parser.esm.js rename to barcode_scanner/static/src/utils/barcode_parser.esm.js index 765a081..5bdcbbc 100644 --- a/barcode_scanner/static/src/js/barcode_parser.esm.js +++ b/barcode_scanner/static/src/utils/barcode_parser.esm.js @@ -1,4 +1,4 @@ -import {barcodeParsers} from "@barcode_scanner/js/registries.esm"; +import {barcodeParsers} from "../registries.esm"; /** * Built-in EAN13 parser. Registered last (high sequence) so it acts as the diff --git a/barcode_scanner/static/src/js/utils/scan_match.esm.js b/barcode_scanner/static/src/utils/scan_match.esm.js similarity index 100% rename from barcode_scanner/static/src/js/utils/scan_match.esm.js rename to barcode_scanner/static/src/utils/scan_match.esm.js diff --git a/barcode_scanner/static/tests/api_error_message.test.js b/barcode_scanner/static/tests/api_error_message.test.js index 4bf9e6f..4550c27 100644 --- a/barcode_scanner/static/tests/api_error_message.test.js +++ b/barcode_scanner/static/tests/api_error_message.test.js @@ -1,7 +1,7 @@ /** @odoo-module **/ import {describe, expect, test} from "@odoo/hoot"; -import {errorMessage} from "@barcode_scanner/js/api.esm"; +import {errorMessage} from "@barcode_scanner/services/api_service.esm"; describe("BarcodeScanner", () => { test("shows the server message for user-facing exceptions", () => { diff --git a/barcode_scanner/static/tests/feedback_service.test.js b/barcode_scanner/static/tests/feedback_service.test.js index 0923842..3e06eb8 100644 --- a/barcode_scanner/static/tests/feedback_service.test.js +++ b/barcode_scanner/static/tests/feedback_service.test.js @@ -1,5 +1,5 @@ import {describe, expect, test} from "@odoo/hoot"; -import {BarcodeScannerFeedbackService} from "@barcode_scanner/js/services/feedback_service.esm"; +import {BarcodeScannerFeedbackService} from "@barcode_scanner/services/feedback_service.esm"; function makeFeedback(notifications) { const feedback = new BarcodeScannerFeedbackService({ diff --git a/barcode_scanner/static/tests/use_barcode.test.js b/barcode_scanner/static/tests/use_barcode.test.js index a968865..a99bb11 100644 --- a/barcode_scanner/static/tests/use_barcode.test.js +++ b/barcode_scanner/static/tests/use_barcode.test.js @@ -2,7 +2,7 @@ import {Component, useState, xml} from "@odoo/owl"; import {describe, expect, test} from "@odoo/hoot"; import {getService, mountWithCleanup} from "@web/../tests/web_test_helpers"; import {animationFrame} from "@odoo/hoot-dom"; -import {useBarcode} from "@barcode_scanner/js/hooks/use_barcode.esm"; +import {useBarcode} from "@barcode_scanner/hooks/use_barcode.esm"; class Reader extends Component { static template = xml`
`; diff --git a/barcode_scrap/__manifest__.py b/barcode_scrap/__manifest__.py index 1dd73b5..3b2b7bc 100644 --- a/barcode_scrap/__manifest__.py +++ b/barcode_scrap/__manifest__.py @@ -12,19 +12,13 @@ "stock", ], "assets": { - "web.assets_backend": [ - "barcode_scrap/static/src/scss/scrap.scss", - "barcode_scrap/static/src/xml/scrap_templates.xml", - "barcode_scrap/static/src/js/screens/scrap_location_screen.esm.js", - "barcode_scrap/static/src/js/screens/scrap_product_selector_screen.esm.js", - "barcode_scrap/static/src/js/screens/scrap_screen.esm.js", - "barcode_scrap/static/src/js/tiles/scrap_menu_tiles.esm.js", + "barcode_scanner.assets": [ + "barcode_scrap/static/src/**/*.esm.js", + "barcode_scrap/static/src/**/*.xml", + "barcode_scrap/static/src/**/*.scss", ], "web.assets_unit_tests": [ "barcode_scrap/static/tests/**/*", ], }, - "installable": True, - "application": False, - "auto_install": False, } diff --git a/barcode_scrap/static/src/js/screens/scrap_location_screen.esm.js b/barcode_scrap/static/src/components/scrap_location_screen/scrap_location_screen.esm.js similarity index 89% rename from barcode_scrap/static/src/js/screens/scrap_location_screen.esm.js rename to barcode_scrap/static/src/components/scrap_location_screen/scrap_location_screen.esm.js index 38616b6..ffbc7a7 100644 --- a/barcode_scrap/static/src/js/screens/scrap_location_screen.esm.js +++ b/barcode_scrap/static/src/components/scrap_location_screen/scrap_location_screen.esm.js @@ -1,9 +1,9 @@ import {Component, onWillStart, useState} from "@odoo/owl"; import {_t} from "@web/core/l10n/translation"; -import {barcodeMatchDomain} from "@barcode_scanner/js/utils/scan_match.esm"; -import {barcodeScreens} from "@barcode_scanner/js/registries.esm"; -import {useBarcodeHandler} from "@barcode_scanner/js/hooks/use_barcode_handler.esm"; -import {useBarcodeScanner} from "@barcode_scanner/js/hooks/use_inventory.esm"; +import {barcodeMatchDomain} from "@barcode_scanner/utils/scan_match.esm"; +import {barcodeScreens} from "@barcode_scanner/registries.esm"; +import {useBarcodeHandler} from "@barcode_scanner/hooks/use_barcode_handler.esm"; +import {useBarcodeScanner} from "@barcode_scanner/hooks/use_inventory.esm"; import {useService} from "@web/core/utils/hooks"; /** diff --git a/barcode_scrap/static/src/components/scrap_location_screen/scrap_location_screen.xml b/barcode_scrap/static/src/components/scrap_location_screen/scrap_location_screen.xml new file mode 100644 index 0000000..0061df0 --- /dev/null +++ b/barcode_scrap/static/src/components/scrap_location_screen/scrap_location_screen.xml @@ -0,0 +1,68 @@ + + + +
+
+ +

Scrap Products

+
+ +
+ + +

SELECT THE LOCATION TO SCRAP FROM

+
+ +
Loading locations...
+
+ + +
+
+
+
+ +
+
+
+
+ + + +
+
+ +
+
+
+
No internal locations found.
+
+
+
+
+
+
diff --git a/barcode_scrap/static/src/js/screens/scrap_product_selector_screen.esm.js b/barcode_scrap/static/src/components/scrap_product_selector_screen/scrap_product_selector_screen.esm.js similarity index 90% rename from barcode_scrap/static/src/js/screens/scrap_product_selector_screen.esm.js rename to barcode_scrap/static/src/components/scrap_product_selector_screen/scrap_product_selector_screen.esm.js index 7a5a240..382c498 100644 --- a/barcode_scrap/static/src/js/screens/scrap_product_selector_screen.esm.js +++ b/barcode_scrap/static/src/components/scrap_product_selector_screen/scrap_product_selector_screen.esm.js @@ -1,10 +1,10 @@ import {Component, onWillStart, useState} from "@odoo/owl"; import {_t} from "@web/core/l10n/translation"; -import {barcodeMatchDomain} from "@barcode_scanner/js/utils/scan_match.esm"; -import {barcodeScreens} from "@barcode_scanner/js/registries.esm"; -import {useBarcodeHandler} from "@barcode_scanner/js/hooks/use_barcode_handler.esm"; -import {useBarcodeScanner} from "@barcode_scanner/js/hooks/use_inventory.esm"; -import {SCRAPPABLE_PRODUCTS} from "@barcode_scrap/js/screens/scrap_screen.esm"; +import {barcodeMatchDomain} from "@barcode_scanner/utils/scan_match.esm"; +import {barcodeScreens} from "@barcode_scanner/registries.esm"; +import {useBarcodeHandler} from "@barcode_scanner/hooks/use_barcode_handler.esm"; +import {useBarcodeScanner} from "@barcode_scanner/hooks/use_inventory.esm"; +import {SCRAPPABLE_PRODUCTS} from "../scrap_screen/scrap_screen.esm"; import {useService} from "@web/core/utils/hooks"; /** diff --git a/barcode_scrap/static/src/components/scrap_product_selector_screen/scrap_product_selector_screen.xml b/barcode_scrap/static/src/components/scrap_product_selector_screen/scrap_product_selector_screen.xml new file mode 100644 index 0000000..9a054f5 --- /dev/null +++ b/barcode_scrap/static/src/components/scrap_product_selector_screen/scrap_product_selector_screen.xml @@ -0,0 +1,61 @@ + + + +
+
+ +

Add Product

+
+ +
+ + +

+ PRODUCTS + IN THIS LOCATION +

+
+ +
Loading products...
+
+ + +
+
+ + + +
+
+ +
+
+
+
No products found.
+
+
+
+
+
+ +
diff --git a/barcode_scrap/static/src/js/screens/scrap_screen.esm.js b/barcode_scrap/static/src/components/scrap_screen/scrap_screen.esm.js similarity index 98% rename from barcode_scrap/static/src/js/screens/scrap_screen.esm.js rename to barcode_scrap/static/src/components/scrap_screen/scrap_screen.esm.js index ca02892..8fc3c7c 100644 --- a/barcode_scrap/static/src/js/screens/scrap_screen.esm.js +++ b/barcode_scrap/static/src/components/scrap_screen/scrap_screen.esm.js @@ -1,11 +1,11 @@ import {Component, onWillStart, useEffect, useRef, useState} from "@odoo/owl"; import {ConfirmationDialog} from "@web/core/confirmation_dialog/confirmation_dialog"; import {_t} from "@web/core/l10n/translation"; -import {barcodeMatchAnyDomain} from "@barcode_scanner/js/utils/scan_match.esm"; -import {barcodeScreens} from "@barcode_scanner/js/registries.esm"; +import {barcodeMatchAnyDomain} from "@barcode_scanner/utils/scan_match.esm"; +import {barcodeScreens} from "@barcode_scanner/registries.esm"; import {formatFloat} from "@web/core/utils/numbers"; -import {useBarcodeHandler} from "@barcode_scanner/js/hooks/use_barcode_handler.esm"; -import {useBarcodeScanner} from "@barcode_scanner/js/hooks/use_inventory.esm"; +import {useBarcodeHandler} from "@barcode_scanner/hooks/use_barcode_handler.esm"; +import {useBarcodeScanner} from "@barcode_scanner/hooks/use_inventory.esm"; import {useService} from "@web/core/utils/hooks"; // What the back office's product field offers on a scrap: goods, never a diff --git a/barcode_scrap/static/src/scss/scrap.scss b/barcode_scrap/static/src/components/scrap_screen/scrap_screen.scss similarity index 100% rename from barcode_scrap/static/src/scss/scrap.scss rename to barcode_scrap/static/src/components/scrap_screen/scrap_screen.scss diff --git a/barcode_scrap/static/src/xml/scrap_templates.xml b/barcode_scrap/static/src/components/scrap_screen/scrap_screen.xml similarity index 66% rename from barcode_scrap/static/src/xml/scrap_templates.xml rename to barcode_scrap/static/src/components/scrap_screen/scrap_screen.xml index ba664bc..7e20ea5 100644 --- a/barcode_scrap/static/src/xml/scrap_templates.xml +++ b/barcode_scrap/static/src/components/scrap_screen/scrap_screen.xml @@ -1,72 +1,5 @@ - - -
-
- -

Scrap Products

-
- -
- - -

SELECT THE LOCATION TO SCRAP FROM

-
- -
Loading locations...
-
- - -
-
-
-
- -
-
-
-
- - - -
-
- -
-
-
-
No internal locations found.
-
-
-
-
-
-
@@ -268,63 +201,4 @@
- - -
-
- -

Add Product

-
- -
- - -

- PRODUCTS - IN THIS LOCATION -

-
- -
Loading products...
-
- - -
-
- - - -
-
- -
-
-
-
No products found.
-
-
-
-
-
-
diff --git a/barcode_scrap/static/src/js/tiles/scrap_menu_tiles.esm.js b/barcode_scrap/static/src/tiles/scrap_menu_tiles.esm.js similarity index 85% rename from barcode_scrap/static/src/js/tiles/scrap_menu_tiles.esm.js rename to barcode_scrap/static/src/tiles/scrap_menu_tiles.esm.js index a36346c..2b4cf0c 100644 --- a/barcode_scrap/static/src/js/tiles/scrap_menu_tiles.esm.js +++ b/barcode_scrap/static/src/tiles/scrap_menu_tiles.esm.js @@ -1,5 +1,5 @@ import {_t} from "@web/core/l10n/translation"; -import {barcodeMenuTiles} from "@barcode_scanner/js/registries.esm"; +import {barcodeMenuTiles} from "@barcode_scanner/registries.esm"; /** * Home-screen tile for scrapping goods. Registers into the scanner core without diff --git a/barcode_scrap/static/tests/scrap_screen.test.js b/barcode_scrap/static/tests/scrap_screen.test.js index 31e57c8..a8d8536 100644 --- a/barcode_scrap/static/tests/scrap_screen.test.js +++ b/barcode_scrap/static/tests/scrap_screen.test.js @@ -1,10 +1,10 @@ -import {beforeEach, describe, expect, test} from "@odoo/hoot"; -import {makeMockEnv, patchTranslations} from "@web/../tests/web_test_helpers"; import { SCRAPPABLE_PRODUCTS, ScrapScreen, -} from "@barcode_scrap/js/screens/scrap_screen.esm"; -import {ScrapProductSelectorScreen} from "@barcode_scrap/js/screens/scrap_product_selector_screen.esm"; +} from "@barcode_scrap/components/scrap_screen/scrap_screen.esm"; +import {beforeEach, describe, expect, test} from "@odoo/hoot"; +import {makeMockEnv, patchTranslations} from "@web/../tests/web_test_helpers"; +import {ScrapProductSelectorScreen} from "@barcode_scrap/components/scrap_product_selector_screen/scrap_product_selector_screen.esm"; const UNTRACKED = { id: 7, diff --git a/barcode_stock/__manifest__.py b/barcode_stock/__manifest__.py index 8ca8606..9357351 100644 --- a/barcode_stock/__manifest__.py +++ b/barcode_stock/__manifest__.py @@ -18,31 +18,10 @@ "views/stock_location_views.xml", ], "assets": { - "web.assets_backend": [ - "barcode_stock/static/src/scss/picking_filters.scss", - "barcode_stock/static/src/xml/barcode_stock_templates.xml", - "barcode_stock/static/src/js/utils/move_progress.esm.js", - "barcode_stock/static/src/js/utils/quantity.esm.js", - "barcode_stock/static/src/js/utils/avatar.esm.js", - "barcode_stock/static/src/js/services/barcode_scanner_state.esm.js", - "barcode_stock/static/src/js/services/barcode_scanner_sync.esm.js", - "barcode_stock/static/src/js/components/picking_move_card.esm.js", - "barcode_stock/static/src/js/components/picking_move_list.esm.js", - "barcode_stock/static/src/js/components/picking_done_card.esm.js", - "barcode_stock/static/src/js/components/picking_done_list.esm.js", - "barcode_stock/static/src/js/components/image_viewer.esm.js", - "barcode_stock/static/src/js/components/picking_info_tab.esm.js", - "barcode_stock/static/src/js/screens/warehouse_ops.esm.js", - "barcode_stock/static/src/js/screens/picking_list_screen.esm.js", - "barcode_stock/static/src/js/screens/picking_screen.esm.js", - "barcode_stock/static/src/js/screens/move_wizard_screen.esm.js", - "barcode_stock/static/src/js/screens/internal_transfer_screen.esm.js", - "barcode_stock/static/src/js/screens/location_selector_screen.esm.js", - "barcode_stock/static/src/js/screens/product_selector_screen.esm.js", - "barcode_stock/static/src/js/screens/user_selector_screen.esm.js", - "barcode_stock/static/src/js/screens/quick_info.esm.js", - "barcode_stock/static/src/js/handlers/stock_scan_handlers.esm.js", - "barcode_stock/static/src/js/tiles/stock_menu_tiles.esm.js", + "barcode_scanner.assets": [ + "barcode_stock/static/src/**/*.esm.js", + "barcode_stock/static/src/**/*.xml", + "barcode_stock/static/src/**/*.scss", ], "web.assets_unit_tests": [ "barcode_stock/static/tests/**/*", diff --git a/barcode_stock/static/src/js/components/image_viewer.esm.js b/barcode_stock/static/src/components/image_viewer/image_viewer.esm.js similarity index 100% rename from barcode_stock/static/src/js/components/image_viewer.esm.js rename to barcode_stock/static/src/components/image_viewer/image_viewer.esm.js diff --git a/barcode_stock/static/src/components/image_viewer/warehouse_ops_screen.xml b/barcode_stock/static/src/components/image_viewer/warehouse_ops_screen.xml new file mode 100644 index 0000000..e723316 --- /dev/null +++ b/barcode_stock/static/src/components/image_viewer/warehouse_ops_screen.xml @@ -0,0 +1,32 @@ + + + +
+
+ + + + + Picking attachment + + +
+
+
+
diff --git a/barcode_stock/static/src/js/screens/internal_transfer_screen.esm.js b/barcode_stock/static/src/components/internal_transfer_screen/internal_transfer_screen.esm.js similarity index 98% rename from barcode_stock/static/src/js/screens/internal_transfer_screen.esm.js rename to barcode_stock/static/src/components/internal_transfer_screen/internal_transfer_screen.esm.js index 3e1a4be..3386730 100644 --- a/barcode_stock/static/src/js/screens/internal_transfer_screen.esm.js +++ b/barcode_stock/static/src/components/internal_transfer_screen/internal_transfer_screen.esm.js @@ -2,12 +2,12 @@ import {Component, onWillStart, onWillUpdateProps, useState} from "@odoo/owl"; import { barcodeMatchAnyDomain, barcodeMatchDomain, -} from "@barcode_scanner/js/utils/scan_match.esm"; +} from "@barcode_scanner/utils/scan_match.esm"; import {_t} from "@web/core/l10n/translation"; -import {barcodeScreens} from "@barcode_scanner/js/registries.esm"; -import {roundQty} from "@barcode_stock/js/utils/quantity.esm"; -import {useBarcodeHandler} from "@barcode_scanner/js/hooks/use_barcode_handler.esm"; -import {useBarcodeScanner} from "@barcode_scanner/js/hooks/use_inventory.esm"; +import {barcodeScreens} from "@barcode_scanner/registries.esm"; +import {roundQty} from "../../utils/quantity.esm"; +import {useBarcodeHandler} from "@barcode_scanner/hooks/use_barcode_handler.esm"; +import {useBarcodeScanner} from "@barcode_scanner/hooks/use_inventory.esm"; import {useService} from "@web/core/utils/hooks"; export class InternalTransferScreen extends Component { diff --git a/barcode_stock/static/src/components/internal_transfer_screen/internal_transfer_screen.xml b/barcode_stock/static/src/components/internal_transfer_screen/internal_transfer_screen.xml new file mode 100644 index 0000000..e949728 --- /dev/null +++ b/barcode_stock/static/src/components/internal_transfer_screen/internal_transfer_screen.xml @@ -0,0 +1,192 @@ + + + +
+
+ +

Internal Transfer

+
+
+ +
+
+
ORIGIN LOCATION
+
+
+ +
+
+ + + + Select origin +
+
+ +
+
+
+ +
+
DESTINATION LOCATION
+
+
+