Commit Graph
896 Commits
Author SHA1 Message Date
Gorash 774a3fad0e [REF] base,all: Update modifier syntax: view migration
Apply of the migration script to update all view modifiers.

Part-of: odoo/odoo#104741
2023-08-18 09:49:13 +02:00
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
Pierre Pulinckx (pipu) b1ebe3b6f4 [REF] *: Replace core._t imports
In this commit, _t import from import { _t } from
"@web/legacy/js/services/core" and from
 web/static/src/legacy/js/core/translation.js are replaced by
@web/core/l10n/translation.js.

task-3292454

closes odoo/odoo#130865

Related: odoo/enterprise#45270
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-08-09 00:13:08 +02:00
Michael (mcm) 00d8aef1c7 [REF] web, *: remove legacy patch
This commit removes legacy patch/unpatch functions and adapts their use
by using the modern patch. There was also a custom patch function used
in tests which has been replaced too.

closes odoo/odoo#130867

Related: odoo/design-themes#685
Related: odoo/enterprise#45271
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-08-07 10:58:48 +02:00
Pierre Pulinckx (pipu) 09535ef5e6 [REF] website_*: Change registerTours of tour_utils
As steps are encapsuled in an arrow function from
69a5d8e3ce47238 for steps tour definition to avoid
direct Markup(_t()) interpretation, the same is done
for registerWebsitePreviewTour() of
"odoo/addons/website/static/src/js/tours/tour_utils.js"
in this commit.

This is done in anticipation of the use of
_t() (import from @web/core/l10n/translation) with
registerWebsitePreviewTour().

task-3292454

closes odoo/odoo#130248

Related: odoo/design-themes#678
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
2023-08-02 13:20:23 +02:00
Bastien PIERRE 65242e31e9 [IMP] *: Remove alias in JS files
Rename all imports with alias old system to the new js module system
Task ID: 3266759

closes odoo/odoo#127414

Related: odoo/design-themes#671
Related: odoo/enterprise#43716
Signed-off-by: Bastien Pierre (ipb) <ipb@odoo.com>
2023-07-27 11:58:34 +02:00
Pierre Pulinckx (pipu) 8bfa76a842 [REF] *: Unify _t and _lt
The goal of this commit is to prepare ground to remove
lazytranslate function _lt() and keep only _t()
for a better understanding of the use of the translation function.

In this commit,

the translate function _t() has been updated to return the translation
if they are loaded. If not, it throws an error.
the lazytranslate function _lt() returns _t() function.
Corollaries :
Steps in test tours are now a function that returns an array of steps
to avoid any interpolation of _t in this ones before translations has
been loaded.

Example :

registry.category("web_tour.tours").add("example", {
    test: true,
    steps: () => [
        {...},
        {...},
    ],
});

task-3292454

closes odoo/odoo#124157

Related: odoo/enterprise#43153
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-07-19 13:13:16 +02:00
Martin Trigaux cd2f330bec [IMP] *: remove glocal ACL
Specify explicit route for each ,, line
This is part of task 3230280 where global ir.model.access will be
forbidden.
The goal is to make access to public/portal explicit. Too often,
global access was granted with only employees in mind.

Remove ,,0,0,0,0 lines

mail:
employee already had read access to mail.group
still needed to subtypes as in ir.rule domain

mail_group: employee already had read access
pos_mercury: only needed for employees

membership:
move public access for website_membership as needed in the controllers

website_customer: employee already had read access

website_event_booth: no need for category
website_event_exhibitor: retrieved in sudo
website_event_track: not needed for location

Part-of: odoo/odoo#125216
2023-07-11 22:33:47 +02:00
Damien Bouvy c2d4feeada [IMP] website_hr_recruitment: use a fictitious number
Stop using an actual phone number as demo. 555-01XX number
are considered fictitious by the NA Numbering Plan and
should be favoured instead.

Task-3391390

See https://en.wikipedia.org/wiki/North_American_Numbering_Plan#Fictional_telephone_numbers

closes odoo/odoo#127173

