Commit Graph
1113 Commits
Author SHA1 Message Date
Kevin Baptiste 0c1d259728 [IMP] hr_contract: only show HR Officer as responsible
Add a domain on the HR Responsible field to only show HR Officers.

task-2959207

closes odoo/odoo#99540

Related: odoo/enterprise#31057
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-05 18:35:58 +02:00
Martin Trigaux 4224566a61 [I18N] hr_contract: export source terms
Avoid duplicated entry

closes odoo/odoo#99516

X-original-commit: 47f4f036202e778bc181d6dbf8609b658f4a53b8
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-09-03 08:13:38 +02:00
Raphael Collet b38a5f78b6 [FIX] *: avoid non-searchable field dependencies
closes odoo/odoo#98562

Related: odoo/enterprise#30639
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-08-29 22:43:11 +02:00
Denis Ledoux 44be7a4ba6 [IMP] hr_contract: move group inside the view
The goal being to get rid of the `groups_id` feature for backend views

Part-of: odoo/odoo#98551
2022-08-29 22:42:53 +02:00
Kevin Baptiste 5d4aa927f1 [FIX] hr_contract: properly position first_contract_date
Properly position the field first_contract_date by using a more explicit
xpath, as the previously used field was added as invisible in odoo/odoo#95729.

closes odoo/odoo#98777

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-08-25 04:20:55 +02:00
sofiagvaladze 6106f2eb9a [FIX] hr_contract: fix access error when archiving employee
Scenario:
hr_contract is installed and employee/officer without rights on contract
tries to archive an employee.

Before the fix:
An employee/officer without rights on contract gets the following access error:
Due to security restrictions, you are not allowed to access 'Employee Contract' (hr.contract) records.
THis is because the action tries to access employee's contract and set
date_end on it.

After the fix an employee/officer without rights on contract can archive
an employee without access error.

task - 2811165

closes odoo/odoo#98648

X-original-commit: c7ff577053a120f8f961642891d3a0ec0c960ae8
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-08-23 16:29:29 +02:00
Denis Ledoux 0501bbd62e [IMP] base: uniform "groups" in back-end view
This revision is to make uniform the behavior of the `groups` attribute
on the Python model fields
and on the node in the view architecture.
In both cases, remove the node from the view completely.

Before this revision,

in a back-end view:
 - In the Python model, if a field has the `groups` attribute set
   and the user is not part of
   the groups, the field is removed, completely, from the view.
 - In the view architecture, if a node has the `groups` attribute set
   and the user is not part of
   the groups, the node is made invisible (not completely removed, just
   made invisible).

in a front-end view:
 - if a node has a "groups" or "t-groups" set and the user
   is not part of the groups, the node is removed from the view.

So it's 2/3 cases removing nodes restricted to a group.
and 1/3 case making invisible nodes restricted to a group.
It's simpler to have a uniform behavior for the 3 cases,
simpler to understandard for developers.

In addition, this will help for the goal to cache back-end views.
It makes possible to convert views using the `groups_id` field
by moving the content of these views directly
in the view to which they add content which is suppose to be completely
removed when the user has not the according group.
By getting rid of the `groups_id` many2many field on `ir.ui.view`,
it makes possible to cache the view architecture without
requiring to use the groups in the cache key.
Currently, if we want to cache the view architecture,
it would be required to use the intersection of the user
groups with the `groups_id` groups of the view,
making it costly to compute the cache key,
therefore altering the performance point to cache the view
architectures.

closes odoo/odoo#95729

Related: odoo/enterprise#29592
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-08-19 19:10:39 +02:00
Stefan-Calin Crainiciuc (stcc) df9c2967f0 [FIX] hr_contract: remove create button for contract history
Steps to reproduce:
- install hr and hr_contract apps
- go to Employees app > Employees > Contracts
- switch to Kanban view

There you can see a 'Create' button. If you click it, it creates a
contract history form view for the default employee, which is 'False'.

This view is not needed, since it doesn't make sense to create a contract
history by itself, as opposed to creating a contract history when a new
employee is added to the database.

This commit removes the contract history 'Create' button.

