Code review comment for lp:~openerp-dev/openobject-addons/trunk-bug-1085787-rma

Revision history for this message
Victor Tabuenca (OpenERP) (vta-openerp) wrote :

Looking to the method's code:
  - I think it doesn't make sense to test the existence of the required field 'resource_id') and,
  - the definition of the field 'resource_id' ('ondelete=cascade')

In my opinion, unlinking the resource should be enough (just let the RDBS to do its job).

Although the patch kind of fixes the bug, because it returns before the call to unlink an employee already deleted by the RDBS (calling super is the cause of the traceback), I think it's more appropriate to fix the method's code in a more suitable manner.

I reject the proposal.

review: Disapprove

« Back to merge proposal