Commit 48a1ae7b authored by wenjie.zheng's avatar wenjie.zheng

Base, Workflow: Try to remove new line marker.

parent 5383fe19
......@@ -658,12 +658,9 @@ def getClassPropertyList(klass):
def intializePortalTypeERP5WorkflowMethod(ptype_klass, portal_ERP5Workflow):
### this function will be used in /product/ERP5Type/dynamic/lazy_class.py
### in generatePortalTypeAccessors()
wf5_module = aq_inner(portal_ERP5Workflow)
portal_type = portal_ERP5Workflow.getPortalObject().getDefaultModule(portal_type="portal_types")
pt = portal_type._getOb(ptype_klass.__name__)
### creat workflow method:
for ERP5Workflow in pt.workflow_list:
for tr in wf5_module._getOb(ERP5Workflow).objectValues(portal_type="Transition"):
tr_id = tr.id
......
......@@ -151,6 +151,7 @@ class Workflow(XMLObject):
def _getERP5WorkflowStateOf(self, ob):
bc_id = self.getStateBaseCategory()
state_path = ob.getCategoryList()
### should find anothoer method to replace lstrip
state_path = state_path[0].lstrip("%s/"%bc_id)
if state_path is not None:
sdef = self.restrictedTraverse(state_path)
......
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