[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>
This commit is contained in:
Rémi Rahir
2019-08-28 10:35:09 +00:00
committed by Alexandre Kühn
parent 7d6a326501
commit 52c6a060d6
@@ -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;
});