[Erp5-report] r16788 - /erp5/trunk/products/ERP5/Document/ImmobilisationDelivery.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Oct 2 23:11:08 CEST 2007
Author: nicolas
Date: Tue Oct 2 23:11:08 2007
New Revision: 16788
URL: http://svn.erp5.org?rev=16788&view=rev
Log:
remove hardcoded WorkflowMethod
Modified:
erp5/trunk/products/ERP5/Document/ImmobilisationDelivery.py
Modified: erp5/trunk/products/ERP5/Document/ImmobilisationDelivery.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/ImmobilisationDelivery.py?rev=16788&r1=16787&r2=16788&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/ImmobilisationDelivery.py (original)
+++ erp5/trunk/products/ERP5/Document/ImmobilisationDelivery.py Tue Oct 2 23:11:08 2007
@@ -77,30 +77,8 @@
, PropertySheet.Reference
)
- def validate_immobilisation(self, **kw):
- LOG("ImmobilisationDelivery", WARNING,
- "validate_immobilisation is deprecated. " \
- "Use validateImmobilisation instead")
- self.validateImmobilisation()
-
- def invalidate_immobilisation(self, **kw):
- LOG("ImmobilisationDelivery", WARNING,
- "invalidate_immobilisation is deprecated. " \
- "Use invalidateImmobilisation instead")
- self.invalidateImmobilisation()
-
- def calculate_immobilisation_validity(self, **kw):
- LOG("ImmobilisationDelivery", WARNING,
- "calculate_immobilisation_validity is deprecated. " \
- "Use calculateImmobilisationValidity instead")
- self.calculateImmobilisationValidity()
-
- validate_immobilisation = WorkflowMethod(validate_immobilisation)
- invalidate_immobilisation = WorkflowMethod(invalidate_immobilisation)
- calculate_immobilisation_validity = WorkflowMethod(calculate_immobilisation_validity)
-
security.declareProtected(Permissions.View, 'updateImmobilisationState')
- def updateImmobilisationState(self,**kw):
+ def updateImmobilisationState(self, **kw):
"""
This is often called as an activity, it will check if the
delivery is valid as an immobilisation movement, and if so
@@ -110,20 +88,11 @@
if self.getImmobilisationState() == 'calculating':
try:
if self.isValidImmobilisationMovement(**kw):
- self.validate_immobilisation()
+ self.validateImmobilisation()
else:
- self.invalidate_immobilisation()
+ self.invalidateImmobilisation()
except ImmobilisationValidityError:
- self.calculate_immobilisation_validity()
-
- security.declareProtected(Permissions.View, 'getImmobilisationState')
- def getImmobilisationState(self, id_only=1):
- """
- Returns the current state in immobilisation validity
- """
- portal_workflow = getToolByName(self, 'portal_workflow')
- wf = portal_workflow.getWorkflowById('immobilisation_workflow')
- return wf._getWorkflowStateOf(self, id_only=id_only)
+ self.calculateImmobilisationValidity()
security.declareProtected(Permissions.View, 'getImmobilisationMovementList')
def getImmobilisationMovementList(self, **kw):
More information about the Erp5-report
mailing list