summaryrefslogtreecommitdiff
path: root/addons/base_setup/static/src/js
diff options
context:
space:
mode:
authorRémi Rahir <rar@odoo.com>2019-08-06 08:02:52 +0000
committerAlexandre Kühn <aku@odoo.com>2019-08-28 10:35:09 +0000
commit52c6a060d6e3e251c3577a06cecffbe2ef8008e7 (patch)
tree1865d154b483a3c4ddee385c8c345aee0520bd1e /addons/base_setup/static/src/js
parent7d6a326501c0de5902782937dec329ae051bba34 (diff)
[FIX] base_setup: allow extension of the edition widget
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) <aku@odoo.com>
Diffstat (limited to 'addons/base_setup/static/src/js')
-rw-r--r--addons/base_setup/static/src/js/res_config_edition.js5
1 files changed, 5 insertions, 0 deletions
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;
});