Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return this._super(previewMode, value).then(function (mailing_list_id) {
ajax.jsonRpc('/web/dataset/call', 'call', {
model: 'mail.mass_mailing.list',
method: 'read',
args: [[parseInt(mailing_list_id)], ['popup_content'], weContext.get()],
}).then(function (data) {
self.$target.find(".o_popup_content_dev").empty();
if (data && data[0].popup_content) {
$(data[0].popup_content).appendTo(self.$target.find(".o_popup_content_dev"));
}
});
});
},
load_products:function(product_ids) {
var self = this;
return ajax.jsonRpc('/shop/get_product_data', 'call', {
'product_ids': product_ids,
'cookies': JSON.parse(utils.get_cookie('comparelist_product_ids') || '[]'),
}).then(function (data) {
self.comparelist_product_ids = JSON.parse(data.cookies);
delete data.cookies;
_.each(data, function(product) {
self.product_data[product.product.id] = product;
});
});
},
toggle_panel: function() {
$('.send_validation_email').on('click', function (ev) {
ev.preventDefault();
var $link = $(ev.currentTarget);
ajax.jsonRpc("/forum/send_validation_email", 'call', {
'forum_id': $link.attr('forum-id'),
}).then(function (data) {
if (data) {
$('button.validation_email_close').click();
}
});
});