[IMP] hr_recruitment : add residence country on website job apply form
- add residence_country field on hr.applicant - adapt javascript tour to take into account this new field - modify hr.applicant form view to integrate this new field - modify website job apply form template to integrate this new field Task ID : 1896305 closes odoo/odoo#30458 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
committed by
Yannick Tivisse
parent
fcba642d6f
commit
414ac1a49a
@@ -30,6 +30,7 @@
|
||||
'email_from',
|
||||
'partner_name',
|
||||
'partner_phone',
|
||||
'residence_country',
|
||||
'job_id',
|
||||
'department_id',
|
||||
]"/>
|
||||
|
||||
@@ -30,6 +30,8 @@ class Applicant(models.Model):
|
||||
|
||||
_inherit = 'hr.applicant'
|
||||
|
||||
residence_country = fields.Char(string="Residence Country")
|
||||
|
||||
def website_form_input_filter(self, request, values):
|
||||
if 'partner_name' in values:
|
||||
values.setdefault('name', '%s\'s Application' % values['partner_name'])
|
||||
|
||||
@@ -18,6 +18,10 @@ odoo.define('website_hr_recruitment.tour', function(require) {
|
||||
content: "Complete phone number",
|
||||
trigger: "input[name=partner_phone]",
|
||||
run: "text 118.218"
|
||||
}, {
|
||||
content: "Complete Residence Country",
|
||||
trigger: "input[name=residence_country]",
|
||||
run: "text Belgium"
|
||||
}, {
|
||||
content: "Complete Subject",
|
||||
trigger: "textarea[name=description]",
|
||||
|
||||
@@ -47,4 +47,15 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_hr_applicant_form_inherit_website" model="ir.ui.view">
|
||||
<field name="name">hr.applicant.form</field>
|
||||
<field name="model">hr.applicant</field>
|
||||
<field name="inherit_id" ref="hr_recruitment.hr_applicant_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='type_id']" position="after">
|
||||
<field name="residence_country"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -143,6 +143,14 @@
|
||||
<input type="text" class="form-control o_website_form_input" name="partner_phone" required=""/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row form-field o_website_form_required_custom">
|
||||
<div class="col-lg-3 col-md-4 text-right">
|
||||
<label class="col-form-label" for="residence_country">Your Residence Country</label>
|
||||
</div>
|
||||
<div class="col-lg-7 col-md-8">
|
||||
<input type="text" class="form-control o_website_form_input" name="residence_country" required=""/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row form-field">
|
||||
<div class="col-lg-3 col-md-4 text-right">
|
||||
<label class="col-form-label" for="description">Short Introduction</label>
|
||||
|
||||
Reference in New Issue
Block a user