[英]Migrate odoo javascript from v8 & v9 to v10
hay i want to do something with javascript in odoo v10 and when im searching i found what i need but in version 8 and copy it from v8 to 10 it gives me some error and i dont know how to fix it here is the code similar to what i want 干草,我想在odoo v10中使用javascript做某事,当我在即时搜索中发现我需要的东西时,但在版本8中将其从v8复制到10,这给了我一些错误,我不知道如何解决,这里的代码类似于我想要的是
_.each(result, function(res) { setTimeout(function() { //If notification not already displayed, we add button and action on it if (!($.find(".eid_"+res.event_id)).length) { res.title = QWeb.render('notify_title', {'title': res.title, 'id' : res.event_id}); res.message += QWeb.render("notify_footer"); a = self.do_notify(res.title,res.message,true); a.element.find(".link2showed").on('click',function() { self.get_notif_box(this).find('.ui-notify-close').trigger("click"); self.rpc("/calendar/notify_ack"); }); }
_.each(result, function(res) {setTimeout(function() {
//If notification not already displayed, we add button and action on it
if (!($.find(".eid_"+res.event_id)).length) {
res.title = QWeb.render('notify_title', {'title': res.title, 'id' : res.event_id});
res.message += QWeb.render("notify_footer");
a = self.do_notify(res.title,res.message,true);
a.element.find(".link2showed").on('click',function() {
self.get_notif_box(this).find('.ui-notify-close').trigger("click");
self.rpc("/calendar/notify_ack");
});
}}); });
Try this.. 尝试这个..
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.