Commit Graph
83 Commits
Author SHA1 Message Date
Pierre Pulinckx (pipu) c07181b20b [REF] *: Replace env._t() by _t()
In this commit, all usages of env._t() are replaced by _t().
In templates files, env._t() didn't work because terms used
in attributes where not extracted into the translation files.
Only string are exported from .xml files to translation files.
So, to make it works, we set a variable that is then used
in attributes.
For example :

<t t-set="string_to_translate">String to translate</t>
<Dialog title="string_to_translate>...</Dialog>

task-3292454

closes odoo/odoo#131390

Related: odoo/enterprise#45631
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-08-18 19:17:16 +02:00
Gorash 774a3fad0e [REF] base,all: Update modifier syntax: view migration
Apply of the migration script to update all view modifiers.

Part-of: odoo/odoo#104741
2023-08-18 09:49:13 +02:00
Yannick Tivisse 186f804a25 [IMP] hr_attendance,planning: Manage overtime generation
closes odoo/odoo#127244

Taskid: 3102448
Related: odoo/enterprise#43602
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-08-17 18:42:03 +02:00
Yannick Tivisse b9b165db7d [FIX] hr_work_entry_contract: Correctly compute work entries for edge timezones
closes odoo/odoo#124222

Related: odoo/upgrade#4699
Related: odoo/enterprise#41253
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-08-17 10:32:54 +02:00
Jorge Pinna Puissant e338487028 [REF] *: remove owl="1" from the templates
As all the templates are now imported in the owl app, there is not need
anymore to specify the owl="1" attribute in the templates.

Part of task~3443861

Part-of: odoo/odoo#130467
2023-08-11 14:32:30 +02:00
niyasraphy 112bc6499a [FIX] hr_work_entry_contract: reload calender from regenerate work entries
before this commit, if user try to regenerate the work entries
from the button 'Regenerate Work Entries' in the work entries
calendar view, the generated entries will not shown to the
user immediately without reloading the screen.

* payroll -> work entries -> work entries
* switch to calendar view
* click on Regenerate Work Entries button
* select employee's and click Regenerate Work Entries
* generated work entries will not be shown in calendar

after this commit, the generated work entries will be shown
in the calendar immediately.

closes odoo/odoo#129647

X-original-commit: 1ea504e6ee794be7513d8de20304527261548849
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-07-26 09:22:17 +02:00
Julien Carion (juca) 6c412be2ea [IMP] *: coherent hotkey uses
This commit makes hotkey uses more coherent throughout the entire
codebase by setting alt+q as main shortcurt for confirm and default
actions and alt+x for cancel actions.

task-3370463

closes odoo/odoo#127469

Related: odoo/enterprise#43694
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-19 18:24:15 +02:00
Wolfgang Taferner 945ed63bb8 [FIX] hr_work_entry_holidays: a leave can be of type other as well
The previous domain fix 84d8bf8167
was skipping all potential leaves of type other left out for work entries
therefore properly inherit instead of overriding and add the proper domain

closes odoo/odoo#128527

X-original-commit: 076d2179ad2f19c0ff8be043e492bdc7b780baef
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-07-15 12:00:42 +02:00
Yannick Tivisse 7fa78e68b0 [IMP] hr_work_entry_contract: Add index for performance improvement
From 7s to 2ms for this query with 2.6M records

explain (analyze, verbose, buffers)
SELECT "hr_work_entry"."id" FROM "hr_work_entry" WHERE
(
    ("hr_work_entry"."active" = true) AND
    (
    (
      ("hr_work_entry"."state" in ('validated', 'draft')) AND
      ("hr_work_entry"."contract_id" in (548259))
    )
    AND
    (
     (
      (
       (("hr_work_entry"."date_start" >= '2023-05-01 00:00:00') AND (
        "hr_work_entry"."date_start" < '2023-05-31 23:59:59.999999')
       ) AND
       ("hr_work_entry"."date_stop" > '2023-05-31 23:59:59.999999')
      )
         OR
       ((("hr_work_entry"."date_start" < '2023-05-01 00:00:00') AND
        ("hr_work_entry"."date_stop" <= '2023-05-31 23:59:59.999999')) AND
        ("hr_work_entry"."date_stop" > '2023-05-01 00:00:00'))
    ) OR
      (("hr_work_entry"."date_start" < '2023-05-01 00:00:00') AND
       ("hr_work_entry"."date_stop" > '2023-05-01 23:59:59.999999'))
    )
  )
)
ORDER BY COALESCE("hr_work_entry"."conflict", false) DESC,
         "hr_work_entry"."state" ,"hr_work_entry"."date_start"
