Commit Graph
74 Commits
Author SHA1 Message Date
Rémy Voet (ryv) a74d020359 [FIX] website_hr_recruitment: fix broken display_name
With https://github.com/odoo/odoo/pull/122085,
we simplified the definition of display_name for `ir.department`:
https://github.com/odoo/odoo/commit/3c62ca1eb96d571b2b686b5caee370324c589ab4#diff-404a1cabe61e6fcb32cc3ac3d3d36336b9313f162130c3edbe1066c130b09c0dR11
but because of https://github.com/odoo/odoo/blob/0d30cc2bc9b9cc2b805d6c2d0a440f185c648da0/odoo/models.py#L235,
it overstates completely the default definition instead of
merging definition as others fields.

Fix the change.

closes odoo/odoo#131445

X-original-commit: 17eed41b81049a25db42a3e8389bd931433b0717
Related: odoo/enterprise#45579
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
2023-08-10 09:12:46 +02:00
Benoit Socias b6b4db5fb5 [FIX] *: adapt front-end HTML field sanitization
*: account, event_booth, gamification, hr, project,
   website_event_track, website_hr_recruitment, website_slides

HTML fields that appear in the front-end can be modified using the
website editor. Some of them are sanitized in a way that breaks the
behavior of snippets that can be dropped within them.

This commit adapts the sanitization of those HTML fields so that the
snippets behave as expected.

opw-3267589

closes odoo/odoo#126708

X-original-commit: 7fd28afaf3e45cafbef80b69aa45c58b31fb3de6
Related: odoo/enterprise#43311
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2023-06-29 11:59:46 +02:00
Rémy Voet (ryv) 3c62ca1eb9 [REM] core: remove name_get API
Rationale
=========

