[FIX] stock: Making inventory adjustments in multi companies
With Company A (Warehouse Wa) and Company B (Warehouse Wb) When making inventory adjustments for Warehouse Wb in company A, the inventory lines displayed must only be the lines of the company A in the Wb. In this way, the user avoids confusion with the adjustments he is creating. opw:697182
This commit is contained in:
@@ -3087,6 +3087,9 @@ class stock_inventory(osv.osv):
|
||||
location_ids = location_obj.search(cr, uid, [('id', 'child_of', [inventory.location_id.id])], context=context)
|
||||
domain = ' location_id in %s'
|
||||
args = (tuple(location_ids),)
|
||||
if inventory.company_id.id:
|
||||
domain += ' and company_id = %s'
|
||||
args += (inventory.company_id.id,)
|
||||
if inventory.partner_id:
|
||||
domain += ' and owner_id = %s'
|
||||
args += (inventory.partner_id.id,)
|
||||
|
||||
Reference in New Issue
Block a user