Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
1918 Vistas

Heloo, i create field Many2one in website job Application Form and that working. But i need this 

@http.route(['/jobs/apply/experienced-developer-4'], type='http', auth="public", website=True)

to make it work. So when i change page to another job position, field Many2one not working, what i must change?

Avatar
Descartar
Mejor respuesta

Hi,

Try to use this controller

@http.route('''/jobs/apply/''', type='http',
auth="public", website=True, sitemap=True)
def jobs_apply(self, job, **kwargs):
""" Used to upload the data in the job forms"""
res = super(WebsiteHrRecruitmentCustom, self).jobs_apply(job, **kwargs)
 
//Add your functions 
 
if you need to add the records you can super the insert_record function
 
 
def insert_record(self, request, model, values, custom, meta=None):
""" Inserting the values from the forms use the function """
 
if model.model == 'hr.applicant':
applicant_id = super(WebsiteFormCustom, self).insert_record(request,
model,
values,
custom,
meta=None)
//Write your codes
 
return application_id

Regards

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
may 25
1046
2
sept 22
3886
3
may 21
4379
4
may 18
4113
1
ene 25
1114