;

closes odoo/odoo#124108

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-06-07 15:58:51 +02:00
Martin Trigaux 2afdda2576 [I18N] *: export saas-16.3 source terms
closes odoo/odoo#123046

X-original-commit: 137f5ca0cb703ee953cb01db525362f7a778e6bd
Related: odoo/enterprise#41703
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-06-01 11:43:51 +02:00
utag-odoo 3931e4ef79 [FIX] hr_work_entry_contract: traceback issue during work entry regeneration
In this commit,
1. Adding a safeguard to ensure date_from is not empty before calculating the
time delta in the wizard.date_to.
2. Both classes disabled="1" and disabled="true" are not working so we add
a disabled class on the button. I don't know why disabled="1" is not working.

task-3328601

closes odoo/odoo#123148

X-original-commit: 97b8d59a88e78afbeae1dc6447a3d9629635524f
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-01 09:14:07 +02:00
Brieuc-brd fa60bac197 [IMP] *: app icons : add viewBox attribute
Prior to this commit, the SVG's viewBox attribute was missing, which
prevented svgs from being scaled.

This commit fixes this issue.

task-3326633
Part of task-3326263

X-original-commit: 30300c373ad1c63a6cf8b035cae0785a09c6933f
Part-of: odoo/odoo#121886
2023-05-22 13:54:08 +02:00
Martin Trigaux 077bbd0b0b [I18N] *: export master source terms
closes odoo/odoo#121563

Related: odoo/enterprise#41140
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-05-17 10:34:00 +02:00
Romeo Fragomeli c8ca9da7bc [IMP] web: move views' buttons into the view itself
Were previously in the ControlPanel.

Part-of: odoo/odoo#116641
2023-05-12 22:59:17 +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
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) 5ce307a2b5 [IMP] hr_work_entry : make general UX improvements
This commit aims to improve usability of work entries by improving the form and adding a default start and end hour going from 9 to 17
task - 3062158

closes odoo/odoo#118252

X-original-commit: 36eca7e6b0ad6b3570ce2478b10ec4da1a157617
Related: odoo/enterprise#39592
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-04-12 10:37:54 +02:00
Prakash Prajapati e5f462de16 [FIX] hr_work_entry_contract: fix the traceback when we edit multiple contract's Working Schedule
Reproduction steps:
 -Install payroll app
- Got to payroll > Contracts > Contracts > List view
- Select multiple record and modify the Working Schedule

- missing return in write

closes odoo/odoo#115105

X-original-commit: fcbff003ccc4cfda48b5b266929ee49f6ace3523
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-03-14 09:55:52 +01:00
Kevin Baptiste c801e8181b [FIX] hr_work_entry_contract: fix work entry regeneration wizard
The button to regenerate work entries was no longer disabled, thus it
lead to a traceback when clicking on it.

The warning message was confusing and misleading.

task-3203225

closes odoo/odoo#114145

X-original-commit: 5325ffd8663f14532b0f43aee25cebdb9a14aec6
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-03-02 17:13:03 +01:00
859a289b01 [REF] web,*: OWL GanttView (part 2)
This commit acts as a setup that allows the newly converted gantt view
extensions in enterprise to work properly.

