Skip to content

Commit

Permalink
[REF] Payment Returned on move line
Browse files Browse the repository at this point in the history
  • Loading branch information
qgroulard committed Feb 7, 2020
1 parent df567a2 commit 6473e58
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 4 additions & 0 deletions account_payment_return/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ class AccountMoveLine(models.Model):
column1='move_line_id',
column2='partial_reconcile_id',
)

@api.multi
def _payment_returned(self, return_line):
self.mapped('invoice_id')._payment_returned(return_line)
4 changes: 1 addition & 3 deletions account_payment_return/models/payment_return.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,7 @@ def action_confirm(self):
# returned_moves: debit on customer account (from invoice move)
returned_moves = move_line.matched_debit_ids.mapped(
'debit_move_id')
returned_moves.mapped('invoice_id')._payment_returned(
return_line
)
returned_moves._payment_returned(return_line)
all_move_lines |= move_line
move_line.remove_move_reconcile()
(move_line | move_line2).reconcile()
Expand Down

0 comments on commit 6473e58

Please sign in to comment.