Purpose
=======
Some trainees (eg: CIP) have a signed contract when they are paid.
X-original-commit: 5fe0f732fe7d0b27b649e9bfd6bec0a1ef2732de
Part-of: odoo/odoo#81927
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
The fields `employee_type` and `user_id` were not properly replaced in
the view.
closesodoo/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>
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.
closesodoo/odoo#79763
X-original-commit: 9bb0227423b97d085e53e7297a85bbb2fff4a0e0
Related: odoo/enterprise#22248
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
HR Responsible should be limited to the employee's of the contract's
company.
closesodoo/odoo#78320
Taskid: 2668125
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Improve the departure wizard form view aswell as the flow when using it.
Removes the confirmation dialog when archiving an employee to directly
display the departure wizard.
Also changes departure reason to an html field instead of pure text.
Task ID: 2575279
closesodoo/odoo#72367
Related: odoo/enterprise#19116
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The `tz` field was no longer clickable on the employee form
because the warning tooltip was getting the click event even
though it was not visible.
closesodoo/odoo#74600
Taskid: 2591003
X-original-commit: 630b4db8a2f0a0faf2dd2230c76d9dc682a9bacb
Signed-off-by: Kevin Baptiste <kba@odoo.com>
clicking on the row of contract history opens the formViewDialog
so this commit fixes the issue by adding the readonly attributes
on the field so that clicking on the row of the contract history
doesn't open the formViewDialog
TaskID-2578874
closesodoo/odoo#73832
Signed-off-by: Kevin Baptiste <kba@odoo.com>
The license is missing in most enterprise manifest so
the decision was taken to make it explicit in all cases.
When not defined, a warning will be triggered starting from
14.0 when falling back on the default LGPL-3.
closesodoo/odoo#74245
Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Purpose
=======
The "first contract date" is a usefull information for anybody who onboards
new colleagues. Issue: this information is not on the "public employee" and so,
visible only by hr officer (minimum).
With this task, we would like make this field public and visible by any internal
user in the system. In this way, we don't have to provide too many access rights
to any employees.
closesodoo/odoo#73552
Taskid: 2584098
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
- hr_contract: Add kanban view on contract history action
- hr_contract: Display the avg wage, not the sum on aggregates
- hr_contract: Improve contract history list view
- hr_contract: Improve contract history tree view
- hr_contract: Improve contract history search view
- hr_contract: Display wage on contract kanban view
- hr_contract: Improve contract tree view
- hr_contract: Improve contract search view
- hr_contract: Make hr_responsible required
It is useful in multiple HR flows.
- hr_contract: Improve contract history form view
- hr_contract: Improve contract form view
- hr_work_entry: Improve work entry computed name
- hr_work_entry: Improve work entries tree view
- hr_work_entry: Improve work entry type form view
closesodoo/odoo#72402
Taskid: 2558171
Related: odoo/enterprise#19124
Related: odoo/upgrade#2583
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this commit, suppose we have a scenario like below
Task-A:
Activity-1:
name: Email ( Today )
Assigned to: User-1
Task-B:
Activity-1:
name: Email ( Today )
assigned to: User-2
Activity-2:
name: Call ( Due in 3 Days )
assigned to: User-1
When User-1 goes through the systray 'Today' filter shortcut he gets both
Task-A and Task-B in the list instead of only Task-A. Indeed currently
activities are not filtered based on current user with its deadlines.
However purpose of systray is to indicate activities current user has to
perform instead of global activities.
After this commit activities will be filtered based on deadlines as well as the
current user. In order to achieve this behavior we needed to pass a domain like
[
('activity_ids.date_deadline','=', fields.Date.today()),
('activity_ids.user_id','=', 1)
]
And for that purpose we introduced a non-stored compute field with a search
method.
Task ID-2438822
COM PR odoo/odoo#72219
X-original-commit: f4eaf4d8fb2f97240201104dcd4fc7e2674bce02
Replace text fields to html fields as we have our own 'OdooEditor'.
Indeed, it gives more options to users in the way they format their
content without weighting too much on the UI
(tools appear on demand and not by default).
Models -> Fields
1) fleet.vehicle -> description
2) fleet.vehicle.log.contract -> notes
3) hr.job -> description
4) hr.contract -> note
5) hr.leave.allocation -> notes
6) hr.applicant -> description
7) lunch.product -> description
8) lunch.order -> product_description
9) lunch.product.report -> description
Task Id: 2499504
X-original-commit: afe52b050a7667f3f20696cd48cd922f635a941c
Automate activites linked to plan on certain triggers.
To automate onboarding and offboarding processes, we can now define
plans that will activate upon triggers, such as employee creation,
departure (archive), contract start or contract end.
Manual plans are still possible.
Upon activation of a plan, a message will be added to the employee's
chatter with the name of the plan.
More options have been added related to when to schedule the plan's
activities.
The blocking mechanism has been removed (the plan would not launch if an
activity could not be started, due to lack of information), failed
activities will now be logged into the employee's chatter.
The list and kanban employee views have also been updated to include
info such as first contract date and activity information.
Task ID: 2489095
closesodoo/odoo#68451
Related: odoo/enterprise#17343
Related: odoo/upgrade#2314
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Description of the issue/feature this PR addresses:
It is currently quite difficult to differentiate users. Most of the time, people
don't take the time to upload an actual avatar so everybody looks the same. This
PR generates a custom avatar with the users initials and random color to
differentiate them. For res.users, res.partner and hr.employee, image fields now
hold the binary image and avatar are used to show the image or svg.
Current behavior before PR:
Avatar had only random colors and was being saved in database, being inefficient
Desired behavior after PR is merged:
A new mixin defines image fields and in case no image is set, it generates an
SVG image with the user's initials and random color.
closesodoo/odoo#69819
Task: 2404630
Related: odoo/enterprise#18199
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Hide fields related to belgian localisation when not using a belgian
company.
Task Id: 2496597
closesodoo/odoo#69691
Related: odoo/enterprise#17881
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Conversion of all modules to the new manifest assets declaration.
Part of task: 2352566
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
This reverts commit 825b533ec964fd8a9923dd4d2091f122b92d8759.
For the following reasons:
- This is a behavior change on a stable release. See our stable policy:
https://github.com/odoo/odoo/wiki/Contributing#what-does-stable-mean
- If a contract end date is set, it's erased when moving the contract afterward.
- There is a cron which is moving the expired contracts automatically,
this will rewrite the end date on it, which is not a big deal, but this
is useless.
- Modifying the contract end date also unlink all the work entries that are
outside of the new contract period. If there is an open payslip, it also
recomputes the worked days lines, and the payslip lines.
That way, it's possible to recompute a payslip by introducing unpaid
time off inside of it. If the payroll officers are checking the payslips
at that time, and don't notice it (already checked, etc...), then at the
validation, this could lead to some more serious issues (wrong net salary
paid to the employee, wrong accounting entries, wrong declaration to the
state, etc).
If the contract end date is badly configured, this is normal that the
reporting is wrong. No need to add some magic that people don't understand,
that could lead to wrong behaviors later on the process.
closesodoo/odoo#68541
X-original-commit: c34b6bc3d0d25e8b8b1bcb6684331627b823f57d
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Currently, groupby and filter dropdown are not working properly
on employee kanban card because when dropdown is exact on position of
fixed-bottom it will direcly click on the kanban card instead of the
custom groupby dropdown due to higher z-index of the fixed-bottom then
dropdown-menu. also chat icon in fixed-bottom is overlap on zoomed
image as zoomodoo-flyout has z-index 100.
fixed-bottom has z-index 1030 while drodown has z-index 1000 so instead
of clicking on dropdown it was going to click on kanbancard bottom.
So in this commit, improve the behaviour and decrease the z-index of
fixed-bottom to allow the click on custom groupby dropdown and hide
the chat icon behind the zoomed image.
Also when try to create contract, employee field does not show proper.
so moved it before start date with label.
closesodoo/odoo#66788
Taskid: 2452363
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The following warning is very long in absolute position. The following
text: "Calendar Mismatch : The employee's calendar does not match its
current contract calendar. This could lead to unexpected behaviors."
is invisible but takes a lot of width on the same line.
Now, the item is a block of 0px height and doesn't take space.
This avoids the horizontal scroll on mobile.
Note that the item is displayed at the wrong place anyway.
This will be fixed in master.
Steps to reproduce:
- Payroll / Employees / All contracts
- Change "Working Schedule" field
closesodoo/odoo#66990
Task-id: 1929043
X-original-commit: af81ac1a03c2b475403f1518dcee58193359cdef
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Before this commit, the hr_work_entry_contract contained enterprise views/features that could not be integrated in community.
These features are now provided by the hr_work_entry_contract_enterprise module.
taskid: 2222790
Purpose
=======
When we want to retrieve all the contract (running for instance), we
don't care about the fact that the employee is archived or not.
For example when we generate the work entries to generate the payslips,
we actually pay the employee, even if he's archived (which is the
normal flow).
closesodoo/odoo#66836
X-original-commit: 262bf8598f9d885382c05e523543019767b521bf
Related: odoo/enterprise#16677
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
When changing a contract's state to "Expired", if the contract has an
end date, the latter is not updated. As a result, contracts' reporting
contains some error.
To reproduce the error:
1. Create an employee E
2. Create a contract C
- Employee: E
- Start date: in the past
- End Date: in the future (! at least after the current month)
3. Set contract's state to "Expired"
4. Go to Employee > Reporting > Contracts
5. On pivot view, change the rows:
- Total must be split into "Date > Month"
- Current month must be split into "Employee"
Error: on current month, "# Departure Employee" of E-employee is 0. It
should be 1. This value's computation is based on `contract.date_end`,
but when changing the state to "Expired", the variable will not be
updated if it already has a value. So "# Departure Employee" will be
equal to 1 for the month of end date defined on step 2, instead of
current month.
Note: The fix result can not be directly tested. The end date must be
done for the departure to be effective (`contract.date_end` < 'today').
Since this fix updates `contract.date_end` to 'today', "# Departure
Employee" will not count this contract until the following day.
OPW-2445504
closesodoo/odoo#66002
X-original-commit: 3cfc1e7dc3ad8396a92d12f74b65485e5938077a
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
Purpose
=======
Currently there's no easy way to retrieve all the contract using a given
calendar.
closesodoo/odoo#65621
Related: odoo/enterprise#16157
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Prior to this commit:
* All employees were treated the same way regarding the contractual point of vue.
From this commit on:
* Three employee types will be created:
- Employee, which is supposed to be under contract
- Student & Contractor which are both not supposed to have an employee contract (but are still use the employee as working for the company)
* Employee view and Contract History will take this consideration into account.
closesodoo/odoo#64931
Taskid: 2446000
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Otherwise, they may crash or be incorrectly verified when
creating/updating recordsets containing multiple records.
Also improve the constraint error messages to be more detailed.
When possible, use a sql constraint instead to speed up the records
validation.
Task Id: 2328664
COM PR: https://github.com/odoo/odoo/pull/55525
ENT PR: https://github.com/odoo/enterprise/pull/12250
Prior to this commit:
* The contract_ids one2many widget in the hr_contract_history form was not sorted
desc.
After this commit:
* The contract_ids one2many widget in the hr_contract_history form is correctly sorted
desc.
related PR's: odoo/enterprise#14647, odoo/upgrade#1939closesodoo/odoo#61512
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Purpose of the task is to add the App icon for the hr_contract module
closesodoo/odoo#60423
Taskid: 2360070
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>