Commit 17716e83 authored by Aurel's avatar Aurel

fix deletion of pay sheet transaction lines & cells


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41696 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0ee874f8
......@@ -181,9 +181,10 @@ class PaySheetTransaction(Invoice):
movement_dict = self.updateAggregatedAmountList()
for movement in movement_dict['movement_to_delete_list']:
parent = movement.getParentValue()
if parent.getPortalType() == 'Pay Sheet Line':
if parent.getPortalType() in ['Pay Sheet Line', 'Pay Sheet Transaction']:
parent.manage_delObjects(movement.getId())
if len(parent.contentValues(portal_type='Pay Sheet Cell')) == 0:
if parent.getPortalType() == 'Pay Sheet Line' and \
len(parent.contentValues(portal_type='Pay Sheet Cell')) == 0:
# the line contain no movements, remove it
self.manage_delObjects(parent.getId())
business_process_list = paysheet_model.findEffectiveSpecialiseValueList(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment