Commit Graph
95 Commits
Author SHA1 Message Date
William Braeckman d665098579 [IMP] hr,website_hr_recruitment: improve job views
Multiple improvement with job views:
 - Add a sequence field for jobs
 - Display 'Open Positions' on the website event if there is only 1 open
   position
 - Display whether the website is published on both the list and the
   form views of hr.job
 - Fix an issue introduced with 446d906f508880eb787debbec3c23cfd081bb045
   where html field would be cut and html tags would be displayed
Minor change:
 - Add an sql constraint on the estimated number of recruitment to be
   positive

Task ID: 2581595

closes odoo/odoo#72769

Related: odoo/enterprise#19264
Related: odoo/upgrade#2585
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-07-06 09:45:40 +00:00
Romain Derie f2583f3de4 [IMP] website(_*): prevent wrong multi website access during dispatch
Before this commit, routes were prevented to be accessed if the route model was
not accessible from the current website, eg you couldn't access blog1 which is
set to website2 from website 1.
That would raise a 404 even from admin/editor.

This commit introduce that behavior at a lowel level in a generic way, instead
of having to write it on every route.

Note that routes without a model converter won't benefit from this.

Closes #63499

closes odoo/odoo#64313

Related: odoo/enterprise#15688
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-01-25 11:01:13 +00:00
Jeremy Kersten e19227d3ba [IMP] website*: clean sitemap
From now, you need to explicitely add sitemap=True if you want your controller
into the sitemap.

It's the default value, but if you forgot it, it will raise a Warning on runbot.
It will avoid wrong controller in sitemap and duplicate (empty) content.

From now, if your model contains a field website_id, the modelConverter for
sitemap will automatically add the domain:
   "[('website_id', 'in', (False, current_website_id))]"

It avoid redundant declaration and ugly url in redirect/rewrite view.

Migration: need to remove it from url_from in website.rewrite

task-2065018

closes odoo/odoo#39427

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-28 10:36:56 +00:00
Raphael Collet 2cfdb12cb0 [FIX] website_hr_recruitment: cannot order by non-stored field 2019-09-12 13:53:12 +00:00
Romain Derie 47406d6e5d [FIX] website_hr(_recruitment): make website specific
As commit 066cfc9598 did for other website_module, this commit make theses
2 modules multi-website compatible.

Mostly by:
  - Adding website_id in form/list views
  - Preventing routes from being accessed by wrong website (only needed for
    admin as portal users will get a 403)
  - Adapt search([]) with multi website domain
  - Add domain in model converter in routes for URL autocomplete (eg menu URL)
    Note that it is not needed for sitemap.xml

closes odoo/odoo#27528
2018-10-11 17:08:20 +00:00
Christophe Simonis 4b9d6387b8 [MERGE] forward port branch saas-15 up to e80a0d4aa9 2018-07-25 18:11:41 +02:00
Nicolas Lempereur f1ee633f26 [FIX] website_hr_recruitment: frontend creation ok
When creating a job position from the frontend, and we:

- are on the same language that the default website language,
- have the permission to write on ir.ui.view,

we have all conditions to adding branding used to edit a page.

But when creating a position by the frontend, we create a job that will
render this template:

 website_hr_recruitment.default_website_description

When we are in the above said condition, we will create a job position
that erroneously has the branding that should only be displayed on
website and removed when saving an edition.

This caused a lot of problem with the editor that would most often not
be able to edit the content.

In this commit, we use the "rendering_bundle" context key to prevent
branding.

opw-1868879
closes #25963
2018-07-25 12:01:05 +02:00
Yannick Tivisse eb7a098592 [FIX] website_hr_recruitment: Avoid exponential sitemap generation
Purpose
=======

Currently all the possible routes for /jobs are put in the sitemap.

Each time you create a job, you add at least 250 links in the sitmap (The country can be set on the route)

Specification
=============