Part-of: odoo/odoo#112756
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2023-02-28 20:38:49 +01:00
Rob Coekaerts 7cd00c0702 [IMP] hr: simplify and correct the default data
Some changes were made to the default/demo/test data to be more
consistent:
  - Duplicates of "Paid Time Off" time off types are consolidated into
    one type (inluding year specific versions, ig "Paid Time Off 2019"
  - Annual Time Off is renamed back to Paid Time Off (both for the
    work entry type as the time off type) to be consistent everywhere.
  - All mentions of years in work entry types and time off types have
    been removed, as this is no longer relevant with the new allocation
    rules.
  - Time off types in the default data have been explicitely made
    company agnostic, in order for them to be available to all companies
    and not just the one company that was select when installing
    hr_holidays. This was already the case for the be_payroll data, but
    not for the standard hr_holidays ones.
  - Various small cosmetic / functional fixes and simplifications
    (eg deduplication of data)
  - expense_other_input has been made country agnostic, in order for it
    to be available in all countries.

task-2978513

closes odoo/odoo#112208

X-original-commit: dcc8bbf
Related: odoo/enterprise#36819
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-02-15 10:14:31 +01:00
Tommy (tong) dab107dd6e [FIX] hr_work_entry_contract: missing leave_id record on some work entries
Steps to reproduce:

- Add a pubic holiday record, i.e., From 6 Feb 2023 to 7 Feb 2023
- Add a leave with the date conflicting the public holiday, i.e. From
3 Feb 2023 to 8 Feb 2023
- Regenrate the work entries and check the work entry in form view.

Current behaviour:
Missing leave_id on some work entries

Expected behaviour:
It should linked to the corresponding leave for the work entries that is
created by the leave, while public holiday work entries should keep leave_id
empty.

Explanation:

After calling contract._get_interval_leave_work_entry_type, the leaves should
be filted out the not related leaves so contract._get_more_vals_leave_interval
can get the correct vals. Otherwise public holiday will always return
{'leave_id': false} in contract._get_more_vals_leave_interval which will replace
the correct leave_id value.

closes odoo/odoo#112641

X-original-commit: 66b65074671063e762e09589c3977dec311fc9b3
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-02-14 17:09:35 +01:00
Yannick Tivisse 3ee6b735fe [FIX] hr_work_entry_contract: Improve work entries generation perf 2023-02-03 10:25:00 +01:00
Yannick Tivisse 394014f679 [IMP] hr_work_entry_contract: Add method to retrieve lunch intervals 2023-02-03 10:25:00 +01:00
Yannick Tivisse 2e4f399e90 [IMP] hr_work_entry_contract: Add method to ease inheritance 2023-02-03 10:25:00 +01:00
Yannick Tivisse 7bce5f3f95 [MOV] resource: Split files according to coding guidelines 2023-02-03 10:25:00 +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
luvi b31daf2f7b [REF] web, *: improve view scale selector style and behavior
*: hr_holidays, hr_work_entry_contract

The commit introduces a new standard view component made to implement
in a consistant way the scale/select the appropriate period to display
in a view. This component is currently used by the Calendar view.

Tests have been added for this new component, as its behavior specs must
remain comprehensive. When there is no options or only one, the button is
removed from the view to keep space available, as its purpose is reduced.

This component gives the opportunity to keep the same style and behaviors
for views implementing it (eg: Calendar, Gantt) and should be used in
other views as well as soon as they are converted to Owl.

Other modules have been adapted to use the component name in xpath instead
of the span with the o_calendar_scale_buttons element. Tests have been
adapted as well.

A scss file has been modified to prevent the arrow to be misplaced on touch
devices due to a higher padding in the dropdown item element.

part of task #2867569

closes odoo/odoo#109090

Related: odoo/enterprise#35435
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-01-11 14:30:46 +01:00
niyasraphy 999043b36c [IMP] *: change leave string's to time off
update various string/labels contains "Leave" in hr_holidays, hr_work_entry_contract, resource, test_resource and project_timesheet_holidays modules to "Time Off"

closes odoo/odoo#107504

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-12-09 16:40:58 +01:00
niyasraphy 967ee433b8 [IMP] hr_work_entry_contract: add discard button in regenerate wizard
closes odoo/odoo#107050

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-12-06 10:52:29 +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
Kevin Baptiste ec109334c5 [FIX] hr_work_entry_contract: allow Payroll Manager to access work entries
A Payroll Manager couldn't access the work entries of their own
employees as they couldn't write the work entries generation date on the
employee's contract.

task-3014915

closes odoo/odoo#104113

X-original-commit: d6a5909f988568581c2ec5b3f83271863be85fc4
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-10-26 01:58:35 +02:00
Martin Trigaux fde3f4d4b9 [I18N] *: export 16.0 source terms
closes odoo/odoo#102163

X-original-commit: 011d7aac5aacedb3ab373f247471ba69d67f50f3
Related: odoo/enterprise#32288
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-10-06 14:56:52 +02:00
Leonardo Pavan Rocha 9d4f2624df [IMP] hr_work_entry_contract: convert calendar views to owl
Converts calendar views in hr_work_entry_contract to owl.

task-2992657

closes odoo/odoo#101657

X-original-commit: 9ffd5bba4b02df35fcd18908d21fa3bc95974f1e
Related: odoo/enterprise#32039
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-09-29 20:50:57 +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
Yannick Tivisse 40d9249f90 [FIX] hr_work_entry_contract: Fix multi-company work entries generation
closes odoo/odoo#99760

X-original-commit: f32cb46f18a5ea28b39b29c3c7934656d6af72a0
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-09-12 15:30:48 +02:00
Rob Coekaerts 252d7f4b39 [ADD] hr_homeworking: add homeworking information and features for employees
task-2700425
2022-09-02 13:29:15 +02:00
Yannick Tivisse c78bfc1463 [FIX] hr_work_entry_contract: Fix work entry generation cron
Purpose
=======

The cron is breaking (expected singleton error) if treating contracts
from the same company at the same time.

Actually, this shouldn't be done that way to avoid mixing unrelated
resource.calendar.leave.

Handle the contracts over 2 cron execution instead.
2022-09-02 13:21:40 +02:00
Rob Coekaerts 0a0ea0336b [IMP] hr_work_entry_contract: Add warning when regenerating work entries. 2022-09-02 13:21:40 +02:00
Rob Coekaerts 6ce0ec9cb2 [IMP] hr_work_entry_contract: Extend work entry generation period by one month.
As the hr_homeworking module will rely on hr_work_entry to designate the
homeworking location of employees, it is necessary that work entries are
generated further in advance than up until the end of the current month, so that
employees can indicate their homeworking locations a reasonable time in advance
(at least one month).
2022-09-02 13:21:40 +02:00
Yannick Tivisse d2ad74f8bd [IMP] hr_work_entry_contract: Allow regenerating work entries for several employees
closes odoo/odoo#98036

Taskid: 2917741
Related: odoo/upgrade#3772
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-08-16 09:19:20 +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
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
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
Agustín Castro Bugallo 208c714b40 [FIX] hr_work_entry_contract: Fix is_unforeseen_is_leave constraint violation
The constraint is added in `hr_payroll`, checking that if `is_unforeseen`
is True, then so must be `is_leave`. To reproduce the error simply install
`hr_payroll`, edit Work Entry Type Attendance to set as unforeseen absence
and upgrade the module `hr_work_entry_contract`.

closes odoo/odoo#92358

X-original-commit: 5448ddcbec8a1058aa271206d5a8999b3e67dda5
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-05-27 15:42:46 +02:00
William Braeckman 9985fd0725 [FIX] hr_work_entry_contract: fix generation of work entries
This commit aims to fix an issue with work entries generation when the
requested period is completely outside of the contracts period.
In this case no work entries should be generated.

Part-of: odoo/odoo#90933
2022-05-11 16:00:34 +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
William Braeckman 3b1e37ce67 [FIX] hr_work_entry_contract: fix first batching
While investigating an error that occured on production it was noticed
that work entry batching did not happen correctly on the first batch for
contracts that started on the same date, this is due to the microseconds
being different in the `date_generated_from` and `date_generated_to`
fields.

TaskId-2466871
2022-05-10 14:56:10 +02:00