diff options
| author | Laurent Smet <las@odoo.com> | 2020-06-30 11:44:45 +0000 |
|---|---|---|
| committer | Laurent Smet <las@odoo.com> | 2020-07-02 10:11:45 +0000 |
| commit | 2cb73e920bb9df4a5bc3c23abdec1b46453c3055 (patch) | |
| tree | dbc54b888dbb0056fbbb6e55ba5f5e42ed2bf4f5 /addons/account_check_printing/wizard | |
| parent | b9fad2c3157aa0f5bd04d235f7f20ab54fbc09bc (diff) | |
[FIX] account_check_printing: Fix traceback when printing check
'payment_state'='sent' has been replaced by the 'is_move_sent' field.
closes odoo/odoo#53964
X-original-commit: 948be4230650858a9fc08ae22e32ff82bfadfd3e
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Diffstat (limited to 'addons/account_check_printing/wizard')
| -rw-r--r-- | addons/account_check_printing/wizard/print_prenumbered_checks.py | 2 |
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 |
