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
0641cb0e
Commit
0641cb0e
authored
Sep 18, 2024
by
Titouan Soulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_jio_connector: add Portal Type filter for jIO Connector
parent
59738f9c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
178 additions
and
8 deletions
+178
-8
bt5/erp5_jio_connector/DocumentTemplateItem/portal_components/document.erp5.JioApiConnector.py
...teItem/portal_components/document.erp5.JioApiConnector.py
+27
-8
bt5/erp5_jio_connector/PropertySheetTemplateItem/portal_property_sheets/JioApiEqualityTester/portal_type_filter_list_property.xml
...JioApiEqualityTester/portal_type_filter_list_property.xml
+36
-0
bt5/erp5_jio_connector/SkinTemplateItem/portal_skins/erp5_jio_connector/JioApiEqualityTester_view.xml
...al_skins/erp5_jio_connector/JioApiEqualityTester_view.xml
+1
-0
bt5/erp5_jio_connector/SkinTemplateItem/portal_skins/erp5_jio_connector/JioApiEqualityTester_view/my_portal_type_filter_list.xml
.../JioApiEqualityTester_view/my_portal_type_filter_list.xml
+114
-0
No files found.
bt5/erp5_jio_connector/DocumentTemplateItem/portal_components/document.erp5.JioApiConnector.py
View file @
0641cb0e
...
...
@@ -87,11 +87,30 @@ class JioApiConnector(XMLObject):
def
allDocsFromApi
(
self
,
request_dict
):
return
self
.
_sendToApi
(
"/allDocs"
,
request_dict
)
def
getMatchingTesterList
(
self
):
return
[
tester
for
tester
in
self
.
objectValues
(
portal_type
=
"jIO API Equality Tester"
)
if
tester
.
isMatchingProvider
()]
def
getCheckingTesterList
(
self
):
return
[
tester
for
tester
in
self
.
objectValues
(
portal_type
=
"jIO API Equality Tester"
)
if
tester
.
isCheckingProvider
()]
def
getUpdatingTesterList
(
self
):
return
[
tester
for
tester
in
self
.
objectValues
(
portal_type
=
"jIO API Equality Tester"
)
if
tester
.
isUpdatingProvider
()]
def
getMatchingTesterList
(
self
,
portal_type
=
None
):
"""
Returns list of matching providers for a given Portal Type.
Contrary to the other methods, this one can take no Portal Type.
This is simply for convenience since usually only one matching
is used, the same for all Portal Types.
"""
if
portal_type
:
return
[
tester
for
tester
in
self
.
objectValues
(
portal_type
=
"jIO API Equality Tester"
)
\
if
tester
.
isMatchingProvider
()
and
portal_type
in
tester
.
getPortalTypeFilterList
()]
else
:
return
[
tester
for
tester
in
self
.
objectValues
(
portal_type
=
"jIO API Equality Tester"
)
if
tester
.
isMatchingProvider
()]
def
getCheckingTesterList
(
self
,
portal_type
):
"""
Returns list of checking providers for a given Portal Type.
"""
return
[
tester
for
tester
in
self
.
objectValues
(
portal_type
=
"jIO API Equality Tester"
)
\
if
tester
.
isCheckingProvider
()
and
portal_type
in
tester
.
getPortalTypeFilterList
()]
def
getUpdatingTesterList
(
self
,
portal_type
):
"""
Returns list of updating providers for a given Portal Type.
"""
return
[
tester
for
tester
in
self
.
objectValues
(
portal_type
=
"jIO API Equality Tester"
)
\
if
tester
.
isUpdatingProvider
()
and
portal_type
in
tester
.
getPortalTypeFilterList
()]
bt5/erp5_jio_connector/PropertySheetTemplateItem/portal_property_sheets/JioApiEqualityTester/portal_type_filter_list_property.xml
0 → 100644
View file @
0641cb0e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Standard Property"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/object
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
portal_type_filter_list_property
</string>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_jio_connector/SkinTemplateItem/portal_skins/erp5_jio_connector/JioApiEqualityTester_view.xml
View file @
0641cb0e
...
...
@@ -79,6 +79,7 @@
<string>
my_reference
</string>
<string>
my_local_reference
</string>
<string>
my_remote_reference
</string>
<string>
my_portal_type_filter_list
</string>
</list>
</value>
</item>
...
...
bt5/erp5_jio_connector/SkinTemplateItem/portal_skins/erp5_jio_connector/JioApiEqualityTester_view/my_portal_type_filter_list.xml
0 → 100644
View file @
0641cb0e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
items
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_portal_type_filter_list
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
items
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_parallel_list_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
items
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Portal Type Filter
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: [(x.getId(), x.getId()) for x in here.getPortalObject().portal_types.objectValues()]
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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