Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
1911 Lượt xem

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?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 5 25
1039
2
thg 9 22
3866
3
thg 5 21
4377
4
thg 5 18
4108
1
thg 1 25
1114