<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/hr/wizard, 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>[IMP] *: replace default_get overrides by default attribute on fields.</title>
<updated>2020-07-23T16:38:17+00:00</updated>
<author>
<name>Victor Feyens</name>
<email>vfe@odoo.com</email>
</author>
<published>2020-07-14T14:32:37+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=5dc8b7bdd8ea8a760d1929333cd8461047e5b4e6'/>
<id>5dc8b7bdd8ea8a760d1929333cd8461047e5b4e6</id>
<content type='text'>
Leave the generic management of fields default to the orm as much as
possible.

* Default method is not called unless necessary.
* Default values are correctly post-processed by the orm when necessary.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Leave the generic management of fields default to the orm as much as
possible.

* Default method is not called unless necessary.
* Default values are correctly post-processed by the orm when necessary.</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] hr: activity type configuration on hr plans</title>
<updated>2020-07-16T08:55:09+00:00</updated>
<author>
<name>Jorge Pinna Puissant</name>
<email>jpp@odoo.com</email>
</author>
<published>2020-07-14T13:24:11+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=793edf32934b160596682ef4be3b20c7080f8159'/>
<id>793edf32934b160596682ef4be3b20c7080f8159</id>
<content type='text'>
revert of 0f4ec36 and bf8a9af

- Employees &gt; Configuration &gt; Planning Types and ensure the activity
    type "To Do" is set to scheduled date several days after previous
    activity (default should be 5 days);
- Check that onboarding Plan has at least 2 activities with activity
    type "To Do";
- Click launch plan.

The activity type configuration is ignored and all activities are due
tomorrow. The previous commit uses the function
_onchange_activity_type_id to fix this issue.

The problem with this commit, is that the _onchange_activity_type_id
function will also change the responsible, the notes and the summary to
set them to their default value.

Now, the activities are due taking into account the activity type
configuration without modifying the already set responsible, notes and
summary.

opw-2265631

X-original-commit: 81e4745a31567af7b58064bd8b4e9bae0756354f</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
revert of 0f4ec36 and bf8a9af

- Employees &gt; Configuration &gt; Planning Types and ensure the activity
    type "To Do" is set to scheduled date several days after previous
    activity (default should be 5 days);
- Check that onboarding Plan has at least 2 activities with activity
    type "To Do";
- Click launch plan.

The activity type configuration is ignored and all activities are due
tomorrow. The previous commit uses the function
_onchange_activity_type_id to fix this issue.

The problem with this commit, is that the _onchange_activity_type_id
function will also change the responsible, the notes and the summary to
set them to their default value.

Now, the activities are due taking into account the activity type
configuration without modifying the already set responsible, notes and
summary.

opw-2265631

X-original-commit: 81e4745a31567af7b58064bd8b4e9bae0756354f</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] hr: activity type responsible on hr plans</title>
<updated>2020-07-03T13:03:46+00:00</updated>
<author>
<name>Jorge Pinna Puissant</name>
<email>jpp@odoo.com</email>
</author>
<published>2020-07-03T09:15:06+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=600bfa11963e98a02cbec8a2273a27dcbd91be7a'/>
<id>600bfa11963e98a02cbec8a2273a27dcbd91be7a</id>
<content type='text'>
fine-tuning of bf8a9af1ac549be830bec28c88eb1c565b591941

- Employees &gt; Configuration &gt; Activity Planning &gt; Plans and ensure the
  activities have different responsible;
- Create a new Employee, assign a Manager (a different user then the one
  connected, you can assign Marc Demo for example);
- Click launch plan.

Before this commit, the activity type responsible is ignored and the
responsible for all activities is the connected user.

Now, the responsible for the activities are assigned taking into account
the activity type configuration.

opw-2265631

closes odoo/odoo#54054

X-original-commit: 0f4ec369dccdf25aed259ae97b5cc8973a1a8c5a
Signed-off-by: Jorge Pinna Puissant (jpp) &lt;jpp@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fine-tuning of bf8a9af1ac549be830bec28c88eb1c565b591941

- Employees &gt; Configuration &gt; Activity Planning &gt; Plans and ensure the
  activities have different responsible;
