Commit Graph
1159 Commits
Author SHA1 Message Date
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
Alexandre Kühn 9f115fce17 [FIX] mail,*: fix style in 1st column of activity view
Task-3290752

closes odoo/odoo#120189

X-original-commit: a97c86a2b962f56955e3c16b7ad99cabb0b13b9c
Related: odoo/enterprise#40564
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-05-03 17:24:58 +02:00
Kevin Baptiste 9122884698 [IMP] hr(_contract): remove non needed information from public employee
The employment type and first contract date were made available on the
public employee, however those fields but don't need to be publicly
available.

odoo/upgrade#4539
task-3252610

closes odoo/odoo#118333

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-04-25 18:25:50 +02:00
Rémy Voet (ryv) 234db70d86 [IMP] *: Use the new API of _read_group for backend use
Part-of: odoo/odoo#110737
2023-04-19 21:58:27 +02:00
dasz 0a2b6d3abc [IMP] hr_contract: add working times menu
closes odoo/odoo#118509

Task: 3254679
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-04-17 11:46:56 +02:00
Kevin Baptiste 5c7b714cb2 [REV] add domain to select current company calendar
This reverts commit 94bbffe46b introduced
in #109904.

This change was bringing more issues than it was trying to solve.

task-3254874

Part-of: odoo/odoo#117663
2023-04-13 15:26:20 +02:00
dasz d832fcf0ce [IMP] hr_*: standardise UI displaying of employees accross all hr apps by using the widget avatar_user
Appraisal: done, fix  chat widget issue
Employee: done, removed unused view
Attendance: done
Expense: done
Time Off: done
Fleet: done
Payroll: done
Referall: done
Lunch: done

task-313272

closes odoo/odoo#111817

Related: odoo/enterprise#36663
Related: odoo/upgrade#4310
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-04-13 15:25:46 +02:00
Jurgen (jugj) 7f49268019 [IMP] hr_contract : Make the contract view the same accross all apps
task - 3061227

closes odoo/odoo#116704

Related: odoo/enterprise#38833
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-04-05 09:42:29 +02:00
Thomas Lefebvre (thle) efc0ff463b [FIX] hr_contract: do not close contracts a day early
Steps to reproduce:
Launch a contract which has an end date
scheduled for the next day for an employee
and manually activate the "HR Contract: update state" cron.

Issue:
Running contracts are closed one day in advance.

Solution:
Correct the condition which selects contracts to close.

opw-3217616

closes odoo/odoo#116580

X-original-commit: e08aa67009b191cb99dfb1f7f1d0cb9d6539376a
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-03-27 07:28:59 +02:00
sofiagvaladze 94bbffe46b [IMP] add domain to select current company calendar
Before this commit user was able to select calendars from
differant companies even though user is not allowed to read
that companies record.

This commit add field related to country company and use
it in a domain to restrict user to select on availble
calendars.

task-3078009

closes odoo/odoo#109904

Related: odoo/enterprise#37334
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-03-21 18:55:55 +01:00
Martin Trigaux 1be5eae8ef [I18N] *: remove nl_BE files
They dates from < 2027 and are quite outdated. Favour the nl
translation instead.
n_BE is not on Transifex so it was not possible to correct bad
translations.

closes odoo/odoo#115845

X-original-commit: d04c8b7e484db8306d858c891a7a2b11885fdcd9
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-03-20 16:51:30 +01:00
Louis Wicket (wil) 9afe7c74c9 [IMP] *: remove "French spacing" 👺
According to Wiktionary, French spacing is "the archaic practice (though
still current in French) of inserting a space around colons, semicolons,
question marks, and exclamation marks". This is not standard practice in
English and most languages of the world.

The purpose of this commit is to start purging the code from this typo,
as it may reflect poorly on the software for some people.

closes odoo/odoo#114533

Related: odoo/enterprise#37853
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-03-14 15:52:10 +01:00
Victor Feyens 24ccf7d9b0 [CLN] *: useless type info for actions
The type fields of actions already defaults to
the model name in the base model definition.

