This question has been flagged
1 Reply
2353 Views

```

print('company_id',comp_id)

warehouse_id = self.env['stock.warehouse'].sudo().search([('company_id','=',comp_id)],limit=1).id            

print('warehouse_id',warehouse_id)

```

when i select on my own company it's give me correct value 

when i select other then my own company it's give me false value where i'm wrong ?


Avatar
Discard
Best Answer

Hi Usman,

Make sure other WH has other company set in the Company field.

I think all of your WHs have single company selected. Please double check that and set the other company and then it will work.

Avatar
Discard