Help

2

Return False value When Select Other Company using multi-company odoo 12cc

Avatar
Usman

```

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 ?


アバター
Discard
1 回答
4

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.

アバター
Discard