Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @api.onchange('bom_line_ids')
- def get_excl_list(self):
- list1 = []
- for i in self.excl_list:
- list1.append(i.id)
- list2 = []
- for j in self.bom_line_ids:
- list2.append(j.product_id.id)
- if j.product_id.id in list1:
- warning_message = "Product: " + self.env['product.template'].search([('id','=',j.product_id.id)]).name + " can't be added to the BoM.n Please select another product."
- print "self.bom_line_ids.product_id", self.bom_line_ids.product_id
- self.bom_line_ids.product_id = False
- print "self.bom_line_ids.product_id", self.bom_line_ids.product_id
- return { 'warning': {'title': 'Product error', 'message':warning_message} }
- self.bom_line_ids.product_id = False
- j.product_id = False
- self.bom_line_ids[self.bom_line_ids.index(j)].product_id = False
- job_titles = fields.Char('Job',compute='myemply_name',store=True)
- @api.onchange('new_empl')
- @api.depends('new_empl')
- def myemply_name(self):
- self.job_titles = value
Add Comment
Please, Sign In to add comment