opw-2929424

closes odoo/odoo#97780

X-original-commit: 337400b00bcaced2f27417e7a925582b80b6a514
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: stcc-odoo <stcc@odoo.com>
2022-08-19 14:28:16 +02:00
Dossogne Bertrand cffedb2ee9 [IMP] hr_contract: hr_contract_history_list to owl
taskID 2957257

closes odoo/odoo#98397

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-08-19 09:12:48 +02:00
Yannick Tivisse f9adbaf422 [IMP] hr: Improve demo data
closes odoo/odoo#98027

Taskid: 2784316
Related: odoo/enterprise#30398
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-08-12 20:16:50 +02:00
Yannick Tivisse e66995d5fa [IMP] hr_contract: Make contract type name translatable
closes odoo/odoo#97896

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-08-10 16:08:21 +02:00
stefanorigano (SRI) 56064ff1e4 [REM] *: drop oe_clear class in favor of clearfix bootstrap default
Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2918463

Part-of: odoo/odoo#97051
2022-08-04 13:54:14 +02:00
Fabien Pinckaers 3363e55cac [IMP] cleanup of help messages in all modules
This commit aims at removing unuseful help message to:
1/ reduce translators work, to focus on more useful translations
2/ not sending unuseful information in load_views
3/ reduce help message to useful messages, so that we can mark
   fields having a tooltip in the future UI.
4/ some cleanup of existing messages too

The main use cases:
- REMOVED: help redundant with the field name, providing no extra info
- MOVED TO COMMENT: technical help messages, that should not be in UX

closes odoo/odoo#97279

Signed-off-by: Fabien Pinckaers <fp@odoo.com>
2022-08-02 00:26:53 +02:00
David Tran d4370e06e7 [FIX] hr_contract: wrong model _description
_description of the `hr.payroll.structure.type` should be "Salary
Structure Type" instead of "Contract Type"

closes odoo/odoo#96653

X-original-commit: 49ecc72b2971edc57f85d4bea50901021b4f3f7b
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-07-27 04:53:31 +02:00
Yannick Tivisse 178e599360 [IMP] hr_contract: Remove FTE wage fields
closes odoo/odoo#96157

Related: odoo/enterprise#29541
Related: odoo/upgrade#3693
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-07-18 18:41:59 +02:00
Romeo Fragomeli 1fcd098af5 [REF] *: BS5: migration
Automated change made by a lot of RegEx to change all think that is
possible to automate.

https://getbootstrap.com/docs/5.1/migration

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:24 +02:00
Samuel Degueldre a7be88cd91 [REF] hr_contract, web: give tooltip info as t-call-context
Previously, we would use t-set to add the tooltip info under the key
"info" in the rendering context, while this works fine, it was mostly
just a workaround for the lack of support in owl for passing a rendering
context to be used by the t-call directly. Since this is now supported
in owl, the commit uses this feature for the tooltips and adapts the
call sites.

Part-of: odoo/odoo#92475
2022-06-30 09:29:47 +02:00
Dossogne Bertrand c5679f0e22 [IMP] hr_contract*: improve general usability
*:
hr_contract
hr_work_entry
hr_work_entry_contract

This commit changes several views and methods to improve general usability of the payroll application

TaskID #2783013

closes odoo/odoo#89311

Related: odoo/enterprise#26466
Related: odoo/upgrade#3534
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-06-29 12:19:03 +02:00
Dossogne Bertrand 6cf977b078 [IMP] hr_contract: avoid screen shaking
On a contract view, if you hover the warning of a calendar mismatch,
the appearing warning text may lengthen the page, adding a scrollbar and
modifying the overhaul layout of the page on the chrome browser.
This commit keeps the text visible anyway so that no changes can cause
that screenshake.

Visual of the error:
https://watch.screencastify.com/v/MGPnCksg2eW49b7CoZc5

taskID 2878189

closes odoo/odoo#94142

X-original-commit: ddb4d6e463cbd410d59685effb189d654c581994
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-06-21 13:22:50 +02:00
Martin Trigaux 5acb6db891 [I18N] *: export saas-15.4 source terms
closes odoo/odoo#93246