Therefore, specifying `ir.actions.server`, `ir.actions.act_window`
& so on as type is useless (and adds noise since it's the same as
the action model).

closes odoo/odoo#114539

Related: odoo/enterprise#37855
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-03-08 17:33:37 +01:00
sofiagvaladze 2a4795d3e2 [FIX] hr_contract: proceed cron action even when ValidationError occurs
The method update_state is called from cron. When the contracts are
updated couple things are checked. There are constraints set that can
throw ValidationError. As a result, none of the contract states are updated.

In this PR we do the following:
In case the ValidationError occurs when we run the cron, we update
contracts that can be updated, and silently pass the invalid contracts.

task - 3069480

bloupbloup

closes odoo/odoo#114566

X-original-commit: bce0d7d0f11d46c671bc2b902d17d80febeefa5f
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-03-07 18:03:19 +01:00
Kevin Baptiste f4045d6004 [IMP] hr_contract: contract wage field as ensure_one
The method `get_contract_wage_field()` was always called with a single
contract record, and from a functional point of view, it doesn't make
sense to call it on 2 records from different countries anyway.

task-2801710

closes odoo/odoo#113731

Related: odoo/enterprise#26373
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-02-27 15:00:01 +01:00
Xavier BOL (xbo)andYannick Tivisse 1648c25cc9 [IMP] resource: make working schedule optional in resource model
closes odoo/odoo#110548

Related: odoo/upgrade#4248
Related: odoo/enterprise#36101
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Co-authored-by: Yannick Tivisse <yti@odoo.com>
2023-02-22 20:25:16 +01:00
FrancoisGe 5126c9b1d4 [REF] *: register widget descriptors instead of components
Before this commit, the widget's description was stored on the
component and this component was then registered.

Now, an object describing the widget is used on registration the same way
as it is done for views since b828cfc.
This split the component's description (props, template, ...) of
the widget's description ( component, extractProps, ...) and makes
it clearer.

We did the same thing for fields in 9f4622492c

Part of task: 3179751

closes odoo/odoo#112962

Related: odoo/enterprise#37215
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-02-21 15:53:06 +01:00
Odoo's Mergebot 00b60d6c74 [MERGE] resource: Add lunch attendance type
Purpose
=======

Add a new type on the working schedule, adding "Lunch" to Morning and Afternoon. It's mandatory, because, if you don't do that, you can't assume the difference between a time that should be recorded as extra hours and a time that should not be counted because it's lunch time.

A company is not another, so to be clear, they will define what are the imposed lunch time where the employee is not paid during the week.

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

Lunch between Morning and Afternoon

When a time period is under Lunch :
- There is no working entry generated for that period of time.
- If you work before the lunch time and after it, it's not considered as extra time.
- The employee is not paid for the Lunch time.

closes odoo/odoo#108061

Taskid: 3102363
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-02-03 12:55:39 +01:00
Yannick Tivisse 7bce5f3f95 [MOV] resource: Split files according to coding guidelines 2023-02-03 10:25:00 +01:00
Yannick Tivisse 2eda54348d [IMP] resource: Add lunch attendance type
Purpose
=======

Add a new type on the working schedule, adding "Lunch" to Morning and Afternoon. It's mandatory,
because, if you don't do that, you can't assume the difference between a time that should be
recorded as extra hours and a time that should not be counted because it's lunch time.

A company is not another, so to be clear, they will define what are the imposed lunch time
where the employee is not paid during the week.

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

Lunch between Morning and Afternoon

When a time period is under Lunch :
- There is no working entry generated for that period of time.
- If you work before the lunch time and after it, it's not considered as extra time.
- The employee is not paid for the Lunch time.

TaskID: 3102363
2023-02-03 10:25:00 +01:00
pedrambiria 0cc394f480 [REV] hr_contract: remove group on contract_id field
https://github.com/odoo/odoo/commit/fa1b4f14257ca04c85c7541fd94b19dff939626c
caused an issue when a user doesn't have the `hr.group_hr_user` and
has the `hr_contract.group_hr_contract_employee_manager` group.
A user who doesn't have `hr.group_hr_user` can not have access to the
`hr.employee`, but has access to `hr.employee.public`. The
problem is that `hr.employee.public` doesn't have the `contract_id`
field.

