fix: auto-refresh product list when category filter wizard closes

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) <noreply@anthropic.com>
This commit is contained in:
gsinghpal
2026-04-01 16:11:36 -04:00
parent 5e806745da
commit b83c9fd318

View File

@@ -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();
},
});
}