[FIX] website_hr_recruitment: get location job app

**Current behavior:**
In the jobs/ directory on the website, if a position has a
location set in its configuration, the 'Location' label will
display the name of the company rather than the city where it is
located.

**Expected behavior:**
The city will be displayed under the 'Location' label.

**Steps to reproduce:**
1. In the Recruitment app, give a job a location value

2. On the website, go to the jobs/ directory and navigate to the
     position from step 1

3. Click 'Apply Now!' and look at the location label on the
     right side of the page

**Cause of the issue:**
This field was missing the "contact" widget type in its
t-options.

**Fix:**
Add the widget type and additionally display "Remote" for the
location when there is no location set.

opw-3761348

closes odoo/odoo#159149

X-original-commit: fdb07fa0e67cacbcaee9ef99bbb3b315cd6baaf5
Signed-off-by: Vincent Ethan <etvi@odoo.com>
Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com>
This commit is contained in:
Ethan Vincent
2024-03-26 09:54:27 +00:00
parent e7d0b3b828
commit 71eea06e7c
2 changed files with 7 additions and 3 deletions
@@ -629,6 +629,7 @@ msgid "Real responsibilities and challenges in a fast evolving company"
msgstr ""
#. module: website_hr_recruitment
#: model_terms:ir.ui.view,arch_db:website_hr_recruitment.apply
#: model_terms:ir.ui.view,arch_db:website_hr_recruitment.job_filter_by_countries
#: model_terms:ir.ui.view,arch_db:website_hr_recruitment.job_filter_by_offices
msgid "Remote"
@@ -323,12 +323,15 @@
<span class="text-muted small">Job</span>
<h6 t-field="job.name"/>
</div>
<div t-if="job.address_id" class="d-flex flex-column align-items-baseline">
<div class="d-flex flex-column align-items-baseline">
<span class="text-muted small">Location</span>
<h6 t-field="job.address_id" t-options='{
<h6 t-if="job.address_id" t-field="job.address_id" t-options='{
"widget": "contact",
"fields": ["city"],
"no_tag_br": True
"no_tag_br": True,
"no_marker": True
}'/>
<h6 t-else="">Remote</h6>
</div>
<div t-if="job.department_id" class="d-flex flex-column align-items-baseline">
<span class="text-muted small">Department</span>