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
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
Bryan Kaperick
erp5
Commits
b4ba5710
Commit
b4ba5710
authored
Feb 05, 2013
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reimplement ContainerLine.getTotalQuantity using ZODB
to get rid of movement table dependancy
parent
d97664b4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
79 deletions
+2
-79
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/ContainerLine_zGetTotal.xml
...eItem/portal_skins/erp5_trade/ContainerLine_zGetTotal.xml
+0
-75
product/ERP5/Document/ContainerLine.py
product/ERP5/Document/ContainerLine.py
+2
-4
No files found.
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/ContainerLine_zGetTotal.xml
deleted
100644 → 0
View file @
d97664b4
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"SQL"
module=
"Products.ZSQLMethods.SQL"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
allow_simple_one_argument_traversal
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
arguments_src
</string>
</key>
<value>
<string>
uid
</string>
</value>
</item>
<item>
<key>
<string>
cache_time_
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
class_file_
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
class_name_
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
connection_hook
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
connection_id
</string>
</key>
<value>
<string>
erp5_sql_connection
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ContainerLine_zGetTotal
</string>
</value>
</item>
<item>
<key>
<string>
max_cache_
</string>
</key>
<value>
<int>
100
</int>
</value>
</item>
<item>
<key>
<string>
max_rows_
</string>
</key>
<value>
<int>
1000
</int>
</value>
</item>
<item>
<key>
<string>
src
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
SELECT \n
\tSUM(quantity) AS total_quantity\n
FROM catalog, movement\n
WHERE \n
\tcatalog.parent_uid = <dtml-sqlvar uid type="int">
\n
AND\t\n
\tcatalog.uid = movement.uid\n
]]>
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/Document/ContainerLine.py
View file @
b4ba5710
...
@@ -94,7 +94,5 @@ class ContainerLine(DeliveryLine):
...
@@ -94,7 +94,5 @@ class ContainerLine(DeliveryLine):
base_id
=
'movement'
base_id
=
'movement'
if
not
self
.
hasCellContent
(
base_id
=
base_id
):
if
not
self
.
hasCellContent
(
base_id
=
base_id
):
return
self
.
getQuantity
()
return
self
.
getQuantity
()
else
:
return
sum
(
cell
.
getQuantity
()
for
cell
in
# Use MySQL
self
.
getCellValueList
(
base_id
=
base_id
))
aggregate
=
self
.
ContainerLine_zGetTotal
()[
0
]
return
aggregate
.
total_quantity
or
0.0
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