From 75c7d300d3028e35768766313db24e420562c63b Mon Sep 17 00:00:00 2001 From: joezsweet Date: Fri, 21 Sep 2018 17:24:51 +0200 Subject: [PATCH] Fix default_maximize check Checking result of rpc call, `dialog_maximize`, will end to be always `true` as the method will return a json: `{'dialog_maximize': false }`. So i changed the test to test the value of json key `dialog_maximize` --- web_dialog_size/static/src/js/web_dialog_size.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web_dialog_size/static/src/js/web_dialog_size.js b/web_dialog_size/static/src/js/web_dialog_size.js index c5b281a0..7c5ab7c5 100644 --- a/web_dialog_size/static/src/js/web_dialog_size.js +++ b/web_dialog_size/static/src/js/web_dialog_size.js @@ -16,8 +16,8 @@ Dialog.include({ return this._super.apply(this, arguments).then(function () { self.$modal.find('.dialog_button_extend').on('click', self.proxy('_extending')); self.$modal.find('.dialog_button_restore').on('click', self.proxy('_restore')); - return config.done(function(default_maximize) { - if (default_maximize) { + return config.done(function(r) { + if (r.default_maximize) { self._extending(); } else { self._restore();