<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/hr_holidays/data, branch 14.0</title>
<subtitle>The current checkout of upstream Odoo</subtitle>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/'/>
<entry>
<title>[FIX] hr_holidays: fix typo in relativedelta days</title>
<updated>2021-04-01T06:33:25+00:00</updated>
<author>
<name>Christophe Monniez</name>
<email>moc@odoo.com</email>
</author>
<published>2021-04-01T06:33:25+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=67cb39aa74ae60dd069bf552ed06c878ec643f9c'/>
<id>67cb39aa74ae60dd069bf552ed06c878ec643f9c</id>
<content type='text'>
In relativedelta, `day` means day of the month and `days` is for number
of days. Today, the demo data failed because the computed `date_to` was
before the `date_from`.

closes odoo/odoo#68627

Signed-off-by: Xavier Morel (xmo) &lt;xmo@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In relativedelta, `day` means day of the month and `days` is for number
of days. Today, the demo data failed because the computed `date_to` was
before the `date_from`.

closes odoo/odoo#68627

Signed-off-by: Xavier Morel (xmo) &lt;xmo@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] hr_holidays: possible overlaps between PTO and weekends</title>
<updated>2021-02-02T08:14:49+00:00</updated>
<author>
<name>Xavier Morel</name>
<email>xmo@odoo.com</email>
</author>
<published>2021-02-02T07:20:44+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=7840b21483c0012174e6028a39b114ce56f06158'/>
<id>7840b21483c0012174e6028a39b114ce56f06158</id>
<content type='text'>
Followup to odoo/odoo#65314: turns out there's a bunch of other leave
requests in the file which will eventually fall on a weekend, and will
probably blow up due to the new validation in 14.0:

- hr_holidays_sl_al in March 2021 because April 17th, 2021 is a
  saturday
- hr_holidays_cl_mit_2 in June 2021 because June 5th, 2021 is a
  saturday
- hr_holidays_sl_vad in September 2021 because September 25th, 2021 is
  a saturday
- hr_holidays_sl_kim in April 2021 because May 1st, 2021 is a saturday
- hr_holidays_sl_kim_2 in March 2021 because July 3rd, 2021 is a
  saturday

Solution
========

Instead of hard-coding month-days, move to the first monday after the
original date e.g. if we were looking for the 20, now get the monday
after the 22. In relativedelta terms, `weekday=0` is "the next
monday". The date is then formatted inclusive of the month-day rather
than hard-coding one.

One nit is for the end date:"the next wednesday" may come before "the
next monday" if we're on TU or WE. So we need to first jump to the
next MO *then* to the WE after that, which makes the code a bit
longer (and more redundant). As a result the end date is now "the
wednesday after &lt;the start date&gt;" rather than being a literal 2 days
later or whatever.

The PR updates all the 1-day and 2-day intervals, it also updates the
3 days inclusive (those over 3 which include start and end dates
rather than without) including those updated by #65314 for clarity /
coherence of small intervals. Longer intervals are left untouched,
although we may eventually want to update them so `number_of_days`
computations are more reliable.

Redundancy issues
-----------------

There are a bunch of redundancies / verbosities which don't seem
easy or possible to remove:

* While lxml does resolve entities by default it doesn't load
  DTDs (let alone validate them), aliasing various datetimes
  &amp; deltas as entities is not an option, not to mention for security
  reasons we'd rather stop resolving entities entirely than allow
  custom ones.
