[MERGE] forward port branch 9.0 up to 3e8ba4905c

This commit is contained in:
Christophe Simonis
2017-07-14 12:10:25 +02:00
5 changed files with 10 additions and 4 deletions
+1 -1
View File
@@ -1074,7 +1074,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
+3
View File
@@ -577,6 +577,9 @@
<filter string="Overdue Activities" name="overdue"
domain="[('date_action', '&lt;', context_today().strftime('%Y-%m-%d'))]"
help="Show all opportunities for which the next action date is before today"/>
<filter string="Overdue Opportunities" name="overdue_opp"
domain="[('date_deadline', '&lt;', context_today().strftime('%Y-%m-%d'))]"
help="Show all opportunities with a deadline for which the next action date is before today"/>
<separator/>
<filter string="Unread Messages" name="message_needaction" domain="[('message_needaction','=',True)]"/>
<filter string="Lost" domain="[('active', '=', False)]"/>
@@ -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",
@@ -65,6 +65,8 @@ var SalesTeamDashboardView = KanbanView.extend({
} else if (action_name === 'crm.action_your_pipeline') {
if (action_extra === 'overdue') {
additional_context['search_default_overdue'] = 1;
} else if (action_extra === 'overdue_opp') {
additional_context['search_default_overdue_opp'] = 1;
}
} else if (action_name === 'crm.crm_opportunity_report_action_graph') {
additional_context.search_default_won = 1;
@@ -84,7 +84,7 @@
</a>
</td>
<td t-if="show_demo or (values and values['closing']['overdue'] != 0)" class="o_warning" title="To Opportunities">
<a href="#" class="o_dashboard_action" name="crm.action_your_pipeline" data-extra="overdue">
<a href="#" class="o_dashboard_action" name="crm.action_your_pipeline" data-extra="overdue_opp">
<t t-if="!show_demo">
<t t-esc="values['closing']['overdue']"/> exp. closing
</t>