'set required_items for production to keep track of reserved qty'

def set_required_items(self):

    self.required_items = []
    if (self.bom_no and self.qty):
        item_dict = get_bom_items_as_dict(self.bom_no, self.company, qty=self.qty, fetch_exploded=self.use_multi_level_bom)
        for item in item_dict.values():
            self.append(u'required_items', {u'item_code': item.item_code, u'required_qty': item.qty, u'source_warehouse': (item.source_warehouse or item.default_warehouse)})
        self.set_available_qty()
