animalelement865 / saasier_public_addons

SaaSier OpenERP Addons
12 stars 18 forks source link

Trouble using the current bom_lines in mrp_bom_history #2

Closed MortenSoerensen closed 4 years ago

MortenSoerensen commented 8 years ago

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