X-original-commit: 5ff6d185f70650c26c28a6aef7dd37c859ab58d2
Related: odoo/enterprise#28218
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-06-10 07:27:26 +02:00
Yannick Tivisse 95ed4ce98a [FIX] hr_contract: Allow retrieving first contract date at given time
closes odoo/odoo#92310

X-original-commit: f78aad96bcf1d499e4da4b634d56efdd2342ccdf
Related: odoo/enterprise#27780
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-05-27 11:45:51 +02:00
Yannick Tivisse fdc54c4aab [FIX] hr_contract: Display the same count than the number of related contract
Purpose
=======

We open the contract history view, the count shouldn't be based on the
contracts, but on the history itself (to exclude canceled contracts for
example).

closes odoo/odoo#92040

X-original-commit: 5754eb95d681ec9ad63bf1a3c98a60cbb75d2869
Related: odoo/enterprise#27652
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-05-24 16:00:02 +02:00
Yannick Tivisse 19441d2902 [FIX] hr_contract: Reset current contract on stage modification
Purpose
=======

Let's say we have 2 contracts A and B:

A --> Running
B --> Cancelled
contract_id : A

B is set to Running
Contract_id : B

B is set to Cancelled
contract_id : B

In this case, the current contract should be reset to A.

X-original-commit: f736264881cbb3086430ea8cd7dba7c4f5a351f4
Part-of: odoo/odoo#92040
2022-05-24 16:00:02 +02:00
Kevin Baptiste 72886a6210 [IMP] hr_contract: automatically expire contract when past end date
Automatically closes contracts when the end date is set in the past.

closes odoo/odoo#90714

Taskid: 2845368
Related: odoo/enterprise#27037
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-05-12 13:42:46 +02:00
William Braeckman f51afa1ed4 [IMP] hr_work_entry_contract: prep work for multiple sources
Prep work to allow work entries to be created from multiple sources when
using contracts.
The end goal is to be able to generate work entries from attendance as
well as the planning app.
After that the plan is to make sure the implementation works well with
payroll for hourly wages.

This commit contains the necessary changes for the next work_entry
modules to work.

TaskId-2466871
2022-05-11 11:23:04 +02:00
Dossogne Bertrand 605a3c1e44 [IMP] hr_*: uniformize group category
*:
approvals
hr_apprasaisal
hr_payroll
hr_referral
fleet
hr
hr_attendance
hr_holidays
hr_recruitment
lunch

Change various access rights names to improve understandability for users.
Addition of an officer role in fleet with intermediate accesses

TaskID 2742855

closes odoo/odoo#87545

Related: odoo/enterprise#25741
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-05-03 14:38:19 +02:00
Victor Feyens 42bad1a6d2 [IMP] *: remove useless keys from manifests
Remove most values uselessly specified because giving the same value as 
the default one (see _DEFAULT_MANIFEST in odoo/modules/module.py)

* auto_install is Falsy by default
* author is Odoo SA by default
* summary & description are empty strings by default
* application is False by default
* test, demo, depends and data are empty lists by default

This will reduce noise/inconsistencies between manifests specifications, 
simplify analysis of manifests content, ...

closes odoo/odoo#90209

Related: odoo/enterprise#26807
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-05-03 13:31:16 +02:00
Philippe Wauthy 9e14c112ee [IMP] hr_contract: add employee manager role
Currently, there are two security roles in Payroll: officer and administrator.
Both roles allow the user to have a full overview on all salaries of the company.

This commit adds an employee manager role allowing an employee manager to view
his reports' contracts.

task-2731933

closes odoo/odoo#83191

Related: odoo/enterprise#23669
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-04-27 11:05:59 +02:00
Dossogne Bertrand f10b59c964 [IMP] hr_payroll: improve user experience
The commit brings various features to the payroll app :
- visual improvements
- choice to recreate the original after a work schedule change
- after a new contract is sign, its differences with the last one is displayed in the chatter

TaskID : 2762038 [Payroll] Misc improvements

closes odoo/odoo#85581

