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
Matevz Golob
wendelin
Commits
31376a6c
Commit
31376a6c
authored
Jun 04, 2015
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extend API and set default to None for an array.
Add a new property of type array.
parent
e9e24e46
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
99 additions
and
2 deletions
+99
-2
bt5/erp5_wendelin/DocumentTemplateItem/portal_components/document.erp5.DataArray.py
...TemplateItem/portal_components/document.erp5.DataArray.py
+6
-0
bt5/erp5_wendelin/PathTemplateItem/portal_categories/elementary_type/array.xml
...hTemplateItem/portal_categories/elementary_type/array.xml
+89
-0
bt5/erp5_wendelin/PropertySheetTemplateItem/portal_property_sheets/DataArray/array_property.xml
...eItem/portal_property_sheets/DataArray/array_property.xml
+2
-2
bt5/erp5_wendelin/TestTemplateItem/portal_components/test.erp5.testWendelin.py
...tTemplateItem/portal_components/test.erp5.testWendelin.py
+1
-0
bt5/erp5_wendelin/bt/template_path_list
bt5/erp5_wendelin/bt/template_path_list
+1
-0
No files found.
bt5/erp5_wendelin/DocumentTemplateItem/portal_components/document.erp5.DataArray.py
View file @
31376a6c
...
...
@@ -57,6 +57,12 @@ class DataArray(BigFile):
"""
array
=
ZBigArray
(
shape
,
dtype
)
self
.
_setArray
(
array
)
def
getArray
(
self
,
default
=
None
):
"""
Get numpy array value.
"""
return
getattr
(
self
,
'array'
,
None
)
def
_setArray
(
self
,
value
):
"""
...
...
bt5/erp5_wendelin/PathTemplateItem/portal_categories/elementary_type/array.xml
0 → 100644
View file @
31376a6c
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Category"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_folders_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Copy_or_Move_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Delete_objects_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/array
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
array
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Category
</string>
</value>
</item>
<item>
<key>
<string>
short_title
</string>
</key>
<value>
<string>
Array
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
array
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_wendelin/PropertySheetTemplateItem/portal_property_sheets/DataArray/array_property.xml
View file @
31376a6c
...
...
@@ -27,7 +27,7 @@
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/
data
</string>
<string>
elementary_type/
array
</string>
</tuple>
</value>
</item>
...
...
@@ -49,7 +49,7 @@
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<string>
python:
\'\'
</string>
</value>
<value>
<string>
python:
None
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
bt5/erp5_wendelin/TestTemplateItem/portal_components/test.erp5.testWendelin.py
View file @
31376a6c
...
...
@@ -118,6 +118,7 @@ class Test(ERP5TypeTestCase):
data_array
=
self
.
portal
.
data_array_module
.
newContent
(
\
portal_type
=
'Data Array'
)
self
.
assertEqual
(
None
,
data_array
.
getArray
())
data_array
.
initArray
((
3
,
3
),
np
.
uint8
)
self
.
tic
()
...
...
bt5/erp5_wendelin/bt/template_path_list
0 → 100644
View file @
31376a6c
portal_categories/elementary_type/array
\ No newline at end of file
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