diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2024-07-02 10:06:29 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2024-07-02 10:06:29 +0700 |
| commit | a10024fec206f68791c87a5a4e56e4c6bce28f5c (patch) | |
| tree | 627d0ca2443eecbcb44b1b4eeda98f94c9ea3496 /indoteknik_custom/models/manufacturing.py | |
| parent | 51c19eca13239fe20ae592f8e9ee0d23f8904c5f (diff) | |
| parent | f9c5b3dffcd71bfa9dea74c946d7b4277db66bd6 (diff) | |
Merge branch 'production' into feature/add_voucher_pastihemat_productsolr
Diffstat (limited to 'indoteknik_custom/models/manufacturing.py')
| -rw-r--r-- | indoteknik_custom/models/manufacturing.py | 4 |
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') |
