summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2025-04-28 08:25:52 +0000
committerIT Fixcomart <it@fixcomart.co.id>2025-04-28 08:25:52 +0000
commit0a714ce0ab6f7a8731bdab253164d06d8cdc5d5e (patch)
tree9a96c449584d25bc63c39763ec7f0f1b1d77e988
parentbac1744ce4e27d796fd2b52f5fbcd3d5cdabdc75 (diff)
parentf2579dfcf01ab1687deb7221b50129fadb95d671 (diff)
Merged in bom-afp (pull request #284)
Bom afp
-rw-r--r--indoteknik_custom/models/manufacturing.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/indoteknik_custom/models/manufacturing.py b/indoteknik_custom/models/manufacturing.py
index 24a8b8c3..715d8513 100644
--- a/indoteknik_custom/models/manufacturing.py
+++ b/indoteknik_custom/models/manufacturing.py
@@ -26,6 +26,13 @@ class Manufacturing(models.Model):
# Check product category
if self.product_id.categ_id.name != 'Finish Good':
raise UserError('Tidak bisa di complete karna product category bukan Unit / Finish Good')
+
+ if self.sale_order and self.sale_order.state != 'sale':
+ raise UserError(
+ ('Tidak bisa Mark as Done.\nSales Order "%s" (Nomor: %s) belum dikonfirmasi.')
+ % (self.sale_order.partner_id.name, self.sale_order.name)
+ )
+
for line in self.move_raw_ids:
# if line.quantity_done > 0 and line.quantity_done != self.product_uom_qty:
# raise UserError('Qty Consume per Line tidak sama dengan Qty to Produce')