summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiqdad <ahmadmiqdad27@gmail.com>2025-07-03 11:44:57 +0700
committerMiqdad <ahmadmiqdad27@gmail.com>2025-07-03 11:44:57 +0700
commit90e26bd8d666503c2bb02608e3e5c26f15ab777b (patch)
tree2728989eb5cd61d40d119c080d861c0c04f6d6d7
parent4410e0c67fbf95c0663a953c14c241ffa5ddc470 (diff)
<miqdad> rev validation bu pick and prepare for tukar guling po
-rw-r--r--indoteknik_custom/models/tukar_guling.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/indoteknik_custom/models/tukar_guling.py b/indoteknik_custom/models/tukar_guling.py
index 42646fbf..20eb598d 100644
--- a/indoteknik_custom/models/tukar_guling.py
+++ b/indoteknik_custom/models/tukar_guling.py
@@ -12,9 +12,9 @@ class TukarGuling(models.Model):
_rec_name = 'name'
origin = fields.Char(string='Origin SO')
-
+ if_so = fields.Boolean('Is SO', default=True)
+ if_po = fields.Boolean('Is PO', default=False)
real_shipping_id = fields.Many2one('res.partner', string='Shipping Address')
-
picking_ids = fields.One2many(
'stock.picking',
'tukar_guling_id',
@@ -265,9 +265,9 @@ class TukarGuling(models.Model):
def action_submit(self):
self.ensure_one()
- picking = self.env['stock.picking']
+ picking = self.operations
if picking.picking_type_id.id == 29:
- if picking.picking_type_id.state != 'done':
+ if picking.state != 'done':
raise UserError("BU/OUT belum Done!")
elif picking.picking_type_id.id == 30:
linked_bu_out = picking.linked_manual_bu_out