Merge lp:~openerp-dev/openobject-addons/6.1-opw-578933-nep into lp:openobject-addons/6.1
Proposed by
Nehal Panchal (OpenERP)
Status: | Rejected |
---|---|
Rejected by: | Naresh(OpenERP) |
Proposed branch: | lp:~openerp-dev/openobject-addons/6.1-opw-578933-nep |
Merge into: | lp:openobject-addons/6.1 |
Diff against target: |
20 lines (+3/-1) 1 file modified
hr/hr.py (+3/-1) |
To merge this branch: | bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-578933-nep |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Olivier Dony (Odoo) | Needs Fixing | ||
Naresh(OpenERP) | Pending | ||
Review via email: mp+123733@code.launchpad.net |
Description of the change
Hello,
Unable to delete the employee.
Unlink() method of hr.employee is deleting a resource associated with an employee before deleting an employee. And so employee unlink() will work on resource which has already been deleted from database.
This fixes the issue.
Thanks.
To post a comment you must log in.
Unmerged revisions
- 6990. By Nehal Panchal (OpenERP)
-
[FIX] hr : Unable to delete an employee
This patch looks very wrong, now the "if resource_ids" test will never pass as 'resource_ids' is initialized to an empty list in the previous line. Please review your patches before submitting such nonsense ;-)
If you'd like to delete the employees before the resources they inherit from you should simply put the call to resource.unlink() *after* the call to super().unlink().