summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/manufacturing.py
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-06-26 10:23:48 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-06-26 10:23:48 +0700
commitfcc629d93b0da863bcdab2fad0812deeee5da6b2 (patch)
tree9dd8b3ffbd7ca681af0f02bf0222d98b08b3726b /indoteknik_custom/models/manufacturing.py
parentac01fa257abf2f12588d240689c42f0d12da644f (diff)
<iman> add tax validation & product category
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')