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 | |
| parent | 865900d364f3a97586c19290ae458e655ea7f592 (diff) | |
<miqdad> push
| -rw-r--r-- | indoteknik_custom/models/tukar_guling.py | 5 | ||||
| -rw-r--r-- | indoteknik_custom/views/ir_sequence.xml | 11 |
2 files changed, 12 insertions, 4 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, }) diff --git a/indoteknik_custom/views/ir_sequence.xml b/indoteknik_custom/views/ir_sequence.xml index bfee0fd4..934e9100 100644 --- a/indoteknik_custom/views/ir_sequence.xml +++ b/indoteknik_custom/views/ir_sequence.xml @@ -161,13 +161,20 @@ <field name="number_increment">1</field> </record> <record id="seq_tukar_guling" model="ir.sequence"> - <field name="name">Pengajuan Return SO</field> + <field name="name">Pengajuan Retur Tukar Guling SO</field> <field name="code">tukar.guling</field> <field name="prefix">PTG/</field> <field name="padding">5</field> <field name="number_next">1</field> <field name="number_increment">1</field> - <field name="company_id" eval="False"/> </record> + <record id="seq_tukar_guling_prs" model="ir.sequence"> + <field name="name">Pengajuan Retur Revisi SO (PRS)</field> + <field name="code">tukar.guling.prs</field> + <field name="prefix">PRS-</field> + <field name="padding">5</field> + <field name="number_next">1</field> + <field name="number_increment">1</field> + </record> </data> </odoo>
\ No newline at end of file |