Related: odoo/enterprise#24873
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-04-26 09:57:43 +02:00
Kevin Baptiste 91507c1d39 [IMP] hr_{contract,skills}: re-organize Settings menu
Taskid: 2796407
Part-of: odoo/odoo#87082
2022-04-04 17:48:29 +02:00
Kevin Baptiste 5ff6b41f67 [IMP] hr_contract: properly define first_contract_date
Removing the `related` makes it properly defined on the SQL view and
allows the field to be searched.

closes odoo/odoo#87885

Taskid: 2781421
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-04-04 13:43:52 +02:00
Leonardo Pavan Rocha 04861eaf9e [IMP] hr_contract: disable email when a contract is about to end
When a contract is about to end, an activity is scheduled for the hr
responsible to act on it. Also, from task 2759601, a new warning was created
showing the contracts that are about to end. Therefore, sending an email to
the hr responsible started being too intrusive. This commit drops the email
sending for this case.

task-2759601

closes odoo/odoo#86379

Related: odoo/upgrade#3359
Related: odoo/enterprise#24287
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-03-31 15:26:48 +02:00
Yannick Tivisse 9b1b25522f [FIX] hr_contract: Avoid setting a calendar from another company
closes odoo/odoo#87588

Related: odoo/enterprise#25739
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-03-30 17:35:11 +02:00
William Braeckman abf60775ab [IMP] hr_contract: enable studio from contract history
Previously when going to a contract from the contract history, studio
was disabled, because it could not find a action xml id attached.

TaskId-

closes odoo/odoo#85690

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-03-02 22:16:59 +00:00
Philippe Wauthy 08a5bf761f [IMP] hr_*, sms: improve ux
Reorder smart buttons on the hr_employee to have them in the following order:
1. Documents
2. Holiday status
3. Time Off
4. Planning
5. Timesheets
6. Equipments
7. Cars
8. Contracts
9. Appraisal
10. Work Entries
11. Payroll
12. Attendance
13. Extra Hours

- Log in the chatter the name of the plan that has been started via the button "Launch Plan"

- When on mobile, open the Time Off Calendar in month view

- When sending a sms without any message, only display Message once in the invalid fields

- Avoid the sms-help info disappearing when clicking on it and there are characters in the body of the message

- Update the tooltip of phone number in the send sms wizard

- Avoid the employee name to be displayed on two lines on mobile if the name is too long. Reduce the font size instead

task-2735679

closes odoo/odoo#83745

Related: odoo/enterprise#23886
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-03-02 18:45:59 +00:00
Vincent Schippefilt 05fc9a6733 [IMP] *: use _read_group instead of read_group
This commit modifies most of the usages of read_group and uses
_read_group instead. _read_group doesn't join automatically on the
many2one fields when no order_by is specified, making it more performant
when the "name" of the many2one is not relevant, which is the case for
most back-end cases

closes odoo/odoo#84908

Task-id: 2479334
Related: odoo/enterprise#24877
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-03-02 17:10:48 +00:00
Kevin Baptiste f9252de355 [IMP] hr_contract: add CSS class on notebook page
Adds a class on the notebook page in order to create a JS tour for
`hr_payroll`.

closes odoo/odoo#85471

Taskid: 2661217
Related: odoo/enterprise#21559
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-02-28 11:07:45 +00:00
Yannick Tivisse c6d1f71bf0 [IMP] hr: Allow plans to directly request signatures
closes odoo/odoo#84976

Related: odoo/enterprise#24577
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-02-22 09:41:54 +00:00
Fabien Pinckaers 10a5796d4b [IMP] speed up load_menus() by using SVG icons instead of png
Reduces load_menus answer size by 32% (between 20kb and 200kb savings
for the initial loading of the backend, depending on the number of apps
installed). Support for SVG icons in the web client for menus/apps.