* While it's possible to define nested safe_eval'd `context` on nodes,
  the evaluation context for *those* contains neither datetime nor
  relativedelta, so storing a bunch of constants in the (environment's)
  context and using that in the expression is not an option either.
* Leaving `date_from`/`date_to` off of some records breaks, probably
  because some other field necessary to properly compute *them* is
  missing.

Other changes
=============

* Removed explicit settings to `number_of_days` and explicit calls to
  `_compute_number_of_days`, seems redundant and unnecessary as the
  compute works fine as long as we let it.
* While at it, updated the calls to `action_approve`: moved them next
  to the corresponding record (instead of being on the other side of
  the file) and used direct references to the subject records rather
  than complicated searches.
* Also updated two leave allocations to be created validated OOTB
  instead of manually calling action_validate as that's what's being
  done elsewhere in the file.

Notes
=====

* In relativedelta lingo, "the next X" is inclusive of the current
  date e.g. when looking for the next WE, if the date being offset is
  already WE there will be no movement, this can be unexpected.
* Normally relativedelta would be used with the MO/TU/WE/... constants
  for weekdays, but we're not exposing those to `@eval` so integer
  literals it is.

closes odoo/odoo#65380

Signed-off-by: Yannick Tivisse (yti) &lt;yti@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Followup to odoo/odoo#65314: turns out there's a bunch of other leave
requests in the file which will eventually fall on a weekend, and will
probably blow up due to the new validation in 14.0:

- hr_holidays_sl_al in March 2021 because April 17th, 2021 is a
  saturday
- hr_holidays_cl_mit_2 in June 2021 because June 5th, 2021 is a
  saturday
- hr_holidays_sl_vad in September 2021 because September 25th, 2021 is
  a saturday
- hr_holidays_sl_kim in April 2021 because May 1st, 2021 is a saturday
- hr_holidays_sl_kim_2 in March 2021 because July 3rd, 2021 is a
  saturday

Solution
========

Instead of hard-coding month-days, move to the first monday after the
original date e.g. if we were looking for the 20, now get the monday
after the 22. In relativedelta terms, `weekday=0` is "the next
monday". The date is then formatted inclusive of the month-day rather
than hard-coding one.

One nit is for the end date:"the next wednesday" may come before "the
next monday" if we're on TU or WE. So we need to first jump to the
next MO *then* to the WE after that, which makes the code a bit
longer (and more redundant). As a result the end date is now "the
wednesday after &lt;the start date&gt;" rather than being a literal 2 days
later or whatever.

The PR updates all the 1-day and 2-day intervals, it also updates the
3 days inclusive (those over 3 which include start and end dates
rather than without) including those updated by #65314 for clarity /
coherence of small intervals. Longer intervals are left untouched,
although we may eventually want to update them so `number_of_days`
computations are more reliable.

Redundancy issues
-----------------

There are a bunch of redundancies / verbosities which don't seem
easy or possible to remove:

* While lxml does resolve entities by default it doesn't load
  DTDs (let alone validate them), aliasing various datetimes
  &amp; deltas as entities is not an option, not to mention for security
  reasons we'd rather stop resolving entities entirely than allow
  custom ones.
* While it's possible to define nested safe_eval'd `context` on nodes,
  the evaluation context for *those* contains neither datetime nor
  relativedelta, so storing a bunch of constants in the (environment's)
  context and using that in the expression is not an option either.
* Leaving `date_from`/`date_to` off of some records breaks, probably
  because some other field necessary to properly compute *them* is
  missing.

Other changes
=============

* Removed explicit settings to `number_of_days` and explicit calls to
  `_compute_number_of_days`, seems redundant and unnecessary as the
  compute works fine as long as we let it.
* While at it, updated the calls to `action_approve`: moved them next
  to the corresponding record (instead of being on the other side of
  the file) and used direct references to the subject records rather
  than complicated searches.
* Also updated two leave allocations to be created validated OOTB
  instead of manually calling action_validate as that's what's being
  done elsewhere in the file.

Notes
=====

* In relativedelta lingo, "the next X" is inclusive of the current
  date e.g. when looking for the next WE, if the date being offset is
  already WE there will be no movement, this can be unexpected.
* Normally relativedelta would be used with the MO/TU/WE/... constants
  for weekdays, but we're not exposing those to `@eval` so integer
  literals it is.

closes odoo/odoo#65380

Signed-off-by: Yannick Tivisse (yti) &lt;yti@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] hr_holidays: include time in demo data</title>
<updated>2021-02-01T09:41:45+00:00</updated>
<author>
<name>Martin Trigaux</name>
<email>mat@odoo.com</email>
</author>
<published>2021-02-01T09:07:01+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=ada1da9a0cea6aaa3f91ee34fd3b273be79e1e3d'/>
<id>ada1da9a0cea6aaa3f91ee34fd3b273be79e1e3d</id>
<content type='text'>
All fields not provided default to 0, so the the exact values are
`%Y-%m-20 00:00:00` - `%Y-%m-22 00:00:00`.
Because this is only 2 days it can entirely overlap with a week-end
(e.g. 2021-02-20/21), leading to `number_of_days` computed to 0 and
triggering an error at confirmation (`"The following employees are not
supposed to work during that period"`).

Change familly trip as the same issue would occure in May 2021

closes odoo/odoo#65314

Signed-off-by: Martin Trigaux (mat) &lt;mat@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All fields not provided default to 0, so the the exact values are
`%Y-%m-20 00:00:00` - `%Y-%m-22 00:00:00`.
Because this is only 2 days it can entirely overlap with a week-end
(e.g. 2021-02-20/21), leading to `number_of_days` computed to 0 and
triggering an error at confirmation (`"The following employees are not
supposed to work during that period"`).

Change familly trip as the same issue would occure in May 2021

closes odoo/odoo#65314

Signed-off-by: Martin Trigaux (mat) &lt;mat@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] *: rephrase, correct typos</title>
<updated>2020-11-27T15:42:35+00:00</updated>
<author>
<name>Martin Trigaux</name>
<email>mat@odoo.com</email>
</author>
<published>2020-11-27T13:42:36+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=9b3b2e8d711e3be75b1faffaf6f4f8f4ec90186e'/>
<id>9b3b2e8d711e3be75b1faffaf6f4f8f4ec90186e</id>
<content type='text'>
Courtesy of Transifex's translators for reporting bad/unclear sentences.

