Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] hr_employee_catch_partner: When the partner of a employee was c… #11

Open
wants to merge 3 commits into
base: 8.0
Choose a base branch
from

Conversation

mikelarre
Copy link

…hanged the old one did not change the pointing to this employee, creating issues on contract assignations

other_employee = self.search(
[('address_home_id', '=', self.address_home_id.id),
('id', '!=', self.id)], limit=1)
self.address_home_id.employee_id = other_employee or False
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Habría que tener en cuenta cuando no hay previamente "self.address_home_id" que es lo que realmente está fallando

@@ -27,8 +27,11 @@ def create(self, vals):

@api.multi
def write(self, vals):
result = super(HrEmployee, self).write(vals)
if vals.get('address_home_id', False):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

De esta manera cuando "quitas" el address_home_id del empleado no está eliminando el empleado del partner

Copy link
Collaborator

@agaldona agaldona left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM Ten en cuenta los puntos que te comenta @oihane

mikelarre and others added 2 commits October 19, 2017 10:13
…hanged the old one did not change the pointing to this employee, creating issues on contract assignations
@coveralls
Copy link

coveralls commented Oct 19, 2017

Coverage Status

Coverage decreased (-0.4%) to 99.104% when pulling 53f5e4c on mikelarre:8.0 into 4face60 on avanzosc:8.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants