diff options
| author | HafidBuroiroh <hafidburoiroh09@gmail.com> | 2026-03-09 09:12:11 +0700 |
|---|---|---|
| committer | HafidBuroiroh <hafidburoiroh09@gmail.com> | 2026-03-09 09:12:11 +0700 |
| commit | d91af3da1edea3c6b8074726e5306ea42a7c0a4b (patch) | |
| tree | a6151be9861950b004851db6cc69159b3a101a93 /indoteknik_custom/models/refund_sale_order.py | |
| parent | f687d197ead268040d7f396eb26ea0035a6dac35 (diff) | |
| parent | a637972fca56a9f2e62636f7639cf27de033b248 (diff) | |
Merge branch 'odoo-backup' of https://bitbucket.org/altafixco/indoteknik-addons into CR/Sourcing-Job
Diffstat (limited to 'indoteknik_custom/models/refund_sale_order.py')
| -rw-r--r-- | indoteknik_custom/models/refund_sale_order.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/indoteknik_custom/models/refund_sale_order.py b/indoteknik_custom/models/refund_sale_order.py index 4c3ca52e..6acd0b59 100644 --- a/indoteknik_custom/models/refund_sale_order.py +++ b/indoteknik_custom/models/refund_sale_order.py @@ -680,6 +680,20 @@ class RefundSaleOrder(models.Model): ('journal_id', '=', 13), ('state', '=', 'posted'), ]) + if rec.sale_order_ids: + so_records = rec.sale_order_ids + so_names = so_records.mapped('name') + domain = [ + ('journal_id', '=', 13), + ('state', '=', 'posted'), + ('sale_id', '=', False), + ('ref', 'ilike', 'selisih'), + ] + domain += ['|'] * (len(so_names) - 1) + for name in so_names: + domain.append(('ref', 'ilike', name)) + + misc = self.env['account.move'].search(domain) moves_ongkir = self.env['account.move'] if rec.sale_order_ids: |
