diff options
| -rw-r--r-- | indoteknik_custom/models/stock_picking.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py index 0c810ef7..f6a21698 100644 --- a/indoteknik_custom/models/stock_picking.py +++ b/indoteknik_custom/models/stock_picking.py @@ -286,10 +286,10 @@ class StockPicking(models.Model): for line in self.move_line_ids_without_package: quant = self.env['stock.quant'].search([ ('product_id', '=', line.product_id.id), - ('location_id', '=', bu_location_id) + ('location_id', '=', bu_location_id), ]) - if quant and quant.inventory_quantity < line.product_uom_qty: + if self.sale_id and quant and quant.inventory_quantity < line.product_uom_qty: raise UserError('Quantity reserved lebih besar dari quantity onhand di product') def button_validate(self): |