- Create a new Employee, assign a Manager (a different user then the one
  connected, you can assign Marc Demo for example);
- Click launch plan.

Before this commit, the activity type responsible is ignored and the
responsible for all activities is the connected user.

Now, the responsible for the activities are assigned taking into account
the activity type configuration.

opw-2265631

closes odoo/odoo#54054

X-original-commit: 0f4ec369dccdf25aed259ae97b5cc8973a1a8c5a
Signed-off-by: Jorge Pinna Puissant (jpp) &lt;jpp@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] hr: activity type configuration on hr plans</title>
<updated>2020-05-18T10:56:03+00:00</updated>
<author>
<name>Jorge Pinna Puissant</name>
<email>jpp@odoo.com</email>
</author>
<published>2020-05-15T14:01:05+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=ec29deb02445e237fb53f3106849f7ab327dd597'/>
<id>ec29deb02445e237fb53f3106849f7ab327dd597</id>
<content type='text'>
- Employees &gt; Configuration &gt; Planning Types and ensure the activity
    type "To Do" is set to scheduled date several days after previous
    activity (default should be 5 days);
- Check that onboarding Plan has at least 2 activities with activity
    type "To Do";
- Click launch plan.

Before this commit, the activity type configuration is ignored and all
activities are due tomorrow.

Now, the activities are due taking into account the activity type
configuration.

opw-2255586

closes odoo/odoo#51423

X-original-commit: c159479d7f714f2ec871cc4b965de3f961160789
Signed-off-by: Jorge Pinna Puissant (jpp) &lt;jpp@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Employees &gt; Configuration &gt; Planning Types and ensure the activity
    type "To Do" is set to scheduled date several days after previous
    activity (default should be 5 days);
- Check that onboarding Plan has at least 2 activities with activity
    type "To Do";
- Click launch plan.

Before this commit, the activity type configuration is ignored and all
activities are due tomorrow.

Now, the activities are due taking into account the activity type
configuration.

opw-2255586

closes odoo/odoo#51423

X-original-commit: c159479d7f714f2ec871cc4b965de3f961160789
Signed-off-by: Jorge Pinna Puissant (jpp) &lt;jpp@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] hr_appraisal: Improve employee archiving flow</title>
<updated>2020-01-29T10:05:12+00:00</updated>
<author>
<name>yhu-odoo</name>
<email>yhu@odoo.com</email>
</author>
<published>2019-12-26T15:35:26+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=32fc38ef58dc4b4f1ff4e176ff4fa03b9c427397'/>
<id>32fc38ef58dc4b4f1ff4e176ff4fa03b9c427397</id>
<content type='text'>
PURPOSE
=======

When you close a payroll (employees), there are often a lot of document
linked. Archiving an employee should archive the contract, cancel future
leaves, archive the private address

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

Add departure date (hr):
  - Add a Date field to both hr.departure.wizard and hr.employee. In
    the wizard, the field is required.
  - In toggle_active() method in hr.employee, set departure_date to
    false when unarchive the employee.
  - If user has a current running contract, a user error will raise if
    user enter a departure date earlier than the start date of the
    contract.
Add checkbox to set a closing date on hr.contract (hr.contract):
  - In the hr.departure.wizard, set the departure date to be the end
    date of runing contract. Set the states of all draft contracts to
    "cancel".
Add checkbox to free car (hr.fleet):
  - In the hr.departure.wizard, set end_date to
    fleet.vehicle.assignation.log, if there is no end_date or end_date &gt;
    departure_date
  - Go through fleet.vehicle, find records with dirver_id to be the
    employee, set it to False.
Add checkbox to archive private address (hr):
   - when the private address not link to a internel user, set
     employee.address_home_id.active to Flase
   - unarchive it after the employee unarchived
Add checkbox to cancel future appraisals (hr.appraisal)
   - find all appraisals link to the employee and state in
     ['new', 'pending'], set their state to 'cancel'.
Add checkbox to cancel future leaves (hr.holidays):
   - only consider leaves are not in state ['refuse', 'cancel'],
     find leaves with to_date &gt; departure_date, set their state to
     'cancel'.

