[Erp5-report] r41696 aurel - /erp5/trunk/products/ERP5/Document/PaySheetTransaction.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Dec 23 09:46:36 CET 2010
Author: aurel
Date: Thu Dec 23 09:46:36 2010
New Revision: 41696
URL: http://svn.erp5.org?rev=41696&view=rev
Log:
fix deletion of pay sheet transaction lines & cells
Modified:
erp5/trunk/products/ERP5/Document/PaySheetTransaction.py
Modified: erp5/trunk/products/ERP5/Document/PaySheetTransaction.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/PaySheetTransaction.py?rev=41696&r1=41695&r2=41696&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/PaySheetTransaction.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/PaySheetTransaction.py [utf8] Thu Dec 23 09:46:36 2010
@@ -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(
More information about the Erp5-report
mailing list