opw-3148092

closes odoo/odoo#111752

X-original-commit: fa6fea0ddce67ae9a3a4244b91c2f1ea79cf3d6d
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-02-03 09:28:33 +01:00
Kevin Baptiste 2a5b80a6d4 [IMP] hr,resource: automatically compute number of hours
- Automatically compute the average number of hours per day on
   resource.calendar;
 - Don't allow to change the working hours of an employee when they have
   a current running contract;
 - Seperate smart buttons on resources to distinguish Material / Human.

 task-3102517

closes odoo/odoo#109768

Related: odoo/enterprise#35718
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-01-26 10:16:53 +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
mehjabin e7d92a2588 [IMP] hr_contract: update field label using attribute selector
before this commit, to update the string for departure_date field the entire field has been replaced

after this commit, using attribute selector(string) updated the string for this field

closes odoo/odoo#110649

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-01-23 11:20:26 +01:00
Kevin Baptiste 2558911fa0 [IMP] hr(_contract): reorganize employee profile view
- Remove the contract from HR Settings as it's already showing from the
   smartbutton;
 - Move `job_id` from the HR Settings;
 - Move the Payroll group to the Belgian payroll localization.

task-3127455

closes odoo/odoo#109552

Related: odoo/enterprise#35621
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-01-17 11:33:50 +01:00
Jorge Pinna Puissant 5b68871097 [IMP] * : kanban, unify dropdown definition in archs
This commit separate the templates, one for the card and another one for
the menu (the ellipsis dropdown).

The new template, called 'kanban-menu', will only contain the dropdown.
Note that, this behaviour is the same as the one used for the kanban
tooltips.

closes odoo/odoo#107589

Task-id: 3096776
Related: odoo/documentation#3284
Related: odoo/enterprise#34962
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-05 15:37:04 +01:00
Xavier-Do 930c3c8f69 [FIX] hr_contract: fix demo contract starting
With the new year transition, some demo data relative to the current
time are now inconsistent with each others:

- Some payslips starts 2 mount before now.
- the contract starts this year, first January.

This means that
- the contract starts 2023-01-01
- the payslips ends 2022-12-01

Leading to an error
"The following employees have a contract outside of the payslip period"

Note that it looks like there is a also a demo/admin inconsistency
in data but this is out of the scope of this fix.

X-original-commit: ae259f93b6ccaaec17a8d32df6282278e015c395
Part-of: odoo/odoo#108884
2023-01-01 20:14:49 +01:00
Dossogne Bertrand 13a8d7c31d [IMP] hr_contract: warn on contract expiration date
Before this commit, the cron related to contract expiration
only created an activity. Now, it also writes a message in order
to warn all concerned user.

task-3081295

closes odoo/odoo#106768

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-12-07 15:32:01 +01:00
Dossogne Bertrand 13f6d26cd9 [FIX] hr_contract: fix tooltip warning
When the contract has a working schedule different
from the employee's, a red triangle appears with a tooltip
explaining the reason. That tooltip was implemented in the
arch view using data-tooltip, which is not intended.
This commit adds an owl widget replacing that issue.

In order to test that tooltip warning, it's only needed
to go on any running contract and change the resource_calendar
so it's different to the one on the employee's page.
Same process on the employee form.

closes odoo/odoo#106760

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-12-01 09:11:48 +01:00
Dossogne Bertrand 228c6401d4 [IMP] hr_contract: ease contract navigation
Before this commit, the contract smartbutton on the
employee page redirected to the contract history page.
After this commit, the user will be redirected to the running
contract or any contract if there is some, or towards a new
contract form otherwise. To access the contract history view,
a new smartbutton has been added on the contract form.

Also added some hr_responsible_id to contract in demo datas
to avoid having empty required fields for employee contracts.

task-3056891

