summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/manufacturing.py
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2024-06-26 15:54:06 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2024-06-26 15:54:06 +0700
commit526c80302b26fc2d7a0ab362966bd55bef53d12f (patch)
treeb1920c963277e229905430f9fd68aaff23040838 /indoteknik_custom/models/manufacturing.py
parentde28ec85c504b10098abdf53cfebebef68aaf626 (diff)
parentc790750afd36ed86772477bce9307b16689910c4 (diff)
Merge branch 'production' of bitbucket.org:altafixco/indoteknik-addons into production
Diffstat (limited to 'indoteknik_custom/models/manufacturing.py')
-rw-r--r--indoteknik_custom/models/manufacturing.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/indoteknik_custom/models/manufacturing.py b/indoteknik_custom/models/manufacturing.py
index 2455a117..37c4e909 100644
--- a/indoteknik_custom/models/manufacturing.py
+++ b/indoteknik_custom/models/manufacturing.py
@@ -23,7 +23,9 @@ class Manufacturing(models.Model):
def button_mark_done(self):
if self._name != 'mrp.production':
return super(Manufacturing, self).button_mark_done()
-
+ # 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')
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')