diff options
| author | Miqdad <ahmadmiqdad27@gmail.com> | 2025-09-12 10:44:22 +0700 |
|---|---|---|
| committer | Miqdad <ahmadmiqdad27@gmail.com> | 2025-09-12 10:44:22 +0700 |
| commit | c0ea809f621f07727a2e3bf54952818992553ea2 (patch) | |
| tree | ffe9c9923aa8213f1f40c84dd4852a398363f9e6 | |
| parent | 73d249fd48d0aeae8ac77946f07668210e12ae7b (diff) | |
<miqdad> Fix duplicate ORT
| -rw-r--r-- | indoteknik_custom/models/tukar_guling.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indoteknik_custom/models/tukar_guling.py b/indoteknik_custom/models/tukar_guling.py index 6e839bf0..d718ba0f 100644 --- a/indoteknik_custom/models/tukar_guling.py +++ b/indoteknik_custom/models/tukar_guling.py @@ -710,7 +710,7 @@ class TukarGuling(models.Model): ### ======== SRT dari BU/OUT ========= srt_return_lines = [] - if mapping_koli: + if mapping_koli and record.operations.picking_type_id.id == 29: for prod in mapping_koli.mapped('product_id'): qty_total = sum(mk.qty_return for mk in mapping_koli.filtered(lambda m: m.product_id == prod)) move = bu_out.move_lines.filtered(lambda m: m.product_id == prod) @@ -723,7 +723,7 @@ class TukarGuling(models.Model): })) _logger.info(f"📟 SRT line: {prod.display_name} | qty={qty_total}") - elif not mapping_koli: + elif not mapping_koli and record.operations.picking_type_id.id == 29: for line in record.line_ids: move = bu_out.move_lines.filtered(lambda m: m.product_id == line.product_id) if not move: |
