Skip to content

Commit

Permalink
Corrigido quando existe mais de um item
Browse files Browse the repository at this point in the history
  • Loading branch information
danimaribeiro committed Nov 10, 2023
1 parent 26452a5 commit f1e44fb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions l10n_br_account/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,11 @@ def _compute_payment_date(self):
for line in self:
if line.full_reconcile_id:
# Get the corresponding move line payment date
matched_line = line.full_reconcile_id.reconciled_line_ids.filtered(lambda x: x.payment_id)
line.payment_date = matched_line.date
matched_line = line.full_reconcile_id.reconciled_line_ids.filtered(lambda x: x.payment_id).sorted(lambda x: x.date)
if matched_line:
line.payment_date = matched_line[0].date
else:
line.payment_date = False
else:
line.payment_date = False

Expand Down

0 comments on commit f1e44fb

Please sign in to comment.