From b83c9fd3180aae4f5153b887786d20cf37dad6ab Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Wed, 1 Apr 2026 16:11:36 -0400 Subject: [PATCH] fix: auto-refresh product list when category filter wizard closes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Used doAction onClose callback instead of await — the wizard dialog close now triggers reload of excluded count and product list. Same fix applied to product creation wizard. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../static/src/js/product_mapping.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/fusion-woo-odoo/fusion_woocommerce/static/src/js/product_mapping.js b/fusion-woo-odoo/fusion_woocommerce/static/src/js/product_mapping.js index ebccab50..cf6d222d 100644 --- a/fusion-woo-odoo/fusion_woocommerce/static/src/js/product_mapping.js +++ b/fusion-woo-odoo/fusion_woocommerce/static/src/js/product_mapping.js @@ -298,7 +298,7 @@ export class ProductMapping extends Component { this.notification.add("Select an instance first.", { type: "warning" }); return; } - await this.actionService.doAction({ + this.actionService.doAction({ type: 'ir.actions.act_window', res_model: 'woo.category.filter', views: [[false, 'form']], @@ -306,11 +306,13 @@ export class ProductMapping extends Component { context: { default_instance_id: this.state.instanceId, }, + }, { + onClose: async () => { + await this._loadExcludedCategoryCount(); + this.state.unmatchedOdooPage = 1; + await this._loadOdooProducts(""); + }, }); - // Reload after wizard closes - await this._loadExcludedCategoryCount(); - this.state.unmatchedOdooPage = 1; - await this._loadOdooProducts(""); } async toggleCategoryFilter() { @@ -482,6 +484,10 @@ export class ProductMapping extends Component { default_instance_id: this.state.instanceId, default_odoo_product_id: odooProductId, }, + }, { + onClose: async () => { + await this._refreshAll(); + }, }); }