Hi all. Like the title, I am wondering how I can get delivery orders from stock.picking based on the warehouse_id in Odoo 12. My code is currently like this:
delivery_orders = self.env['stock.picking'].search(['&', ('state', '=', 'assigned'), ('warehouse_id', '=', warehouse_id)]).mapped('id')
But of course it does not work because there is no warehouse_id field in stock.picking. If anyone knows the answer, please let me know and many thanks in advance.
Thanks a lot