[FIX] base_import: pass resIds to exit

When we're exiting the import view, we need to have ids of the imported records
to confirm that the import was successful and to filter on import records if
needed.
This commit adds an optional resIds parameter.

task-3549609

closes odoo/odoo#140969

X-original-commit: bb968c5e197e37c0391209420655a777821aa3f1
Related: odoo/enterprise#50141
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
This commit is contained in:
aliya
2023-11-04 06:43:20 +00:00
parent d30729c6cb
commit 474af642e7
2 changed files with 3 additions and 3 deletions
@@ -57,7 +57,7 @@ export class ImportAction extends Component {
this.router.pushState(newState, { replace: true });
}
exit() {
exit(resIds) {
this.env.config.historyBack();
}
@@ -180,7 +180,7 @@ export class ImportAction extends Component {
this.notification.add(_t("%s records successfully imported", res.ids.length), {
type: "success",
});
this.exit();
this.exit(res.ids);
}
}
@@ -19,7 +19,7 @@
<button t-if="isPreviewing" type="button" class="btn btn-secondary">Load File</button>
<button t-else="" type="button" class="btn btn-primary o_import_file">Upload File</button>
</FileInput>
<button t-on-click="exit" type="button" class="btn btn-secondary">Cancel</button>
<button t-on-click="() => this.exit()" type="button" class="btn btn-secondary">Cancel</button>
</t>
<t t-if="isPreviewing">
<ImportDataSidepanel