Commit Graph
30 Commits
Author SHA1 Message Date
pash-odoo 6f9e561783 [FIX] hr_skills: fix resume end date wrong selection
before this commit, in resume we are able to put end date less than start date
which is not possible in real life.
make change in constraint to check selected end date is greater than start date.
make changes in demo data of end date which are according to new changes.

task-3397726

closes odoo/odoo#136326

X-original-commit: 1cf56688126d3f0a1d27f4ed5ee995c4dcd956bc
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-09-25 15:20:19 +00:00
Yannick Tivisse 9aced74696 [FIX] hr_skills: Allow deleting skill, skill levels and skill types
PURPOSE
=======

Starting from 16.0 we introduced some reports to log skills history, skills evolution.

It means that the skill model is linked to another model, preventing us to delete it.

Usually, we use the message "link to x, archive it instead", but archiving a skill will only be possible from v17 (new task)

So, we need to be able to delete a skill on v16

closes odoo/odoo#131300

Taskid: 3456843
X-original-commit: d9672b55e7a596778fd542541f39e5216c06cb40
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-08-09 19:27:15 +02:00
Rémy Voet (ryv) c5cb357d90 [IMP] *: add dependencies to display_name field
The previous commit introduced an optimization to reduce the number of
queries and fields fetched when we call `name_search`. But it works much
better when the dependencies of `display_name` contain field names used
in the calculation (on the same record/model).

Then, to improve the performance and the cache coherency, add `depends`
and `depends_context` depending on the custom `_compute_display_name`.
Add only the first level of dependencies (never traverse relational
field) because only these have a positive impact on the previous
optimization and the cost is very low (see `modified`).
About `depends_context`, we don't include `lang` because (when `_` is
used by example) it is unlikely to get the same display_name in the same
request with two different lang.

closes odoo/odoo#122085

Related: odoo/documentation#4639
Related: odoo/enterprise#42599
Related: odoo/upgrade#4780
Signed-off-by: Raphael Collet <rco@odoo.com>
2023-06-28 17:41:19 +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
Dossogne Bertrand 3b78f6ae9b [IMP] hr_skills: make resume lines translatable
Before this commit, the name and description of resume lines
were not translatable.

task-3323624

closes odoo/odoo#121166

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-05-31 15:53:59 +02:00
Thomas Lefebvre (thle) 1b662986bd [FIX] hr_skills: add default skill type
Steps to reproduce:
- enable "Skills Management" in Employee app;
- create a new employee;
- add skill by creating a skill level ("Create and edit").

Issue:
A traceback appears.

Solution:
Add the default skill type in the context
so that it can be used during creation.

opw-3269030

closes odoo/odoo#118555

X-original-commit: d553527403f4352da23673b91052e706841e1438
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-04-14 09:39:50 +02:00
Yannick Tivisse 3c4af0cd08 [IMP] hr_skills: Print CV
closes odoo/odoo#101639

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-02-15 17:59:07 +01:00
niyasraphy 044231fb10 [FIX] hr_skills, hr_skills_{}: fix typo
closes odoo/odoo#107513

X-original-commit: 641571c27a2c8cfb4da243977ddec512dea11587
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-12-09 10:45:02 +01:00
niyasraphy 40d86ef921 [FIX] hr_skills: remove duplicated model definition
closes odoo/odoo#106993

X-original-commit: 8a32755ce90ffd4edbcde1af363e1808a7f09c03
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-12-08 13:37:52 +01:00
sofiagvaladze 39efb6116a [FIX] hr_skills: Skill history report
Prior, by default Skill history report goes to stacked view.
Which is not informative for the kind of information that is displayed.

task - 2993831

closes odoo/odoo#101656

X-original-commit: 1951b56d91dc17ec8d81257e8c431f7a24420e2b
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-30 09:31:45 +02:00
Dossogne Bertrand c77f2d60af [FIX] hr_skills: fix permissions on employee page
Before this commit, a user wasn't able to modify
a skill from the employee page.

closes odoo/odoo#99214

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-05 14:50:43 +02:00
Kevin Baptiste adf7320342 [IMP] hr_*_skills: migrate skills/resume widgets to Owl 2022-08-24 09:23:01 +02:00
Yannick Tivisse 7291e9da9c [IMP] hr(_skills): Allow grouby skills and tags
closes odoo/odoo#93684

Taskid: 2880658
Related: odoo/enterprise#28436
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-06-16 11:25:02 +02:00
Yannick Tivisse 4918c1a87b [IMP] hr_skills: Add skills history reporting
closes odoo/odoo#93312

Taskid: 2868601
Related: odoo/enterprise#28249
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-06-15 12:23:07 +02:00
Yannick Tivisse 16ee5235e0 [MOV] hr_skills: Split model files according to coding guidelines
Part-of: odoo/odoo#93126
2022-06-09 15:26:22 +02:00
sofiagvaladze afbc213e2c [IMP] hr_skills: add _order fields on models
task - 2687370

closes odoo/odoo#81836

Related: odoo/enterprise#22723
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-03-14 17:27:57 +00:00
Dossogne Bertrand b79c5b17e3 [IMP] hr_skills: improve appraisal usability
after this commit:
- you are able to create new skills from an appraisal form
- you select skills more easily

taskID #2766619 [Appraisals] Skills usability