closes odoo/odoo#105416

Related: odoo/enterprise#33799
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-11-29 14:22:59 +01:00
Dossogne Bertrand ed486f2c62 [FIX] hr_*: fix visuals after always-edit mode
hr_*:
- hr
- hr_contract
- hr_work_entry
- hr_work_entry_contract

Fixes multiple visual issues in various models

task-3002444

closes odoo/odoo#106540

X-original-commit: 6164cf814520560dc016a5eb04080c12c516a509
Related: odoo/enterprise#34395
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-11-25 17:56:45 +01:00
Dossogne Bertrand 2415338d46 [IMP] hr_contract: remove unused code
In the hr_contract_history list view, some owl code was set to
allow employee creation from that view. Since the create button
has been removed, that code was unused.

closes odoo/odoo#106264

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-11-22 18:12:31 +01:00
Yannick TivisseandXavier BOL 6d4ff45174 [FIX] hr_contract: Fix transitive relationship on contract res.groups
closes odoo/odoo#106256

X-original-commit: d9a475518914b31f0b2088444a4d23f00d2826a6
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Co-authored-by: Xavier BOL (xbo) <xbo@odoo.com>
2022-11-22 17:09:22 +01:00
Philippe Wauthy 347dd08342 [FIX] hr_contract: add group on contract_id field
Add the hr_contract.group_hr_contract_employee_manager group on the contract_id field in hr_employee
to avoid having an access error once a user with Manager security group in Payroll tries to open the
Payroll app.

task-3053032

closes odoo/odoo#105753

X-original-commit: fa1b4f14257ca04c85c7541fd94b19dff939626c
Related: odoo/enterprise#33942
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-11-15 16:16:48 +01:00
FrancoisGe c998fdd77b [FIX] base: consider multi_edit="1" views editable
Since odoo/odoo#95729

nodes with a `groups=` are completely removed from the views when
the user is not part of the group, instead of being made invisible.

In that PR, views have been adapted to add back fields, with invisible="1",
when they were required, for instance when they were used in a domain
of another field which was still there despite the user is not part
of the given group.

As `tree` views having `multi_edit="1"` where not considered
as editable views, the domain of fields in these views were not
validated:
- https://github.com/odoo/odoo/blob/1fb8fa16ab7dc298d54f089d7163fb556dbc5fcc/odoo/addons/base/models/ir_ui_view.py#L1460
- https://github.com/odoo/odoo/blob/1fb8fa16ab7dc298d54f089d7163fb556dbc5fcc/odoo/addons/base/models/ir_ui_view.py#L1321-L1322

while they are well required for the web client,
in `multi_edit="1"` this is possible to edit relational/many2one field,
and therefore it will do `name_search` calls using the domain of the
field, and therefore the fields used in these domains must always
be present in the views. Without it, a crash in the web client occurs
when attempting to edit the relational/many2one field.

This revision targets to consider the `multi_edit="1"` tree views
as editable, to make the field domains validated as they should be.

Hence, views are adapted to add back fields with `invisible="1"`
when they are required in domains of other fields.

Part-of: odoo/odoo#103790
2022-10-23 12:30:03 +02:00
alt-odoo 0053a9e565 [FIX] hr_contract: handle employees with multiple contracts
In case an employee has multiple contracts in several companies, we need
to only keep the contract of the current company of the employee, as
there can be only one in the main view hr_contract_history.

Before this patch, contract_information CTE returns the same ID for both
contracts:
employee_id | company_id | id | is_under_contract
-------------+------------+--------+-------------------
681 | 1 | 146842 | 0
681 | 14 | 146842 | 0

After the patch, it returns:
employee_id | company_id | id | is_under_contract
-------------+------------+--------+-------------------
681 | 1 | 4009 | 0
681 | 14 | 146842 | 0

We need to fix the WINDOW clause to make sure the id of the contract
that is selected is the one in the same company as the employee/contract
being selected in the contract_information CTE.

This way when an employee has multiple contracts, there will still be
1 line for each contract, but each with a different contract ID.

