Before checking the first element of 'partner_id.child_ids', rather check that the partner and not the object has children, to avoid crashes when the partner of the PO is a company. opw-1826359
Before checking the first element of 'partner_id.child_ids', rather check that the partner and not the object has children, to avoid crashes when the partner of the PO is a company. opw-1826359