[FIX] stock: chained location type `Customers` was not working at all for pickings without partner
This can create inconsistencies in the warehouse inventory in case delivery orders are not customer-specific, e.g. when using the POS. When there is no destination customer we can still use the default Customers locations. bzr revid: odo@openerp.com-20131107105302-hf8lublc1x3qc87h
This commit is contained in:
parent
f378aaa0a7
commit
05e067415d
|
@ -241,6 +241,9 @@ class stock_location(osv.osv):
|
|||
if location.chained_location_type == 'customer':
|
||||
if partner:
|
||||
result = partner.property_stock_customer
|
||||
else:
|
||||
loc_id = self.pool['res.partner'].default_get(cr, uid, ['property_stock_customer'], context=context)['property_stock_customer']
|
||||
result = self.pool['stock.location'].browse(cr, uid, loc_id, context=context)
|
||||
elif location.chained_location_type == 'fixed':
|
||||
result = location.chained_location_id
|
||||
if result:
|
||||
|
|
Loading…
Reference in New Issue