Skip to content

Commit

Permalink
[IMP] add inherit off method _get_payment_difences
Browse files Browse the repository at this point in the history
  • Loading branch information
maq-adhoc committed Apr 19, 2024
1 parent 8d1e7bc commit a1ed54c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions l10n_ar_withholding_ux/models/account_payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ def _get_withholding_move_line_default_values(self):
'currency_id': self.currency_id.id,
}

def _get_payment_difence(self):
payment_difence = super()._get_payment_difence()
payment_difence -= sum(self.l10n_ar_withholding_line_ids.mapped('amount'))
return payment_difence

@api.depends('l10n_ar_withholding_line_ids.amount')
def _compute_payment_total(self):
super()._compute_payment_total()
Expand Down

0 comments on commit a1ed54c

Please sign in to comment.