X-original-commit: 3c69077d506727d3fadde57c84d4185986d70a60
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2023-07-04 11:35:11 +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
Prakash Prajapati 63d930112c [IMP] (website_), hr_recruitment: improve the recruitment app
In this commit we have made the following changes.
- Add new refuse reasons:
       - Languages issues
       - Role already fulfilled
       - Duplicate
       - Spam
       - Refused by Applicant
- Modify refuse reasons:
       - Refused by Applicant: don't like job
       - Refused by Applicant: better offer
- Clickable job position breadcrumb in website.
- Set default applicant when we create new email template
- Use the `selection_badge` widget in Refuse Reason wizard

task-3336247

closes odoo/odoo#125612

X-original-commit: 94bc52e79e37df6daf9af6cb62efd65d63cbb61e
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-19 21:25:52 +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
Xavier ALT a2d74e14a6 [FIX] website_hr_recruitment: fix filters links after choosing "Other" department
Fix wrongly generated link when "Other" department filter is active
(introduced by odoo/odoo@54f246f9c)

To reproduce (on runbot):
- Log-in as 'admin'
- Go to the website /jobs page
- Edit page and enable both 'Country' and 'Department' search filters
  then save changes
- Choose "Others" in the departments filter
- Choose any country in the countries filter

=> traceback with:
`ValueError: invalid literal for int() with base 10: '233is_other_department=1'`

closes odoo/odoo#125203

X-original-commit: 12085c9b653412b976279495804f672f3307764b
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-06-15 19:59:10 +02:00
Yash Vaishnav ce7bca79ba [IMP] website_hr_recruitment: simplify the long name and hide the number
Before this commit, when the recruiter's name and job position were excessively
long, it extended beyond the boundaries of the box. And, if the recruiter did
not have a phone number, the phone symbol would still be displayed within
the box.

In this commit, The name and job position of the recruiter were shortened and
the space at the bottom of the recruiter's email was minimized.

task-3342768

closes odoo/odoo#123054

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-14 21:28:30 +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
Martin Trigaux 2afdda2576 [I18N] *: export saas-16.3 source terms
closes odoo/odoo#123046

X-original-commit: 137f5ca0cb703ee953cb01db525362f7a778e6bd
Related: odoo/enterprise#41703
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-06-01 11:43:51 +02:00
Pierre Masereel 1a3397e2ff [FIX] website_hr_recruitement: cannot render template
Cannot correctly concatenate the value from the t-set and the number

closes odoo/odoo#122113

X-original-commit: 5af263fb987cc53d40f0f9ec54ac65336d533218
Signed-off-by: Masereel Pierre <pim@odoo.com>
2023-05-23 18:02:19 +02:00
Louis Wicket (wil) 04189318cc [I18N] *: update master translations
Currently, only stable releases see their translations updated. This has
resulted in master accumulating outdated stuff for years, which can be
confusing for users testing master on runbot.

This one-shot commit resynchronizes master translations based on the
content from 16.0 and removes empty PO files (i.e. no longer containing
translations).

closes odoo/odoo#121629

Related: odoo/enterprise#41171
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-05-22 17:52:07 +02:00
Brieuc-brd fa60bac197 [IMP] *: app icons : add viewBox attribute
Prior to this commit, the SVG's viewBox attribute was missing, which
prevented svgs from being scaled.

This commit fixes this issue.

task-3326633
Part of task-3326263

X-original-commit: 30300c373ad1c63a6cf8b035cae0785a09c6933f
Part-of: odoo/odoo#121886
2023-05-22 13:54:08 +02:00
Martin Trigaux 077bbd0b0b [I18N] *: export master source terms
closes odoo/odoo#121563

Related: odoo/enterprise#41140
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-05-17 10:34:00 +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
Brieuc-brd 418413e499 [IMP] web, *: directional icons
This commit adapts the directional icons to improve the usability and
maintain consistency with the ui icons library.

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:22 +02:00
Elisabeth Dickinson b2ef35a431 [IMP] *: replace .bg-color by .text-bg-color on ribbons
Also remove unnecessary CSS on ribbons.

Part-of: odoo/odoo#116641
2023-05-12 22:59:16 +02:00
Brieuc-brdandElisabeth Dickinson 21d87a3da5 [REF] *: milk graphical assets
- apps icons
- base: replace demo avatars Mitchell, Marc and Joel
- mail: replace odoobot avatar

