I'm deleting some records in a table but few one2many fields of in this table are in relation with other tables(many2one). Can you all help me how to do it with a query? I want to delete the many2one field records also.
delete from manpower_estimate where manpower_estimate_line IN (select id from res_scheduledjobs where contract_start_date < '2014-12-31' and contract_end_date < '2014-12-31')
This is what I'm doing. res_scheduledjobs is the table with one2many field and manpower_estimate is the table with its many2one field