From 1f18e4b71e15f5aa0e4ac268c2dbf5f1bdaf93ba Mon Sep 17 00:00:00 2001 From: Ignacio Cainelli Date: Fri, 21 Jul 2023 08:37:59 -0300 Subject: [PATCH] [FIX] l10n_latam_check: "check False" on entry Steps to reproduce this bug: 1- On a Bank type journal, set true the "Use electronic and deferred checks" field 2- Do a new vendor payment with Bank journal and Manual payment method 3- Corresponding journal entry shows "Check False delivered" --- addons/l10n_latam_check/models/account_payment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/l10n_latam_check/models/account_payment.py b/addons/l10n_latam_check/models/account_payment.py index e5d76a5377cf2..9c10607b02f11 100644 --- a/addons/l10n_latam_check/models/account_payment.py +++ b/addons/l10n_latam_check/models/account_payment.py @@ -273,7 +273,7 @@ def _get_trigger_fields_to_synchronize(self): def _prepare_move_line_default_vals(self, write_off_line_vals=None): """ Add check name and operation on liquidity line """ res = super()._prepare_move_line_default_vals(write_off_line_vals=write_off_line_vals) - check = self if (self.payment_method_line_id.code == 'new_third_party_checks' or self.l10n_latam_manual_checks) \ + check = self if (self.payment_method_line_id.code == 'new_third_party_checks' or (self.payment_method_line_id.code == 'check_printing' and self.l10n_latam_manual_checks)) \ else self.l10n_latam_check_id if check: document_name = (_('Check %s received') if self.payment_type == 'inbound' else _('Check %s delivered')) % (