Commit Graph
231 Commits
Author SHA1 Message Date
Tom De Caluwé 34f1bc96a2 [FIX] hr_holidays: ignore unconfirmed leaves in current leave status
As of this commit, only confirmed leaves will be considered when computing the
current leave or absence of an employee. Additionally, a bug in the is_absent
search implementation was fixed: before this commit, the same results were
returned for absent and non-absent searches.

opw-2877328

closes odoo/odoo#124968

X-original-commit: 28ccbbab07a0c25570ca9b940428b8e541d262d7
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-14 13:10:49 +02:00
Audric Onockx (auon) 6b3c5370a8 [IMP] hr_timesheet: allow timesheeting on sub-tasks with no project
Allow timesheeting on sub-tasks with no project_id set.
Instead, refer to the project_id set on its parent_id, and so on,
recursively.

task-3336215

X-original-commit: d794e41619a36a8c9ad1e77a816e57051207cdcf
Part-of: odoo/odoo#124563
2023-06-10 12:18:56 +02:00
Louis Wicket (wil) 04189318cc [I18N] *: update master translations
Currently, only stable releases see their translations updated. This has
resulted in master accumulating outdated stuff for years, which can be
confusing for users testing master on runbot.

This one-shot commit resynchronizes master translations based on the
content from 16.0 and removes empty PO files (i.e. no longer containing
translations).

closes odoo/odoo#121629

Related: odoo/enterprise#41171
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-05-22 17:52:07 +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
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
Adesh Jolhe 1ec282f858 [IMP] project_timesheet_holidays, _*: bring ux improvements for project and timesheet app
*_= project, sale_timesheet,

The purpose of this commit is to improve the UX of the project and timesheet app
So in this commit done following changes:

- In the timesheet time off form view changes the label from
timesheet to timesheets
- In the timesheet list view added a 'no_open' option on the SOL field to
make not be clickable
- In project form view removed the 'quick' create option from the
user_id field
- In project task form view added a 'no_open' option on the SOL field to
make not be clickable

- Color of the Gantt and calendar views in project app
     My Tasks:
	the color used should be according to the personal stage set on the task.
     All tasks:
	the color used should be according to the project set on the task.
     When the user clicks on a project in the main view of Project app:
	the color used should be according to the stage.

task-3125942

closes odoo/odoo#111688

Related: odoo/enterprise#36615
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-19 11:00:49 +02:00
Kartik Chavda 14b5a466ea [IMP] project_timesheet_holidays: update info to make it more understandable
Before this commit generating timesheet for time off doesn't have
clearer info after the recent change.

This commit update info according to recent changes to have better
understanding to end user.

task-3186664

closes odoo/odoo#115265

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-12 22:47:57 +02:00
Kartik Chavda fdb692c25b [IMP] project_timesheet_holidays: create timesheets for global leave wo calendar
Before this commit when user create a global without calendar then
it'll not create any timesheets for any employee but global leave
without calendar is taken as leave global leave for all calendar
in that company's calendar and should create timesheet for all
calendars employee in company.

This commit create timesheets for all calendars employee in that
company if global leave does not have specific calendar set on it.

task-2969791

Part-of: odoo/odoo#100141
2023-04-03 17:07:07 +02:00
Audric Onockx (auon) 3905feb62a [REF] hr_timesheet: make _timesheet_preprocess work in batch
With this commit, we allow _timesheet_preprocess to accept a list of
dict of values instead of dict of values.
This represents an important gain in performance.

With 6 projects, 17 tasks/project, 10 timsheet vals/task = 1020 'vals':
Queries : reduced from 110 to 7.
Time : divided by ≃2.5.

task-3030942

closes odoo/odoo#103458

Related: odoo/enterprise#32967
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-02-03 14:23:02 +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
Denis Ledoux b4a7996e96 [IMP] base, *: change the API of init hooks to pass env
This is mostly a cleaning/refactoring change.

The current API for init hooks (pre, post, uninstall) is to pass
`cr, registry`.
But the first thing which was done by most
post init and uninstall hooks was to create an env using
the cr passed
e.g.
`env = api.Environment(cr, SUPERUSER_ID, {})`
and the `registry` argument was unused in all these hooks,
completely.

By changing the API of hooks to pass `env` instead
of `cr, registry`, we gain in average two lines in every
hooks:
- the line creating the env `env = api.Environment(cr, SUPERUSER_ID, {})`
- the line importing `api` and `SUPERUSER_ID`

