[FIX] account_reconcile_oca: Depending on how the widget is opened, there is not always this.form_controller

This commit is contained in:
Tom
2025-01-14 23:09:19 +01:00
parent 0760c8fbea
commit 5e8332e7e0

View File

@@ -113,7 +113,7 @@ export class ReconcileController extends KanbanController {
resId = record.resId;
}
if (this.state.selectedRecordId && this.state.selectedRecordId !== resId) {
if (this.form_controller.model.root.isDirty) {
if (this.form_controller && this.form_controller.model.root.isDirty) {
await this.form_controller.model.root.save({
noReload: true,
stayInEdition: true,