diff options
Diffstat (limited to 'addons/web/static/src/js/fields/relational_fields.js')
| -rw-r--r-- | addons/web/static/src/js/fields/relational_fields.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/addons/web/static/src/js/fields/relational_fields.js b/addons/web/static/src/js/fields/relational_fields.js index 325bb176e61..c0dc8ec65e5 100644 --- a/addons/web/static/src/js/fields/relational_fields.js +++ b/addons/web/static/src/js/fields/relational_fields.js @@ -856,6 +856,8 @@ var FieldX2Many = AbstractField.extend({ toggle_column_order: '_onToggleColumnOrder', activate_next_widget: '_onActiveNextWidget', navigation_move: '_onNavigationMove', + save_optional_fields: '_onSaveOrLoadOptionalFields', + load_optional_fields: '_onSaveOrLoadOptionalFields', }), // We need to trigger the reset on every changes to be aware of the parent changes @@ -1388,6 +1390,18 @@ var FieldX2Many = AbstractField.extend({ }); }, /** + * Add necessary key parts for the basic controller to compute the local + * storage key. The event will be properly handled by the basic controller. + * + * @param {OdooEvent} ev + * @private + */ + _onSaveOrLoadOptionalFields: function (ev) { + ev.data.keyParts.relationalField = this.name; + ev.data.keyParts.subViewId = this.view.view_id; + ev.data.keyParts.subViewType = this.view.type; + }, + /** * Forces a resequencing of the records. * * @private |