Therefore removing ~250 lines of repeated code lines accross odoo/odoo and
odoo/enterprise.
In addition to these lines removed,
it also ease the API of init hooks for Odoo developers,
who are used to that `env` and not so much how to create an `env`
from a cursor.

Part-of: odoo/odoo#108254
2023-02-01 10:25:01 +01:00
Kartik Chavda 26268a50eb [IMP] {hr,sale}_timesheet, project_timesheet_holidays: improve generic UX
Purpose of this PR to do generic improvement for timesheet apps.

So in this PR done following improvements:
- add information about project section on time off type form view so user can better
  understand time off and timesheets relation.
- display 'view timesheets' as button instead of link in sale order portal view.
- add time off link to project settings's time off section so user can easily navigate to
  understand link b/w time off and project apps.
- prevent user to create new timesheet for non active employee by adding context
  depending on employee's active state.

task-2983879

closes odoo/odoo#106047

Related: odoo/enterprise#34171
Related: odoo/upgrade#4056
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-01-25 17:49:50 +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
Thomas Carlier(thc) ac8c6736fc [FIX] project_timesheet_holidays: Fix traceback when no timesheet_task_id is found.
-steps to reproduce:
 do a search in project.task on is_timeoff_task when no
 timesheet_task_id is defined on any hr.leave_type.
 This will trigger the _search_is_timeoff_task method

-before this commit:
 crash when no leave_type with timesheet_task_id is found

-after this commit:
 creation of an empty list as expected

opw-3086486

closes odoo/odoo#110091

X-original-commit: b98949b1cb85514ee5a56ff1a5860591c10b0994
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-01-17 12:58:48 +01:00
Kartik Chavda eb0d81eaa7 [IMP] {hr,sale}_timesheet, _*: make separate method for access
_* = project_timesheet_holidays

Before this commit checking validation for creating and writing
on timesheet done in create and write method which makes
customization difficult for user.

So, in this commit check validation for creating and writing on
timesheet done in separate method _check_can_create and
_check_can_write respectively for timesheet.

task-2928942

closes odoo/odoo#100943

Related: odoo/enterprise#31689
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-01-16 11:36:49 +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
Jorge Pinna PuissantandMichael Mattiello (mcm) c7c2959449 [IMP] web, *: simplification and standardization of the settings arch
The aim of this commit is to simplify and standardize the settings archs.

To do this, a small DSL exclusively for the settings was created. This
new DSL introduces 3 tags: `app`, `block` and `setting`.

The `app` tag is used to declare the application on the settings view.
It creates an entry with its logo on the sidebar of the view. It also
acts as delimiter when searching.

```xml
    <app string="CRM" name="crm">
    ...
    </app>
```

- `string` : The "display" name of the application.
- `name` : The technical name of the application (the name of the module).
- `logo` *optional* : The relative path to the logo. If not set, the
        logo is created using the `name` parameter :
        `/{name}/static/description/icon.png`.

The `block` tag is used to declare a group of settings. This group can
have a title and a description/help.

```xml
    <block title="Title of group Bar">
    ...
    </block>
```

- `title` *optional* : The title of the block of settings (the old h2),
        you can perform research on its text.
- `help` *optional* : The description/help of the block of settings
        (the old h3), you can perform research on its text.

