Skip to content

Commit

Permalink
[IMP]account_payment_group:order imputed invoices by date maturity on…
Browse files Browse the repository at this point in the history
… receipts

Ticket: 51784
X-original-commit: 2e34da2
  • Loading branch information
Pablo Montenegro authored and pablohmontenegro committed Nov 24, 2022
1 parent 4c53b58 commit b5eae9d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions account_payment_group/models/account_payment_group.py
Expand Up @@ -319,8 +319,16 @@ def _compute_matched_move_line_ids(self):
al revz (debit_move_id vs credit_move_id)
"""
for rec in self:
<<<<<<< HEAD
payment_lines = rec.payment_ids.mapped('line_ids').filtered(lambda x: x.account_internal_type in ['receivable', 'payable'])
rec.matched_move_line_ids = (payment_lines.mapped('matched_debit_ids.debit_move_id') | payment_lines.mapped('matched_credit_ids.credit_move_id')) - payment_lines
||||||| parent of 35ceee8a... temp
payment_lines = rec.payment_ids.mapped('move_line_ids').filtered(lambda x: x.account_internal_type in ['receivable', 'payable'])
rec.matched_move_line_ids = (payment_lines.mapped('matched_debit_ids.debit_move_id') | payment_lines.mapped('matched_credit_ids.credit_move_id')) - payment_lines
=======
payment_lines = rec.payment_ids.mapped('move_line_ids').filtered(lambda x: x.account_internal_type in ['receivable', 'payable'])
rec.matched_move_line_ids = (payment_lines.mapped('matched_debit_ids.debit_move_id').sorted(key=lambda x: x.date_maturity) | payment_lines.mapped('matched_credit_ids.credit_move_id')).sorted(key=lambda x: x.date_maturity) - payment_lines
>>>>>>> 35ceee8a... temp

@api.depends('payment_ids.line_ids')
def _compute_move_lines(self):
Expand Down

0 comments on commit b5eae9d

Please sign in to comment.