Commit 643e093a4bc9d46973705831697036b56a89b143 adds a security on orderpoints triggering purchase orders. But this new check fails in case the picking type on the purchase order is not linked to a warehouse (e.g in a subcontracting flow). This commit ensure the check is done only if we have a warehouse linked to the purchase order. closes odoo/odoo#75619 Opw: 2631979 X-original-commit: 8343ce44d72c77f56937e1694606dc718497fbb8 Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>