The `setting` tag is used to declare the setting itself. The first field
in the setting is used as the main field (optional). This field is
placed on the left panel (if it's a boolean field) or on the top of the
right panel (otherwise). The field is also used to create the setting
label if a `string` is not defined. The `setting` tag can also contain
more elements (e.g. html), all of these elements are rendered in the
right panel.

```xml
    <setting string="this is bar">
        <field name="bar"/>
        ...More elements
    </setting>
```

- `type` *optional* : By default, a setting is visually separated on two
        panels (left and right), and is used to edit a given field. By
        defining `type='header'`, a special kind of setting is rendered
        instead. This setting is used to modify the scope of the other
        settings. For example, on the website application, this setting
        is used to indicate to which website the other settings apply.
        The header setting is visually represented as a yellow banner on
        the top of the screen.
- `string` *optional* : The text used as label of the setting. If it's
        not defined, the first field is used as label.
- `title` *optional* : The text used as tooltip.
- `help` *optional* : The help/description of the setting. This text is
        displayed just below the setting label (with classname
        `text-muted`).
- `company_dependent` *optional* : If this attribute is set to "1" an
        icon is displayed next to the setting label to explicit that
        this setting is company-specific.
- `documentation` *optional* :  If this attribute is set, an icon is
        added next to the setting label, this icon is a link to the
        documentation. Note that you can use relative or absolute path.
        The relative path is relative to
        `https://www.odoo.com/documentation/server_version`, so it's not
        necessary to hard-code the server version on the arch anymore.

closes odoo/odoo#106425

Task-id: 3081367
Related: odoo/enterprise#34337
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: "Michael Mattiello (mcm)" <mcm@odoo.com>
2022-12-02 14:40:25 +01:00
Kartik Chavda 1f3a392ffa [IMP] project_timesheet_holidys: make timesheet page readonly for time off tasks
This commit make timesheet page of tasks related to time off types readonly
so user can not create,update or delete timesheets create by leaves

task-2888607

closes odoo/odoo#96359

Related: odoo/enterprise#29678
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-11-07 13:49:50 +01:00
Prakash Prajapati 2b21daec04 [IMP] *_: replace the UserError into RedirectWarning in the timesheet
_* = project_timesheet_holidays

Currently, if the timesheet is associated with timeoff and it is deleted, a
user error occurs.
In this commit, RedirectWarning will appear instead of user error, so it can be
redirected to the timeoff linked to the timesheet.

task-2888607

Part-of: odoo/odoo#96359
2022-11-07 13:49:50 +01:00
Sarika Shekhada e828c72b83 [IMP] project_timesheet_holidays: improve demo data timesheet
In this commit before, timesheets are not generated for approved time off. So we
have entered the timesheet regarding the approved time off.

task-2960247

closes odoo/odoo#103071

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-02 17:38:57 +01:00
Damien Bouvy f2992bbe0c [FIX] *_holidays: adapt to grid form views
closes odoo/odoo#103101

X-original-commit: d13047de8cafa414a2197b5311699cce84e59e20
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-10-14 09:18:13 +02:00
Dhaval BaraiyaandMahendra Barad <mba@odoo.com>, Prakash Prajapati <ppr@odoo.com> 1e48724f8b [IMP] *.*: update the tooltips in various modules
The goal of this task is to review the copywriting of the tooltips
because some of them are not correct in English and others are not
valid anymore. This is also a good opportunity to make an inventory
of the tooltips we have and to add some that could be missing.

task-2860991

closes odoo/odoo#102179

X-original-commit: 5e4cf8f9f6a4372f45aa04a5965f8073bb4ea68a
Related: odoo/enterprise#32298
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Co-authored-by: Mahendra Barad <mba@odoo.com>, Prakash Prajapati <ppr@odoo.com>
2022-10-05 12:04:48 +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
mafo-odoo 7c6cad248f [FIX] project_timesheet_holidays: holiday timesheet can't be deleted
Issue:
When creating time off timesheet from the timesheet app,the newly
created timesheet is connected to a leave request while it shouldn't
be linked to any leave request and in consequence you can only delete
this new timesheet by deleting the leave request.

Explanation:
To create the new timesheet timesheet_grid makes a copy of another
timesheet on the same line and that makes that the holiday_id (used
to link timesheet and leave request) is also copied.

Solution:
When copying a timesheet the holiday_id is not copied

opw-2951062

closes odoo/odoo#100211

X-original-commit: e1e6ba48bb43ebfe9644368287f9bdf2fd1d561c
Related: odoo/enterprise#31347
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-19 09:33:42 +02:00
Vincent Larcin 0b4c5de6e5 [FIX] project_timesheet_holidays: fix AccessError with mrp
Steps to reproduce
------------------

1) Install project_timesheet_holidays and mrp.
2) Go to Manufacturing > Settings and enable Work Orders.
3) Log in as a user with access rights to Manufacturing but no access rights to HR.
4) Create a Manufacturing Order with a Work Order.
5) Go to Operations > Work Order and start the Work Order.
5) Click on "Done", you should get an AccessRight error.

---

This commit fixes this error by calling sudo before creating the timesheet leaves for each employee.

Follow-up of https://github.com/odoo/odoo/pull/94414

closes odoo/odoo#99174

X-original-commit: 13718d26bb98713f5a533c1a53c7fc2c2abfaac2
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Larcin Vincent (vila) <vila@odoo.com>
2022-08-30 08:18:59 +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
Kartik Chavda 25cd0cf3fc [IMP] project_timesheet_holiday: improve feature timesheet created by time off
This commit prevent user write on time off timesheets and create timesheet
on time off tasks and add test for this feature.

