'Remove all those child items which are no longer present in main item table'

def cleanup_raw_materials_supplied(self, parent_items, raw_material_table):

    delete_list = []
    for d in self.get(raw_material_table):
        if ([d.main_item_code, d.reference_name] not in parent_items):
            delete_list.append(d)
    if delete_list:
        rm_supplied_details = self.get(raw_material_table)
        self.set(raw_material_table, [])
        for d in rm_supplied_details:
            if (d not in delete_list):
                self.append(raw_material_table, d)