This commit backports the behavior of this commit in v11.0 (https://github.com/odoo/odoo/commit/1b52b00d2aa96b9360d50a0f0960f1febb5e607e)

Don't generate sitemap entries for other routes than /jobs/
2017-10-12 12:10:52 +02:00
Jeremy Kersten 1b52b00d2a [IMP] website*: clean sitemap + add method to declare sitemap function.
Don't add useless routes or route that will return 404.
Improve generate function from ModelConverter to have a better management of
query_string.

Now we have an helper sitemap_qs2dom that will analyse the current route and
check if query string is plausible and if yes, generate a domain, when the
query_string don't seems to match the route, we return a Falsy domain.

Before this commit, if qs was /product/ipad, enumerate_page check for each
modelconverter of the route a name ilike '/product/ipad'.

Now we check all routes that contains product and one converter that match ipad
or routes that contains ipad and one converter that match product.

This commit a new way to declare the sitemap for a route.
    def sitemap_xx(env, rule, query_string):
        yield {'loc': '/my_url'}
    @http.route(..., sitemap=sitemap_xx)

    In this case, only the loc returned by this function will be in the sitemap
    for all rules.

    You can pass sitempa=False, if you don't want that route are into the sitemap
2017-09-27 21:33:49 +02:00
Christophe Simonis 017ee5eab3 [MERGE] forward port branch saas-17 up to 877e709871 2017-08-24 13:17:53 +02:00
Christophe Simonis 30bd5ac0e9 [MERGE] forward port branch saas-16 up to aec6248bb3 2017-08-23 16:44:58 +02:00
Jeremy Kersten a313bcf7f3 [FIX] website_hr_recruitement: allow to map the list 2 times.
Don't uses generator, since some code need to access after the foreach on 'jobs'.
2017-08-17 21:40:33 +02:00
Thibault Delavallée 014b5c9f7c [MOV] website, http_routing: move (un)slug support to http_routing
Slug and unslug API is now available in http_routing. Indeed there is no
link to any website or any reason to not support slufigied URLs when
website is not installed. A new unslug_url method is added as a tool
coming from an embedded method from website. Doing it allows to have all
slug related methods defined at the same point.

Support of slug and unslug in qweb rendering is also moved directly in
http_routing version of ir_ui_view instead of website inheritance. This
is done in order to keep things coherent.

Some code from website about ModelConverter is also moved. Indeed both
versions of ir_http uses some kind of placeholder to store the uid
when converting urls to python. This commit unifies it by using the
website one directly in base to simplify the override.

This commit also updates all module importing slug. Enterprise modules
will have to be updated, see related commit.
2017-08-08 14:23:58 +02:00
xmo-odoo fffaf735f5 [FIX] P3: list -> iterable builtins (#16811)
In Python 3:

* various builtins and dict methods were changed to return
  view/iterable objects rather than lists
* and the separate Python 2 view/iterable builtins and methods were
  removed altogether

This is problematic when using these items as list (which the happens
repeatedly in Odoo), but more viciously when iterating *multiple times*
over them (which also happens, which I've messed up multiple times while
writing this, and which is a pain to debug even when you've just created
the issue).

Convert all code using these to semantics-matching cross-version
helper functions to get the LCD behaviour between P2 and P3, and
forbid the builtins via lint.

issue #8530
2017-05-10 09:39:55 +02:00
Fabien Pinckaers b56979c230 [IMP] website_hr_recruitment: clean job offers 2016-08-24 09:40:05 -07:00
Thibault Delavallée c8a313d51e [IMP] various: use odoo for imports instead of openerp and update class names 2016-08-10 15:48:07 +02:00
Jérome Maes 8a399930f3 [REF] website_*: remove render method on website
Since saas-3, website controllers use `request.website.render`
to render the template of a web page. This was kept for retro
compatibility. It's time to stop using deprecated stuff.
Same for `_render` method on website.

'json' route don't use `request.render` since
`JsonRequest` has no `render` method.
2016-08-04 12:02:14 +02:00
Jeremy Kersten ab489b1d73 [FIX] website_hr_recruitment: don't display offices from others countries. 2016-04-06 15:16:58 +02:00
David Monjoie a77f5cf42f [ADD] website_form: generic form controller
Contains a new ajax post function that comes from mdo's
original code and that I was not able to get rid of.
2015-08-26 16:01:19 +02:00
David Monjoie 1e4b7c42fa [REV] website_hr_recruitment: revert ee91d1e
This commit would makes us very vulnerable to spams and malevolent
bots who would forge e-mails to force the creation of a res_partner
for each e-mail, quickly overloading the database. I'm reverting
this as it was requested by al.

After discussion with yti, the original issue was that to use the
mail thread on the hr application, the user needed to create a
res_partner just to send him a mail, even if he was refused.

A proposed solution would be to add the e-mail of the applicant
to the suggested recipients of the mail thread.
2015-04-30 16:48:22 +02:00
Jeremy Kersten 825c2b3ff5 [FIX] website_hr_recruitement: allow utm for job apply 2015-03-18 16:51:05 +01:00
Yannick Tivisse ee91d1e09c [FIX] website_hr_recruitment: partner created on application form creation
This is a huge PITA for our HR department because they have to re-create
partner for every applicant (even the refused ones...)
2015-03-09 21:22:47 +01:00
Leonardo Donelli 4a0b13ed92 [REF] remove vim modelines and resulting trailing blank lines
Let 2015 be a year without modelines!
cf #4174
2014-12-31 15:52:13 +01:00
Jeremy Kersten c17bc5090d [FIX] hr_recruitment: use utm_mixin to allow to track the job applicant.
Remove old source_id
            Use hr.recruitment.source to generate link with utm and create
            alias with default value for utm
[FIX] crm/utm: Fix bug with utm (ddac26cdbb)
            Move demo into data
            Move ir_http to save the utm in the dispatch
2014-12-27 16:37:21 +01:00
Richard Mathot e829047015 [FIX] (website_)hr_recruitment: correct version of
659db669aa
2014-10-20 17:35:33 +02:00
ssh-odoo 659db669aa [IMP] website_hr_recruitment: resume in chatter 2014-10-13 13:34:09 +02:00
Jeremy Kersten 0d0a6c37ba [FIX] website_hr_recruitement: Don't use GeoIp if all countries is selected 2014-09-16 11:29:14 +02:00
Jeremy Kersten cfac9464a4 [FIX] website_hr_recruitment: add param to force all countries else it use GeoIP, check that country returned by GeoIP have jobs availables else fallback on all countries 2014-09-15 15:27:48 +02:00
Xavier Morel 1b546a3cd5 [FIX] website_hr_recruitment: typo during new API conversion
re fixes #1148
2014-07-18 15:07:59 +02:00
Xavier Morel 3f8fd0dad6 [IMP] website_hr_recruitment: new API 2014-07-15 13:56:19 +02:00
Xavier Morel fcfa5a56ef [FIX] website_hr_recruitment: various warnings 2014-07-15 10:55:41 +02:00
Xavier Morel 03977a29e6 [FIX] expected browse_record can be an integer
If no filter is specified, the geoip library is installed and the user's
address can be geolocated, ``country`` is assigned an integer (the id of the
matching country) whereas the filtering code expects a browse.

fixes #1148
2014-07-15 10:50:49 +02:00
Raphael Collet cbe2dbb672 [MERGE] new v8 api by rco
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.

- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes
2014-07-06 17:05:41 +02:00
Simon Lejeune 195fa93168 [MERGE] backend front end integration
Render the top-menu (backend menu or frontend editbar) server-side.
Use Fontawesome icons (mail, timezone, chat).
Refactor website widgets, split Website.editorBarin editorbar, ace, editorbar- content, editorbarCustomize.
2014-06-27 11:03:34 +02:00
Christophe Matthieu be4dddca8a [IMP] website_hr_recruitment: use session geoip for country default value 2014-06-23 17:51:20 +02:00
Christophe Matthieu 9eb3356b16 merge upstream 2014-06-23 17:44:58 +02:00
Richard Mathot 72dff744b5 [IMP] website_hr_recruitment: group offices by country 2014-06-11 15:38:22 +02:00
Christophe Matthieu 57e6ee4c4e [IMP] website_hr_recruitment: Search by country or/and department or/and by office. Default search by country with GeoIP 2014-05-27 13:50:40 +02:00
Fabien Meghazi 8eed143112 [IMP] Invert multilang logic in route decorator. True by default, can be set to False explicitlty 2014-05-13 11:35:45 +02:00
Denis Ledoux f363856773 [FIX] website_hr_recruitment: missing required 'name', which leaded to crash, and the phone field is partner_phone, not just phone. Do you even test what you do ?
bzr revid: dle@openerp.com-20140303174445-j733tpmccc9x855u
2014-03-03 18:44:45 +01:00
Christophe Matthieu 60c75d38bf [FIX] website placeholder; website_hr_recruitment required for ie
bzr revid: chm@openerp.com-20140224142751-7bolxomy2nc717w0
2014-02-24 15:27:51 +01:00
Christophe Matthieu 2b3ad30f8a [FIX] website: change auth=admin into auth=public. Fix website_project link
bzr revid: chm@openerp.com-20140129091050-w2d7dbigflwod1uj
2014-01-29 10:10:50 +01:00
Antony Lesuisse 6f8d8434dc [FIX] website_hr_recruitment full cleanups
- keep url namespace under /jobs
- public mode fixes
- moved jobs_ids field in hr_recruitment
- simplify code, remove dead code and data

bzr revid: al@openerp.com-20140129051403-cipao0bllxa85gsg
2014-01-29 06:14:03 +01:00
Fabien Meghazi 14bb6060d7 [REM] Removed @website.route() decorator
Need trunk-website-al Rev#5151

bzr revid: fme@openerp.com-20140120153733-ve3dn2kwvha7n3yl
2014-01-20 16:37:33 +01:00
ddm ff7da06cf9 [FIX] Main object for jobs (promote)
bzr revid: ddm@openerp.com-20131216133549-57343aix6it9ch5a
2013-12-16 14:35:49 +01:00
Christophe Matthieu 53a07c814a [FIX] website_hr_recruitment
bzr revid: chm@openerp.com-20131206170414-i5yq47pjy79jt1sd
2013-12-06 18:04:14 +01:00
Christophe Matthieu d0b813a016 [IMP] fix website_hr_recruitment, website_event, and create contact qweb widget
bzr revid: chm@openerp.com-20131206133003-to4lbgoynvviifq5
2013-12-06 14:30:03 +01:00
ddm 67599578b6 [FIX] Removed param default value (fix sitemap)
bzr revid: ddm@openerp.com-20131204135549-qc5xtpx826bqb2ud
2013-12-04 14:55:49 +01:00
Christophe Matthieu 63a9616138 [FIX] website_hr_recruitment, website_blog
bzr revid: chm@openerp.com-20131203171714-fym4y602l7gfylfw
2013-12-03 18:17:14 +01:00
Xavier Morel f2fa5b5e62 [IMP] website_hr_recruitment: only iterate once on jobs to get addresses and departments, extract browsing
bzr revid: xmo@openerp.com-20131125135211-mwuoj4g0474r4byn
2013-11-25 14:52:11 +01:00