mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[FIX] stock_quant_manual_assign: Search in all child locations
This commit is contained in:
committed by
Cyril Gaudin
parent
f860c72e27
commit
a782609367
@@ -55,13 +55,14 @@ class AssignManualQuants(models.TransientModel):
|
||||
def default_get(self, var_fields):
|
||||
super(AssignManualQuants, self).default_get(var_fields)
|
||||
move = self.env['stock.move'].browse(self.env.context['active_id'])
|
||||
available_quants = self.env['stock.quant'].search(
|
||||
['|', ('location_id', '=', move.location_id.id),
|
||||
('location_id', 'in', move.location_id.child_ids.ids),
|
||||
('product_id', '=', move.product_id.id),
|
||||
('qty', '>', 0),
|
||||
'|', ('reservation_id', '=', False),
|
||||
('reservation_id', '=', move.id)])
|
||||
available_quants = self.env['stock.quant'].search([
|
||||
('location_id', 'child_of', move.location_id.id),
|
||||
('product_id', '=', move.product_id.id),
|
||||
('qty', '>', 0),
|
||||
'|',
|
||||
('reservation_id', '=', False),
|
||||
('reservation_id', '=', move.id)
|
||||
])
|
||||
quants_lines = [{
|
||||
'quant': x.id,
|
||||
'lot_id': x.lot_id.id,
|
||||
|
||||
Reference in New Issue
Block a user