closes odoo/odoo#84892

Related: odoo/enterprise#24518
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-03-14 09:42:24 +00:00
Yannick Tivisse 20f556644b [IMP] hr*: Avoid creating useless objects on salary simulations
Part-of: odoo/odoo#85133
2022-02-28 17:27:07 +00:00
Kevin Baptiste a8d3ba8a8b [IMP] hr_skills: ensure Progress is positive
It was possible to have negative Progress on a skill, which doesn't make
sense.

Here we ensure it's a valid percentage between 0 and 100 inclusive.

odoo/upgrade#3238

closes odoo/odoo#84442

Taskid: 2762009
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-02-17 10:08:53 +00:00
Dossogne Bertrand 23f2f6638f [IMP] hr_skills: improve dropdown readability
Description of the issue/feature this PR addresses:
When you want to add/select new skills, it could be more clear.

Current behavior before PR:
When you want to change a skill level, you have to select a skill level to see its progression value

Desired behavior after PR is merged:
- The progression value is displayed beside the skill level in the dropdown list.
- In the appraisal module, the same thing applies to skills, which also feature the skill type in the dropdown list.

task: #2719642 [Skills] Overwrite name_get()

skill dropdown

[IMP] hr_skills: do not display skill option if skill_type is unselected

closes odoo/odoo#82202

Related: odoo/enterprise#23237
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-02-09 10:52:35 +00:00
Kevin Baptiste 28eba3d6db [IMP] hr_skills: improve UX
- Reset skill levels on skill/skill type change
- Improve form view
- Add a sequence on hr.skill

closes odoo/odoo#73305

Taskid: 2575351
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-11-18 10:53:59 +00:00
Raphael Collet 35a9f6c27a [FIX] core: SELF_READABLE_FIELDS and SELF_WRITEABLE_FIELDS on res.users
Avoid setting up those lists with method __init__() on the model, since
the model's class no longer has the expected parent classes.
2021-05-06 07:30:24 +00:00
Martin Trigaux 80e97e98ce [IMP] *: use named placeholders in translated message
When more than one parameter is present in a message, it helps the
translation to use named placeholder. This way, the order can be
changed. It also helps the comprehension of the message.
2020-06-18 13:03:34 +02:00
Raphael Collet 6a69f107df [FIX] *: useless parameter 'ondelete' on One2many fields
Note: some of them were moved to the corresponding M2O.
2020-04-07 09:25:08 +00:00
Martin Trigaux f8ff7debdc [FIX] *: bad usage of _ method
No need for selection fields
If in global variable, the _lt should be used instead

closes odoo/odoo#31211

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-01 12:40:01 +00:00
RomainLibert b43d4ed71f [IMP] hr_skills: Adapt module with new hr.employee.public model 2019-05-31 10:21:21 +02:00
jbm-odoo 59e6611736 [IMP] hr_skills*: Add certification and course in employee profile
When a employee succeed a course or a certification, a new line
will be added in resumé of employee profile.

+ [FIX] hr_skills: remove sequence to sort resumé

Actually, sorting a resumé doesn't work because we add new line for
title in the array.

With this commit, all sequence are removed. The resumé is sorted
by date and skills are sorted by level.

closes odoo/odoo#31764

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-04-16 14:48:25 +00:00
Yannick Tivisse 0ab333c6e8 [FIX] hr_skills: Don't set 'false' line in no value to set
closes odoo/odoo#31334

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-03-11 14:28:14 +00:00
Lucas Lefèvre f6d2d0fd87 [FIX] hr_skills: Allow searches on employee skills/resumé
Search term should match in the resumé line title or
in the resumé line description.
2019-03-11 14:28:13 +00:00
Lucas Lefèvre 8e14972830 [ADD] hr_skills: Introduce a new module for employee resumé and skills
Purpose
=======

Consultancy companies need resumé and skills of their consultants.
For big projects, they often need to send them to their customers.
These informations are also useful to statistics.

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

New models
----------

1/ `hr.resume.line.type`
Types of resumé lines. e.g. *Experience*, *Education*, *Hobbies*

2/ `hr.resume.line`
It is a line in the resumé of an employee.

3/ `hr.skill`
Name of a skill. e.g *French*, *Python*, *Piano*

4/ `hr.skill.type`
Skills can belongs to a particular type. A skill type has skill levels associated.
e.g. *Languages*, *Dev*, *Music*

5/ `hr.skill.level`
Levels available for a particular skill type. Each level has a label
and a progress (between 0 and 100) associated.
e.g. *Intermediary (20%)*, *Advanced (85%)*, *Expert (100%)*

6/ `hr.employee.skill`
These are skills which employees have. It links an employee with a particular skill
and level.
e.g. Mitchell has an *Intermediary* level in *Python*

Access Rights
-------------

Only a `hr_user` can create/edit `hr.resume.line.type`, `hr.skill`, `hr.skill.level`, `hr.skill.type`.
If employees are allowed to edit their infos (setting), they can also create/edit `hr.resume.line`,
`hr.employee.skill` for themselves.

UI
--
Resumé lines are displayed, grouped by type, in a new 'Resumé' tab in the employee
form. Resumé lines can be reordered (handle widget)

Emloyee skills are displayed in the Resumé tab, grouped by skill type.
2019-02-14 16:28:55 +01:00