Part-of: odoo/odoo#116641
Co-authored-by: Elisabeth Dickinson <edi@odoo.com>
2023-05-12 22:59:14 +02:00
stefanorigano (SRI) 46b762a1f1 [REF] web, *: milk colors
*: google_calendar, hr_holidays, hr_skills_slides, mail,
microsoft_calendar, point_of_sale, web_editor, website_livechat,
website_sale

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:12 +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
Guillaume (gdi) 89af36516f [FIX] website, *: add a robust utility to enter in edit mode
*: test_website, website_blog, website_crm, website_hr_recruitment,
website_mass_mailing, website_sale, website_sale_wishlist,
website_slides

This commit creates a new util which clicks on edit and waits for the
edit mode to be started. This way, we make sure that the edit mode is
enabled before testing the next step of the test. This avoids race
conditions during tests.

This commit replaces all the uses of the old util with the new one, it
also removes the steps that are waiting for the edit mode to start.
Finally, from [this other commit], we can start a tour in edit mode. For
these tests (which have `edition: true`), it is useless to check if the
edit mode has started at the beginning of the test because this check is
already done by default. This commit removes unnecessary / duplicated
steps.

[this other commit]: https://github.com/odoo/odoo/commit/99b50d18e220aedf14de806f4bf1b2d35c32de35#diff-c7720501ec33f5f92c907d8bb41de50edd832a4564317073e801a6915796a6bdR278

task-3203820

closes odoo/odoo#120481

X-original-commit: https://github.com/odoo/odoo/commit/9fd5d25f59578abc9c608578a7d2e2953880b582
Related: odoo/design-themes#656
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Guillaume-gdi <gdi@odoo.com>
2023-05-04 20:33:55 +02:00
Kevin Baptiste 9d216634c5 [FIX] website_hr_recruitment: sort jobs / departments by name
The jobs / departments / offices were not in alphabetical order but
ordered by the job they were in, which didn't make sense.

task-3278949

closes odoo/odoo#119260

X-original-commit: 5da763a8ef0503286fa5cc55e32970f4d785825a
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-04-21 20:18:44 +02:00
Michael (mcm) ff0d6dd580 [REF] *: replace odoo module by native one
This commit converts almost all odoo module by native module.
The goal is to deprecate odoo.define in favor of native module and then
simplify boot.js by removing the regexp that finds module dependencies.

task id: 3162300

closes odoo/odoo#117305

Related: odoo/enterprise#39118
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-04-03 17:07:24 +02:00
Arthur Detroux (ard) 1ebcdb0023 [FIX] website, *: check access rights to display elements in New+ modal
*: website_blog,website_event,website_forum,website_hr_recruitment,
website_livechat,website_sale,website_slides

Prior to this commit, elements inside the New+ modal had a `isDisplayed`
property that was meant to be changed by the patches done by each
module. Unfortunately, this was forgotten in the refactor done in [1]
and more precisely when the component was introduced in [2].

This commit fixes that by checking the access rights of the user on each
individual model used on the create form.

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

opw-3198700

closes odoo/odoo#117206

X-original-commit: 58704cb7615addd7d40291431e05a894776320d8
Related: odoo/enterprise#39066
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-03-30 18:58:59 +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
Géry Debongnie b53f78e224 [REF] web_tour,*: use the registry in collecting the tours
This is a step closer to a goal of avoiding dependence on asynchronous
modules. Starting from this commit, new tour definition should be
registered to `registry.category("web_tour.tours")` registry.

So, instead of the following:

```js
import tour from "web_tour.tour";
tour.register(name, options, steps);
```

We now do:

```js
import { registry } from "@web/core/registry";
registry.category("web_tour.tours").add(name, optionsWithSteps);
```

Notice the `options` and `steps` params are merged when registering
the tour definition. It should look something like so:

```js
registry.category("web_tour.tours").add("account_tour", {
  test: true,
  steps: [ ... ],
});
```

And if the `TourManager` instance is needed, one can get it from the
registry like so `registry.get("tourManager")`. Note however that
this instance is only available when the `TourManager` has been
instantiated -- so it's not available at top level of the module.

closes odoo/odoo#111103

Related: odoo/enterprise#36335
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-01-27 23:17:35 +01:00
Arthur Detroux (ard)andqsm-odoo 9d870e2259 [FIX] website, *: move form editor files into assets_wysiwyg
*: website_crm, website_form_project, website_hr_recruitment,
   website_mass_mailing, website_sale

Prior to this commit, modules that add elements (fields, references,
etc.) to the website_form registry, would do so inside the
`website.assets_editor` bundle.
It creates a module dependency error since [1] + [2]:
The form options (`s_website_form/options.js`) defined in
`website.assets_wysiwyg` requires the registry defined in
`website.assets_editor`. But since [1] and [2], the
`website.assets_wysiwyg` bundle is loaded inside the iframe without
`website.assets_editor`, as only `website.assets_wysiwyg` is needed to
properly display and interact with the editor. (Although, most of the
bundle is not necessary and a later IMP will either only load the CSS
needed or split the bundle).

This commit moves the modules that creates the registry as well as
modules that extend it to the `website.assets_wysiwyg` bundle, fixing
the dependency error. Though they are not required inside the iframe,
the bundle can now be loaded without the need of assets_editor,
removing the missing dependencies. But mainly, this should have been the
case since the introduction of website.assets_wysiwyg at [3] anyway: we
want to lazy load everything that is editor related. Although it was [4]
which mixed the form editor files between the `website.assets_editor`
and `website.assets_wysiwyg` bundles.

[1]: https://github.com/odoo/odoo/commit/03c552690b15cbf2e7d6b7812386ac64042219af
[2]: https://github.com/odoo/odoo/commit/a154ee7ad6fd3ebdd38943e1439badae11c3151d
[3]: https://github.com/odoo/enterprise/commit/19a144d6af2974e964c6487170e6bca1b14d3898
[4]: https://github.com/odoo/odoo/commit/f8882698e8f4d1a3ad081522778344e2bd7aa0de

closes odoo/odoo#110811

Related: odoo/enterprise#36195
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2023-01-24 21:10:52 +01:00
Martin Trigaux 776689b0f4 [I18N] *: export saas-16.1 source terms
closes odoo/odoo#110752

X-original-commit: 56b2b52287a8f2192d80ea417c7efac80a87c0a9
Related: odoo/enterprise#36173
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-01-24 10:20:30 +01:00
Julien Castiaux 3d1f486bcc [IMP] *: update modules to use the new geoip API
request.geoip is no more a dictionnary cached in the session. It is now
a full blown object with lazy and smart geolocalisation capabilities.

Among other things, the previous dictionnary API is now deprecated. The
changes are:

* `request.geoip['country_name']` -> `request.geoip.country_name`
* `request.geoip['country_code']` -> `request.geoip.country_code`
* `request.geoip['city']` -> `request.geoip.city.name`
* `request.geoip['latitude']` -> `request.geoip.location.latitude`
* `request.geoip['longitude']` -> `request.geoip.location.longitude`
* `request.geoip['region']` -> `(request.geoip.subdivisions[0].iso_code if request.geoip.subdivisions else None)`
* `request.geoip['time_zone']` -> `request.geoip.location.time_zone`

It is safe to access all the attributes. Doing `request.geoip.city.name`
when the geolocalization failed (missing db, invalid address, ...)
evaluates to None. It does not raise an AttributeError.

Task: 2848206
Part-of: odoo/odoo#91337
2023-01-03 13:16:02 +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
Rémy Voet (ryv)andJulien Castiaux f6c7ead359 [IMP] tests: RecordCapturer now keep the order of record creation
closes odoo/odoo#104838

Related: odoo/enterprise#33562
Signed-off-by: Rémy Voet <ryv@odoo.com>
Co-authored-by: Julien Castiaux <juc@odoo.com>
2022-11-07 11:26:33 +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
qsm-odoo eed3f1bc59 [FIX] website, *: hide page options for non-designer users
*: website_blog, website_crm_partner_assign, website_customer,
   website_event, website_event_exhibitor, website_event_meet,
   website_event_track, website_forum, website_hr_recruitment,
   website_membership, website_sale, website_sale_loyalty,
   website_sale_slides, website_slides, website_slides_forum

With commit [1], the "customize_show" options were moved in edit mode.
They were wrongly displayed for non-designer users. Trying to use those
would throw a warning at the user.

[1]: https://github.com/odoo/odoo/commit/17a8a37e9bfc5b787d9666597d43e63f0064919f

closes odoo/odoo#103142

X-original-commit: f2ca62a4a9ccb6713a39c100fc87c112619eac41
Related: odoo/enterprise#32768
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-10-12 10:35:05 +02:00
Younn Olivier d6bf2c0cbf [FIX] website, *: redirect to the WebsitePreview using ir.actions.client
*: website_forum, website_hr_recruitment, website_sale

Before this commit, most of the backend redirections to the
WebsitePreview, introduced in [1], were using ir.actions.url with the
get_client_action_url util, which was not optimal.

This commit changes that to use a new get_client_action method, which
returns the ir.actions.client record. It will execute the action
directly, avoid to redirect the router before, and improve performances.
Also, it allows to solve bugs, as:
- The back navigation from the WebsitePreview to the ListViews.
Going through the /web controller would add an entry in the history, and
going back on it would reload the client action.

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

task-2687506

closes odoo/odoo#102991

X-original-commit: 30fb11e479fb7b3db3649e55fcbdb06bfcdb398c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-10-11 08:07:46 +02:00
Martin Trigaux fde3f4d4b9 [I18N] *: export 16.0 source terms
closes odoo/odoo#102163

X-original-commit: 011d7aac5aacedb3ab373f247471ba69d67f50f3
Related: odoo/enterprise#32288
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-10-06 14:56:52 +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
xO-Tx b0484d64c4 [FIX] website, *: fix website content kanban views
*: website_blog, website_forum, website_hr_recruitment, website_sale,
   website_slides

The goal of this commit is to set the missing 'view_ids' on some
actions linked to website 'pages' tree/kanban views.

Linking a form view to actions will make the 'Edit' & 'Configuration'
buttons work correctly (on kanban record dropdown for 'hr.job' &
'slide.channel').

The website url on "product pages" kanban should start on a new line
after this commit too.

Related to task-2889981

closes odoo/odoo#101814

X-original-commit: a61e730cd9f92b2c343646f33f3e59cef518c3bf
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-10-03 20:19:53 +02:00
xO-Tx 0d6ca33f5d [FIX] website, *: add multi-edit for jobs pages
*: website_hr_recruitment

After [1], the multi-edit was added on the pages list views not using it
except 'hr.job' records since editing the 'Department' field leads to a
traceback.

The goal of this commit is to fix this issue by setting an invisible
'company_id' (to be available in domains since necessary to change
'Department') and add multi-edit on the view.

The 'home' icon for 'home page' records on list view should be hidden
after this commit (on multi edit mode) to edit the fields correctly.

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

Related to task-2889981

X-original-commit: d101be46a2a9c392e2d63f491fcc5ccec2d65c78
Part-of: odoo/odoo#101814
2022-10-03 20:19:53 +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
Aaron Bohy 6f455ca0c9 [FIX] website_hr_recruitment: remove toggle_button widget
For the sake of consistency with the other website content views,
this commit removes the `toggle_button` widget to display the
`is_published` field in the jobs list view.

closes odoo/odoo#101504

X-original-commit: 59b9b52bec9edd5de9b24cb8c353cdc73945d4bf
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-28 21:26:35 +02:00
xO-Tx f23399db1d [IMP] website, *: add website content kanban views
*: website_event, website_forum, website_hr_recruitment,
   website_sale, website_slides

The website content list views should act as a page manager (click on
a record redirects to iframe, "CREATE" and "Publish / Unpublish"
buttons, ...).

The goal of this commit is to add a kanban version of these views for
key app models ('website.page', 'blog.post',...) since the same code
can now be used for list and kanban controllers / renderers since [1].
It is especially important in mobile where the kanban views are nicer
than list views by default.

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

task-2889981

closes odoo/odoo#101174

Related: odoo/enterprise#31821
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-27 14:54:40 +02:00