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
2
Merge Requests
2
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
389e4dbd
Commit
389e4dbd
authored
Jan 26, 2023
by
Cédric Le Ninivin
Committed by
Cédric Le Ninivin
Mar 01, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_api_style: Move JIO API revision to depend on the web section
parent
db7185fb
Changes
33
Hide whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
1007 additions
and
53 deletions
+1007
-53
bt5/erp5_api_style/ActionTemplateItem/portal_types/jIO%20Web%20Section/jio_api_revision_configuration.xml
...es/jIO%20Web%20Section/jio_api_revision_configuration.xml
+81
-0
bt5/erp5_api_style/MixinTemplateItem/portal_components/mixin.erp5.JIOAPIRevisionMixin.py
...eItem/portal_components/mixin.erp5.JIOAPIRevisionMixin.py
+42
-23
bt5/erp5_api_style/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
...rtalTypePropertySheetTemplateItem/property_sheet_list.xml
+1
-0
bt5/erp5_api_style/PropertySheetTemplateItem/portal_property_sheets/JIOAPIRevisionConfiguration.xml
...em/portal_property_sheets/JIOAPIRevisionConfiguration.xml
+66
-0
bt5/erp5_api_style/PropertySheetTemplateItem/portal_property_sheets/JIOAPIRevisionConfiguration/revision_hash_calculation_method_per_type_property.xml
...on/revision_hash_calculation_method_per_type_property.xml
+42
-0
bt5/erp5_api_style/PropertySheetTemplateItem/portal_property_sheets/JIOAPIRevisionConfiguration/select_missing_revision_object_list_method_property.xml
...n/select_missing_revision_object_list_method_property.xml
+38
-0
bt5/erp5_api_style/PropertySheetTemplateItem/portal_property_sheets/JIOAPIRevisionConfiguration/select_updatable_revision_object_list_method_property.xml
...select_updatable_revision_object_list_method_property.xml
+38
-0
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Alarm_activateCheckAndFixUnmatchingJIOAPIRevisionHash.py
.../Alarm_activateCheckAndFixUnmatchingJIOAPIRevisionHash.py
+4
-4
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Alarm_activateUpdateJIOAPIRevision.py
...pi_jio_sql_revision/Alarm_activateUpdateJIOAPIRevision.py
+6
-9
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_getNewjIOAPIRevision.py
...ns/erp5_api_jio_sql_revision/Base_getNewjIOAPIRevision.py
+1
-1
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_getNewjIOAPIRevision.xml
...s/erp5_api_jio_sql_revision/Base_getNewjIOAPIRevision.xml
+1
-1
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zCreatejIOAPIRevisionTable.sql
..._api_jio_sql_revision/Base_zCreatejIOAPIRevisionTable.sql
+4
-2
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zGetFromIOAPIRevisionTable.sql
..._api_jio_sql_revision/Base_zGetFromIOAPIRevisionTable.sql
+1
-1
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zGetFromIOAPIRevisionTable.xml
..._api_jio_sql_revision/Base_zGetFromIOAPIRevisionTable.xml
+63
-1
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zSelectMissingJIOAPIRevisionObjectList.xml
..._revision/Base_zSelectMissingJIOAPIRevisionObjectList.xml
+1
-1
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zSelectUpdatableJIOAPIRevisionObjectList.sql
...evision/Base_zSelectUpdatableJIOAPIRevisionObjectList.sql
+10
-1
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zSelectUpdatableJIOAPIRevisionObjectList.xml
...evision/Base_zSelectUpdatableJIOAPIRevisionObjectList.xml
+21
-3
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zUnindexFromjIOAPIRevisionTable.sql
...jio_sql_revision/Base_zUnindexFromjIOAPIRevisionTable.sql
+1
-1
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zUnindexFromjIOAPIRevisionTable.xml
...jio_sql_revision/Base_zUnindexFromjIOAPIRevisionTable.xml
+8
-1
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zUpdatejIOAPIRevisionTable.sql
..._api_jio_sql_revision/Base_zUpdatejIOAPIRevisionTable.sql
+3
-2
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zUpdatejIOAPIRevisionTable.xml
..._api_jio_sql_revision/Base_zUpdatejIOAPIRevisionTable.xml
+8
-1
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/JIOWebSection_checkAndFixUnmatchingJIOAPIRevisionHash.py
.../JIOWebSection_checkAndFixUnmatchingJIOAPIRevisionHash.py
+6
-0
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/JIOWebSection_checkAndFixUnmatchingJIOAPIRevisionHash.xml
...JIOWebSection_checkAndFixUnmatchingJIOAPIRevisionHash.xml
+62
-0
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/JIOWebSection_updateJIOAPIRevision.py
...pi_jio_sql_revision/JIOWebSection_updateJIOAPIRevision.py
+24
-0
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/JIOWebSection_updateJIOAPIRevision.xml
...i_jio_sql_revision/JIOWebSection_updateJIOAPIRevision.xml
+62
-0
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/JIOWebSection_viewJIOAPIRevisionConfiguration.xml
...evision/JIOWebSection_viewJIOAPIRevisionConfiguration.xml
+142
-0
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/JIOWebSection_viewJIOAPIRevisionConfiguration/my_revision_hash_calculation_method_per_type_list.xml
...ion/my_revision_hash_calculation_method_per_type_list.xml
+94
-0
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/JIOWebSection_viewJIOAPIRevisionConfiguration/my_select_missing_revision_object_list_method.xml
...uration/my_select_missing_revision_object_list_method.xml
+84
-0
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/JIOWebSection_viewJIOAPIRevisionConfiguration/my_select_updatable_revision_object_list_method.xml
...ation/my_select_updatable_revision_object_list_method.xml
+84
-0
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_style/ERP5Site_asjIOStyle.py
...teItem/portal_skins/erp5_api_style/ERP5Site_asjIOStyle.py
+5
-0
bt5/erp5_api_style/bt/template_action_path_list
bt5/erp5_api_style/bt/template_action_path_list
+1
-0
bt5/erp5_api_style/bt/template_portal_type_property_sheet_list
...rp5_api_style/bt/template_portal_type_property_sheet_list
+1
-0
bt5/erp5_api_style/bt/template_property_sheet_id_list
bt5/erp5_api_style/bt/template_property_sheet_id_list
+2
-1
No files found.
bt5/erp5_api_style/ActionTemplateItem/portal_types/jIO%20Web%20Section/jio_api_revision_configuration.xml
0 → 100644
View file @
389e4dbd
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ActionInformation"
module=
"Products.CMFCore.ActionInformation"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
action_type/object_view
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
category
</string>
</key>
<value>
<string>
object_view
</string>
</value>
</item>
<item>
<key>
<string>
condition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
icon
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
jio_api_revision_configuration
</string>
</value>
</item>
<item>
<key>
<string>
permissions
</string>
</key>
<value>
<tuple>
<string>
View
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
priority
</string>
</key>
<value>
<float>
3.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
JIO API Revisions
</string>
</value>
</item>
<item>
<key>
<string>
visible
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
string:${object_url}/JIOWebSection_viewJIOAPIRevisionConfiguration
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_api_style/MixinTemplateItem/portal_components/mixin.erp5.JIOAPIRevisionMixin.py
View file @
389e4dbd
...
...
@@ -38,22 +38,28 @@ class JIOAPIRevisionMixin:
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getJIOAPIRevision'
)
def
getJIOAPIRevision
(
self
):
def
getJIOAPIRevision
(
self
,
web_section
):
"""
Return Object Revision
"""
return
self
.
_getJIOAPIRevisionTuple
()[
0
]
return
self
.
_getJIOAPIRevisionTuple
(
web_section
)[
0
]
def
_unindexJIOAPIRevision
(
self
):
def
_unindexJIOAPIRevision
(
self
,
web_section
):
try
:
self
.
Base_zUnindexFromjIOAPIRevisionTable
(
uid
=
self
.
getUid
())
self
.
Base_zUnindexFromjIOAPIRevisionTable
(
uid
=
self
.
getUid
(),
web_section
=
web_section
)
except
ProgrammingError
:
# jio_api_revision table is not created
pass
def
_getJIOAPIRevisionTuple
(
self
):
def
_getJIOAPIRevisionTuple
(
self
,
web_section
):
try
:
result
=
self
.
Base_zGetFromIOAPIRevisionTable
(
uid
=
self
.
getUid
())
result
=
self
.
Base_zGetFromIOAPIRevisionTable
(
uid
=
self
.
getUid
(),
web_section
=
web_section
,
)
except
ProgrammingError
:
# jio_api_revision table is not created
return
None
,
None
,
None
...
...
@@ -61,54 +67,65 @@ class JIOAPIRevisionMixin:
return
result
[
0
].
revision
,
result
[
0
].
hash
,
result
[
0
].
indexation_timestamp
return
None
,
None
,
None
def
_calculateHash
(
self
):
hash_method
=
self
.
getTypeBasedMethod
(
"calculatejIOAPIRevisionHash"
)
def
_calculateHash
(
self
,
web_section
,
hash_method
):
if
not
hash_method
:
return
None
return
hash_method
()
hash_method
=
getattr
(
self
,
hash_method
)
return
hash_method
(
web_section
=
web_section
)
security
.
declareProtected
(
Permissions
.
ManagePortal
,
'updateJIOAPIRevision'
)
def
updateJIOAPIRevision
(
self
):
def
updateJIOAPIRevision
(
self
,
web_section_url
,
hash_method
):
"""
Update jIO API Revision
"""
calculated_hash
=
self
.
_calculateHash
(
web_section_url
,
hash_method
)
if
not
calculated_hash
:
self
.
_unindexJIOAPIRevision
(
web_section_url
)
return
indexation_timestamp
=
int
(
DateTime
(
self
.
getPortalObject
().
portal_catalog
(
uid
=
self
.
getUid
(),
select_list
=
(
'indexation_timestamp'
,)
)[
0
].
indexation_timestamp
))
calculated_hash
=
self
.
_calculateHash
()
if
not
calculated_hash
:
self
.
_unindexJIOAPIRevision
()
return
stored_hash
=
None
_
,
stored_hash
,
stored_timestamp
=
self
.
_getJIOAPIRevisionTuple
()
_
,
stored_hash
,
stored_timestamp
=
self
.
_getJIOAPIRevisionTuple
(
web_section_url
)
stored_timestamp
=
int
(
DateTime
(
stored_timestamp
))
if
stored_hash
==
calculated_hash
:
if
stored_timestamp
!=
indexation_timestamp
:
self
.
Base_zUpdateTimeStampjIOAPIRevisionTable
(
uid
=
self
.
getUid
(),
indexation_timestamp
=
indexation_timestamp
,
web_section
=
web_section_url
)
return
new_revision
=
self
.
Base_getNewjIOAPIRevision
()
new_revision
=
self
.
Base_getNewjIOAPIRevision
(
web_section_url
)
self
.
Base_zUpdatejIOAPIRevisionTable
(
uid
=
self
.
getUid
(),
revision
=
new_revision
,
hash
=
calculated_hash
,
indexation_timestamp
=
indexation_timestamp
,
web_section
=
web_section_url
)
return
def
_getHashMethodFromWebSection
(
self
,
web_section_url
):
hash_method_list
=
[[
y
.
strip
()
for
y
in
x
.
split
(
'|'
)]
for
x
in
\
self
.
getPortalObject
().
restrictedTraverse
(
web_section_url
).
getRevisionHashCalculationMethodPerTypeList
()]
hash_method_dict
=
{
x
[
0
]:
x
[
1
]
for
x
in
hash_method_list
}
return
hash_method_dict
.
get
(
self
.
getPortalType
(),
None
)
security
.
declareProtected
(
Permissions
.
ManagePortal
,
'markUnmatchingJIOAPIrevisionHash'
)
def
markUnmatchingJIOAPIrevisionHash
(
self
):
def
markUnmatchingJIOAPIrevisionHash
(
self
,
web_section_url
,
hash_method
=
None
):
"""
Check if the calculated hash match the stored one.
If not set jio_api_revision timestamp to 0 to triger reprocessing by alarm
"""
calculated_hash
=
self
.
_calculateHash
()
_
,
stored_hash
,
_
=
self
.
_getJIOAPIRevisionTuple
()
if
not
hash_method
:
hash_method
=
self
.
_getHashMethodFromWebSection
(
web_section_url
)
calculated_hash
=
self
.
_calculateHash
(
web_section_url
,
hash_method
)
_
,
stored_hash
,
_
=
self
.
_getJIOAPIRevisionTuple
(
web_section_url
)
if
calculated_hash
!=
stored_hash
:
# Marking jIO API revision timestamp to zero will trigger reprocessing
self
.
Base_zUpdateTimeStampjIOAPIRevisionTable
(
...
...
@@ -119,13 +136,15 @@ class JIOAPIRevisionMixin:
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'checkJIOAPIRevisionConstraint'
)
def
checkJIOAPIRevisionConstraint
(
self
,
**
kw
):
def
checkJIOAPIRevisionConstraint
(
self
,
web_section_url
,
hash_method
=
None
):
"""
Check is calculated Hash equals to the stored one
Fixing is not offered as it needs to be centralised to avoid missing a new revision for an object
"""
calculated_hash
=
self
.
_calculateHash
()
_
,
stored_hash
,
_
=
self
.
_getJIOAPIRevisionTuple
()
if
not
hash_method
:
hash_method
=
self
.
_getHashMethodFromWebSection
(
web_section_url
)
calculated_hash
=
self
.
_calculateHash
(
web_section_url
,
hash_method
)
_
,
stored_hash
,
_
=
self
.
_getJIOAPIRevisionTuple
(
web_section_url
)
if
calculated_hash
!=
stored_hash
:
return
[
self
.
Base_translateString
(
"Stored Hash ${stored_hash} difer from calculated hash ${calculated_hash}"
,
...
...
bt5/erp5_api_style/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
View file @
389e4dbd
...
...
@@ -3,6 +3,7 @@
<item>
TextDocument
</item>
</portal_type>
<portal_type
id=
"jIO Web Section"
>
<item>
JIOAPIRevisionConfiguration
</item>
<item>
SortIndex
</item>
<item>
WebSectionUpgradeConstraint
</item>
</portal_type>
...
...
bt5/erp5_api_style/PropertySheetTemplateItem/portal_property_sheets/JIOAPIRevisionConfiguration.xml
0 → 100644
View file @
389e4dbd
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Property Sheet"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_count
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_mt_index
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_tree
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
JIOAPIRevisionConfiguration
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Property Sheet
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Length"
module=
"BTrees.Length"
/>
</pickle>
<pickle>
<int>
0
</int>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
bt5/erp5_api_style/PropertySheetTemplateItem/portal_property_sheets/JIOAPIRevisionConfiguration/revision_hash_calculation_method_per_type_property.xml
0 → 100644
View file @
389e4dbd
<?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/lines
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
revision_hash_calculation_method_per_type_property
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<string>
python: ()
</string>
</value>
</item>
<item>
<key>
<string>
read_permission
</string>
</key>
<value>
<string>
Modify portal content
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_api_style/PropertySheetTemplateItem/portal_property_sheets/JIOAPIRevisionConfiguration/select_missing_revision_object_list_method_property.xml
0 → 100644
View file @
389e4dbd
<?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/string
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
select_missing_revision_object_list_method_property
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
read_permission
</string>
</key>
<value>
<string>
Modify portal content
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_api_style/PropertySheetTemplateItem/portal_property_sheets/JIOAPIRevisionConfiguration/select_updatable_revision_object_list_method_property.xml
0 → 100644
View file @
389e4dbd
<?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/string
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
select_updatable_revision_object_list_method_property
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
read_permission
</string>
</key>
<value>
<string>
Modify portal content
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Alarm_activateCheckAndFixUnmatchingJIOAPIRevisionHash.py
View file @
389e4dbd
if
not
context
.
Base_zCheckjIOAPIRevisionTableExists
():
context
.
Base_zCreatejIOAPIRevisionTable
()
from
Products.ZSQLCatalog.SQLCatalog
import
SimpleQuery
context
.
getPortalObject
().
portal_catalog
.
searchAndActivate
(
method_id
=
'markUnmatchingJIOAPIrevisionHash'
,
method_id
=
'JIOWebSection_checkAndFixUnmatchingJIOAPIRevisionHash'
,
method_kw
=
{
'tag'
:
tag
},
activate_kw
=
{
'tag'
:
tag
,
'priority'
:
8
},
query
=
SimpleQuery
(
comparison_operator
=
"!="
,
**
{
"jio_api_revision.revision"
:
None
}),
portal_type
=
"jIO Web Section"
,
validation_state
=
"!=expired"
,
)
...
...
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Alarm_activateUpdateJIOAPIRevision.py
View file @
389e4dbd
...
...
@@ -3,14 +3,11 @@ if not context.Base_zCheckjIOAPIRevisionTableExists():
portal
=
context
.
getPortalObject
()
# Get the list of objects that should have a jio api revision but do not have
potentially_missing_object_list
=
portal
.
Base_zSelectMissingJIOAPIRevisionObjectList
()
for
element
in
potentially_missing_object_list
:
portal
.
unrestrictedTraverse
(
element
.
relative_url
).
updateJIOAPIRevision
()
# Get the list of objects that have a jio api revision and where indexation timestamp has changed since last check
updatable_object_list
=
context
.
Base_zSelectUpdatableJIOAPIRevisionObjectList
()
for
element
in
updatable_object_list
:
portal
.
unrestrictedTraverse
(
element
.
relative_url
).
updateJIOAPIRevision
()
portal
.
portal_catalog
.
searchAndActivate
(
method_id
=
"JIOWebSection_updateJIOAPIRevision"
,
portal_type
=
"jIO Web Section"
,
validation_state
=
"!=expired"
,
activate_kw
=
{
'tag'
:
tag
},
)
context
.
activate
(
after_tag
=
tag
).
getId
()
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_getNewjIOAPIRevision.py
View file @
389e4dbd
return
context
.
getPortalObject
().
portal_ids
.
generateNewId
(
id_group
=
repr
((
'revision'
,
"jio_api_reference"
)),
default
=
1
)
return
context
.
getPortalObject
().
portal_ids
.
generateNewId
(
id_group
=
repr
((
'revision'
,
"jio_api_reference"
,
web_section_url
)),
default
=
1
)
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_getNewjIOAPIRevision.xml
View file @
389e4dbd
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
<value>
<string>
web_section_url
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zCreatejIOAPIRevisionTable.sql
View file @
389e4dbd
CREATE
TABLE
`jio_api_revision`
(
`uid`
BIGINT
UNSIGNED
NOT
NULL
,
`revision`
varchar
(
255
)
NOT
NULL
UNIQUE
,
`revision`
varchar
(
255
)
NOT
NULL
,
`hash`
varchar
(
255
),
`indexation_timestamp`
TIMESTAMP
(
6
),
PRIMARY
KEY
(
`uid`
)
`web_section`
varchar
(
255
)
NOT
NULL
,
PRIMARY
KEY
(
`uid`
,
`web_section`
),
CONSTRAINT
UC_Revision
UNIQUE
(
`revision`
,
`web_section`
)
)
ENGINE
=
InnoDB
\ No newline at end of file
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zGetFromIOAPIRevisionTable.sql
View file @
389e4dbd
...
...
@@ -3,4 +3,4 @@ SELECT
FROM
jio_api_revision
WHERE
uid
=<
dtml
-
sqlvar
expr
=
"uid"
type
=
"int"
>
uid
=<
dtml
-
sqlvar
expr
=
"uid"
type
=
"int"
>
AND
web_section
=<
dtml
-
sqlvar
expr
=
"web_section"
type
=
"string"
>
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zGetFromIOAPIRevisionTable.xml
View file @
389e4dbd
...
...
@@ -6,9 +6,71 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_col
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
name
</string>
</key>
<value>
<string>
revision
</string>
</value>
</item>
<item>
<key>
<string>
null
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
type
</string>
</key>
<value>
<string>
t
</string>
</value>
</item>
<item>
<key>
<string>
width
</string>
</key>
<value>
<int>
2
</int>
</value>
</item>
</dictionary>
<dictionary>
<item>
<key>
<string>
name
</string>
</key>
<value>
<string>
hash
</string>
</value>
</item>
<item>
<key>
<string>
null
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
type
</string>
</key>
<value>
<string>
t
</string>
</value>
</item>
<item>
<key>
<string>
width
</string>
</key>
<value>
<int>
9
</int>
</value>
</item>
</dictionary>
<dictionary>
<item>
<key>
<string>
name
</string>
</key>
<value>
<string>
indexation_timestamp
</string>
</value>
</item>
<item>
<key>
<string>
null
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
type
</string>
</key>
<value>
<string>
d
</string>
</value>
</item>
<item>
<key>
<string>
width
</string>
</key>
<value>
<int>
26
</int>
</value>
</item>
</dictionary>
</list>
</value>
</item>
<item>
<key>
<string>
arguments_src
</string>
</key>
<value>
<string
encoding=
"base64"
>
dWlkCg==
</string>
</value>
<value>
<string>
uid\n
web_section
</string>
</value>
</item>
<item>
<key>
<string>
connection_id
</string>
</key>
...
...
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zSelectMissingJIOAPIRevisionObjectList.xml
View file @
389e4dbd
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
<value>
<string>
web_section
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zSelectUpdatableJIOAPIRevisionObjectList.sql
View file @
389e4dbd
select
catalog
.
uid
,
catalog
.
relative_url
from
catalog
join
jio_api_revision
on
CAST
(
catalog
.
indexation_timestamp
AS
INT
)
!=
CAST
(
jio_api_revision
.
indexation_timestamp
AS
INT
)
AND
catalog
.
uid
=
jio_api_revision
.
uid
select
catalog
.
uid
,
catalog
.
relative_url
,
catalog
.
portal_type
from
catalog
join
jio_api_revision
on
CAST
(
catalog
.
indexation_timestamp
AS
INT
)
!=
CAST
(
jio_api_revision
.
indexation_timestamp
AS
INT
)
AND
catalog
.
uid
=
jio_api_revision
.
uid
where
jio_api_revision
.
web_section
=<
dtml
-
sqlvar
expr
=
"web_section"
type
=
"string"
>
\ No newline at end of file
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zSelectUpdatableJIOAPIRevisionObjectList.xml
View file @
389e4dbd
...
...
@@ -25,7 +25,7 @@
</item>
<item>
<key>
<string>
width
</string>
</key>
<value>
<int>
0
</int>
</value>
<value>
<int>
6
</int>
</value>
</item>
</dictionary>
<dictionary>
...
...
@@ -43,7 +43,25 @@
</item>
<item>
<key>
<string>
width
</string>
</key>
<value>
<int>
0
</int>
</value>
<value>
<int>
39
</int>
</value>
</item>
</dictionary>
<dictionary>
<item>
<key>
<string>
name
</string>
</key>
<value>
<string>
portal_type
</string>
</value>
</item>
<item>
<key>
<string>
null
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
type
</string>
</key>
<value>
<string>
t
</string>
</value>
</item>
<item>
<key>
<string>
width
</string>
</key>
<value>
<int>
17
</int>
</value>
</item>
</dictionary>
</list>
...
...
@@ -51,7 +69,7 @@
</item>
<item>
<key>
<string>
arguments_src
</string>
</key>
<value>
<string></string>
</value>
<value>
<string>
web_section
</string>
</value>
</item>
<item>
<key>
<string>
connection_id
</string>
</key>
...
...
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zUnindexFromjIOAPIRevisionTable.sql
View file @
389e4dbd
DELETE
FROM
jio_api_revision
WHERE
<
dtml
-
sqltest
uid
op
=
eq
type
=
int
>
DELETE
FROM
jio_api_revision
WHERE
<
dtml
-
sqltest
uid
op
=
eq
type
=
int
>
AND
<
dtml
-
sqltest
web_section
op
=
eq
type
=
string
>
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zUnindexFromjIOAPIRevisionTable.xml
View file @
389e4dbd
...
...
@@ -6,9 +6,16 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_col
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
arguments_src
</string>
</key>
<value>
<string>
uid
</string>
</value>
<value>
<string>
uid\n
web_section
</string>
</value>
</item>
<item>
<key>
<string>
connection_id
</string>
</key>
...
...
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zUpdatejIOAPIRevisionTable.sql
View file @
389e4dbd
DELETE
FROM
jio_api_revision
WHERE
uid
=<
dtml
-
sqlvar
expr
=
"uid"
type
=
"int"
>
uid
=<
dtml
-
sqlvar
expr
=
"uid"
type
=
"int"
>
AND
web_section
=<
dtml
-
sqlvar
expr
=
"web_section"
type
=
"string"
>
;
<
dtml
-
var
"'
\0
'"
>
...
...
@@ -14,6 +14,7 @@ VALUES
<
dtml
-
sqlvar
expr
=
"uid"
type
=
"int"
>
,
<
dtml
-
sqlvar
expr
=
"revision"
type
=
"string"
optional
>
,
<
dtml
-
sqlvar
expr
=
"hash"
type
=
"string"
optional
>
,
<
dtml
-
sqlvar
expr
=
"indexation_timestamp"
type
=
"datetime"
optional
>
<
dtml
-
sqlvar
expr
=
"indexation_timestamp"
type
=
"datetime"
optional
>
,
<
dtml
-
sqlvar
expr
=
"web_section"
type
=
"string"
optional
>
)
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zUpdatejIOAPIRevisionTable.xml
View file @
389e4dbd
...
...
@@ -6,12 +6,19 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_col
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
arguments_src
</string>
</key>
<value>
<string>
uid\n
revision\n
hash\n
indexation_timestamp
</string>
</value>
indexation_timestamp\n
web_section
</string>
</value>
</item>
<item>
<key>
<string>
connection_id
</string>
</key>
...
...
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/JIOWebSection_checkAndFixUnmatchingJIOAPIRevisionHash.py
0 → 100644
View file @
389e4dbd
context
.
getPortalObject
().
portal_catalog
.
searchAndActivate
(
method_id
=
'markUnmatchingJIOAPIrevisionHash'
,
method_kw
=
{
"web_section_url"
:
context
.
getRelativeUrl
()},
activate_kw
=
{
'tag'
:
tag
,
'priority'
:
8
},
**
{
"jio_api_revision.web_section"
:
context
.
getRelativeUrl
()}
)
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/JIOWebSection_checkAndFixUnmatchingJIOAPIRevisionHash.xml
0 → 100644
View file @
389e4dbd
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
tag
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
JIOWebSection_checkAndFixUnmatchingJIOAPIRevisionHash
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/JIOWebSection_updateJIOAPIRevision.py
0 → 100644
View file @
389e4dbd
select_missing_method
=
context
.
getSelectMissingRevisionObjectListMethod
()
select_updatable_method
=
context
.
getSelectUpdatableRevisionObjectListMethod
()
hash_method_list
=
[[
y
.
strip
()
for
y
in
x
.
split
(
'|'
)]
for
x
in
\
context
.
getRevisionHashCalculationMethodPerTypeList
()]
hash_method_dict
=
{
x
[
0
]:
x
[
1
]
for
x
in
hash_method_list
}
if
not
select_missing_method
or
not
select_updatable_method
or
not
hash_method_dict
:
# Revisions are not configured
return
portal
=
context
.
getPortalObject
()
web_section_relative_url
=
context
.
getRelativeUrl
()
# Get the list of objects that should have a jio api revision but do not have
potentially_missing_object_list
=
getattr
(
portal
,
select_missing_method
)(
web_section
=
web_section_relative_url
)
# Get the list of objects that have a jio api revision and where indexation timestamp has changed since last check
updatable_object_list
=
getattr
(
portal
,
select_updatable_method
)(
web_section
=
web_section_relative_url
)
for
result_list
in
(
updatable_object_list
,
potentially_missing_object_list
):
for
element
in
result_list
:
portal
.
restrictedTraverse
(
element
.
relative_url
).
updateJIOAPIRevision
(
web_section_relative_url
,
hash_method_dict
.
get
(
element
.
portal_type
,
None
)
)
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/JIOWebSection_updateJIOAPIRevision.xml
0 → 100644
View file @
389e4dbd
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
JIOWebSection_updateJIOAPIRevision
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/JIOWebSection_viewJIOAPIRevisionConfiguration.xml
0 → 100644
View file @
389e4dbd
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ERP5 Form"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
Base_edit
</string>
</value>
</item>
<item>
<key>
<string>
action_title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
edit_order
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
enctype
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
group_list
</string>
</key>
<value>
<list>
<string>
left
</string>
<string>
right
</string>
<string>
center
</string>
<string>
bottom
</string>
<string>
hidden
</string>
</list>
</value>
</item>
<item>
<key>
<string>
groups
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
bottom
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
center
</string>
</key>
<value>
<list>
<string>
my_revision_hash_calculation_method_per_type_list
</string>
</list>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
left
</string>
</key>
<value>
<list>
<string>
my_select_missing_revision_object_list_method
</string>
<string>
my_select_updatable_revision_object_list_method
</string>
</list>
</value>
</item>
<item>
<key>
<string>
right
</string>
</key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
JIOWebSection_viewJIOAPIRevisionConfiguration
</string>
</value>
</item>
<item>
<key>
<string>
method
</string>
</key>
<value>
<string>
POST
</string>
</value>
</item>
<item>
<key>
<string>
name
</string>
</key>
<value>
<string>
JIOWebSection_viewJIOAPIRevisionConfiguration
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
ERP5 Form
</string>
</value>
</item>
<item>
<key>
<string>
pt
</string>
</key>
<value>
<string>
form_view
</string>
</value>
</item>
<item>
<key>
<string>
row_length
</string>
</key>
<value>
<int>
4
</int>
</value>
</item>
<item>
<key>
<string>
stored_encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
JIO API Revision Configuration
</string>
</value>
</item>
<item>
<key>
<string>
unicode_mode
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
update_action
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
update_action_title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/JIOWebSection_viewJIOAPIRevisionConfiguration/my_revision_hash_calculation_method_per_type_list.xml
0 → 100644
View file @
389e4dbd
<?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>
height
</string>
<string>
title
</string>
<string>
width
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_revision_hash_calculation_method_per_type_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>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_lines_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewWebFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
height
</string>
</key>
<value>
<int>
10
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Revision Hash Calculation Method per Type
</string>
</value>
</item>
<item>
<key>
<string>
width
</string>
</key>
<value>
<int>
100
</int>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/JIOWebSection_viewJIOAPIRevisionConfiguration/my_select_missing_revision_object_list_method.xml
0 → 100644
View file @
389e4dbd
<?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>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_select_missing_revision_object_list_method
</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>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_string_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewWebFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Select Missing Revision Method
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/JIOWebSection_viewJIOAPIRevisionConfiguration/my_select_updatable_revision_object_list_method.xml
0 → 100644
View file @
389e4dbd
<?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>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_select_updatable_revision_object_list_method
</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>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_string_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewWebFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Select Updatable Revision Method
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_style/ERP5Site_asjIOStyle.py
View file @
389e4dbd
...
...
@@ -2,6 +2,11 @@
mode
=
mode
or
context
.
REQUEST
.
form
.
get
(
"mode"
,
"get"
)
text_content
=
text_content
or
context
.
REQUEST
.
form
.
get
(
"text_content"
,
""
)
document_id
=
document_id
or
context
.
REQUEST
.
form
.
get
(
"document_id"
,
""
)
web_section_value
=
context
.
getWebSectionValue
()
if
web_section_value
:
context
.
REQUEST
.
set
(
"web_section_relative_url"
,
web_section_value
.
getRelativeUrl
())
import
json
portal
=
context
.
getPortalObject
()
...
...
bt5/erp5_api_style/bt/template_action_path_list
View file @
389e4dbd
Error Record Module | view
Error Record | view
jIO Web Section | jio_api_revision_configuration
jIO Web Section | layout_configuration
jIO Web Section | local_permission
jIO Web Section | predicate
...
...
bt5/erp5_api_style/bt/template_portal_type_property_sheet_list
View file @
389e4dbd
Error Record | TextDocument
jIO Web Section | JIOAPIRevisionConfiguration
jIO Web Section | SortIndex
jIO Web Section | WebSectionUpgradeConstraint
\ No newline at end of file
bt5/erp5_api_style/bt/template_property_sheet_id_list
View file @
389e4dbd
JIOAPIRevisionConstraint
\ No newline at end of file
JIOAPIRevisionConstraint
JIOAPIRevisionConfiguration
\ 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