[Erp5-report] r22864 - /erp5/trunk/products/ERP5/Document/SimulationMovement.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Aug 4 16:20:58 CEST 2008
Author: jerome
Date: Mon Aug 4 16:20:58 2008
New Revision: 22864
URL: http://svn.erp5.org?rev=22864&view=rev
Log:
add a getTranslatedSimulationStateTitle method on simulation movement.
Modified:
erp5/trunk/products/ERP5/Document/SimulationMovement.py
Modified: erp5/trunk/products/ERP5/Document/SimulationMovement.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/SimulationMovement.py?rev=22864&r1=22863&r2=22864&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/SimulationMovement.py (original)
+++ erp5/trunk/products/ERP5/Document/SimulationMovement.py Mon Aug 4 16:20:58 2008
@@ -173,6 +173,24 @@
return None
security.declareProtected( Permissions.AccessContentsInformation,
+ 'getTranslatedSimulationStateTitle')
+ def getTranslatedSimulationStateTitle(self):
+ """Returns translated simulation state title, for user interface, such as
+ stock browser.
+ """
+ delivery = self.getDeliveryValue()
+ if delivery is not None:
+ return delivery.getTranslatedSimulationStateTitle()
+ order = self.getOrderValue()
+ if order is not None:
+ return order.getTranslatedSimulationStateTitle()
+ # The simulation_state of a simulation movement is calculated by a
+ # mapping, there's no reliable way of getting the translated title from a
+ # simulation state ID, so we just return the state ID because we got
+ # nothing better to return.
+ return self.getSimulationState()
+
+ security.declareProtected( Permissions.AccessContentsInformation,
'isAccountable')
def isAccountable(self):
"""
More information about the Erp5-report
mailing list