Skip to content

Commit 8e4d64c

Browse files
committed
Merge PR #3763 into 14.0
Signed-off-by rvalyi
2 parents 3887181 + 77593a9 commit 8e4d64c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

l10n_br_account_payment_brcobranca/models/account_move.py

+13
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,19 @@ def _post(self, soft=True):
110110

111111
# Conciliação Automatica entre a Linha da Fatura e a Linha criada
112112
if self.journal_id.return_auto_reconcile:
113+
if line_to_reconcile.reconciled:
114+
raise UserError(
115+
_(
116+
"The invoice line %(name)s is already reconciled.\n\n"
117+
"Invoice: %(invoice)s\n"
118+
"Account: %(account)s\n"
119+
"Detailed line ID: %(aml)s\n",
120+
name=line_to_reconcile.name,
121+
invoice=line_to_reconcile.move_id.name,
122+
aml=line_to_reconcile,
123+
account=line_to_reconcile.account_id.name,
124+
),
125+
)
113126
if line_to_reconcile:
114127
(line + line_to_reconcile).reconcile()
115128
line_to_reconcile.cnab_state = "done"

0 commit comments

Comments
 (0)