diff --git a/theme_prime/__manifest__.py b/theme_prime/__manifest__.py index fa68b62d7..9c83c1a26 100644 --- a/theme_prime/__manifest__.py +++ b/theme_prime/__manifest__.py @@ -6,7 +6,7 @@ 'description': 'Powerful multipurpose eCommerce theme suitable for all kind of businesses like Electronics, Fashion, Sports, Beauty, Furniture and many more.', 'summary': 'Powerful multipurpose eCommerce theme suitable for all kind of businesses like Electronics, Fashion, Sports, Beauty, Furniture and many more.', 'category': 'Theme/eCommerce', - 'version': '17.0.0.4', + 'version': '18.0.1.3', 'depends': ['droggol_theme_common'], 'license': 'OPL-1', @@ -17,7 +17,8 @@ 'price': 289.00, 'currency': 'USD', - 'live_test_url': 'https://prime-17-electronics-1.droggol.com/', + 'live_test_url': 'https://prime-18-electronics-1.droggol.com/', + 'installable': True, 'images': [ 'static/description/prime_cover.png', diff --git a/theme_prime/controllers/main.py b/theme_prime/controllers/main.py index 694e8cdfc..ce54c44cd 100644 --- a/theme_prime/controllers/main.py +++ b/theme_prime/controllers/main.py @@ -36,7 +36,7 @@ class ThemePrimeWebsiteSale(WebsiteSale): # Hide out of stock if request.httprequest.args.get('hide_out_of_stock'): - domains = expression.AND([domains, ['|', '|', ('detailed_type', '!=', 'product'), ('allow_out_of_stock_order', '=', True), '&', ('dr_free_qty', '>', 0), ('allow_out_of_stock_order', '=', False)]]) + domains = expression.AND([domains, ['|', '|', ('is_storable', '=', False), ('allow_out_of_stock_order', '=', True), '&', ('dr_free_qty', '>', 0), ('allow_out_of_stock_order', '=', False)]]) # Rating ratings = request.httprequest.args.getlist('rating') diff --git a/theme_prime/migrations/18.0.1.0/pre-migrate.py b/theme_prime/migrations/18.0.1.0/pre-migrate.py new file mode 100644 index 000000000..051eeca22 --- /dev/null +++ b/theme_prime/migrations/18.0.1.0/pre-migrate.py @@ -0,0 +1,20 @@ +def migrate(cr, version): + """Best-effort Odoo 17 -> 18 port marker. No destructive schema changes.""" + if version is None: + return + # Drop obsolete view xmlids that inherited removed website_sale_product_configurator templates. + cr.execute(""" + DELETE FROM ir_ui_view + WHERE id IN ( + SELECT res_id FROM ir_model_data + WHERE module = 'theme_prime' + AND name IN ('configure_optional_products', 'optional_product_items') + AND model = 'ir.ui.view' + ) + """) + cr.execute(""" + DELETE FROM ir_model_data + WHERE module = 'theme_prime' + AND name IN ('configure_optional_products', 'optional_product_items') + AND model = 'ir.ui.view' + """) diff --git a/theme_prime/static/src/components/theme_service.js b/theme_prime/static/src/components/theme_service.js index 0306ac587..f28bf3ace 100644 --- a/theme_prime/static/src/components/theme_service.js +++ b/theme_prime/static/src/components/theme_service.js @@ -2,10 +2,10 @@ import { registry } from '@web/core/registry'; import { markup } from "@odoo/owl"; +import { rpc } from "@web/core/network/rpc"; export const componentService = { - dependencies: ['rpc'], - start(env, { rpc }) { + start() { return { async _fetchRecords(params, extras) { let { routePath, fieldsToMarkup } = extras || {}; @@ -26,4 +26,4 @@ export const componentService = { } } -registry.category('services').add('shared_component_service', componentService); \ No newline at end of file +registry.category('services').add('shared_component_service', componentService); diff --git a/theme_prime/static/src/js/core/cart_manager.js b/theme_prime/static/src/js/core/cart_manager.js index a2bea22a8..c561be1bd 100644 --- a/theme_prime/static/src/js/core/cart_manager.js +++ b/theme_prime/static/src/js/core/cart_manager.js @@ -1,6 +1,6 @@ /** @odoo-module **/ -import "@website_sale_product_configurator/js/website_sale_options"; +import "@website_sale/js/website_sale_configurators"; import publicWidget from "@web/legacy/js/public/public_widget"; import {CartManagerMixin} from "@theme_prime/js/core/mixins"; import { QuickViewDialog } from "@theme_prime/js/frontend/quick_view_dialog"; @@ -10,7 +10,7 @@ publicWidget.registry.WebsiteSale.include(Object.assign({}, CartManagerMixin, { this._super(...arguments); this.notification = this.bindService("notification"); }, - _onProductReady: function () { + _onProductReady: function (isOnProductPage = false) { if (this._isB2bModeEnabled()) { this._loggedInNotification(); return Promise.resolve(); diff --git a/theme_prime/static/src/js/editor/snippets.editor.js b/theme_prime/static/src/js/editor/snippets.editor.js index 1747c34b4..d7a3936ca 100644 --- a/theme_prime/static/src/js/editor/snippets.editor.js +++ b/theme_prime/static/src/js/editor/snippets.editor.js @@ -1,8 +1,9 @@ /** @odoo-module **/ -import SnippetsMenu from "@website/js/editor/snippets.editor"; -import { _lt } from "@web/core/l10n/translation"; +import websiteSnippetsEditor from "@website/js/editor/snippets.editor"; +import { _t } from "@web/core/l10n/translation"; -SnippetsMenu.SnippetsMenu.include({ - optionsTabStructure: [...SnippetsMenu.SnippetsMenu.prototype.optionsTabStructure, ["theme-prime-options", _lt("Theme Prime Options")]], -}); +websiteSnippetsEditor.SnippetsMenu.optionsTabStructure = [ + ...websiteSnippetsEditor.SnippetsMenu.optionsTabStructure, + ["theme-prime-options", _t("Theme Prime Options")], +]; diff --git a/theme_prime/static/src/js/frontend/quick_view_dialog.js b/theme_prime/static/src/js/frontend/quick_view_dialog.js index afff4d220..a6138c795 100644 --- a/theme_prime/static/src/js/frontend/quick_view_dialog.js +++ b/theme_prime/static/src/js/frontend/quick_view_dialog.js @@ -1,7 +1,7 @@ /** @odoo-module **/ import '@website_sale_comparison/js/website_sale_comparison'; -import { jsonrpc } from "@web/core/network/rpc_service"; +import { rpc } from "@web/core/network/rpc"; import Dialog from '@web/legacy/js/core/dialog'; import publicWidget from "@web/legacy/js/public/public_widget"; import { ProductCarouselMixins } from "@theme_prime/js/core/mixins"; @@ -24,7 +24,7 @@ export const QuickViewDialog = Dialog.extend(ProductCarouselMixins, { }, willStart: async function () { await this._super(...arguments); - const result = await jsonrpc('/theme_prime/get_quick_view_html', { + const result = await rpc('/theme_prime/get_quick_view_html', { options: {productID: this.productID, variantID: this.variantID, variant_selector: this.isVariantSelectorDialog} }); if (result) { diff --git a/theme_prime/static/src/xml/cards.xml b/theme_prime/static/src/xml/cards.xml index 23e0f8945..f9f9aaab1 100644 --- a/theme_prime/static/src/xml/cards.xml +++ b/theme_prime/static/src/xml/cards.xml @@ -386,7 +386,7 @@ - +
@@ -420,7 +420,7 @@ - +
@@ -468,7 +468,7 @@ - + @@ -558,7 +558,7 @@
- +
diff --git a/theme_prime/static/src/xml/frontend/2_col_deal.xml b/theme_prime/static/src/xml/frontend/2_col_deal.xml index c3ee433a5..69f040c37 100644 --- a/theme_prime/static/src/xml/frontend/2_col_deal.xml +++ b/theme_prime/static/src/xml/frontend/2_col_deal.xml @@ -29,11 +29,11 @@
- +
-
-

+

+

@@ -92,8 +92,8 @@

-

- +

+

diff --git a/theme_prime/static/src/xml/frontend/suggested_product_slider.xml b/theme_prime/static/src/xml/frontend/suggested_product_slider.xml index 0d0b8d03d..7c61877c6 100644 --- a/theme_prime/static/src/xml/frontend/suggested_product_slider.xml +++ b/theme_prime/static/src/xml/frontend/suggested_product_slider.xml @@ -7,7 +7,7 @@ - +
@@ -25,8 +25,8 @@
-
- +
+
diff --git a/theme_prime/views/layout.xml b/theme_prime/views/layout.xml index 4095012bb..a64708f23 100644 --- a/theme_prime/views/layout.xml +++ b/theme_prime/views/layout.xml @@ -38,33 +38,10 @@ - - - - + - + @@ -486,7 +437,7 @@ - +