diff options
| author | Indoteknik . <it@fixcomart.co.id> | 2025-05-16 11:29:04 +0700 |
|---|---|---|
| committer | Indoteknik . <it@fixcomart.co.id> | 2025-05-16 11:29:04 +0700 |
| commit | 05305c6bf12da58cfadac7f1a901ef825d09cb61 (patch) | |
| tree | 7f6f28397b4ad871131f7f28ea698117bcf1fe0f /indoteknik_custom/models/mrp_production.py | |
| parent | c61cb9fcd3d01b4ffafaa6446f9fd68b09a88ff7 (diff) | |
| parent | 4360e1fd9f3af2c18b19463773047d9939716069 (diff) | |
(andri) resolved confict di SO view
Diffstat (limited to 'indoteknik_custom/models/mrp_production.py')
| -rw-r--r-- | indoteknik_custom/models/mrp_production.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/indoteknik_custom/models/mrp_production.py b/indoteknik_custom/models/mrp_production.py index 8179fe56..58c2512c 100644 --- a/indoteknik_custom/models/mrp_production.py +++ b/indoteknik_custom/models/mrp_production.py @@ -244,6 +244,10 @@ class CheckBomProduct(models.Model): @api.constrains('production_id', 'product_id') def _check_product_bom_validation(self): for record in self: + if record.production_id.sale_order.state not in ['sale', 'done']: + raise UserError(( + "SO harus diconfirm terlebih dahulu." + )) if not record.production_id or not record.product_id: continue |
