diff options
| author | Miqdad <ahmadmiqdad27@gmail.com> | 2025-06-19 14:49:03 +0700 |
|---|---|---|
| committer | Miqdad <ahmadmiqdad27@gmail.com> | 2025-06-19 14:49:03 +0700 |
| commit | bb8d3f325228936acaad5f8cbdac555fc289b854 (patch) | |
| tree | 8715973c5ea1834308e742538cfb0cc2f81c6a05 /indoteknik_custom/models | |
| parent | 865900d364f3a97586c19290ae458e655ea7f592 (diff) | |
<miqdad> push
Diffstat (limited to 'indoteknik_custom/models')
| -rw-r--r-- | indoteknik_custom/models/tukar_guling.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/indoteknik_custom/models/tukar_guling.py b/indoteknik_custom/models/tukar_guling.py index 7bcf5e80..fe0d6ab0 100644 --- a/indoteknik_custom/models/tukar_guling.py +++ b/indoteknik_custom/models/tukar_guling.py @@ -202,6 +202,7 @@ class TukarGuling(models.Model): line.sequence = (i + 1) * 10 return new_record + def write(self, vals): if 'operations' in vals and not vals.get('origin'): picking = self.env['stock.picking'].browse(vals['operations']) @@ -279,7 +280,7 @@ class TukarGuling(models.Model): if not origin_so: raise UserError("BU/OUT tidak memiliki origin (SO), tidak bisa cari BU/PICK.") - # Cari DO dari SO + # Cari DO (deliv order (bu/out)) dari SO get_group_id = self.env['stock.picking'].search([ ('origin', '=', origin_so), ], limit=1) @@ -373,7 +374,7 @@ class TukarGuling(models.Model): 'picking_id': ort_picking.id, 'product_id': line.product_id.id, 'product_uom_id': line.product_uom.id, - 'qty_done': line.product_uom_qty, # Ambil dari return.picking.line.quantity + 'qty_done': line.product_uom_qty, 'location_id': location_customer.id, 'location_dest_id': location_dest_id, }) |