task-2826265

Part-of: odoo/odoo#90744
2022-08-08 10:50:22 +02:00
mafo-odoo 1ed41ee161 [FIX] project_timesheet_holidays: reset timesheets when global holiday has calendar edited
Steps to reproduce:
- Install Time off and timesheet modules
- Create a public holiday with no "working hours"
- Then edit it and add it with working hours used by some employees

Expected behavior:
Adding the working hours makes that the global time off meets the
requirements to create timesheets. Then the employee related to the
new "working hours" is going to have timesheets created for this
holiday.

Current behavior:
No timesheet is created.

Explanation:
The write function of the global time off only updated timesheets
when the dates where modified. We add the update in the calendar_id
modification case and with it the new conditions to create the
timesheets. (working hours = calendar_id)

opw-2879882

closes odoo/odoo#96226

X-original-commit: a255a743b5296570aab166a5e275a323a1792b60
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-07-18 19:55:56 +02:00
Xavier BOL (xbo) 81c44cfbf0 [FIX] project_timesheet_holidays: add freeze_time in test using today
Before this commit, when the test is launched at the end of the working
date, the first global time off created will start at the end of the
next Monday and so no timesheet will be generated for this day.

This commit adds a `freeze_time` for this test to have the expected
behavior. That is, a timesheet should be generated per global time off
created.

closes odoo/odoo#95658

X-original-commit: 6a72c81b5b435fc79e139531a8b38d97ed04e994
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Xavier <xbo@odoo.com>
2022-07-08 19:52:46 +02:00
mafo-odoo 4659736fc4 [FIX] project_timesheet_holidays: create/remove global time off timesheets
Before this commit, when the employee is generated with the salary
configurator, the employee is archived since the employee will not
directly start in the company. Even if the employee is archived and the
timesheets are generated for this employee based on the global time offs
found in the future. The problem is the timesheets cannot be created
for archived employees and so a user error is raised.
This problem could also happen if the user creates an archived employee.

This commit fixes the issue by preventing the timesheets generation when
the employee created is archived. When this employee will be updated and
active field will be set to True, the timesheets generation will be
applied. In the inverse use case, when the user will archive an employee
and timesheets generated for the future global time offs will be removed.

opw-2887727
opw-2870739

closes odoo/odoo#95644

X-original-commit: 160afba28d88ddd9d84856cc90639586bc2ea7b6
Related: odoo/enterprise#29273
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Fockedey Martin (mafo) <mafo@odoo.com>
2022-07-08 14:34:27 +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
Rohitkumar (roku) b2eed699f1 [FIX] project_timesheet_holidays: don't show private task in timesheet task
Before this commit, in time off form view, task field contains the private task.

So this commit fixes the issue by not displaying the private task in task field
of time off form view.

task-2733415

closes odoo/odoo#89674

X-original-commit: 76fcd0cfe5fc157f22825544e239f283831b49fd
Related: odoo/enterprise#26611
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-04-26 14:28:55 +02:00
Prakash Prajapati 4b488c2c7e [ADD] project_timesheet_holidays: add test for public holiday and timeoff
task-2727561

closes odoo/odoo#86914

Related: odoo/enterprise#25464
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-04-25 19:11:27 +02:00
Prakash Prajapati b364b5aa00 [IMP] project_timesheet_holidays: improve test for employee timeoff
task-2727561

Part-of: odoo/odoo#86914
2022-04-25 19:11:26 +02:00
Xavier BOL (xbo)andWilliam Braeckman 68ad5504b4 [FIX] project_timesheet_holidays: remove timesheets when time off is canceled
Before this commit, when the user cancels his validated time off planned
in the future, the timesheets generated for this time off are not
deleted. The problem is since the timesheets are not removed we could
have duplicated timesheets if the user adds a new time off in the same days
for instance, because the newest timesheets are generated and thus we have
duplicated timesheets generated instead of having only timesheets generated
for the newest time off.

This commit removes the timesheets generated for the time off when this
time off is canceled (=archived). Also, It also prevent the user to
manually unarchive the time off since this operation is not really
managed and could introduced eventual problems.

Related PR: #76722

Part of task-2791386

closes odoo/odoo#89246

