[Erp5-report] r26069 - /erp5/trunk/products/ERP5/Document/
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Mar 17 13:51:34 CET 2009
Author: fabien
Date: Tue Mar 17 13:51:33 2009
New Revision: 26069
URL: http://svn.erp5.org?rev=26069&view=rev
Log:
update getCell method to be able to get Cells on effective models
use effective models in PaySheetTransaction.py
Modified:
erp5/trunk/products/ERP5/Document/PaySheetModel.py
erp5/trunk/products/ERP5/Document/PaySheetTransaction.py
Modified: erp5/trunk/products/ERP5/Document/PaySheetModel.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/PaySheetModel.py?rev=26069&r1=26068&r2=26069&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/PaySheetModel.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/PaySheetModel.py [utf8] Tue Mar 17 13:51:33 2009
@@ -80,12 +80,17 @@
cell = XMLMatrix.getCell(self, *kw, **kwd)
# if cell not found, look on the inherited models
if cell is None:
- for specialised_model in self.getSpecialiseValueList():
- cell = specialised_model.getCell(*kw, **kwd)
+ if kwd.has_key('paysheet'):
+ model_list = self.getInheritanceEffectiveModelTreeAsList(kwd['paysheet'])
+ else:
+ model_list = self.getInheritanceModelTreeAsList()
+ if self in model_list:
+ model_list.remove(self)
+ for specialised_model in model_list:
+ cell = XMLMatrix.getCell(specialised_model, *kw, **kwd)
if cell is not None:
return cell
return cell
-
security.declareProtected(Permissions.AccessContentsInformation,
'getReferenceDict')
Modified: erp5/trunk/products/ERP5/Document/PaySheetTransaction.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/PaySheetTransaction.py?rev=26069&r1=26068&r2=26069&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/PaySheetTransaction.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/PaySheetTransaction.py [utf8] Tue Mar 17 13:51:33 2009
@@ -246,7 +246,7 @@
'''
return the not editable lines as dict
'''
- model = paysheet.getSpecialiseValue()
+ model = paysheet.getSpecialiseValue().getEffectiveModel(paysheet)
def sortByIntIndex(a, b):
return cmp(a.getIntIndex(), b.getIntIndex())
@@ -314,7 +314,7 @@
# current_amount = base_amount_dict[base_amount][share]
base_amount_dict = {}
- model = paysheet.getSpecialiseValue()
+ model = paysheet.getSpecialiseValue().getEffectiveModel(paysheet)
def sortByIntIndex(a, b):
return cmp(a.getIntIndex(), b.getIntIndex())
@@ -503,7 +503,7 @@
If property_list is provided, only subobjects with at least one of those
properties is defined will be taken into account
'''
- model = self.getSpecialiseValue()
+ model = self.getSpecialiseValue().getEffectiveModel(self)
model_reference_dict = model.getInheritanceModelReferenceDict(
portal_type_list=portal_type_list,
property_list=property_list)
More information about the Erp5-report
mailing list