Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
slapos.core
Commits
92c533b2
Commit
92c533b2
authored
Dec 07, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Continue post upgrade fixes.
parent
68b0db4c
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
538 additions
and
21 deletions
+538
-21
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/00_ERP5Site_postUpgradeFixUp.xml
...al_skins/slapos_upgrader/00_ERP5Site_postUpgradeFixUp.xml
+6
-20
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/ERP5Site_postUpgradeFixUpPortalDeliveries.xml
...os_upgrader/ERP5Site_postUpgradeFixUpPortalDeliveries.xml
+73
-0
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/ERP5Site_postUpgradeFixUpPortalPropertySheets.xml
...pgrader/ERP5Site_postUpgradeFixUpPortalPropertySheets.xml
+124
-0
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/ERP5Site_postUpgradeFixUpPortalRules.xml
.../slapos_upgrader/ERP5Site_postUpgradeFixUpPortalRules.xml
+69
-0
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/ERP5Site_postUpgradeFixUpPortalSkins.xml
.../slapos_upgrader/ERP5Site_postUpgradeFixUpPortalSkins.xml
+78
-0
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/ERP5Site_postUpgradeFixUpPortalTemplates.xml
...pos_upgrader/ERP5Site_postUpgradeFixUpPortalTemplates.xml
+81
-0
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/ERP5Site_postUpgradeFixUpPortalTypes.xml
.../slapos_upgrader/ERP5Site_postUpgradeFixUpPortalTypes.xml
+106
-0
master/bt5/slapos_upgrader/bt/revision
master/bt5/slapos_upgrader/bt/revision
+1
-1
No files found.
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/00_ERP5Site_postUpgradeFixUp.xml
View file @
92c533b2
...
...
@@ -52,26 +52,12 @@
<key>
<string>
_body
</string>
</key>
<value>
<string>
portal = context.getPortalObject()\n
\n
# drop not needed builders\n
for builder_id in [\n
\'purchase_invoice_tax_builder\',\n
\'sale_invoice_tax_builder\',\n
]:\n
if builder_id in portal.portal_deliveries.objectIds():\n
portal.portal_deliveries.deleteContent(builder_id)\n
\n
# uninstall not needed Business Templates\n
unwanted_business_template_list = [\n
\'erp5_ui_test\',\n
\'erp5_discount_resource\',\n
\'erp5_tax_resource\',\n
\'erp5_legacy_tax_system\',\n
]\n
\n
for bt5 in portal.portal_templates.contentValues(portal_type=\'Business Template\'):\n
if bt5.getTitle() in unwanted_business_template_list:\n
if bt5.getInstallationState() == \'installed\':\n
bt5.uninstall()\n
portal.ERP5Site_postUpgradeFixUpPortalDeliveries()\n
portal.ERP5Site_postUpgradeFixUpPortalTemplates()\n
portal.ERP5Site_postUpgradeFixUpPortalTypes()\n
portal.ERP5Site_postUpgradeFixUpPortalPropertySheets()\n
portal.ERP5Site_postUpgradeFixUpPortalRules()\n
portal.ERP5Site_postUpgradeFixUpPortalSkins()\n
\n
raise NotImplementedError\n
return \'Done.\'\n
...
...
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/ERP5Site_postUpgradeFixUpPortalDeliveries.xml
0 → 100644
View file @
92c533b2
<?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>
_body
</string>
</key>
<value>
<string>
portal_deliveries = context.getPortalObject().portal_deliveries\n
for builder_id in [\n
\'purchase_invoice_tax_builder\',\n
\'sale_invoice_tax_builder\',\n
]:\n
if builder_id in portal_deliveries.objectIds():\n
portal_deliveries.deleteContent(builder_id)\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Site_postUpgradeFixUpPortalDeliveries
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/ERP5Site_postUpgradeFixUpPortalPropertySheets.xml
0 → 100644
View file @
92c533b2
<?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>
_body
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
portal_property_sheets = context.getPortalObject().portal_property_sheets\n
\n
id_list = portal_property_sheets.objectIds()\n
\n
unwanted_id_list = [\n
\'FreeFiberRequest\', \'VifibAssignmentConstraint\',\n
\'VifibCapacity\', \'VifibComputerConstraint\',\n
\'VifibComputerPartitionConstraint\',\n
\'VifibEmailConstraint\', \'VifibHostingSubscriptionConstraint\',\n
\'VifibInternalPackingListConstraint\', \'VifibInternalPackingListLineConstraint\',\n
\'VifibOpenSaleOrderConstraint\', \'VifibOpenSaleOrderLineConstraint\',\n
\'VifibPersonConstraint\', \'VifibPurchasePackingListConstraint\',\n
\'VifibPurchasePackingListLineConstraint\',\n
\'VifibRestAPISystemPreference\', \'VifibSaleInvoiceConstraint\',\n
\'VifibSaleOrderConstraint\', \'VifibSaleOrderLineConstraint\',\n
\'VifibSalePackingListConstraint\', \'VifibSalePackingListLineConstraint\',\n
\'VifibSoftwareProductConstraint\', \'VifibSoftwareReleaseConstraint\',\n
\'VifibSystemPreference\'\n
]\n
to_delete_id_list = []\n
\n
for id in unwanted_id_list:\n
if id in id_list:\n
to_delete_id_list.append(id)\n
if len(to_delete_id_list) >
0:\n
portal_property_sheets.deleteContent(to_delete_id_list)\n
\n
def getPropertySheet(name):\n
return portal_property_sheets.restrictedTraverse(name)\n
\n
# fix HostingSubscription\n
if \'root_software_release_url_property\' in getPropertySheet(\'HostingSubscription\'):\n
getPropertySheet(\'HostingSubscription\').deleteContent(\'root_software_release_url_property\')\n
\n
# fix SlaveInstanceConstraint\n
for id in [\n
\'destination_reference_property_existence_constraint\',\n
\'reference_property_existence_constraint\',\n
\'setup_packing_list_constraint\',\n
\'text_content_existence_constraint\',\n
]:\n
if id in getPropertySheet(\'SlaveInstanceConstraint\'):\n
getPropertySheet(\'SlaveInstanceConstraint\').deleteContent(id)\n
\n
# fix SoftwareInstanceConstraint\n
for id in [\n
\'destination_reference_property_existence_constraint\',\n
\'reference_property_existence_constraint\', \n
\'setup_packing_list_constraint\',\n
\'ssl_certificate_constraint\',\n
\'ssl_key_constraint\',\n
]:\n
if id in getPropertySheet(\'SoftwareInstanceConstraint\'):\n
getPropertySheet(\'SoftwareInstanceConstraint\').deleteContent(id)\n
]]>
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Site_postUpgradeFixUpPortalPropertySheets
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/ERP5Site_postUpgradeFixUpPortalRules.xml
0 → 100644
View file @
92c533b2
<?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>
_body
</string>
</key>
<value>
<string>
portal_rules = context.getPortalObject().portal_rules\n
\n
portal_rules.fixConsistency()\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Site_postUpgradeFixUpPortalRules
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/ERP5Site_postUpgradeFixUpPortalSkins.xml
0 → 100644
View file @
92c533b2
<?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>
_body
</string>
</key>
<value>
<string>
portal_skins = context.getPortalObject().portal_skins\n
for name, layers in portal_skins.getSkinPaths():\n
layer_list = layers.split(\',\')\n
if \'garbage_collection_201112\' in layer_list:\n
layer_list = [q for q in layer_list if q != \'garbage_collection_201112\']\n
portal_skins.manage_skinLayers(skinpath=layer_list, skinname=name, add_skin=1)\n
portal_skins.getPortalObject().changeSkin(None)\n
if name == \'ODS\':\n
if \'erp5_ooo_import\' not in layer_list:\n
layer_list.insert(layer_list.index(\'erp5_open_trade\'), \'erp5_ooo_import\')\n
portal_skins.manage_skinLayers(skinpath=layer_list, skinname=name, add_skin=1)\n
portal_skins.getPortalObject().changeSkin(None)\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Site_postUpgradeFixUpPortalSkins
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/ERP5Site_postUpgradeFixUpPortalTemplates.xml
0 → 100644
View file @
92c533b2
<?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>
_body
</string>
</key>
<value>
<string>
portal_templates = context.getPortalObject().portal_templates\n
# uninstall not needed Business Templates\n
unwanted_business_template_list = [\n
\'erp5_ui_test\',\n
\'erp5_ui_test_core\',\n
\'erp5_discount_resource\',\n
\'erp5_tax_resource\',\n
\'erp5_legacy_tax_system\',\n
\'vifib_software_pdm\',\n
]\n
\n
for bt5 in portal_templates.contentValues(portal_type=\'Business Template\'):\n
if bt5.getTitle() in unwanted_business_template_list:\n
if bt5.getInstallationState() == \'installed\':\n
bt5.uninstall()\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Site_postUpgradeFixUpPortalTemplates
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/ERP5Site_postUpgradeFixUpPortalTypes.xml
0 → 100644
View file @
92c533b2
<?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>
_body
</string>
</key>
<value>
<string>
portal_types = context.getPortalObject().portal_types\n
def getPortalType(portal_type):\n
return portal_types.restrictedTraverse(portal_type)\n
\n
# fix Delivery Simulation Rule portal type\n
getPortalType(\'Delivery Simulation Rule\').setTypeAllowedContentTypeList((\n
\'Category Membership Divergence Tester\', \'DateTime Divergence Tester\',\n
\'Float Divergence Tester\', \'Net Converted Quantity Divergence Tester\',\n
\'Specialise Divergence Tester\', \'String Divergence Tester\',\n
\'Variation Divergence Tester\'\n
))\n
\n
# fix Hosting Subscription\n
getPortalType(\'Hosting Subscription\').setTypeBaseCategoryList((\n
\'destination_section\'\n
))\n
\n
# fix Item\n
getPortalType(\'Item\').setTypePropertySheetList([ ])\n
getPortalType(\'Item\').setTypeBaseCategoryList([ ])\n
\n
# fix Preference\n
# property sheets have to be removed\n
# fix Preference Tool\n
# property sheets have to be removed\n
\n
# fix Slave Instance\n
getPortalType(\'Slave Instance\').setTypeBaseCategoryList((\n
\'aggregate\', \'causality\', \'specialise\'\n
))\n
\n
# fix Software Instance\n
getPortalType(\'Software Instance\').setTypeBaseCategoryList((\n
\'aggregate\', \'causality\', \'specialise\'\n
))\n
\n
# fix Types Tool\n
getPortalType(\'Types Tool\').setTypeAllowedContentTypeList((\n
\'Base Type\', \'Gadget Type\'\n
))\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Site_postUpgradeFixUpPortalTypes
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_upgrader/bt/revision
View file @
92c533b2
32
\ No newline at end of file
33
\ 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