diff options
| author | Miqdad <ahmadmiqdad27@gmail.com> | 2025-09-18 17:19:55 +0700 |
|---|---|---|
| committer | Miqdad <ahmadmiqdad27@gmail.com> | 2025-09-18 17:19:55 +0700 |
| commit | b07468846b95803f21b81191013651fac2d9adb4 (patch) | |
| tree | 8299d6a9259d84b06c9b03e53485e86035eaa6bf | |
| parent | 675499a48ae64183ed494bb907047151d934e6b2 (diff) | |
<Miqdad> Fix bug cannot open vcm
| -rw-r--r-- | indoteknik_custom/models/tukar_guling_po.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/indoteknik_custom/models/tukar_guling_po.py b/indoteknik_custom/models/tukar_guling_po.py index f61b3828..2a5ca3dd 100644 --- a/indoteknik_custom/models/tukar_guling_po.py +++ b/indoteknik_custom/models/tukar_guling_po.py @@ -353,18 +353,18 @@ class TukarGulingPO(models.Model): # self._check_bill_on_retur_po() tipe = vals.get('return_type', self.return_type) - if self.operations and self.operations.picking_type_id.id == 28 and tipe == 'tukar_guling': - group = self.operations.group_id - if group: - # Cari BU/PUT dalam group yang sama - bu_put = self.env['stock.picking'].search([ - ('group_id', '=', group.id), - ('picking_type_id.id', '=', 75), # 75 = ID BU/PUT - ('state', '=', 'done') - ], limit=1) - - if bu_put: - raise UserError("❌ Tidak bisa retur BU/INPUT karena BU/PUT sudah Done!") + # if self.operations and self.operations.picking_type_id.id == 28 and tipe == 'tukar_guling': + # group = self.operations.group_id + # if group: + # # Cari BU/PUT dalam group yang sama + # bu_put = self.env['stock.picking'].search([ + # ('group_id', '=', group.id), + # ('picking_type_id.id', '=', 75), # 75 = ID BU/PUT + # ('state', '=', 'done') + # ], limit=1) + # + # if bu_put: + # raise UserError("❌ Tidak bisa retur BU/INPUT karena BU/PUT sudah Done!") if self.operations.picking_type_id.id == 28 and tipe == 'tukar_guling': raise UserError("❌ BU/INPUT tidak boleh di retur tukar guling") |
