Skip to content
Snippets Groups Projects
Commit 4b881950 authored by Uriel Mayo's avatar Uriel Mayo
Browse files

Merge branch 'JS-352' into '7.0-stage'

[IMP][JS-352] location availabilty search based on warehouse

See merge request !220
parents a86901b8 75aecd97
Branches 7.0-stage
No related tags found
1 merge request!220[IMP][JS-352] location availabilty search based on warehouse
......@@ -38,6 +38,22 @@ class stock_location(osv.osv):
'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse')
}
def _product_reserve(self, cr, uid, ids, product_id, product_qty,
context=None, lock=False):
location_id = ids and ids[0] or False
loc_warehouse = self.browse(cr, uid, location_id).warehouse_id
# We extract every location with the same warehouse as the move location
if loc_warehouse:
warehouse_locations_ids = self.search(
cr, uid, [('warehouse_id', '=', loc_warehouse.id)]
)
ids = warehouse_locations_ids or ids
return super(stock_location, self)._product_reserve(
cr, uid, ids, product_id,
product_qty, context=None, lock=False
)
class split_in_production_lot(osv.osv_memory):
_name = "stock.move.split"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment