Commit Graph
21 Commits
Author SHA1 Message Date
Yannick Tivisse 7bd2327d79 [IMP] hr_recruitment: Remove restrictive and confusing ir.rule
No need to hide the chatter to recruiters, as the salary configurator
has been improved to avoid posting sensitive data on the application
form itself.

TaskID: 3101400
2023-07-05 14:21:28 +02:00
sofiagvaladze 3faad0a7a0 [IMP] hr_recruitment(_skills/_survey): grant interviewer more rights
Purpose: In order to increase visibility of the interviewer group,
it is moved from hidden group, to recruitment group.

Moreover, we grant the interviewer additional rights in order to manage
the application process properly and be able to execute following actions
• Send an interview
• Check interview results
• Add/delete/modify skills
• Create a meeting

In order to allow above mentioned actions on skills to the interviewer,
we grant them all the rights to the hr_applicant_skill.

In order to let the interviewer send the survey we grant them access to
the private addresses and now recruitment-interviewer implies
survey-officer group as well.

Additionally, for the security purposes, we make a change, so that
the survey officer is not able to read recruitment interview results
unless they are also an interviewer for a specific applicant.

task - 3179332

closes odoo/odoo#118897

Related: odoo/enterprise#40696
Related: odoo/upgrade#4624
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-27 17:33:02 +02:00
dasz 12ebca8818 [IMP] hr_recruitment: improve workflow based on heavy usage from India
- kanban view progressbar based on status
- new first column 'New' with the welcome mail template
- create date column renamed to 'applied on' and moved to front

task 3346175

closes odoo/odoo#123293

Related: odoo/enterprise#42098
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-27 10:42:33 +02:00
Kevin Baptiste 7fc04795a8 [FIX] hr_recruitment: count archived/refused for other applications
The fix introduced in odoo/odoo#119017 was no longer taking into account
the refused/archived applications, showing a negative number in some
cases.

task-3293460

closes odoo/odoo#120426

X-original-commit: 55e279f96c9d878103657f437222066ae74dcf0f
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-05-03 15:04:56 +02:00
sofiagvaladze 012a5e761d [FIX] hr_recruitment: simplify application_count computation
Prior, application_count was computed in batch. In order to do
so, the complex query was used, which can be error prone.

As the field is only used for smart button on the form, we can assume
that the method will be called for one record at a time, thus using ORM
methods will not make big difference in terms of speed, while it is more
elegant and secure.

Note: that we still need to have _compute_application_count in batch,
as it is a compute method.

task - 3266694

closes odoo/odoo#119373

X-original-commit: 8480a6a6da8ef319047d11be489f546d368dfc56
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-04-22 05:52:31 +02:00
sofiagvaladze faf0f0130b [FIX] hr_recruitment: correctly count the number of applications
Previously, the "Other applications" smartbutton was incorrectly
matching with the applicants with '' on the fields. We don't want
applicants to match if both of them has '' on the matching fields.
Moreover, record rules were not correctly applied for application_count
calculation, as current record will not match with similar record
which has no company defined on it.

This commit fixes the above mentioned issues.

task - 3266694

closes odoo/odoo#118805

X-original-commit: e8263e56423432e9465f70d26fce60c021eabaa2
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-04-17 18:01:26 +02:00
Kevin Baptiste b658171ea2 [IMP] hr_recruitment: allow multiple interviewers on applicant
Allow multiple interviewers on hr.applicant instead of a Many2One.

odoo/upgrade#3904
task-2939388

closes odoo/odoo#100338

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-16 23:49:43 +02:00
Joren Van Onder 7a89246e9f [FIX] hr_recruitment: don't send chatter to Recruitment Interviewers
1f7c83cc3e renamed _notify_compute_recipients to
_notify_get_recipients. This function was not renamed with it so
members of the hr_recruitment.group_hr_recruitment_interviewer group
were receiving chatter they shouldn't be receiving.

The test didn't catch this because:

- the interviewer was not subscribed and thus never received email,
- MockEmail._filter_mail got passed status=False instead of None,
  which always made it return an empty mail.mail recordset.

opw-2898730

closes odoo/odoo#95004

X-original-commit: 4dd9d3ee6fb261fd856036ced35bfb15b302b0b7
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-07-01 16:36:02 +02:00
sofiagvaladze 5dca077c68 [IMP] hr_recruitment: Improve multi applicant count
Purpose:
At the moment, you can only find multi applications for the same applicant
based on the similar email.
Not every application comes through the same email.

We want to find same applicants based on the same email, phone or
mobile phone.

task - 2701472

closes odoo/odoo#86428

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-04-29 11:01:15 +02:00
Kevin Baptiste 63c4a9b951 [IMP] hr_recruitment: add Interviewer access rights
Create a new Interviewer access rights.

This right is automatically given to users that are added as
Interviewers on a Job Position or on an Application.

An interviewer can only access applications they are interviewer of the
job or the application itself, the chatter is disabled for them as it might
contain some sensitive information (salary details, contract link, etc.)

closes odoo/odoo#78622

Taskid: 2669730
Related: odoo/enterprise#21778
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-01-24 11:09:50 +00:00
sofiagvaladze 3018a91eaa [FIX] hr_recruitment: correct smart button display info
It is more intuitive that application_count smartbutton has
the label 'x Other applications'.

task - 2695252

closes odoo/odoo#80551

X-original-commit: f1a2f51fec0a31b80a20c78a5b3d11561dce7164
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-12-03 08:55:43 +00:00
Aurélien Warnon 1e25946a76 [IMP] utm: globally improve UTM records management across all apps
PURPOSE

This commit consolidates UTM usage across all applications.

Global purpose is to avoid having undesired side-effects, such as unlinking an
utm.source/utm.medium/utm.campaign and at the same time cascading the deletion
to various records without noticing.

SPECS

ALLOW MORE PEOPLE TO CLEAN UTM RECORDS

Currently, not even the system administrator can delete utm.mediums and
utm.sources (he can only delete campaigns).

These were considered as "technical records", but allowing some cleanup is
a good idea since these records are often automatically generated and can
create a lot of unnecessary noise in the database.

That's why we now allow the following groups to delete all UTM records
(sources, mediums and campaigns):
- group_system
- group_mass_mailing_user
- group_social_manager (enterprise)

PREVENT DELETION

For some use cases, removing an utm.source/utm.medium/utm.campaign would
cascade delete the related record, which was unintended / hidden side effect.

These combinations were secured by preventing to unlink:
- mailing.mailing source_id field
  Trying to delete the utm.source will throw an error message
- mailing.mailing medium_id field
  Trying to delete the utm.medium will throw an error message
- hr.recruitment.source source_id field
  Trying to delete the utm.source will throw an error message

ADDING CLEAN ERROR MESSAGES

When trying to delete an UTM record that is linked with ondelete="restrict", we
improved the error message to give a clear explication to the user, e.g:

"You can't delete these UTM sources as they are linked to the following
mailings in the Mass Mailing APP, and deleting the source would break the
statistics: Newsletter"

SPECIFY 'ondelete' strategy

For a lot of uses of sources/mediums/campaigns, the 'ondelete' strategy was not
specified, leading to the confusion of "is this really how we want to handle
this?".

A lot of ondelete="set null" have been added in various field definitions to
ensure that this is the desired and logical strategy we want for that
specific model.

PREVENT REMOVING HARDCODED UTM RECORDS

In some functional flows, UTM records are hardcoded using their direct
record reference.
This is notably the case for the recruitment process and its creation of
aliases, and for the Email / SMS Marketing flows.

As deleting them would break these flows, we prevent their deletion in a
"api.ondelete" method.

ENFORCE NEW RULES WITH TESTS

A lot of python tests have been added to make sure we enforce the decisions
taken here above.

LINKS

ENT PR odoo/enterprise#19048
Task-2459480

closes odoo/odoo#72239

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-23 11:12:04 +00:00
William Braeckman 99b1c30c6a [IMP] hr_recruitment: find duplicate applications ignoring case
Improves the application count compute by ignoring case when matching
applications by email.

TaskId-2669835

closes odoo/odoo#78541

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-10-27 05:54:40 +00:00
João Marques b99491cf4d [IMP] hr_recruitment: Add option to subscribe users to new applications automatically
Provide a new message subtype to allow users to be automatically subscribed to new applications from a Job Position.

TT30413

Part-of: odoo/odoo#75736
2021-09-03 10:38:00 +00:00
Yannick Tivisse b70a6cdf5c [IMP] hr_recruitment: Avoid multi-executed tests
closes odoo/odoo#40020

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-12 11:34:36 +00:00
Yannick Tivisse f071182b1e [IMP] hr_recruitment: Adapt tests to work with/without demo data 2019-11-05 13:08:03 +01:00
Julien Castiaux 4f03a5f136 [FIX] *: remove old deprecated modules/functions
PEP-594 is deprecating a bunch of modules. As part of the cleanup, we
are also dealing with long deprecated modules, functions and aliases.

* `assert_` -> `assertTrue`
* `assertEquals` -> `assertEqual`
* `assertNotEquals` -> `assertNotEqual`
* `assertAlmostEquals` -> `assertAlmostEqual`
* `assertRaisesRegexp` -> `assertRaisesRegex`
* `assertRegexpMatches` -> `assertRegex`
* `base64.encodestring` -> `base64.encodebytes`
* `base64.decodestring` -> `base64.decodebytes`
* `inspect.getargspec` -> `inspect.signature`
* `inspect.formatargspec` -> `inspect.signature`
* `logging.warn` -> `logging.warning`

closes odoo/odoo#36863

Task: 2003936
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-09-17 11:36:42 +00:00
Thibault Delavallée 7b79045fab [REF] mail: perform some code cleaning in mail gateway about parsing email values
PURPOSE

Add some improvements in mail gateway: remove private discussion, improve
bounce management, allow resetting bounce counters, improve automatic set or
reset of blacklists and ease mass mailing inheritance.

SPECIFICATIONS

Parsing email values: make message_parse effectively prepare all required
values for later processing

  * update message_parse to add some more data directly in parsed dictionary
    and avoid having to parse value again in later processing and computation.

    * notably recipients computation is now done directly in parsing. It
      includes email check and reconstruction using tools methods. That way
      routing just has to handle those values and not compute part of them;
    * from and cc are correctly managed with parsed and cleaned (sanitized)
      versions in dictionary;
    * remove all code decoding message header and replace them by fetching
      the parsed value instead;

  * filter parsed values before calling message_post to ensure right values
    are given to it instead of having to manage them in message_post. Indeed
    caller has to give the right input;
  * make parsing sub-methods (extract payload, post process payload) have
    a dictionary as input and output to always manage a dictionary of values
    through the parsing methods and update their namespace;

Routing: remove deprecated code parts

  * remove use of email_references regex. Indeed emails are routed using their
    messageId and not the regex anymore since several versions [1];
  * clean some unnecessary variables;
  * simplify variable type input, like message_parse accepts only valid
    email.message instances and to avoid several decode / encode. Tests are
    updated accordingly;

Update docstrings of those methods.

LINKS

Related to task 1893155
Linked to PR #33340

[1] See df037e2959 and 0028c42136
2019-08-09 14:30:55 +00:00
Raphael Collet b7fd679a6c [FIX] *: sudo() -> with_user() 2019-07-04 11:32:22 +00:00
Thanh Dodeur c212cfe899 [REF] *: removes datas_fname from ir.attachment
This commit removes the field `datas_fname` from `ir.attachment` as
it was unnecessary and most of the time the duplicate of `name` or
`url`.

Task #1909865

closes odoo/odoo#32976

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-06-05 09:12:13 +00:00
Axay Javiya 4fe90a4fb4 [IMP] hr_recruitment: Convert yml into python test case 2017-06-13 15:38:50 +02:00