Skip to content

Commit

Permalink
Merge pull request #203 from andrp92/account_check_printing_report_base
Browse files Browse the repository at this point in the history
[FIX][ACPRB] fix issue that won't allow multiple payments to be posted…
  • Loading branch information
pedrobaeza committed Dec 5, 2018
2 parents 75702bb + 8257edc commit 1ce8360
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions account_check_printing_report_base/models/account_payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ def do_print_checks(self):
@api.multi
def post(self):
res = super(AccountPayment, self).post()
if (self.journal_id.check_print_auto and
self.payment_method_id.code == 'check_printing'):
return self.do_print_checks()
recs = self.filtered(
lambda x: x.journal_id.check_print_auto
and x.payment_method_id.code == 'check_printing')
if recs:
return recs.do_print_checks()
return res

0 comments on commit 1ce8360

Please sign in to comment.