Since v8, the `display_name` field is present on all models. By default,
`display_name` uses `name_get` which has pretty much the same purpose
(return record name used by the web client). Gradually, many (backend)
developers (and the ORM: https://github.com/odoo/odoo/commit/6da1c3ac4c036eac289597602976538e243cb939)
started using `display_name` (more convenient than
`record.name_get()[0][1]`) but it still had the `name_get` override.
It becomes more complex than necessary and poeple start to misunderstand
the two (and sometimes override both, leading to inconstiencies between
`display_name`/`name_get`).

To simplify the ORM and the API, we decided to keep only one of them,
the `display_name` field:
- It is much more convenient from a backend point of view
(`record.name_get()[0][1]` vs `record.display_name`)
- It is cached during the same transaction (and invalidated if
its dependencies change)
- It can be overridden like any other compute field (override
`_compute_display_name` with any extra dependencies)
- `name_get` is replaced by `read(['display_name'])`
(API perceptive), which can actually be more efficient
(if `display_name`'s depends are correct, the ORM will only fetch the
fields it needs instead of every prefetchable field)

Changes
=======

- Deprecates `name_get` for the v17 and based the method on
`display_name` (the opposite of before)
- Converts all usage of `name_get`
- Overrides of `name_get` are now overrides of `_compute_display_name`
- For `res.partner`, rename the field store `display_name` into
`complete_name` because `display_name` context-dependent and it makes
no sense to have a compute store that is context-dependent.
- Previously, it was possible to return multiple names for the same
record with `name_get`, but it was tricky and most of the usage of
this `name_get` didn't take this into account. The only example of
this is the `name_get` of `product.product`
(now use `", ".join(<names>)`).

Part-of: odoo/odoo#122085
2023-06-28 17:41:19 +02:00
Jurgen (jugj) 543f4c89c9 [IMP] website_hr_recruitment: Make website_id field always visible
task-3337958

closes odoo/odoo#125477

X-original-commit: 8446039f2a8c9e2686b8b0671b2dcabd3fa2849f
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-19 08:22:56 +02:00
Thomas Lefebvre (thle) 5c76d3ddd2 [FIX] website_hr_recruitment: prevent applying for unpublished job
Issue:
------
When we have the link to the form to apply for a job,
even if the job is not published, we can still apply.

Solution:
---------
Check that the job is published before the creation of the record
in the `website_form_input_filter`.

opw-3331717

closes odoo/odoo#125429

X-original-commit: d68eab464654441d51f618c5d3d036999316ed7f
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-06-19 07:14:56 +02:00
Prakash Prajapati 81be16f275 [IMP] website_hr_recruitment: rename Job URL in the recruitment
In this commit we renamed jobs/detail/job_position route
to jobs/job_position.

task-3339118

closes odoo/odoo#122460

Related: odoo/enterprise#41771
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-05 13:31:18 +02:00
Jurgen (jugj) a9b5f5c3c1 [IMP] hr_recruitment : Improve the UX of recruitment app
task - 3175879

closes odoo/odoo#121222

X-original-commit: 5625c013f86f3ae2617614ccde3b789bbd5ab169
Related: odoo/enterprise#40965
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-05-16 13:37:05 +02:00
Carlos ValverdeandBenoit Socias 54f246f9c7 [IMP] website_hr_recruitment: add pager + search and improve filters
1. Pager + search

Before this commit the jobs list had no pager, and the search parameter
was neither used for filtering nor propagated to the rendering.

After this commit the jobs list supports pager and the search parameter
is passed through all layers.

2. Filters

Before this commit, filters were displayed as a set of `nav-pills` items
in a column on the left of the main template.

After this commit, filters have been moved to the top as dropdown
elements, displaying counts inside badges, which are obtained from the
list of filtered jobs.

Filters have also been adapted to requested change: each filter content
must be based on results that would be obtained if that filter was not
applied.

Additionally, `Remote` filterable location has been included, and can
be set either by using the backend or directly with the website builder.

task-2406626

closes odoo/odoo#67913

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Benoit Socias <bso@odoo.com>
2023-05-12 19:54:08 +02:00
d3b7e1c127 [IMP] website_hr_recruitment, *: improve pages design
*: website

Old 'website_hr_recruitment' templates looked outdated, so they have
been improved in terms of usability and design, by applying the
following changes:

- Old images used in `/jobs` and `/jobs/detail/` have been replaced by
new ones, taken from the Odoo official profile in social media.

- A `Connect with us` section has been added to the right column of
`/jobs`, including a separator, links and social media icons.

- Job entries in `/jobs` now show the city of the office, its country
and its department, as shown in the filters.

- In `/jobs/*`, old header with a breadcrumb has been replaced by
the topbar seen above, including a link to previous page in the
navigation flow.

- Design in `/jobs/detail/` has been improved, including a redesign of
the `Our Product` block or the image gallery at the end of the page.

- Header in `jobs/apply/*` has been improved and includes a column with
the address of the job position.

- In `jobs/apply/*`, the design of the form group has been revamped and
also has been added a right column including a snippet with the contact
information of the recruiter tracking the job application process.

- Overall design has been improved in the `/job-thank-you` view,
including the recruiter snippet seen above.

- Job description is now editable and not truncated. Additionally, a
default job description has also been added.

- Every new job entry has now a default short description, editable.

- If there is either no available job or not any valid job after the job
search, the `No jobs available` view has also been improved.

- Illustrations with dynamic colors have been included in
`/jobs/detail` (`Our Product` block) and `/job-thank-you`.

- `boolean_toggle` widget used in `website_hr_recruitment`'s
backend, in its job entry kanban has been improved.

- Syntax has been adapted to BS5.

- Tests have also been updated to the changes in the templates.

task-2406626

Part-of: odoo/odoo#67913
Co-authored-by: Benoit Socias <bso@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2023-05-12 19:54:08 +02:00
qsm-odoo 7621cdad9d [FIX] website_hr_recruitment: add slug to jobs' website_url
This follows the merge of [1].

Model implementing the `_compute_website_url` method sometimes adds the
"base url" part which is probably not necessary and sometimes forgot to
add the "slug" part. This commit only fixes the website_hr_recruitment
job's one to add the slub. The others will be fixed later, this should
probably be part of a deeper refactoring to use routes with Model
validation rather than accepting any int and reviewing when the base
URL is actually necessary.

Notice that the main point of this change is that the `website_url`
field as some models now shown in the "Site" menu of the website app.
In that case, when clicking on a record, the user is redirected to the
iframe preview, with the right website and domain without the need for
it to be part of the object's URL.

[1]: https://github.com/odoo/odoo/commit/da3f4c2aff92cca23ca2d7a87fa0eb5b1d7ce5fe

closes odoo/odoo#112211

X-original-commit: 0c6cf40bacf2d206e9a8b09bb2073252f5919dd0
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-02-08 15:39:08 +01:00
Dossogne Bertrand b213e479ba [IMP] {|website_}hr_recruitment: explicitate files purpose
Before this commit, recruitment models and views were mostly
set inside 'hr_recruitment.py' and 'hr_recruitment_views.xml'
respectively. In order to navigate easily, models are separated
into distinctive files.

closes odoo/odoo#105935

Related: odoo/upgrade#4048
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-12-21 15:35:44 +01:00
Kevin Baptiste 85ee52b71b [IMP] website_hr_recruitment: add JobPosting metadata
Adds the JobPosting[1] metadata on job pages to increase their
discoverability.

[1]: https://schema.org/JobPosting

task-2908478

closes odoo/odoo#103334

Related: odoo/upgrade#3967
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-10-25 14:03:08 +02:00
Kevin Baptiste 5afd3607a1 [FIX] (website_)hr_recruitment: unpublished job on archive
Unpublish the job from the website when they are archived, and correct
the condition to show Archive/Unarchive on the job kanban view.

task-3001159

closes odoo/odoo#102034

X-original-commit: 653a673b980133c2304e04c93730321d9f26eebe
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-10-04 13:29:11 +02:00
Dossogne Bertrand 239e617a97 [FIX] website_hr_recruitment: fix apply fields
Previously, it wasn't possible to add fields to the form
using the web editor on the apply page.
This commit also set the "job_details" field on the hr.job
model as a translatable field.

Related commit: 0a8c3e7451

task-2990154

closes odoo/odoo#101808

X-original-commit: af4c7188a6928a033d0a4ef30f759049d8c59a8c
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-10-03 08:04:58 +02:00
xO-Tx f451840941 [IMP] website_hr_recruitment: open list view job records in the same tab
After the update on 'open_website_url' [1], the method will open website
'hr.job' in new tab (on form view's 'website_redirect_button' &
'Job Page' link on kanban views.

The goal of this commit is to open record pages in the same tab since
after [2], content pages are loaded on iframe in backend.

Remark: 'open_website_url' is used now on website pages tree/kanban view
too (on row click).

[1]: https://github.com/odoo/odoo/commit/6c5f38ae37e9c1014bfa93dd82ffc6a3b31f0bd5
[2]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b

X-original-commit: b618fa1e9228df60819a874d24e04a6abff45c45
Part-of: odoo/odoo#101215
2022-09-27 11:41:52 +02:00
Kevin Baptiste db83ba8a5f [IMP] website_hr_recruitment: use t-field in website template
Use a `t-field` on the job apply template to make it editable through
the editor.

closes odoo/odoo#100468

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-19 15:10:02 +02:00
Dossogne Bertrand 0a8c3e7451 [IMP] hr_*: improve web application submission
hr_*:
hr
hr_contract
hr_recruitment
website_hr_recruitment

Increase UX and possibilities to postulate to a job on recruitement.
Also moves the model hr.contract.type from hr_contract to hr so that it
can also be used from hr_recruitment without having two models in parallel.

taskID 2898063

closes odoo/odoo#96551

Related: odoo/enterprise#29777
Related: odoo/upgrade#3861
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-07 23:10:25 +02:00
Romain Derie 44ae3f38da [IMP] *: bypass sanitize for full editor users on frontend fields
The previous commit allows the sanitizer to be bypassed by some users if
those users are part of one of the `base.group_sanitize_override` group
and if the HTML field is declared as `sanitize_overridable`.

This commit flag frontend HTML fields as `sanitize_overridable`.
See the main commit of this PR for more details.
It also gives the `base.group_sanitize_override` group to the "Editor &
Designer" group.

Part-of: odoo/odoo#97398
2022-08-24 23:03:23 +02:00
Dossogne Bertrand ad5b2a277b [IMP] hr_recruitment: improve reports clarity
This commit aims to improve the recruitment reports clarity,
particularly the confusion between source and medium

TaskID : 2837445

closes odoo/odoo#90975

Related: odoo/enterprise#27148
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-06-24 17:09:50 +02:00
alt-odoo e7ebb669db [FIX] website_hr_recruitment: allow portal users to filter by department
Currently, only a public user or an internal user can access HR
department information. This is causing an access rights error when
trying to filter job offers on the website if connected with a portal
user, while there is no error if not connected (public user). We should
have the same behavior for the two cases.

closes odoo/odoo#92003

X-original-commit: 689a3aa9bf08bf3567c0fa0cc4cf67cc3d7e0b54
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Alex Thuyls (alt) <alt@odoo.com>
2022-05-21 12:10:11 +02:00
Kevin Baptiste 6c5f38ae37 [IMP] hr_recruitment: improve flow (back2basics)
* Redesign views
    * New layout for the job kanban card + redesigned menu
* Create new reports
    * Candidate Sources: get a better view on where applicants are
      coming from;
    * Time in Stage: shows how long an applicant is in the current
      stage.
* Archiving a job archives applicants as well

odoo/enterprise#24816
odoo/upgrade#3395

closes odoo/odoo#85479

Taskid: 2738082
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-04-01 13:37:09 +02:00
Gorash 880954ebfc [IMP] *: remove _render from ir.ui.view and simplify report
There were inconsistencies in the calls to `_render`.
* the view context could contain information that misled developers.
Indeed, the context and value of the view are not supposed to be found
in the rendering. Thus by calling `ir.qweb` with the name of the
template, we ensure that there is no unwanted information and in
addition the cache key is that of the name of the template which saves
a query.
* the context used for rendering was modified by a method on
`ir.ui.view`, except this is not information used by this model. There
is now a `_prepare_environment` method residing on `ir.qweb`. This
method allows to modify the value dictionary as well as the context in
which the rendering will be done. This preparation of the data as well
as my security check is done only once per rendering. This also saves
some queries
* Freeze options for rendering were inconsistent. It could be that
options on which rendering depends were not part of the cache key. Thus,
depending on the user who generated the generation of the rendering
function, there was or was not information in the template. For example
for automatic branding. This is no longer possible, because it is the
context that is used. The options serving as a cache key are only
recorded for information (for the profiling system for example). A
simplification of the `ir.qweb.field` models could be made.

The report rendering and call `ir.qweb` instead of `ir.ui.view`.

Part-of: odoo/odoo#85110
2022-03-29 10:56:15 +02:00
Martin Trigaux 9aedb999f5 [IMP] *: remove xmlid_to_object helper
Use env.ref instead of the xmlid_to_object
To make it more readable and be able to clean old helpers
2021-08-10 14:24:11 +02:00
Martin Trigaux c7bac3dee0 [IMP] *: make ir.model.data helper private
No reason to interfact with them directly in RPC
2021-08-10 13:49:04 +02:00
sofiagvaladze 08ed9a0ebb [IMP] hr_recruitment: UX improvements
Multi-Application Management and UX improvements.

Improve in Recruitment app Job Positions Kanban view;
It is more intuitive if list is applications default view; improve the applications form;

Task - 2404610

closes odoo/odoo#63946

Related: odoo/enterprise#15750
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-07-30 13:15:02 +00:00
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 92175d3341 [IMP] *: replace web.base.url ICP by helper method
Previous commit introduce an helper to get the most suited URL for a record
instead of always using the ICP, which is not correct in a website context.

This commit replaces calls to ICP by the helper method.

Community: https://github.com/odoo/odoo/pull/68201
Enterprise: https://github.com/odoo/enterprise/pull/17538
Upgrade: https://github.com/odoo/upgrade/pull/2372

task-2476101
2021-06-02 10:04:29 +00:00
Jeremy Kersten f8a7379be9 [IMP] website_customer, website_hr: match apps when redirect in edit backend
Edit in backend now redirect to related apps, and no more in website Apps

closes odoo/odoo#54208

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-07-09 06:45:33 +00:00
Thibault Francois 3ad85b6f06 [FIX] website_hr_recruitement: Mail not send at creation
When an applicant is created from the website
and the job_id has a first stage with a template to send
the mail is actually not sent.

This is happening because at the creation of
a mail.thread values from computed field don't
appear in the change to track.
so _message_track_post_template don't see the
change on stage_id and thus don't send the email

This is going to be fix on the master
in the meanwhile we can force the value of the stage_id
at the creation of the applicant from the website form

closes odoo/odoo#53462

X-original-commit: bbaf4913382809da0c4d644f914cb3e8191a5d1b
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-22 17:15:24 +00:00
Martin Trigaux d9287caf94 [IMP] *: convert to private methods
render, render_template, load, activity_schedule_with_view,
get_website_pages should all be private:
It should not be possible to render an aribtrary template only with
its name or id

Still need to render some qweb views from js so the method
render_template is kept public.
This explains why the website editor still need read access on
ir.ui.view as we want to allow any snippet to be rendered.
2020-05-14 13:59:10 +02:00
DramixDw 9b9829416b [IMP] website: simplify website menu
Some apps, once installed, automatically create a menuitem in website.
What complexify the UI and create useless menu withtout plusvalue.

It is not because you install livechat to make support online, that you want
a link in your menu to show stats e.g.

Now we remove the default menu created, and help user to find it when he create
a link. The autocomplete suggest most of the main App's controllers

task-2189613

closes odoo/odoo#49081

Related: odoo/enterprise#9733
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-05-01 07:59:07 +00:00
fja-odoo 388c222c6c [IMP] base, *: allow html fields not to sanitize forms
* = event, website_event_track, website_sale, website_hr_recruitment,
website_livechat, website_sale, website_slides

The option to sanitize or not the forms was not available, this will
allow better flexibility on whether forms should be sanitized or not on
an HTML field.
Also we use this new param to allow forms to be added on some already
existing html fields where forms where sanitized out.

task-2209554

closes odoo/odoo#47318

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-03-31 14:22:43 +00:00
Adrian Torres 4b38cc6590 [REM] *: calls to @api.multi
Multi is the default api for methods, it is not necessary to explicitly
decorate methods with it, adds clutter and most people use it because
they see that the rest of the code uses it.

Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
2019-07-17 14:13:12 +02:00
Kevin Baptiste 81a2ad4e05 [IMP] hr_recruitment: Improve general usability (back2basics)
TaskID: 2033500

closes odoo/odoo#34858

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-17 07:02:01 +00:00
Adrian Torres 9e71d57d11 [REM] *: remove calls to api.one and adapt code
Adapt all code that was using `api.one` to recordset-style method and
remove any and all calls to `api.one` in preparation for its removal.
2019-07-05 09:04:45 +00:00
Christophe Simonis a97037c6d4 [MERGE] forward port branch saas-12.2 up to 78b3b650b0 2019-05-06 12:27:51 +02:00
Christophe Simonis 3ca58705c9 [MERGE] forward port branch saas-11.3 up to 2c68df0ab4 2019-05-02 13:16:27 +02:00
Christophe Simonis 82c901c937 [MERGE] forward port branch saas-15 up to d5a1ad566b 2019-05-02 09:39:20 +02:00
Christophe Simonis 5728e39181 [MERGE] forward port branch 10.0 up to 903fec011d 2019-05-02 08:48:46 +02:00
Xavier Morel 8371f08202 [FIX] website_hr_recruitment: don't prefetch website_description
Prefetching it triggers its translation, which quickly becomes most of
the overhead of /jobs despite the field not being displayed on that
page: an empty /jobs takes ~150ms, a /jobs with 99 jobs takes ~2000ms,
>70% of which are spent in html_translate and ultimately
translate.py:process (14600 calls, 60% of runtime, 40% own).

Removing prefetching lowers the runtime to ~700ms.

closes odoo/odoo#32985

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-04-26 12:16:24 +00:00
lbs-odoo 414ac1a49a [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>
2019-03-06 14:56:12 +00:00
Jeremy KerstenandDerie Romain 066cfc9598 [IMP] website_[blog|event|forum|sale|slide]: make website specific
Set up env & tools for module website multiwebsite (blog, event, sale..)
website_id in modelConverter and ir_rule

add _compute_domain_keys to have a different cache per website
  or rules would not be correctly website_dependant
  eg: blog 1 on website 1, blog 2 on website 2
      access blog 1 from website 1 => can access -> normal
      access blog 1 from website 2 => can access -> should crash because (ir rule)

split mixing website.published.mixin and website.published.multi.mixin to have
website_id only on last one.
 multi mixing will:
     - override website_published compute to take current_website into account (not in backend)
     - force website when clicking on published in backend

- website blog, website_sale, website_event, website_forum, website_slides are now multi website

Co-authored-by: Derie Romain <rde@odoo.com>
Co-authored-by: Kersten Jérémy <jke@odoo.com>
2018-08-13 20:16:34 +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
Xavier Morel 01e3514147 [FIX] P3: urllib, urllib2 and urlparse
In Python 3, all of these were "consolidated" under urllib(.request,
.parse, .errors) which is inconvenient.

Since we already have hard dependencies on requests and
werkzeug(.urls, which is a backport of Python 3's unicode-aware
urllib.parse) migrate *everything* to that.

A sticking point is urllib2.URLError, those were (mostly) replaced by
the slightly more general IOError which URLError extends.
2017-05-15 12:26:30 +02:00
xmo-odoo b4429c2a91 [FIX] Various P3-related import changes
* LDAP import: python-ldap is not python3-compatible, pyldap is

  Warning: only supported from debian Stretch (current testing)?
  https://packages.debian.org/search?searchon=names&keywords=pyldap

* implicitly relative imports
* imports of moved or removed stdlib modules

issue #8530
2017-04-28 09:06:53 +02:00
Raphael Collet d0ca2d115e [REF] ir_config_parameter: remove group_ids and simplify
Add `sudo()` to call `get_param` where necessary, and make the web client use a
controller instead of directly accessing parameters.
2017-01-03 16:52:49 +01:00
Thibault Delavallée 02c748be59 [IMP] tools: sanitizer: add and clean sanitize options
Now having

 * sanitize: run the sanitizer to clean the html (removing javascripts,
   unwanted tags, ...)
 * sanitize_tags: only a subset of tags is allowed in html content.
   Unwelcomed tags are remove dand their content stripped.
 * sanitize_attributes: only a subset of attributes is allowed.
 * sanitize_style: only a subset of style attributes is allowed. Style
   attributes are parsed to keep only a white list.
 * strip_style: all style is removed. It bypasses sanitize_style as there
   is no need to sanitize something that is removed.
 * strip_classes: remove class attributes

Fields parameters have also been updated to match the sanitize options. Html
fields by default are sanitized with sanitize_tags activated but without any
further options. All addons have been updated to match the new options
according to their previous behavior.
2016-08-30 15:54:56 +02:00
Csaba Fazekas 00cfb0889b [IMP] website_hr_recruitment: new job position default template 2016-08-23 11:42:05 +02:00
Jérome Maes 9f6ecb239e [REF] website_*: clean method to override when using 2016-08-04 12:02:14 +02:00
Christophe Simonis 523d3af131 [MERGE] forward port branch saas-12 up to 16d65a8 2016-07-29 17:55:21 +02:00