diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2025-09-25 06:32:13 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2025-09-25 06:32:13 +0000 |
| commit | 75a09b95bfb2bc93d81030c4cc1a0ffda6b6899f (patch) | |
| tree | e8593189116e3d5f30bc44df62f2240ed1bb065b | |
| parent | 49aac1b287d6aaa389d7b9c17f60841e2294f4dd (diff) | |
| parent | 88a5f39629ac6f5700af27a8144dd3a761e5aa41 (diff) | |
Merged in refund_system (pull request #434)
<hafid> refund
| -rw-r--r-- | indoteknik_custom/models/refund_sale_order.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/indoteknik_custom/models/refund_sale_order.py b/indoteknik_custom/models/refund_sale_order.py index f4711faf..eca781e2 100644 --- a/indoteknik_custom/models/refund_sale_order.py +++ b/indoteknik_custom/models/refund_sale_order.py @@ -542,11 +542,14 @@ class RefundSaleOrder(models.Model): ('state', '=', 'posted'), ]) - misc = self.env['account.move'].search([ - ('ref', 'ilike', invoice_ids.mapped('name')[0]), - ('journal_id', '=', 13), - ('state', '=', 'posted'), - ]) + misc = self.env['account.move'] + if invoice_ids: + invoice_name = invoice_ids.mapped('name')[0] + misc = self.env['account.move'].search([ + ('ref', 'ilike', invoice_name), + ('journal_id', '=', 13), + ('state', '=', 'posted'), + ]) all_moves = moves | piutangbca | piutangmdr | misc |
