跳至內容
選單
此問題已被標幟
1 回覆
1907 瀏覽次數

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?

頭像
捨棄
最佳答案

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

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
5月 25
1031
2
9月 22
3858
3
5月 21
4369
4
5月 18
4099
1
1月 25
1112