From e5740270568404d71a3bc093074a085c9c2eded8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Sun, 5 Mar 2017 09:34:56 +0100 Subject: [REF] web,*: remove 'web.model' and 'web.dataModel Use this.rpc instead of Model object, with web.ajax if necessary. nb: EventDispatcherMixin include now the custom_events managment instead of widget --- addons/web/static/src/js/fields/relational_fields.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'addons/web/static/src/js/fields/relational_fields.js') diff --git a/addons/web/static/src/js/fields/relational_fields.js b/addons/web/static/src/js/fields/relational_fields.js index b3b3a26c437..c5750c86735 100644 --- a/addons/web/static/src/js/fields/relational_fields.js +++ b/addons/web/static/src/js/fields/relational_fields.js @@ -227,14 +227,14 @@ var FieldMany2One = AbstractRelationalField.extend({ var self = this; var slowCreate = this._searchCreatePopup.bind(this, "form", false, this._createContext(name)); if (this.nodeOptions.quick_create) { - this.performModelRPC(this.field.relation, "name_create", [name]).then( - function (result) { + this.rpc(this.field.relation, "name_create") + .args([name]) + .exec() + .then(function (result) { if (self.mode === "edit") { self.reinitialize({id: result[0], display_name: result[1]}); } - }, - slowCreate - ); + }, slowCreate); } else { slowCreate(); } -- cgit v1.2.3