PR #42526
Task 2153106

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

When you close a payroll (employees), there are often a lot of document
linked. Archiving an employee should archive the contract, cancel future
leaves, archive the private address

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

Add departure date (hr):
  - Add a Date field to both hr.departure.wizard and hr.employee. In
    the wizard, the field is required.
  - In toggle_active() method in hr.employee, set departure_date to
    false when unarchive the employee.
  - If user has a current running contract, a user error will raise if
    user enter a departure date earlier than the start date of the
    contract.
Add checkbox to set a closing date on hr.contract (hr.contract):
  - In the hr.departure.wizard, set the departure date to be the end
    date of runing contract. Set the states of all draft contracts to
    "cancel".
Add checkbox to free car (hr.fleet):
  - In the hr.departure.wizard, set end_date to
    fleet.vehicle.assignation.log, if there is no end_date or end_date &gt;
    departure_date
  - Go through fleet.vehicle, find records with dirver_id to be the
    employee, set it to False.
Add checkbox to archive private address (hr):
   - when the private address not link to a internel user, set
     employee.address_home_id.active to Flase
   - unarchive it after the employee unarchived
Add checkbox to cancel future appraisals (hr.appraisal)
   - find all appraisals link to the employee and state in
     ['new', 'pending'], set their state to 'cancel'.
Add checkbox to cancel future leaves (hr.holidays):
   - only consider leaves are not in state ['refuse', 'cancel'],
     find leaves with to_date &gt; departure_date, set their state to
     'cancel'.

PR #42526
Task 2153106

Related: odoo/enterprise#7471
Signed-off-by: Yannick Tivisse (yti) &lt;yti@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] mail: better prevent activity type removal and add a fallback mechanism</title>
<updated>2019-11-25T14:17:31+00:00</updated>
<author>
<name>Victor Feyens</name>
<email>vfe@odoo.com</email>
</author>
<published>2019-04-02T13:13:02+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=0eadc0aa5ea53943738e43b3ec1c9bff3ef30922'/>
<id>0eadc0aa5ea53943738e43b3ec1c9bff3ef30922</id>
<content type='text'>
Current activity types master data cannot be unlinked through a quite harsh
override of unlink using xml id existence, introduced at 2602642a78dff6c15d615fadf4c55a6b6ca315df.
Some of them are real master data, other could be unlinked if users want it.
Finally custom activity types may cause errors when removed if used in some
side models like server actions or automated actions.

To allow more flexibility we remove the removal constraint and implement
a fallback mechanism. It is implemented in mail.activity.mixin when calling
activity_schedule(xmlid, ...). If the given xmlid is not found
_default_activity_type() specifies the default activity to use. It can
be overridden in modules if some specific behavior is wanted.

e.g.

def _default_activity_type(self):
    """Define a default fallback activity type when xml id not found
    only used in in activity_schedule() for now.
    """
    try:
        return self.env.ref('mail.mail_activity_data_todo')
    except Exception:
        return False

In this commit we also

  * restrict deletion of activity type (hr.plan and ir.actions.server);
  * fallback on default activity type if xmlid ref not found in
    activity_schedule;
  * correct calls to activity_schedule and replace some manual creation calls
    by activity_schedule;

Task ID 1961156
PR #39013

Related: odoo/enterprise#6238
Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
Co-authored-by: Victor Feyens &lt;vfe@odoo.com&gt;
Co-authored-by: Michaël Mattiello &lt;mcm@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Current activity types master data cannot be unlinked through a quite harsh
override of unlink using xml id existence, introduced at 2602642a78dff6c15d615fadf4c55a6b6ca315df.
Some of them are real master data, other could be unlinked if users want it.
Finally custom activity types may cause errors when removed if used in some
side models like server actions or automated actions.

To allow more flexibility we remove the removal constraint and implement
a fallback mechanism. It is implemented in mail.activity.mixin when calling
activity_schedule(xmlid, ...). If the given xmlid is not found
_default_activity_type() specifies the default activity to use. It can
be overridden in modules if some specific behavior is wanted.

