[hr] when copy a department all employees assigned get duplicated

Bug #988165 reported by JB (eficent.com)
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Low
OpenERP R&D Addons Team 3

Bug Description

Hello, I have identified that in OpenERP 6.0.3, in module HR, in case that an HR manager copies a department from an existing one, the employees assigned to the department are get duplicated.

For example:
Department A
> Employee 1
> Employee 2

Then I make a copy of Department B, so:
Department B
> Employee 1
> Employee 2

When I look at the list of the company's employees, I see:
> Employee 1
> Employee 1
> Employee 2
> Employee 2

That should not happen at all. One would expect that an employee only exists once in a company.

Regards,
Jordi Ballester
www.eficent.com

Revision history for this message
Vishal Parmar(Open ERP) (vpa-openerp) wrote :

Hello,

I have faced the same problem in trunk also. When duplicate record it should be distinguished.

Thanks.

Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Jordi,

Thanks for the reporting.

Your issue has been fixed on lp:~openerp-dev/openobject-addons/trunk-bug-988165-amp branch with following revision no and id.

rev no : 6759
rev ID : <email address hidden>

It will be merge with trunk soon.

Note: I am not sure with the manager field. When we have duplicate the department then currently manager is linked with the new created department too. I think it's correct. Other possibility( duplicated time manager will not link with new department ) please tell me I will improve my commit.

Thanks again!

Changed in openobject-addons:
status: Confirmed → Fix Committed
Revision history for this message
JB (eficent.com) (jb.eficent) wrote :

Ho, as per my understanding whrn a department is copied the copy should.
1. Respect the origonal manager
2. Not copy any of the assigned employees. New departmment should start from 0 enployees.

The process of defining departments is completely separate from the process of incorporating employees.
Therefore the.copy of a department should npt imply copy of employees.

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Jordi,

Thanks for your quick response.

Your reported issue has been already fixed on above branch (lp:~openerp-dev/openobject-addons/trunk-bug-988165-amp) with 6759 rev no.

So please try this code which will solved your problem correctly.

Thanks again!

Revision history for this message
JB (eficent.com) (jb.eficent) wrote :

Excellent! Works perfectly. Thanks for the quick fix!

Revision history for this message
Anto (abourguignon) wrote :

fix landed in trunk in commit 7395 revid:<email address hidden>

Changed in openobject-addons:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.