From fea0fef7a2c1c50de634e2ac868bf75a0d4bc511 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Tue, 24 May 2016 11:05:42 +0200 Subject: [PATCH 1/6] [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/6] [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/6] [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 bb514316537c875867e444ad1a0fed8b0e820939 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Wed, 9 Mar 2016 14:28:12 +0100 Subject: [PATCH 4/6] [FIX] website_mail: publications of internal notes On the font-end view of project.issue, only the messages of type `note` were display. This excluded the messages recieved via email which makes hard to understand a conversation (e.g. a customer does not sees his own answers). Instead, only filter out the notifications (change of states, responsible...) opw-677426 --- addons/website_mail/models/mail_message.py | 1 - addons/website_mail/views/website_mail.xml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/website_mail/models/mail_message.py b/addons/website_mail/models/mail_message.py index e43a6eca9c0..544282fe813 100644 --- a/addons/website_mail/models/mail_message.py +++ b/addons/website_mail/models/mail_message.py @@ -68,4 +68,3 @@ class MailMessage(osv.Model): if cr.fetchall(): raise AccessError(_('The requested operation cannot be completed due to security restrictions. Please contact your system administrator.\n\n(Document type: %s, Operation: %s)') % (self._description, operation)) return super(MailMessage, self).check_access_rule(cr, uid, ids=ids, operation=operation, context=context) - diff --git a/addons/website_mail/views/website_mail.xml b/addons/website_mail/views/website_mail.xml index 50192030cc2..d0df8e6b5a1 100644 --- a/addons/website_mail/views/website_mail.xml +++ b/addons/website_mail/views/website_mail.xml @@ -73,7 +73,7 @@ -
  • +
  • From e69d9b8b7df9d55ac8d8709d622c31fef9480a23 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Tue, 24 May 2016 14:38:31 +0200 Subject: [PATCH 5/6] [FIX] account_asset: fiscal year date The fiscal year start date should be taken into account when calculating the depreciation amount in case of prorata temporis. opw-678072 --- addons/account_asset/account_asset.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/addons/account_asset/account_asset.py b/addons/account_asset/account_asset.py index 69cafd5869b..96667d2ccf8 100644 --- a/addons/account_asset/account_asset.py +++ b/addons/account_asset/account_asset.py @@ -127,19 +127,15 @@ class AccountAssetAsset(models.Model): amount = amount_to_depr / (undone_dotation_number - len(posted_depreciation_line_ids)) if self.prorata and self.category_id.type == 'purchase': amount = amount_to_depr / self.method_number - days = total_days - float(depreciation_date.strftime('%j')) if sequence == 1: + days = (self.company_id.compute_fiscalyear_dates(depreciation_date)['date_to'] - depreciation_date).days + 1 amount = (amount_to_depr / self.method_number) / total_days * days - elif sequence == undone_dotation_number: - amount = (amount_to_depr / self.method_number) / total_days * (total_days - days) elif self.method == 'degressive': amount = residual_amount * self.method_progress_factor if self.prorata: - days = total_days - float(depreciation_date.strftime('%j')) if sequence == 1: + days = (self.company_id.compute_fiscalyear_dates(depreciation_date)['date_to'] - depreciation_date).days + 1 amount = (residual_amount * self.method_progress_factor) / total_days * days - elif sequence == undone_dotation_number: - amount = (residual_amount * self.method_progress_factor) / total_days * (total_days - days) return amount def _compute_board_undone_dotation_nb(self, depreciation_date, total_days): From f3b2d36a70e98c008e74e8a6bb5f4be632a4911b Mon Sep 17 00:00:00 2001 From: tdu-odoo Date: Tue, 24 May 2016 14:53:10 +0200 Subject: [PATCH 6/6] [FIX] account: Code 421 should be type Payable and not Current Liabilities To be able to counter part the expense of the employee with the account set on his personal contact form, we need to configure the 421 account as payable. more infos on http://www.compta-facile.com/comptabilisation-des-notes-de-frais/ The fix allows us to get that correct entry: https://drive.google.com/a/openerp.com/file/d/0B5t9_ESHwijQemhyUjFFRzdTeVE/view?usp=sharing --- addons/l10n_fr/plan_comptable_general.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/l10n_fr/plan_comptable_general.xml b/addons/l10n_fr/plan_comptable_general.xml index d16acb998d9..f846e6178a3 100644 --- a/addons/l10n_fr/plan_comptable_general.xml +++ b/addons/l10n_fr/plan_comptable_general.xml @@ -2053,7 +2053,7 @@ Personnel - RĂ©munĂ©rations dues 421 - +