diff options
| author | Mqdd <ahmadmiqdad27@gmail.com> | 2026-03-07 10:14:13 +0700 |
|---|---|---|
| committer | Mqdd <ahmadmiqdad27@gmail.com> | 2026-03-07 10:14:13 +0700 |
| commit | cba2b93c0a6e807c3b3a5037f2a18677eb80c760 (patch) | |
| tree | 8d1b2e0a65183b0863e3e9d9e0f7f4fa287e941f | |
| parent | ff474f82cd53d2fd6443fb38018e698186c1123e (diff) | |
| parent | e8a5f723ce78316c475b49e368b509394b029a86 (diff) | |
Merge branch 'odoo-backup' of bitbucket.org:altafixco/indoteknik-addons into odoo-backup
merge
| -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: |
