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
1
Merge Requests
1
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
Cédric Le Ninivin
erp5
Commits
ad94a72d
Commit
ad94a72d
authored
Apr 27, 2016
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace slow contentValues in price calculation
parent
16d2fe28
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
product/ERP5/Document/DeliveryLine.py
product/ERP5/Document/DeliveryLine.py
+7
-2
product/ERP5/mixin/composition.py
product/ERP5/mixin/composition.py
+1
-1
No files found.
product/ERP5/Document/DeliveryLine.py
View file @
ad94a72d
...
@@ -212,8 +212,13 @@ class DeliveryLine(Movement, XMLMatrix, ImmobilisationMovement):
...
@@ -212,8 +212,13 @@ class DeliveryLine(Movement, XMLMatrix, ImmobilisationMovement):
"""
"""
returns true is the object contains no submovement (line or cell)
returns true is the object contains no submovement (line or cell)
"""
"""
portal_type
=
self
.
getPortalMovementTypeList
()
object_list
=
self
.
objectValues
()
return
len
(
self
.
contentValues
(
filter
=
{
'portal_type'
:
portal_type
}))
==
0
if
object_list
:
portal_type
=
self
.
getPortalObject
().
getPortalMovementTypeList
()
for
ob
in
object_list
:
if
ob
.
getPortalType
()
in
portal_type
:
return
False
return
True
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getMovedItemUidList'
)
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getMovedItemUidList'
)
def
getMovedItemUidList
(
self
):
def
getMovedItemUidList
(
self
):
...
...
product/ERP5/mixin/composition.py
View file @
ad94a72d
...
@@ -95,7 +95,7 @@ def _findPredicateList(container_list, portal_type):
...
@@ -95,7 +95,7 @@ def _findPredicateList(container_list, portal_type):
mask_set
=
set
()
mask_set
=
set
()
for
container
in
container_list
:
for
container
in
container_list
:
mask_list
=
[]
mask_list
=
[]
for
ob
in
container
.
conten
tValues
(
portal_type
=
portal_type
):
for
ob
in
container
.
objec
tValues
(
portal_type
=
portal_type
):
if
isinstance
(
ob
,
Predicate
):
if
isinstance
(
ob
,
Predicate
):
# reference is used to hide lines on farther containers
# reference is used to hide lines on farther containers
reference
=
ob
.
getProperty
(
'reference'
)
reference
=
ob
.
getProperty
(
'reference'
)
...
...
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