コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
1913 ビュー

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
1039
2
9月 22
3870
3
5月 21
4377
4
5月 18
4109
1
1月 25
1114