diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2025-05-23 02:11:28 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2025-05-23 02:11:28 +0000 |
| commit | 957004adc73e524667800457f3db9fb6793edeac (patch) | |
| tree | 1824b9ee589f2b54657ab75f539b2f7d02224e7c /indoteknik_custom/models/manufacturing.py | |
| parent | 92b6da28414fed56732f86e1f04ea2fac3464d7d (diff) | |
| parent | 558130bbf48c33ddfa6080450c80bc8801a570f0 (diff) | |
Merged in CR/form-merchant (pull request #310)odoo-production
odoo quotation view & merchant view
Diffstat (limited to 'indoteknik_custom/models/manufacturing.py')
| -rw-r--r-- | indoteknik_custom/models/manufacturing.py | 7 |
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') |
