diff options
| author | qsm-odoo <qsm@odoo.com> | 2017-08-22 16:19:58 +0200 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2017-08-23 15:14:37 +0200 |
| commit | e0d5a875f02ae0c986d9684b067a62e46f8c5e1f (patch) | |
| tree | 187ed8ca83b96db56b7ead9832c0ae7c20fcdcb9 /addons/web/static/src/js/fields | |
| parent | 11af3b73393a67b8438a323d530c81f5b3ab985c (diff) | |
[FIX] web: make "slow" create of m2o fields work
There were some coding mistakes since some changes introduced by
https://github.com/odoo/odoo/commit/d19671f0d0ff7189055cbe0794afed32f8a387e6
Diffstat (limited to 'addons/web/static/src/js/fields')
| -rw-r--r-- | addons/web/static/src/js/fields/relational_fields.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web/static/src/js/fields/relational_fields.js b/addons/web/static/src/js/fields/relational_fields.js index 7b1aa80a835..e05a53194c3 100644 --- a/addons/web/static/src/js/fields/relational_fields.js +++ b/addons/web/static/src/js/fields/relational_fields.js @@ -225,7 +225,7 @@ var FieldMany2One = AbstractField.extend({ var self = this; var def = $.Deferred(); var slowCreate = function () { - var dialog = self._searchCreatePopup.bind(self, "form", false, self._createContext(name)); + var dialog = self._searchCreatePopup("form", false, self._createContext(name)); dialog.on('closed', self, def.resolve.bind(def)); }; if (this.nodeOptions.quick_create) { @@ -393,7 +393,7 @@ var FieldMany2One = AbstractField.extend({ */ _searchCreatePopup: function (view, ids, context) { var self = this; - new dialogs.SelectCreateDialog(this, _.extend({}, this.nodeOptions, { + return new dialogs.SelectCreateDialog(this, _.extend({}, this.nodeOptions, { res_model: this.field.relation, domain: this.record.getDomain({fieldName: this.name}), context: _.extend({}, this.record.getContext(this.recordParams), context || {}), |
