Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hamza
erp5-Boxiang
Commits
d8c7e3f9
Commit
d8c7e3f9
authored
Dec 16, 2014
by
wenjie.zheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lazy_class use _getOb instead getattr, remove unnecessary commentaries.
parent
70ad0fcb
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3860 additions
and
3891 deletions
+3860
-3891
product/ERP5Type/Base.py
product/ERP5Type/Base.py
+3639
-3658
product/ERP5Type/ERP5Type.py
product/ERP5Type/ERP5Type.py
+0
-4
product/ERP5Type/dynamic/lazy_class.py
product/ERP5Type/dynamic/lazy_class.py
+3
-10
product/ERP5Workflow/Document/Workflow.py
product/ERP5Workflow/Document/Workflow.py
+218
-219
No files found.
product/ERP5Type/Base.py
View file @
d8c7e3f9
This diff is collapsed.
Click to expand it.
product/ERP5Type/ERP5Type.py
View file @
d8c7e3f9
...
...
@@ -418,14 +418,10 @@ class ERP5TypeInformation(XMLObject,
for
workflow
in
workflow_tool
.
getWorkflowsFor
(
ob
):
workflow
.
notifyCreated
(
ob
)
# =========== Project ERP5Workflow , WENJIE , 2014 ================================
### workflow_list need to be defined somewhere.
### exp: ERP5Workflow in Person module won't work at this situation.
for
ERP5Workflow
in
self
.
getTypeWorkflowList
():
workflow_module
=
portal
.
getDefaultModule
(
portal_type
=
"Workflow"
)
ERP5Workflow
=
workflow_module
.
_getOb
(
ERP5Workflow
)
ERP5Workflow
.
initializeDocument
(
ob
)
# =========== WF5 ==============================================================
if
not
temp_object
:
init_script
=
self
.
getTypeInitScriptId
()
...
...
product/ERP5Type/dynamic/lazy_class.py
View file @
d8c7e3f9
...
...
@@ -266,25 +266,18 @@ class PortalTypeMetaClass(GhostBaseMetaClass, PropertyHolder):
else
:
initializePortalTypeDynamicWorkflowMethods
(
cls
,
portal_workflow
)
# ================== ERP5Workflow Project, Wenjie, Dec 2014 =======================
portal_type
=
site
.
getDefaultModule
(
portal_type
=
"portal_types"
)
### try to get workflow_list from related types then initialize the class of types
pt
=
getattr
(
portal_type
,
cls
.
__name__
,
None
)
pt
=
portal_type
.
_getOb
(
cls
.
__name__
,
None
)
if
pt
is
not
None
:
#pt = portal_type._getOb(cls.__name__)
#raise NotImplemented (pt)
wf
=
getattr
(
pt
,
'workflow_list'
,
None
)
if
wf
is
not
None
:
### Get ERP5Workflow Module
workflow_list
=
getattr
(
pt
,
'workflow_list'
,
None
)
if
workflow_list
is
not
None
:
portal_ERP5Workflow
=
site
.
getDefaultModule
(
portal_type
=
"Workflow"
)
if
portal_ERP5Workflow
is
None
:
LOG
(
"ERP5Type.Dynamic"
,
WARNING
,
"no ERP5Workflow methods for %s"
%
cls
.
__name__
)
else
:
### Generate Workflow Method
intializePortalTypeERP5WorkflowMethod
(
cls
,
portal_ERP5Workflow
)
# ================== WF5 =======================================================
# portal type group methods, isNodeType, isResourceType...
from
Products.ERP5Type.ERP5Type
import
ERP5TypeInformation
...
...
product/ERP5Workflow/Document/Workflow.py
View file @
d8c7e3f9
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment