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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tristan Cavelier
erp5
Commits
c305ee47
Commit
c305ee47
authored
Jul 29, 2016
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_upgrader: add document conversion server url consistency constraint
parent
5a7536ce
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
243 additions
and
0 deletions
+243
-0
bt5/erp5_upgrader/PropertySheetTemplateItem/portal_property_sheets/TemplateToolDocumentConversionServerUrlConsistencyConstraint.xml
...eToolDocumentConversionServerUrlConsistencyConstraint.xml
+66
-0
bt5/erp5_upgrader/PropertySheetTemplateItem/portal_property_sheets/TemplateToolDocumentConversionServerUrlConsistencyConstraint/document_conversion_server_url_consistency_constraint.xml
...document_conversion_server_url_consistency_constraint.xml
+80
-0
bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_checkDocumentConversionServerUrlConsistency.py
...r/ERP5Site_checkDocumentConversionServerUrlConsistency.py
+33
-0
bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_checkDocumentConversionServerUrlConsistency.xml
.../ERP5Site_checkDocumentConversionServerUrlConsistency.xml
+62
-0
bt5/erp5_upgrader/bt/template_portal_type_property_sheet_list
...erp5_upgrader/bt/template_portal_type_property_sheet_list
+1
-0
bt5/erp5_upgrader/bt/template_property_sheet_id_list
bt5/erp5_upgrader/bt/template_property_sheet_id_list
+1
-0
No files found.
bt5/erp5_upgrader/PropertySheetTemplateItem/portal_property_sheets/TemplateToolDocumentConversionServerUrlConsistencyConstraint.xml
0 → 100644
View file @
c305ee47
<?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>
TemplateToolDocumentConversionServerUrlConsistencyConstraint
</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_upgrader/PropertySheetTemplateItem/portal_property_sheets/TemplateToolDocumentConversionServerUrlConsistencyConstraint/document_conversion_server_url_consistency_constraint.xml
0 → 100644
View file @
c305ee47
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Script Constraint"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_identity_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_range_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
constraint_type/post_upgrade
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
document_conversion_server_url_consistency_constraint
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Script Constraint
</string>
</value>
</item>
<item>
<key>
<string>
script_id
</string>
</key>
<value>
<string>
ERP5Site_checkDocumentConversionServerUrlConsistency
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_checkDocumentConversionServerUrlConsistency.py
0 → 100644
View file @
c305ee47
# Migrate OOoDoc server Address & Port to a URL
report_message_list
=
[]
portal
=
context
.
getPortalObject
()
system_preference_list
=
context
.
getPortalObject
().
portal_catalog
(
portal_type
=
"System Preference"
)
for
system_preference
in
system_preference_list
:
port
=
getattr
(
system_preference
,
"preferred_ooodoc_server_port_number"
,
None
)
address
=
getattr
(
system_preference
,
"preferred_ooodoc_server_address"
,
None
)
url
=
getattr
(
system_preference
,
"preferred_document_conversion_server_url"
,
None
)
or
""
action_list
=
[]
# Useless to set preferred ooodoc server address & port number to None
# because they have a default value (like localhost:8008)
if
url
in
(
""
,
None
)
and
address
not
in
(
""
,
None
):
url
=
"http://"
+
address
+
(
""
if
port
in
(
""
,
0
,
None
)
else
(
":"
+
str
(
port
)))
if
fixit
:
system_preference
.
setPreferredDocumentConversionServerUrl
(
url
)
action_list
.
append
(
"ooodoc server url set to %r"
%
url
)
else
:
action_list
.
append
(
"ooodoc server url should be set to %r"
%
url
)
if
action_list
:
if
fixit
:
__traceback_info__
=
system_preference
.
getRelativeUrl
()
portal
.
portal_workflow
.
doActionFor
(
system_preference
.
getObject
(),
action
=
"edit_action"
,
comment
=
"migrate ooodoc address & port to URL"
)
report_message_list
.
append
(
"- system preference %s : %s"
%
(
system_preference
.
getRelativeUrl
(),
", "
.
join
(
action_list
)))
return
report_message_list
bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_checkDocumentConversionServerUrlConsistency.xml
0 → 100644
View file @
c305ee47
<?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>
fixit=False, **kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Site_checkDocumentConversionServerUrlConsistency
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_upgrader/bt/template_portal_type_property_sheet_list
View file @
c305ee47
Template Tool | TemplateToolBusinessTemplateInstallationConstraint
Template Tool | TemplateToolCategoryNameConstraint
Template Tool | TemplateToolDocumentConversionServerUrlConsistencyConstraint
Template Tool | TemplateToolTableConsistencyConstraint
Template Tool | TemplateToolWorkflowChainConsistencyConstraint
\ No newline at end of file
bt5/erp5_upgrader/bt/template_property_sheet_id_list
View file @
c305ee47
TemplateToolBusinessTemplateInstallationConstraint
TemplateToolCategoryNameConstraint
TemplateToolDocumentConversionServerUrlConsistencyConstraint
TemplateToolTableConsistencyConstraint
TemplateToolWorkflowChainConsistencyConstraint
\ 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