Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin
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
Léo-Paul Géneau
wendelin
Commits
5acc25a5
Commit
5acc25a5
authored
Jul 23, 2017
by
Klaus Wölfel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add api to get len() of Data Bucket Stream
parent
643ae22e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
bt5/erp5_wendelin/DocumentTemplateItem/portal_components/document.erp5.DataBucketStream.py
...eItem/portal_components/document.erp5.DataBucketStream.py
+7
-4
bt5/erp5_wendelin/DocumentTemplateItem/portal_components/document.erp5.DataBucketStream.xml
...Item/portal_components/document.erp5.DataBucketStream.xml
+2
-2
No files found.
bt5/erp5_wendelin/DocumentTemplateItem/portal_components/document.erp5.DataBucketStream.py
View file @
5acc25a5
...
...
@@ -51,10 +51,12 @@ class DataBucketStream(Document):
,
PropertySheet
.
SortIndex
)
def
__init__
(
self
,
id
,
**
kw
):
self
.
initTree
()
Document
.
__init__
(
self
,
id
,
**
kw
)
def
__len__
(
self
):
return
len
(
self
.
_tree
)
def
initTree
(
self
):
"""
...
...
@@ -101,11 +103,12 @@ class DataBucketStream(Document):
return
sequence
return
sequence
[:
count
]
def
getBucketItemSequence
(
self
,
start_key
=
None
,
count
=
None
):
def
getBucketItemSequence
(
self
,
start_key
=
None
,
count
=
None
,
exclude_start_key
=
False
):
"""
Get a lazy sequence of bucket
value
s
Get a lazy sequence of bucket
item
s
"""
sequence
=
self
.
_tree
.
items
(
min
=
start_key
)
sequence
=
self
.
_tree
.
items
(
min
=
start_key
,
excludemin
=
exclude_start_key
)
if
count
is
None
:
return
sequence
return
sequence
[:
count
]
...
...
bt5/erp5_wendelin/DocumentTemplateItem/portal_components/document.erp5.DataBucketStream.xml
View file @
5acc25a5
...
...
@@ -46,8 +46,8 @@
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 5
5
, 21: Redefining built-in \'id\' (redefined-builtin)
</string>
<string>
W: 6
5
, 18: Redefining built-in \'id\' (redefined-builtin)
</string>
<string>
W: 5
4
, 21: Redefining built-in \'id\' (redefined-builtin)
</string>
<string>
W: 6
7
, 18: Redefining built-in \'id\' (redefined-builtin)
</string>
</tuple>
</value>
</item>
...
...
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