diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2023-01-16 11:43:41 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2023-01-16 11:43:41 +0700 |
| commit | 4cec68ef40a33071d949c33c1592c146779f1abe (patch) | |
| tree | f3715f3eb91fed73777da1126c05915bacd60e0e /indoteknik_custom/models/stock_picking.py | |
| parent | b734cf901978f1fda1afd45dd654659b7f7a2971 (diff) | |
add delivered validation system parameter and add sequence for new product template scheduler
Diffstat (limited to 'indoteknik_custom/models/stock_picking.py')
| -rw-r--r-- | indoteknik_custom/models/stock_picking.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py index 84a374c5..d19214d2 100644 --- a/indoteknik_custom/models/stock_picking.py +++ b/indoteknik_custom/models/stock_picking.py @@ -145,8 +145,10 @@ class StockPicking(models.Model): continue raise UserError('Sudah pernah dikirim kalender') + is_delivered_validation = self.env['ir.config_parameter'].get_param( + 'stock_picking.qty_delivered_validation') for line in self.move_line_ids_without_package: - if line.move_id.sale_line_id and self.picking_type_id.code == 'outgoing': + if line.move_id.sale_line_id and self.picking_type_id.code == 'outgoing' and is_delivered_validation == 'Y': if line.move_id.sale_line_id.qty_delivered + line.qty_done > line.move_id.sale_line_id.product_uom_qty: raise UserError("Qty Delivered akan lebih dari Qty SO") |
