When I use the create new component list button I would like to load the current bom lines instead of having to add maybe a hundred components manually again if only a few components change in the new bom list. I have tried to modify the save_bom_history.py
def load_lines(self,cr,uid,context=None): for data in self.browse(cr,uid,ids): bom = self.pool.get('mrp.bom').browse(cr,uid,context['active_id']) for lines in bom.bom_lines: data.new_bom_ids.append(lines) return True
When I use the create new component list button I would like to load the current bom lines instead of having to add maybe a hundred components manually again if only a few components change in the new bom list. I have tried to modify the save_bom_history.py
def load_lines(self,cr,uid,context=None): for data in self.browse(cr,uid,ids): bom = self.pool.get('mrp.bom').browse(cr,uid,context['active_id']) for lines in bom.bom_lines: data.new_bom_ids.append(lines) return True