diff options
| author | Indoteknik . <it@fixcomart.co.id> | 2025-08-08 15:11:35 +0700 |
|---|---|---|
| committer | Indoteknik . <it@fixcomart.co.id> | 2025-08-08 15:11:35 +0700 |
| commit | da1903796553ca0ee5195a7962521bc09b4b98a8 (patch) | |
| tree | 0fe68309a748a74e121c9f9c51cb4b047e7cd217 /indoteknik_custom/models/account_move.py | |
| parent | 7ebcf1675e55dae39f769466e5bf5ef064646f27 (diff) | |
| parent | 19067dfea850b289b47d70ab36628b796ae87265 (diff) | |
Merge branch 'odoo-backup' of https://bitbucket.org/altafixco/indoteknik-addons into reminder-tempo-v2
Diffstat (limited to 'indoteknik_custom/models/account_move.py')
| -rw-r--r-- | indoteknik_custom/models/account_move.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py index bf7e2d68..12978a2f 100644 --- a/indoteknik_custom/models/account_move.py +++ b/indoteknik_custom/models/account_move.py @@ -95,6 +95,14 @@ class AccountMove(models.Model): ) payment_date = fields.Date(string="Payment Date", compute='_compute_payment_date') + partial_payment = fields.Float(string="Partial Payment", compute='compute_partial_payment') + + def compute_partial_payment(self): + for move in self: + if move.amount_total_signed > 0 and move.amount_residual_signed > 0 and move.payment_state == 'partial': + move.partial_payment = move.amount_total_signed - move.amount_residual_signed + else: + move.partial_payment = 0 def _compute_payment_date(self): for move in self: |
