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:
@@ -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();
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user