From 52c6a060d6e3e251c3577a06cecffbe2ef8008e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Rahir?= Date: Tue, 6 Aug 2019 08:02:52 +0000 Subject: [PATCH] [FIX] base_setup: allow extension of the edition widget MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The refactoring of the settings in a0c34138f88c4eb5d8a86340df55bbc091c5a252 did not properly take the enterprise edition into account. In particular, we had lost the information about the expiration date. This commit adds that information in community as the alternative would be to extend the widget ResConfigEdition in web_enterprise which would imply an explicit dependency between web_enterprise and base_setup and we would like to avoid that situation. closes odoo/odoo#36114 Signed-off-by: Alexandre Kühn (aku) --- addons/base_setup/static/src/js/res_config_edition.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addons/base_setup/static/src/js/res_config_edition.js b/addons/base_setup/static/src/js/res_config_edition.js index bdc3f434f88..d8abae43401 100644 --- a/addons/base_setup/static/src/js/res_config_edition.js +++ b/addons/base_setup/static/src/js/res_config_edition.js @@ -14,8 +14,13 @@ odoo.define('base_setup.ResConfigEdition', function (require) { init: function () { this._super.apply(this, arguments); this.server_version = session.server_version; + this.expiration_date = session.expiration_date + ? moment(session.expiration_date) + : moment().add(30, 'd'); }, }); widget_registry.add('res_config_edition', ResConfigEdition); + + return ResConfigEdition; });