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
54b4a987
Commit
54b4a987
authored
Jun 14, 2017
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Movement_getPriceCalculationOperandDict: Use a SimpleQuery instead of raw SQL
parent
c31215a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Movement_getPriceCalculationOperandDict.py
...kins/erp5_core/Movement_getPriceCalculationOperandDict.py
+5
-3
No files found.
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Movement_getPriceCalculationOperandDict.py
View file @
54b4a987
from
Products.ZSQLCatalog.SQLCatalog
import
SimpleQuery
def
getResourceInternalPriceSortKeyMethod
(
high_priority_supply_line_list
):
def
getResourceInternalPriceSortKeyMethod
(
high_priority_supply_line_list
):
def
resourceInternalPriceSortKeyMethod
(
a
):
def
resourceInternalPriceSortKeyMethod
(
a
):
high_priority_supply_line_list_len
=
len
(
high_priority_supply_line_list
)
high_priority_supply_line_list_len
=
len
(
high_priority_supply_line_list
)
...
@@ -70,9 +72,9 @@ def getOptimisedPriceCalculationOperandDict(default=None, context=None, **kw):
...
@@ -70,9 +72,9 @@ def getOptimisedPriceCalculationOperandDict(default=None, context=None, **kw):
for
key
in
preferences
.
getPreferredPricingSupplyPathKeyCategoryList
():
for
key
in
preferences
.
getPreferredPricingSupplyPathKeyCategoryList
():
key_uid
=
'%s_uid'
%
key
key_uid
=
'%s_uid'
%
key
supply_kw
[
'default_%s'
%
key_uid
]
=
context
.
getProperty
(
key_uid
)
supply_kw
[
'default_%s'
%
key_uid
]
=
context
.
getProperty
(
key_uid
)
supply_uid_list
=
[
str
(
brain
.
uid
)
for
brain
in
context
.
portal_catalog
(
**
supply_kw
)]
supply_uid_list
=
[
brain
.
uid
for
brain
in
context
.
portal_catalog
(
**
supply_kw
)]
if
len
(
supply_uid_list
)
:
if
supply_uid_list
:
kw
[
'query'
]
=
' catalog.uid IN (%s)'
%
','
.
join
(
supply_uid_list
)
kw
[
'query'
]
=
SimpleQuery
(
uid
=
supply_uid_list
)
else
:
else
:
return
default
return
default
return
resource
.
getPriceCalculationOperandDict
(
default
=
default
,
context
=
context
,
**
kw
)
return
resource
.
getPriceCalculationOperandDict
(
default
=
default
,
context
=
context
,
**
kw
)
...
...
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