X-original-commit: a9e63ebe32079e2215acafcd4bca15b371ee9bc2
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Xavier <xbo@odoo.com>
Co-authored-by: William Braeckman <wbr@odoo.com>
2022-04-21 12:50:12 +02: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
Yannick Tivisse 20f556644b [IMP] hr*: Avoid creating useless objects on salary simulations
Part-of: odoo/odoo#85133
2022-02-28 17:27:07 +00:00
Yannick Tivisse 959a05d00c [FIX] project_timesheet_holidays: Prevent duplicated timesheets + Imp Perfs
Purpose
=======

The existing timesheets linked to a time off are unlinked once the
time off is refused (which is the only action on the interface for
validated time off).

But nothing prevents to set in a python code a time off directly
in draft to validate it afterward.

In that case, the timesheet is duplicated and is impossible to unlink
as this is forbidden for timesheets linked to a time off.

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

Make sure before creating timesheets linked to a time off that there
is not remaining linked timesheets.

On the other hand, modify the method to generate the timesheets in batch.

X-original-commit: 46a3394b960ba344d49a4e99ae5a6a7d7392dbf6
Part-of: odoo/odoo#84269
2022-02-11 11:40:07 +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
Xavier BOL (xbo) 2ca28bca34 [FIX] project_timesheet_holidays: take all leaves in given interval
Before this commit, we search the leaves in the same interval of the
public leaves.

This commit searches all leaves containing the public leave in their
interval to get all leaves and not create a timesheet for this public
leave for an employee is already off.

task-2665899

closes #79034

X-original-commit: ca6c164075d83e6bace2451888f8a2365b769e1a
Part-of: odoo/odoo#79291
2021-11-02 16:59:56 +00:00
Philippe Wauthy e09667b60f [FIX] project_timesheet_holidays: fix traceback when approving a time off with several employees
Description of the issue/feature this PR addresses:
A traceback appears when a time off is at the second approval stage and approved with several employees assigned to the time off.
https://www.awesomescreenshot.com/video/5408638

Current behavior before PR:
When validating a time off that is in the second approval stage with several employees assigned to, a traceback appears

Desired behavior after PR is merged:
No traceback appears when validating a time off that is in the second approval stage with several employees assigned to

task-2657656

closes odoo/odoo#77625

X-original-commit: aaa7c5bf10089eb8953f46cccb2e93aa3a20fa35
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-10-01 15:26:59 +00:00
Philippe Wauthy 6367ff2b33 [FIX] hr_holidays: Improve general UX (Back2basics)
General fixes for usability

- Time off type configuration visual : https://tinyurl.com/yj2z6okp
- When you create an allocation, the end date should have a place holder "no limit". If there is no end date recorded, that value should be displayed on loading.
- In Overview, remove filter "people i manage"
- In Approvals / time off : change filters : https://i.imgur.com/uDNjZv8.png
- In Approvals / approvals : change filters like in point 5 (remove people I manage replace with my team)
- In Reporting / By Employee : filters : https://tinyurl.com/yg3u3rkf
- In Reporting / By Type : filters : https://tinyurl.com/yhbpgz5m
- Remove Allocations smartbutton from Employee App
- When you click on TimeOff Smartbutton from Employee App, you should be redirect to this screen : https://tinyurl.com/ygwxzx5b
- When an allocation is created, the validity is added to the name of the allocation like "Allocation X (validity Date --> Date) and hide the validity field in "My allocations".
- Users will have the information of the validity from the name of the allocation

task-2643692

closes odoo/odoo#77376

X-original-commit: 7f92c830d3607167bd76bc43d992fbf720a3ef29
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-09-29 08:33:26 +00:00
Martin Trigaux ef8ad324b0 [I18N] *: export 15.0 source terms
closes odoo/odoo#76542

X-original-commit: 63e6807437295519a0f4705fb88644d6d557ca3a
Related: odoo/enterprise#20882
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-09-16 07:17:40 +00:00
Nidhi Patel dbe22a3c06 [IMP] {hr,sale}_timesheet: improve setting in the timesheet module
The purpose of this task is to improve the setting of the timesheet module.

In this commit, we improve the following:
 - Rename the label, description and align the field with the name and
   description of the feature
 - Add an 'OK' button in the 'download our app' modal
 - Render the frequency field properly in the employee/manager reminders
   setting on mobile view
 - In configure your services link: change the name of the action to "Services"
 - Display the following options in the community, with the usual 'Enterprise'
   tag:  Round Timesheet, Employee/Manager reminder, Invoicing Policy

