unmanaged data in union
I think best of it is still to came , but i feel comfortable with **full join **. 

SELECT
a1.ram, 
a1.product_id,
a1.date_ad as fromDate,
a2.date_ad as toDate  
FROM
 (
   select 
    ram,date_ad, cvd.product_id
from challan_from_vendor cv left join challan_from_vendor_detail cvd on cv.id = cvd.challan_from_id   
group by 1,date_ad, cvd.product_id
) as a1
FULL JOIN 
(
 select 
    ram, date_ad, cvd.product_id
from challan_to_vendor cv left join challan_to_vendor_detail cvd on cv.id = cvd.challan_to_id     
group by 1, date_ad,cvd.product_id
) as a2 ON (a1.product_id=a2.product_id)
ORDER BY 1;