Skip to content

Commit

Permalink
[FIX] account_banking_ach_discount
Browse files Browse the repository at this point in the history
  • Loading branch information
murtuzasaleh committed Mar 2, 2022
1 parent 5fbcc95 commit be607a9
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions account_banking_ach_discount/models/bank_payment_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ def _compute_discount_amount(self):
discount_amount = sum(bline.mapped("payment_line_ids.discount_amount"))
bline.discount_amount = discount_amount

def reconcile(self):
self.ensure_one()
amlo = self.env["account.move.line"]
transit_mlines = amlo.search([("bank_payment_line_id", "=", self.id)])
for line in transit_mlines:
ap_mlines = line.move_id.line_ids.filtered(
lambda x: x.account_id == line.account_id
)
lines_to_rec = line
lines_to_rec += ap_mlines
lines_to_rec.reconcile()
# def reconcile(self):
# self.ensure_one()
# amlo = self.env["account.move.line"]
# transit_mlines = amlo.search([("bank_payment_line_id", "=", self.id)])
# for line in transit_mlines:
# ap_mlines = line.move_id.line_ids.filtered(
# lambda x: x.account_id == line.account_id
# )
# lines_to_rec = line
# lines_to_rec += ap_mlines
# lines_to_rec.reconcile()

0 comments on commit be607a9

Please sign in to comment.