closes odoo/odoo#62539

Related: odoo/enterprise#15032
Signed-off-by: Martin Trigaux (mat) &lt;mat@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Courtesy of Transifex's translators for reporting bad/unclear sentences.

closes odoo/odoo#62539

Related: odoo/enterprise#15032
Signed-off-by: Martin Trigaux (mat) &lt;mat@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] hr_holidays: Improve the general usability (back2basics)</title>
<updated>2020-08-11T09:10:49+00:00</updated>
<author>
<name>Yannick Tivisse</name>
<email>yti@odoo.com</email>
</author>
<published>2020-08-06T07:57:25+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=d2238de57630d58c4913ab44746476b83492c72f'/>
<id>d2238de57630d58c4913ab44746476b83492c72f</id>
<content type='text'>
closes odoo/odoo#55568

Taskid: 2282495
Related: odoo/upgrade#1574
Related: odoo/enterprise#12272
Signed-off-by: Yannick Tivisse (yti) &lt;yti@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
closes odoo/odoo#55568

Taskid: 2282495
Related: odoo/upgrade#1574
Related: odoo/enterprise#12272
Signed-off-by: Yannick Tivisse (yti) &lt;yti@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] *: use `ref=` instead of `eval="ref('` in xml field tags.</title>
<updated>2020-02-11T13:07:06+00:00</updated>
<author>
<name>Victor Feyens</name>
<email>vfe@odoo.com</email>
</author>
<published>2020-02-07T13:42:17+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=d4e0fe018d05fd0dc3e9ab77977d6e97440c73c0'/>
<id>d4e0fe018d05fd0dc3e9ab77977d6e97440c73c0</id>
<content type='text'>
* Code cleanup
* Avoid a safe evaluation of the field value when loading those records.

closes odoo/odoo#44883

Related: odoo/enterprise#8283
Signed-off-by: Victor Feyens (vfe) &lt;vfe@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Code cleanup
* Avoid a safe evaluation of the field value when loading those records.

closes odoo/odoo#44883

Related: odoo/enterprise#8283
Signed-off-by: Victor Feyens (vfe) &lt;vfe@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[REV] web: reverts update to fontawesome 5.11.2</title>
<updated>2019-12-09T10:33:36+00:00</updated>
<author>
<name>Kevin Baptiste</name>
<email>kba@odoo.com</email>
</author>
<published>2019-12-05T07:18:28+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=6cbe824871da51af27ac5b2feb7ecc9fcd6b18d0'/>
<id>6cbe824871da51af27ac5b2feb7ecc9fcd6b18d0</id>
<content type='text'>
This reverts commit ff1c35513aecef5fbc30f7c2f3834450e719714e.

