[IMP] web: better 'Odoo Enterprise' settings popup
The popup is now a bit more styled and needs less info to call our servers.
This commit is contained in:
committed by
Damien Bouvy
parent
608b2f7fba
commit
22e94f5254
Binary file not shown.
|
After Width: | Height: | Size: 366 KiB |
@@ -1657,7 +1657,8 @@ var AbstractFieldUpgrade = {
|
||||
},
|
||||
|
||||
open_dialog: function() {
|
||||
var message = _t('Upgrade to <a href="https://www.odoo.com/editions">Odoo Enterprise</a> to activate this feature.');
|
||||
var message = $(QWeb.render('EnterpriseUpgrade'));
|
||||
|
||||
var buttons = [
|
||||
{
|
||||
text: _t("Upgrade now"),
|
||||
@@ -1682,21 +1683,8 @@ var AbstractFieldUpgrade = {
|
||||
},
|
||||
|
||||
confirm_upgrade: function() {
|
||||
new Model("res.users").call("read", [session.uid, ["partner_id"]]).done(function(data) {
|
||||
if(data.partner_id) {
|
||||
new Model("res.partner").call("read", [data.partner_id[0], ["name", "lang", "country_id", "email", "phone"]]).done(function(data) {
|
||||
// Remove false value
|
||||
data.country_id = data.country_id[0];
|
||||
var sanitized_data = _.omit(data, function(value, key, object) {
|
||||
if (_.isUndefined(value) || ( (_.isBoolean(value)) && (value === false) ) || key === "id") {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
// prepare to url (+urlencode)
|
||||
var url_args = $.param(sanitized_data);
|
||||
framework.redirect("https://www.odoo.com/odoo-enterprise/upgrade?" + url_args);
|
||||
});
|
||||
}
|
||||
new Model("res.users").call("search_count", [[["share", "=", false]]]).then(function(data) {
|
||||
framework.redirect("https://www.odoo.com/odoo-enterprise/upgrade?num_users=" + data);
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
@@ -1456,4 +1456,23 @@
|
||||
</t>
|
||||
</t>
|
||||
|
||||
<t t-name="EnterpriseUpgrade">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
Get this feature and much more with Odoo Enterprise!
|
||||
<ul class="list-unstyled">
|
||||
<li><i class="fa fa-check"></i> Access to all Enterprise Apps</li>
|
||||
<li><i class="fa fa-check"></i> New design</li>
|
||||
<li><i class="fa fa-check"></i> Mobile support</li>
|
||||
<li><i class="fa fa-check"></i> Upgrade to future versions</li>
|
||||
<li><i class="fa fa-check"></i> Bugfixes guarantee</li>
|
||||
<li><a href="http://www.odoo.com/editions" target="_blank"><i class="fa fa-plus"></i> And more</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<img class="img-responsive" t-att-src='_s + "/web/static/src/img/enterprise_upgrade.jpg"' draggable="false"/>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
|
||||
@@ -18,6 +18,7 @@ _default_parameters = {
|
||||
"database.secret": lambda: (str(uuid.uuid4()), ['base.group_erp_manager']),
|
||||
"database.uuid": lambda: (str(uuid.uuid1()), []),
|
||||
"database.create_date": lambda: (datetime.datetime.now().strftime(misc.DEFAULT_SERVER_DATETIME_FORMAT), ['base.group_user']),
|
||||
"database.expiration_date": lambda: ((datetime.datetime.now()+datetime.timedelta(+30)).strftime(misc.DEFAULT_SERVER_DATETIME_FORMAT), ['base.group_user']),
|
||||
"web.base.url": lambda: ("http://localhost:%s" % config.get('xmlrpc_port'), []),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user