e.g.

def _default_activity_type(self):
    """Define a default fallback activity type when xml id not found
    only used in in activity_schedule() for now.
    """
    try:
        return self.env.ref('mail.mail_activity_data_todo')
    except Exception:
        return False

In this commit we also

  * restrict deletion of activity type (hr.plan and ir.actions.server);
  * fallback on default activity type if xmlid ref not found in
    activity_schedule;
  * correct calls to activity_schedule and replace some manual creation calls
    by activity_schedule;

Task ID 1961156
PR #39013

Related: odoo/enterprise#6238
Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
Co-authored-by: Victor Feyens &lt;vfe@odoo.com&gt;
Co-authored-by: Michaël Mattiello &lt;mcm@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] hr: stop planning acitivity if user has no access</title>
<updated>2019-09-17T13:30:16+00:00</updated>
<author>
<name>RomainLibert</name>
<email>rli@odoo.com</email>
</author>
<published>2019-09-17T13:30:16+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=164feadb42a2acd7ea876e8d9aa1f0c77637ce5e'/>
<id>164feadb42a2acd7ea876e8d9aa1f0c77637ce5e</id>
<content type='text'>
Since the introduction of the public/private employee model, having an
acitivity defined on hr.employee (the private one) for an employee that
has no rights to read it is useless.

Task id 2072987

closes odoo/odoo#37021

Signed-off-by: Yannick Tivisse (yti) &lt;yti@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since the introduction of the public/private employee model, having an
acitivity defined on hr.employee (the private one) for an employee that
has no rights to read it is useless.

Task id 2072987

closes odoo/odoo#37021

Signed-off-by: Yannick Tivisse (yti) &lt;yti@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] hr: add note field on hr_plan_activity_type</title>
<updated>2019-09-12T14:31:16+00:00</updated>
<author>
<name>RomainLibert</name>
<email>rli@odoo.com</email>
</author>
<published>2019-09-12T14:31:16+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=2b34d22b4251ac9b4ef850b8ab6a3c2dbcb05117'/>
<id>2b34d22b4251ac9b4ef850b8ab6a3c2dbcb05117</id>
<content type='text'>
We would like to have a custom note on plan activities

closes odoo/odoo#36796

Signed-off-by: Yannick Tivisse (yti) &lt;yti@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We would like to have a custom note on plan activities

closes odoo/odoo#36796

Signed-off-by: Yannick Tivisse (yti) &lt;yti@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[REM] *: calls to @api.multi</title>
<updated>2019-07-17T12:13:12+00:00</updated>
<author>
<name>Adrian Torres</name>
<email>adt@odoo.com</email>
</author>
<published>2019-07-10T12:59:37+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=4b38cc6590abcb58a0ca102a06063eb3db7ac1f4'/>
<id>4b38cc6590abcb58a0ca102a06063eb3db7ac1f4</id>
<content type='text'>
Multi is the default api for methods, it is not necessary to explicitly
decorate methods with it, adds clutter and most people use it because
they see that the rest of the code uses it.

Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Multi is the default api for methods, it is not necessary to explicitly
decorate methods with it, adds clutter and most people use it because
they see that the rest of the code uses it.

Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] hr: Fix departure wizard activity generation</title>
<updated>2019-07-12T11:01:36+00:00</updated>
<author>
<name>Yannick Tivisse</name>
<email>yti@odoo.com</email>
</author>
<published>2019-07-12T08:29:52+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=1680b171a31b0f42e04b613ea97966717887455a'/>
<id>1680b171a31b0f42e04b613ea97966717887455a</id>
<content type='text'>
Purpose
=======

If the fired employee has no access to the hr.employee model,
the departure wizard will lead to a traceback, as we try to
create an activity on a model for which the user won't be able
to resolve it.

Create an activity on the related partner instead.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Purpose
=======

If the fired employee has no access to the hr.employee model,
the departure wizard will lead to a traceback, as we try to
create an activity on a model for which the user won't be able
to resolve it.

Create an activity on the related partner instead.
</pre>
</div>
</content>
</entry>
</feed>
