Commit Graph
13 Commits
Author SHA1 Message Date
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
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
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 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
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
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
Kevin Baptiste 56559941b5 [FIX] hr_contract: make timezone clickable again
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.

closes odoo/odoo#74600

Taskid: 2591003
X-original-commit: 630b4db8a2f0a0faf2dd2230c76d9dc682a9bacb
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-08-03 08:01:44 +00:00
Adrien Dieudonne d5626cebd0 [FIX] hr_contract: Avoid horizontal scroll in contract form on mobile
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

closes odoo/odoo#66990

Task-id: 1929043
X-original-commit: af81ac1a03c2b475403f1518dcee58193359cdef
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2021-03-01 10:27:57 +00:00
Lucas Lefèvre c33a347e6a [FIX] hr_contract: Move scss in correct folder
File `calendar_mismatch.scss` was wrongly in a `css` folder
while it should be in a `scss` folder according to the guidelines.

And set the correct `type="text/scss"` instead of `type="text/css"`
for a .scss file.

closes odoo/odoo#34478

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-01 09:44:04 +00:00
Kevin Baptiste f17655dd77 [IMP] hr_contract: Replace some contract states by kanban status
Purpose
=======

Having some usability check to be sure to make the pay
for everyone, and don't loose contracts.

We would like to remove incoming and to renew columns in
hr.contract and replace them by a kanban state.  In employee, we would
like to add warning on the kanban to warn the hr responsible there
is no contract or a contract is about to expire

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

hr.contract kanban:

- add a kanabn state
- it becomes red automatically when the contract is in running and  expire in 7 days
- add aquick search in filter to filter on expered soon
- the kanban state can be changed manaually (in case of there is several rh)
- sort by contract end date set first (more close of today first)

Employee kanban

- add an red icon if there is no contract in Runnig status OR there is a
kanban state red in their contract (whatever the status).
- add a quick seaach on employee with warning

- State pending + green = incoming
- State confirmed + red = about to expire / to renew

closes odoo/odoo#33489

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-06-28 06:59:32 +00:00
Lucas Lefèvre 22437e331a [IMP] hr_contract: Sync employee and contract calendars mismatch
Purpose
=======

An employee and its current contract should have the same
calendar. Currently, if the contract's calendar is changed,
the employee's calendar is not changed.
In the same way, if a contract is created directly in `open`
state, the employee's calendar is not changed.
Finally, the calendar synchronization when the employee
contract is changed is only done in payroll, for no reason.

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

Fix the three issues described above.

If the employee's calendar is nonetheless manually changed, a warning
should be displayed if there is a mismatch between both calendars.
2019-06-13 10:02:10 +02:00