Please provide resolution for the following error :
ValueError: Wrong value for crm.lead.service:
Appended is the code snippet causing this problem :
from odoo import models, fields, api
class mjcrm(models.Model):
_inherit = 'crm.lead'
service = fields.Selection([('fa', 'FA'),
('psms', 'PSMS'),
('parishkaran ', 'Parishkaran'),
('valuation', 'Valuation'),
('mjpro', 'mjPRO'),
('onlineStore', 'OnlineStore'),
('loyaltyprogram', 'LoyaltyProgram'),
('ra', 'RA'),
('as', 'AS'),
('mss', 'MSS'),
('cms', 'CMS'),
('psp', 'PSP'),
], string="BU Services", tracking=True)
@api.onchange('bu')
def onchange_bu(self):
#global service_selection
service_selection = []
if self.bu:
if self.bu == 'MetalJunction':
self.bu_head = 'Anup_Jagnania'
service_selection.append([('fa', 'FA'),
('psms', 'PSMS'),
('parishkaran ', 'Parishkaran')
])