Skip to content

Commit

Permalink
Preventing stacking memo
Browse files Browse the repository at this point in the history
  • Loading branch information
vprime committed Jun 9, 2017
1 parent bb057a9 commit 848fd0b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions account_payment_batch_process/wizard/invoice_batch_process.py
Expand Up @@ -194,7 +194,6 @@ def make_payments(self):
# Make group data either for Customers or Vendors
context = dict(self._context or {})
data = {}
memo = self.communication or ' '
if self.is_customer:
context.update({'is_customer': True})
if self.total_customer_pay_amount != self.cheque_amount:
Expand All @@ -208,9 +207,10 @@ def make_payments(self):
if partner_id in data:
old_total = data[partner_id]['total']
# Build memo value
if memo:
memo = data[partner_id]['memo'] + ' : ' + memo +\
'-' + str(paym.invoice_id.number)
if self.communication:
memo = data[partner_id]['memo'] + ' : ' +\
self.communication + '-' +\
str(paym.invoice_id.number)
else:
memo = data[partner_id]['memo'] + ' : ' +\
str(paym.invoice_id.number)
Expand Down

0 comments on commit 848fd0b

Please sign in to comment.