[FIX] stock: prevent crash when trying to mark as done when it involves multiple pickings
closes odoo/odoo#107008 X-original-commit: 8e4b9b9f1511096ce4a3ccd6f13044ce621c4b0b Signed-off-by: Tiffany Chang <tic@odoo.com>
This commit is contained in:
@@ -1075,7 +1075,7 @@ class Picking(models.Model):
|
||||
lines = self.move_ids.filtered(lambda m: m.product_id.type == 'product' and m.state != 'cancel' and m.quantity_done and not m.move_dest_ids)
|
||||
if lines:
|
||||
# don't show reception report if all already assigned/nothing to assign
|
||||
wh_location_ids = self.env['stock.location']._search([('id', 'child_of', self.picking_type_id.warehouse_id.view_location_id.id), ('usage', '!=', 'supplier')])
|
||||
wh_location_ids = self.env['stock.location']._search([('id', 'child_of', self.picking_type_id.warehouse_id.view_location_id.ids), ('usage', '!=', 'supplier')])
|
||||
if self.env['stock.move'].search([
|
||||
('state', 'in', ['confirmed', 'partially_available', 'waiting', 'assigned']),
|
||||
('product_qty', '>', 0),
|
||||
|
||||
Reference in New Issue
Block a user