closes odoo/odoo#74967

Task-id: 2531338
Related: odoo/enterprise#20182
Related: odoo/upgrade#2771
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-09-03 15:45:14 +00:00
254d6a71e8 [IMP] hr_holidays: Improve Accruals, dashboards and general UX (Back2basics)
Purpose
=======

Time Off : New Dashboard, Accruals feature, Public holidays, New time off type configuration view.

- Review of Dashboard
- Accrual feature : Currently, when you create an allocation, it's possible to create an
  Accrual, but there is no appraisal Plan. An Appraisal plan is use to define steps of accruals
  for each employee.
  In Belgium, we use accrual Allocation for European Leaves, or compensatory hours, it's a
  simple use case.  But in USA, it's possible to change the calculation mode each year.
  Also, in USA, it's possible to deal your accrual plan when you arrive on the company. It's a
  HR Officer task to create the right Accrual allocation for each new employee.
- Public Holidays :
  Improvement of global time off feature located on Working hours calendar. Now, Time off
  application have to manage Public Holidays.
- Review of Time Off type configuration

COM PR: https://github.com/odoo/odoo/pull/72511
ENT PR: https://github.com/odoo/enterprise/pull/19157
UPG PR: https://github.com/odoo/upgrade/pull/2791
TaskID:2475413

closes odoo/odoo#72511

Related: odoo/enterprise#19157
Related: odoo/upgrade#2791
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Co-authored-by: William Braeckman <wbr@odoo.com>
Co-authored-by: Xavier BOL (xbo) <xbo@odoo.com>
Co-authored-by: Laurent Stukkens (LTU) <ltu@odoo.com>
Co-authored-by: Yannick Tivisse <yti@odoo.com>
2021-09-02 12:57:03 +00:00
jdoutrelouxandLaurent Stukkens 96ff372034 [IMP] project_timesheet_holidays : generate timesheet entries for global time off
Generate timesheet entries for each employee when a  global time off is created
if module_project_timesheet_holidays is true.

This only impacts the employees with the corresponding resource calendar
The entries are linked to the project and task set in the settings.

The number of hours timesheeted corresponds to the timeframe during which both the global time off
and the working hours of the employee overlap (same behavior as for regular time off).

If the global time off is modified or deleted, the timesheet entry is adapted accordingly.

Task-2352428
Closes #67021

Co-authored-by: Laurent Stukkens (LTU) <ltu@odoo.com>
Co-authored-by: jdoutreloux <jud@odoo.com>
2021-08-31 19:54:18 +00:00
William Braeckman 1285726ff9 [FIX] project_timesheet_holidays: prevent multi-company issue in time
off.

When validating a time off with a company-less time off type, if the
time off type is configured to create timesheet entries in a project, a
multi-company security rule could be triggered by accessing the project.
We now check that the company of the task is valid in the current
context (it would make no sense to have an employee work on a task from
another company anyway) before creating the timesheets.

Closes odoo/odoo#75308

Task ID: 2628148

closes odoo/odoo#75579

X-original-commit: 29662626f7d67480926fbb12986ca644d213151c
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: William Braeckman (wbr) <Williambraecky@users.noreply.github.com>
2021-08-25 12:19:18 +00:00
Xavier-Do 288595f558 [FIX] *: add explicit license to all manifest
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.

closes odoo/odoo#74245

Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-07-26 13:09:57 +00:00
Martin Trigaux 6758868731 [I18N] *: export saas-14.4 source terms
Without demo data

closes odoo/odoo#73560

X-original-commit: 802e46541117573e028b711ea33dad9df9075a39
Related: odoo/enterprise#19602
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-07-12 10:57:37 +00:00
Barad Mahendra 27538bca03 [IMP] project,hr(_timesheet)_holidays: usability improvement for project
Purpose of the commit is to improve the usability and onboarding
of the project app.

So in this commit, done the below changes:
 - Rename column "Kanban state" in list view screens
 - Hide column "analytic account" when not needed
 - Do not show "Internal" project

PS: Moved leave_timesheet_project_id into hr_timesheet and rename
it as internal_project_id and we used it in the domain in the
kanban/action to the kanban in order not to have it in the result.

closes odoo/odoo#68857

Taskid: 2451722
Related: odoo/upgrade#2479
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-06-24 05:18:14 +00:00