summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/sale_order.py
diff options
context:
space:
mode:
authorMqdd <ahmadmiqdad27@gmail.com>2025-12-12 08:55:41 +0700
committerMqdd <ahmadmiqdad27@gmail.com>2025-12-12 08:55:41 +0700
commitb0037dfee3eb9c9a03de185dde9e46df95ea3cb9 (patch)
tree4c1825759952f420030cf89adec04f41382d361c /indoteknik_custom/models/sale_order.py
parentda5617f49ec011c80d4ce6b04ce025f18151e575 (diff)
parentfcdb961c42b32887b51c349242ba47312b7110e3 (diff)
Merge branch 'odoo-backup' of https://bitbucket.org/altafixco/indoteknik-addons into odoo-backup
merge
Diffstat (limited to 'indoteknik_custom/models/sale_order.py')
-rwxr-xr-xindoteknik_custom/models/sale_order.py24
1 files changed, 14 insertions, 10 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index 9ef9ce9a..17691798 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -3445,16 +3445,20 @@ class SaleOrder(models.Model):
('journal_id', '=', 11),
('state', '=', 'posted'),
])
- piutangbca = self.env['account.move'].search([
- ('ref', 'in', invoice_ids.mapped('name')),
- ('journal_id', '=', 4),
- ('state', '=', 'posted'),
- ])
- piutangmdr = self.env['account.move'].search([
- ('ref', 'in', invoice_ids.mapped('name')),
- ('journal_id', '=', 7),
- ('state', '=', 'posted'),
- ])
+ piutangbca = self.env['account.move']
+ piutangmdr = self.env['account.move']
+
+ for inv_name in invoice_ids.mapped('name'):
+ piutangbca |= self.env['account.move'].search([
+ ('ref', 'ilike', inv_name),
+ ('journal_id', '=', 4),
+ ('state', '=', 'posted'),
+ ])
+ piutangmdr |= self.env['account.move'].search([
+ ('ref', 'ilike', inv_name),
+ ('journal_id', '=', 7),
+ ('state', '=', 'posted'),
+ ])
moves2 = self.env['account.move'].search([
('ref', 'ilike', self.name),