[FIX] web: ask to save new record before translating
Have a translatable field in a form view. Create a new record with that form view. Click on the button to open translations for that field. Before this commit, the record was not saved before opening the translation dialog, hence changing the translations could not work properly. After this commit, this feature is back, and we ask to save a new record before opening the translation dialog. closes odoo/odoo#97608 Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
This commit is contained in:
@@ -171,6 +171,13 @@ class FieldAdapter extends ComponentAdapter {
|
||||
}
|
||||
} else if (evType === "history_back") {
|
||||
return this.wowlEnv.config.historyBack();
|
||||
} else if (evType === "translate") {
|
||||
const { fieldParams, record, update } = this.props;
|
||||
return this.translationDialog({
|
||||
fieldName: fieldParams.name,
|
||||
record,
|
||||
updateField: update,
|
||||
});
|
||||
}
|
||||
super._trigger_up(...arguments);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user