FROM `ps_product` a
LEFT JOIN `ps_product_lang` b ON (b.`id_product` = a.`id_product`)
LEFT JOIN `ps_manufacturer` m ON (a.id_manufacturer = m.id_manufacturer)
LEFT JOIN `ps_product_attribute` pa ON (pa.`id_product` = a.`id_product`)
LEFT JOIN `ps_stock_available` sav ON ((sav.`id_product` = a.`id_product`) AND (sav.id_product_attribute is null OR pa.id_product_attribute = sav.id_product_attribute)
Try this way (not tested)