summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorAdrien Dieudonné <adr@odoo.com>2015-11-10 11:19:44 +0100
committerDamien Bouvy <dbo@odoo.com>2015-11-17 13:01:09 +0100
commit22e94f5254a35fc20ca536ed1b5e6a6cf315e4c4 (patch)
tree55b646efd6af9577b2d183f4c109d9af137839cf /addons/web/static/src/js
parent608b2f7fbaf9eeb90e6e9b6f3b6ee2a86794e271 (diff)
[IMP] web: better 'Odoo Enterprise' settings popup
The popup is now a bit more styled and needs less info to call our servers.
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/views/form_widgets.js20
1 files changed, 4 insertions, 16 deletions
diff --git a/addons/web/static/src/js/views/form_widgets.js b/addons/web/static/src/js/views/form_widgets.js
index a68bbf730a0..c1cc05ce156 100644
--- a/addons/web/static/src/js/views/form_widgets.js
+++ b/addons/web/static/src/js/views/form_widgets.js
@@ -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);
});
},