closes odoo/odoo#41480

X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc
Related: odoo/enterprise#7110
Signed-off-by: Yannick Tivisse (yti) &lt;yti@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit ff1c35513aecef5fbc30f7c2f3834450e719714e.

closes odoo/odoo#41480

X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc
Related: odoo/enterprise#7110
Signed-off-by: Yannick Tivisse (yti) &lt;yti@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] web: update to fontawesome 4.7.0 to 5.11.2</title>
<updated>2019-11-28T10:05:12+00:00</updated>
<author>
<name>Kevin Baptiste</name>
<email>kba@odoo.com</email>
</author>
<published>2019-08-12T07:18:23+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=ff1c35513aecef5fbc30f7c2f3834450e719714e'/>
<id>ff1c35513aecef5fbc30f7c2f3834450e719714e</id>
<content type='text'>
FontAwesome 5 introduced new names for some icons as described on
https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes

This commit replaces the old names to the new ones.

closes odoo/odoo#35826

Taskid: 2050241
Related: odoo/enterprise#5180
Signed-off-by: Yannick Tivisse (yti) &lt;yti@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
FontAwesome 5 introduced new names for some icons as described on
https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes

This commit replaces the old names to the new ones.

closes odoo/odoo#35826

Taskid: 2050241
Related: odoo/enterprise#5180
Signed-off-by: Yannick Tivisse (yti) &lt;yti@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] hr_holidays: Add specific approval for allocations</title>
<updated>2019-11-22T15:58:38+00:00</updated>
<author>
<name>Lucas Lefèvre</name>
<email>lul@odoo.com</email>
</author>
<published>2019-08-02T13:02:39+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=8f3a5068ca6c5e65fb97b968701c5c883eb5c132'/>
<id>8f3a5068ca6c5e65fb97b968701c5c883eb5c132</id>
<content type='text'>
Purpose
=======

We want to allow different approvals for allocations and leaves of a same type.

e.g. In case of compensation days, a manager would approve the
allocation request, but would later not approve leave requests.

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

Allocation modes
----------------
No change here except renames.
1. No limit (employee doesn't need an allocation to request a leave)
2. Allow employee requests
3. Fixed by Time Off Officer

Allocation approval
-------------------
A radio field to choose the approval mechanism
appears if the employee is allowed to request an allocation.
The following approval modes are possible:
1. Time Off Officer
2. Employee's Time Off Manager (leave_responsible_id)
3. Employee's Time Off Manager and Time Off Officer

These options are the same as leave approval options
(except the missing "No Validation").

If option 1 or 2 is selected, a o2m field should
allow to select which Time Off Officer is responsible
for approving those allocations.

Allocation approval policy is the same as the leave approval policy.

Task id: 1936742

Access rights based on task 1950998
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Purpose
=======

We want to allow different approvals for allocations and leaves of a same type.

e.g. In case of compensation days, a manager would approve the
allocation request, but would later not approve leave requests.

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

Allocation modes
----------------
No change here except renames.
1. No limit (employee doesn't need an allocation to request a leave)
2. Allow employee requests
3. Fixed by Time Off Officer

Allocation approval
-------------------
A radio field to choose the approval mechanism
appears if the employee is allowed to request an allocation.
The following approval modes are possible:
1. Time Off Officer
2. Employee's Time Off Manager (leave_responsible_id)
3. Employee's Time Off Manager and Time Off Officer

These options are the same as leave approval options
(except the missing "No Validation").

If option 1 or 2 is selected, a o2m field should
allow to select which Time Off Officer is responsible
for approving those allocations.

Allocation approval policy is the same as the leave approval policy.

Task id: 1936742

Access rights based on task 1950998
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] hr*: Grant user's rights to demo user for HR applications</title>
<updated>2019-09-23T07:56:12+00:00</updated>
<author>
<name>Yannick Tivisse</name>
<email>yti@odoo.com</email>
</author>
<published>2019-09-19T10:31:39+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=285f2f9d47a300e7f1c425afde7ca492e5afea44'/>
<id>285f2f9d47a300e7f1c425afde7ca492e5afea44</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