closes odoo/odoo#102821

X-original-commit: 88fa430be8a0c164e100b5f3c2f16ae906cc9a54
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Alex Thuyls (alt) <alt@odoo.com>
2022-10-10 11:57:16 +02:00
Audric Onockx (auon) f95555d0e5 [FIX] hr,hr_contract,resource: allocate hours before resource creation
Steps :
- On a new DB (no demo data). Say created at 15:00. - Go to planning.
- Add a shift for today.
- Set the dates from 08:00 to 17:00.

Issue :
The 'Allocated Time' = 02:00.

Cause :
We used to count from the resource creation min to the departure max. So, in this case, not from 08:00, but from 15:00.
While this might seem logical, it confuses users in onboarding.

Fix :
Calculate the whole time, regardless of the resource lifespan.

Notes :
- Similar issues solved with this commit :
> Once the shift validated, the avatar progress bar uses
the same allocated time.
> Same in Project Task gantt view.
- When contract is installed, if the resource does not have a contract, the Allocated Time = 0. Now, it is calculated from the resource calendar.

task-2983993

closes odoo/odoo#102732

X-original-commit: 6a61d1c4c56075ade36f6f32e7a61f1f6c771a6f
Related: odoo/enterprise#32547
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-10-08 09:42:49 +02:00
Damien Bouvy aadf7ca9f8 [FIX] hr(_*): update for grid views
X-original-commit: ea6497a73f4e20d02d02376bf766080735d8ec52
Part-of: odoo/odoo#102508
2022-10-06 22:22:42 +02:00
Kevin Baptiste c459618b49 [FIX] hr_contract: allow archiving employee
Users with both "HR Officer" and "Contract Administrator" access should
be able to archive employees even without Payroll access.

closes odoo/odoo#102102

X-original-commit: 765a6ec16b0a3c1cd86f7fc217bfb795a788d9c6
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-10-04 17:01:44 +02:00
sofiagvaladze 70c953c26a [IMP] hr_contract: Contracts smartbutton
purpose:
Contract management is a prior thing on an employee profile;
Thus, Contract smartbutton should be in the second position,
after Documents smartbutton, in case documents_hr is installed.

task - 2984690

closes odoo/odoo#100532

Related: odoo/enterprise#31481
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-27 11:41:36 +02:00
Martin Trigaux 1a8772769e [I18N] *: export 16.0 source terms
closes odoo/odoo#100573

Related: odoo/enterprise#31507
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-09-20 13:48:49 +02:00
Philippe Wauthy 78daac46e2 [IMP] hr_contract: add DISTINCT to hr_contract_history query
Following https://github.com/odoo/enterprise/pull/31202, it happens that the query for the contract history returns several times the same id if the employee has several contracts.

This commit fixes it by adding a DISTINCT to the SQL query so that ID returned are unique.

task-2974531

closes odoo/odoo#100027

Related: odoo/enterprise#31202
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-19 15:09:52 +02:00
Gorash 39ea7a1fab [IMP] web/all: XML templates are now declared into the python manifest.
Adapt all manifest, split some XML file and update JavaScript files.

Part-of: odoo/odoo#95500
2022-09-14 20:25:01 +02:00
Rob Coekaerts fc5e9918a8 [IMP] hr_contract: include cancelled contracts in contract history
In order to avoid empty contract histories when there are existing but
cancelled contracts, cancelled contracts are now also included in the
contract history.

task-2939158

closes odoo/odoo#99767

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-14 18:16:15 +02:00
Dossogne Bertrand 0a8c3e7451 [IMP] hr_*: improve web application submission
hr_*:
hr
hr_contract
hr_recruitment
website_hr_recruitment

Increase UX and possibilities to postulate to a job on recruitement.
Also moves the model hr.contract.type from hr_contract to hr so that it
can also be used from hr_recruitment without having two models in parallel.

taskID 2898063

closes odoo/odoo#96551

Related: odoo/enterprise#29777
Related: odoo/upgrade#3861
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-07 23:10:25 +02:00
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