Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eteri
erp5
Commits
1162ce93
Commit
1162ce93
authored
Jul 27, 2011
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small optimizations in BusinessProcess
parent
4d8897d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
product/ERP5/Document/BusinessProcess.py
product/ERP5/Document/BusinessProcess.py
+6
-8
No files found.
product/ERP5/Document/BusinessProcess.py
View file @
1162ce93
...
@@ -403,7 +403,7 @@ class BusinessProcess(Path, XMLObject):
...
@@ -403,7 +403,7 @@ class BusinessProcess(Path, XMLObject):
trade_state -- a Trade State category
trade_state -- a Trade State category
"""
"""
return
len
(
self
.
getBusinessLinkValueList
(
successor
=
trade_state
))
==
0
return
not
self
.
getBusinessLinkValueList
(
successor
=
trade_state
)
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'isFinalTradeState'
)
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'isFinalTradeState'
)
def
isFinalTradeState
(
self
,
trade_state
):
def
isFinalTradeState
(
self
,
trade_state
):
...
@@ -412,7 +412,7 @@ class BusinessProcess(Path, XMLObject):
...
@@ -412,7 +412,7 @@ class BusinessProcess(Path, XMLObject):
trade_state -- a Trade State category
trade_state -- a Trade State category
"""
"""
return
len
(
self
.
getBusinessLinkValueList
(
predecessor
=
trade_state
))
==
0
return
not
self
.
getBusinessLinkValueList
(
predecessor
=
trade_state
)
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getSuccessorTradeStateList'
)
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getSuccessorTradeStateList'
)
def
getSuccessorTradeStateList
(
self
,
explanation
,
trade_state
):
def
getSuccessorTradeStateList
(
self
,
explanation
,
trade_state
):
...
@@ -761,14 +761,12 @@ class BusinessProcess(Path, XMLObject):
...
@@ -761,14 +761,12 @@ class BusinessProcess(Path, XMLObject):
amount
,
None
))
amount
,
None
))
# Arrow categories
# Arrow categories
for
base_category
,
category_url_list
in
\
property_dict
.
update
(
trade_model_path
.
getArrowCategoryDict
(
context
=
amount
))
trade_model_path
.
getArrowCategoryDict
(
context
=
amount
).
iteritems
():
property_dict
[
base_category
]
=
category_url_list
# More categories
# More categories
for
base_category
in
(
'delivery_mode'
,
'incoterm'
,
'payment_mode'
):
for
base_category
in
(
'delivery_mode'
,
'incoterm'
,
'payment_mode'
):
value
=
trade_model_path
.
getPropertyList
(
base_category
)
value
=
trade_model_path
.
getPropertyList
(
base_category
)
if
len
(
value
)
>
0
:
if
value
:
property_dict
[
base_category
]
=
value
property_dict
[
base_category
]
=
value
# Amount quantities - XXX-JPS maybe we should consider handling unit conversions here
# Amount quantities - XXX-JPS maybe we should consider handling unit conversions here
...
@@ -824,7 +822,7 @@ class BusinessProcess(Path, XMLObject):
...
@@ -824,7 +822,7 @@ class BusinessProcess(Path, XMLObject):
explanation -- an Order, Order Line, Delivery or Delivery Line or
explanation -- an Order, Order Line, Delivery or Delivery Line or
Applied Rule which implicitely defines a simulation subtree
Applied Rule which implicitely defines a simulation subtree
"""
"""
return
len
(
self
.
getBuildableBusinessLinkValueList
(
explanation
))
!=
0
return
not
not
self
.
getBuildableBusinessLinkValueList
(
explanation
)
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'isPartiallyBuildable'
)
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'isPartiallyBuildable'
)
def
isPartiallyBuildable
(
self
,
explanation
):
def
isPartiallyBuildable
(
self
,
explanation
):
...
@@ -834,7 +832,7 @@ class BusinessProcess(Path, XMLObject):
...
@@ -834,7 +832,7 @@ class BusinessProcess(Path, XMLObject):
explanation -- an Order, Order Line, Delivery or Delivery Line or
explanation -- an Order, Order Line, Delivery or Delivery Line or
Applied Rule which implicitely defines a simulation subtree
Applied Rule which implicitely defines a simulation subtree
"""
"""
return
len
(
self
.
getPartiallyBuildableBusinessLinkValueList
(
explanation
))
!=
0
return
not
not
self
.
getPartiallyBuildableBusinessLinkValueList
(
explanation
)
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'build'
)
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'build'
)
def
build
(
self
,
explanation
):
def
build
(
self
,
explanation
):
...
...
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