From 4001aaf2c47d3e7e6334aaa453f58054b98ee864 Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL Date: Wed, 12 Jul 2017 09:58:34 +0200 Subject: [PATCH 1/3] [FIX] l10n_fr_certification : fix string_to_hash computation - use datas of all lines, and not only the last lines. - removed useless 'move_id' field from account.move.line Was PR #18175. Courtesy of Sylvain Legal --- addons/l10n_fr_certification/models/account.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/l10n_fr_certification/models/account.py b/addons/l10n_fr_certification/models/account.py index bef0880d7ca..07d5fc04e41 100644 --- a/addons/l10n_fr_certification/models/account.py +++ b/addons/l10n_fr_certification/models/account.py @@ -10,7 +10,7 @@ ERR_MSG = _("According to the french law, you cannot modify a %s in order for it #forbidden fields MOVE_FIELDS = ['date', 'journal_id', 'company_id'] -LINE_FIELDS = ['debit', 'credit', 'account_id', 'move_id', 'partner_id'] +LINE_FIELDS = ['debit', 'credit', 'account_id', 'partner_id'] class AccountMove(models.Model): @@ -55,7 +55,8 @@ class AccountMove(models.Model): for line in move.line_ids: for field in LINE_FIELDS: - values[field] = _getattrstring(line, field) + k = 'line_%d_%s' % (line.id, field) + values[k] = _getattrstring(line, field) #make the json serialization canonical # (https://tools.ietf.org/html/draft-staykov-hu-json-canonical-form-00) move.l10n_fr_string_to_hash = dumps(values, sort_keys=True, encoding="utf-8", From b1b83925913136f82e1af710643aeeebaca086cc Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Thu, 2 Feb 2017 09:59:29 +0100 Subject: [PATCH 2/3] [FIX] sales_team, crm: expected closing On the CRM dashboard, the shortcut 'exp. closing' is the same than the 'overdue' shortcut. However, the number of opportunities in these categories is computed differently (see method `retrieve_sales_dashboard`). We introduce a new filter "Overdue Opportunities" which reflects this difference. Backport of 9d2f48dc7fa9d5de3e850ff7ac82d9b31cf188cd opw-704173 opw-751165 --- addons/crm/crm_lead_view.xml | 3 +++ addons/sales_team/static/src/js/sales_team_dashboard.js | 2 ++ addons/sales_team/static/src/xml/sales_team_dashboard.xml | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index f5deb670046..12dddbe0e62 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -633,6 +633,9 @@ ]"/> + - + exp. closing From 3e8ba4905ccd32ea4324b8baa46e6554ce84c7ac Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Thu, 13 Jul 2017 08:32:45 +0200 Subject: [PATCH 3/3] [FIX] crm: expected closing The "exp. closing" dashboard button takes into account the won opportunities. It shouldn't. Backport of 9d2f48dc7fa9d5de3e850ff7ac82d9b31cf188cd opw-751165 opw-744940 --- addons/crm/crm_lead.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 6fedd54890b..b8902cb736d 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -1147,7 +1147,7 @@ Update your business card, phone book, social media,... Send an email right now res['closing']['today'] += 1 if date_deadline >= date.today() and date_deadline <= date.today() + timedelta(days=7): res['closing']['next_7_days'] += 1 - if date_deadline < date.today(): + if date_deadline < date.today() and not opp['date_closed']: res['closing']['overdue'] += 1 # Next activities