summaryrefslogtreecommitdiff
path: root/addons/account_check_printing
diff options
context:
space:
mode:
Diffstat (limited to 'addons/account_check_printing')
-rw-r--r--addons/account_check_printing/wizard/print_prenumbered_checks.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/account_check_printing/wizard/print_prenumbered_checks.py b/addons/account_check_printing/wizard/print_prenumbered_checks.py
index abbda0c7f6d..416ab4a1a11 100644
--- a/addons/account_check_printing/wizard/print_prenumbered_checks.py
+++ b/addons/account_check_printing/wizard/print_prenumbered_checks.py
@@ -22,7 +22,7 @@ class PrintPreNumberedChecks(models.TransientModel):
check_number = int(self.next_check_number)
payments = self.env['account.payment'].browse(self.env.context['payment_ids'])
payments.filtered(lambda r: r.state == 'draft').action_post()
- payments.filtered(lambda r: r.state not in ('sent', 'cancelled')).write({'state': 'sent'})
+ payments.filtered(lambda r: r.state == 'posted' and not r.is_move_sent).write({'is_move_sent': True})
for payment in payments:
payment.check_number = check_number
check_number += 1