From fea0fef7a2c1c50de634e2ac868bf75a0d4bc511 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Tue, 24 May 2016 11:05:42 +0200 Subject: [PATCH 1/7] [FIX] project_issue: number of issues for a customer When counting the number of issues for a customer, all the the contacts of this customer must be taken into account. opw:676985 --- addons/project_issue/project_issue.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index 78bab712022..b40c3a9fa7a 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -546,9 +546,10 @@ class project_project(osv.Model): class res_partner(osv.osv): def _issue_count(self, cr, uid, ids, field_name, arg, context=None): Issue = self.pool['project.issue'] + partners = {id: self.search(cr, uid, [('id', 'child_of', ids)]) for id in ids} return { - partner_id: Issue.search_count(cr,uid, [('partner_id', '=', partner_id)]) - for partner_id in ids + partner_id: Issue.search_count(cr, uid, [('partner_id', 'in', partners[partner_id])]) + for partner_id in partners.keys() } """ Inherits partner and adds Issue information in the partner form """ From 784cdf9724427d0652d805b590e2b38fb2117ddb Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Tue, 24 May 2016 14:21:25 +0200 Subject: [PATCH 2/7] [FIX] account: fix error in aged partner balance, variable at_least_one_amount referenced before assignment --- addons/account/report/account_aged_partner_balance.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/account/report/account_aged_partner_balance.py b/addons/account/report/account_aged_partner_balance.py index 7bcb8432926..df52011118d 100644 --- a/addons/account/report/account_aged_partner_balance.py +++ b/addons/account/report/account_aged_partner_balance.py @@ -128,6 +128,7 @@ class ReportAgedPartnerBalance(models.AbstractModel): history.append(partners_amount) for partner in partners: + at_least_one_amount = False values = {} # Query here is replaced by one query which gets the all the partners their 'after' value after = False From d4e7da6133d6100d2a90c15648aa61c03125480b Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Tue, 24 May 2016 12:33:30 +0200 Subject: [PATCH 3/7] [IMP] im_livechat: don't auto-open on mobile Currently on mobile, the livechat window would take all the viewport of a small screen mobile browser. This combined with the "auto open" feature can be desorienting: users could have only seen the "hello, how may I help you ?" window and not know what to do or what is happening. So this commit remove the "auto open" feature if user is on a too small device (the user would thus have to click on "Have a Question"). closes #12148 opw-678012 --- addons/im_livechat/static/src/js/im_livechat.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/im_livechat/static/src/js/im_livechat.js b/addons/im_livechat/static/src/js/im_livechat.js index 84f626883c0..a7d320c37b1 100644 --- a/addons/im_livechat/static/src/js/im_livechat.js +++ b/addons/im_livechat/static/src/js/im_livechat.js @@ -2,6 +2,7 @@ odoo.define('im_livechat.im_livechat', function (require) { "use strict"; var bus = require('bus.bus').bus; +var config = require('web.config'); var core = require('web.core'); var session = require('web.session'); var time = require('web.time'); @@ -55,10 +56,11 @@ var LivechatButton = Widget.extend({ start: function () { this.$el.text(this.options.button_text); + var small_screen = config.device.size_class === config.device.SIZES.XS; if (this.history) { _.each(this.history.reverse(), this.add_message.bind(this)); this.open_chat(); - } else if (this.rule.action === 'auto_popup') { + } else if (!small_screen && this.rule.action === 'auto_popup') { var auto_popup_cookie = utils.get_cookie('im_livechat_auto_popup'); if (!auto_popup_cookie || JSON.parse(auto_popup_cookie)) { this.auto_popup_timeout = setTimeout(this.open_chat.bind(this), this.rule.auto_popup_timer*1000); From 2d66d9a63e85dada87b5c70b38bda9ec059aaaf4 Mon Sep 17 00:00:00 2001 From: Simon Lejeune Date: Thu, 3 Mar 2016 17:14:15 +0100 Subject: [PATCH 4/7] [FIX] *: do not use groups when extending an asset bundle Using groups when declaring an extension of an asset bundle leads to a different generated asset bundle according to the user's group. This is not something we want because a dynamic asset bundle's content means that it could (and it does) trigger unwanted cache invalidation. website_event, website_blog, website_forum and website_sale add functions to `website.contentMenu`. These functions are bound to server side qweb nodes protected by groups. We can always add the functions; if a user tries to use the routes he should receive a traceback because of lack of access rules website_blog adds a `website_blog.editor` module, but is guarded by the presence of a node in the DOM. We use the same logic to guard the module added by website_sale with the `.js_sale` node. website_gengo is working as expected. --- addons/website_blog/views/website_blog_templates.xml | 2 +- addons/website_event/views/website_event.xml | 2 +- addons/website_forum/views/website_forum.xml | 2 +- addons/website_gengo/views/website_gengo.xml | 2 +- addons/website_sale/static/src/js/website_sale.editor.js | 4 ++++ addons/website_sale/views/templates.xml | 2 +- 6 files changed, 9 insertions(+), 5 deletions(-) diff --git a/addons/website_blog/views/website_blog_templates.xml b/addons/website_blog/views/website_blog_templates.xml index ed305fbf61d..2594efc4d86 100644 --- a/addons/website_blog/views/website_blog_templates.xml +++ b/addons/website_blog/views/website_blog_templates.xml @@ -2,7 +2,7 @@ -