[FIX] analytic: prevent closing the analytic editor

steps to reproduce:
- enable analytic
- open journal items in list view
- select one item, set an analytic account
- select the same item, click on the analytic account, click on the save button (floppy disk)
- pop up opens
- close it

Issue:
Traceback

Cause:
In multiEdit mode, the main element cannot be focused in

opw-3463911

closes odoo/odoo#136576

X-original-commit: 93e553c211e1b74c0e712e387290db6455cf0e3d
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
This commit is contained in:
Yolann Sabaux
2023-09-27 17:41:04 +00:00
parent 2ba215729b
commit e4fc2ec5e3
@@ -64,10 +64,14 @@ export class AnalyticDistribution extends Component {
},
isToMany: false,
onRecordSaved: async (record) => {
this.mainRef.el.focus();
if (!this.props.record.model.multiEdit) {
this.mainRef.el.focus();
}
},
onClose: () => {
this.mainRef.el.focus();
if (!this.props.record.model.multiEdit) {
this.mainRef.el.focus();
}
},
fieldString: _t("Analytic Distribution Template"),
});