Reduced PNG icons for apps list (8 bits PNG instead of 24 as our icons
don't need more colors as they are flat designs)

closes odoo/odoo#84280

Related: odoo/enterprise#24200
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
2022-02-12 08:55:18 +00:00
William Braeckman 9e3b9317a1 [IMP] hr_contract: Improve demo data for payroll dashboard
Part-of: odoo/odoo#83836
2022-02-07 19:03:42 +00:00
Yannick Tivisse 8927f28bd6 [FIX] hr_contract: Exclude gaps on first contract date computation
Purpose
=======

This field is used for several things, like the simple holiday pay recovery.

Normally, we expect the HR officers to create a new employee, instead of
unarchiving the old one, but this could happen.

If someone leaves the company, and come back, take the new entry date as
first contract date instead of the original one.

closes odoo/odoo#83493

Taskid: 2745947
X-original-commit: a17c601fffca149a5c4d7be2924fb581ae408299
Related: odoo/enterprise#23790
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-01-27 16:17:17 +00:00
Yannick Tivisse 3d6af5180e [FIX] hr_contract: Display trainees in contract history
X-original-commit: a06c40da777f3b78b62387f8bf2353cf2ca4fd5c
Part-of: odoo/odoo#81927
2022-01-03 18:11:18 +00:00
Yannick Tivisse 5d278b47e9 [FIX] hr_contract: Display contracts stat button for trainees
Purpose
=======

Some trainees (eg: CIP) have a signed contract when they are paid.

X-original-commit: 5fe0f732fe7d0b27b649e9bfd6bec0a1ef2732de
Part-of: odoo/odoo#81927
2022-01-03 18:11:18 +00:00
Yannick TivisseandVictor Feyens 18952cdc76 [IMP] *: Convert single create method into multi
Taskid: 2703085
Part-of: odoo/odoo#80824
Co-authored-by: Victor Feyens <vfe@odoo.com>
2021-12-14 19:13:18 +00:00
Martin Trigaux d99cfd9416 [I18N] *: export saas-15.1 source terms
closes odoo/odoo#80964

X-original-commit: 0663892a34896980008eb0de69aeb58019a67e89
Related: odoo/enterprise#22759
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-12-07 13:48:53 +00:00
Thibault Libioulle 74624f43ee [REF] resource,hr{,_contract}: obtain calendar validity per resource
This commit adds methods to easily obtain calendar validity per resource
for a given search period and get the work intervals per resource,
taking into account the validity of their calendars.

In hr, the create and departure date of an employee are taken into
account to compute the calendars validity.

In hr_contract, it looks for every contract of human resources with
employee of type student or employee existing in the search period and
consider the specific calendar of the contract as valid during the
contract-lifetime.

PR: #77362

task-2646630
2021-11-30 12:20:47 +01:00
Kevin Baptiste 7ca6539979 [FIX] hr_contract: fix wrong view definition
The fields `employee_type` and `user_id` were not properly replaced in
the view.

closes odoo/odoo#80130

Taskid: 2694143
X-original-commit: 4d4309507911ae2440d4989df364c292ca285652
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-11-22 07:06:19 +00:00
Luis Torres 3882ec7c39 [FIX] hr_contract: Missing field added in the contract view
The field contract_type_id is added in hr_contract, but is not present
in the view.

Why not a custom module to add this field in the view?
The hr_contract is the base module, then, my custom module install it,
but it need to set the contract type and the field is not present.

The field cannot be added in the custom module, because some customers
that use my module also needs hr_contract_salary, that adds the field in
the view.

Then, this is related with another PR in enterprise that removes the
field from the view on that module.

closes odoo/odoo#79763

X-original-commit: 9bb0227423b97d085e53e7297a85bbb2fff4a0e0
Related: odoo/enterprise#22248
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-11-15 16:41:15 +00:00
Kevin Baptiste a3a42f335c [IMP] hr_contract: restrict HR Responsible to contract's company
HR Responsible should be limited to the employee's of the contract's
company.

closes odoo/odoo#78320

Taskid: 2668125
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-10-19 10:50:58 +00:00
Yannick Tivisse 0ca0fdcee3 [IMP] hr_contract: Make a method callable on an empty recordset
closes odoo/odoo#76604

X-original-commit: 7126040738cabe7d16412224f7b3baa1d41df014
Related: odoo/enterprise#20912
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-09-16 11:19:50 +00:00