Commit 40d14109 authored by Alain Takoudjou's avatar Alain Takoudjou

slapos_erp5: Check all module IdGenerator in one constraint to speed up post upgrade

parent 31bf747b
<property_sheet_list>
<portal_type id="Access Token Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Account Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Accounting Transaction Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Activity Tool">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Bug Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Business Configuration Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Business Process Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Campaign Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Certificate Authority Tool">
<item>CertificateAuthorityToolConsistencyConstraint</item>
</portal_type>
<portal_type id="Cloud Contract Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Component Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Computer Model Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Computer Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Computer Network Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Consumption Document Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Credential Recovery Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Credential Request Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Credential Update Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Currency Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Data Set Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Document Ingestion Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Document Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Event Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="External Source Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Glossary Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Hosting Subscription Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Image Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Implicit Item Movement Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Internal Order Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Internal Packing List Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Internal Supply Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Internal Trade Condition Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Inventory Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Item Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Knowledge Pad Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Meeting Module">
<portal_type id="Id Tool">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Memcached Tool">
<item>MemcachedToolServerConstraint</item>
</portal_type>
<portal_type id="Notification Message Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Open Internal Order Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Open Purchase Order Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Open Sale Order Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Organisation Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Person Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Product Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Project Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Purchase Order Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Purchase Packing List Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Purchase Supply Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Purchase Trade Condition Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Quantity Unit Conversion Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Query Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Regularisation Request Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Requirement Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Returned Purchase Packing List Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Returned Sale Packing List Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Sale Opportunity Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Sale Order Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Sale Supply Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Sale Trade Condition Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Service Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Service Report Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Software Installation Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Software Instance Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Software Licence Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Software Product Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Software Publication Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Software Release Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Support Request Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="System Event Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Task Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Task Report Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Transformation Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Upgrade Decision Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Web Page Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Web Site Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
<portal_type id="Workflow Module">
<item>SlapOSModuleIdGeneratorConstraint</item>
</portal_type>
</property_sheet_list>
\ No newline at end of file
portal = context.getPortalObject()
id_generator = '_generatePerDayId'
error_list = []
if context.getIdGenerator() != id_generator:
error_list.append("%s module has incorrect ID generator" % context.getRelativeUrl())
for module_id in portal.objectIds(spec=('ERP5 Folder',)) + ["portal_simulation", "portal_activities"]:
module = portal.restrictedTraverse(module_id)
if module.getIdGenerator() != id_generator:
if fixit:
context.setIdGenerator(id_generator)
if fixit:
error_list.append("%s module has incorrect ID generator (fixed)." % context.getRelativeUrl())
module.setIdGenerator(id_generator)
else:
error_list.append("%s module has incorrect ID generator." % context.getRelativeUrl())
return error_list
Access Token Module | SlapOSModuleIdGeneratorConstraint
Account Module | SlapOSModuleIdGeneratorConstraint
Accounting Transaction Module | SlapOSModuleIdGeneratorConstraint
Activity Tool | SlapOSModuleIdGeneratorConstraint
Bug Module | SlapOSModuleIdGeneratorConstraint
Business Configuration Module | SlapOSModuleIdGeneratorConstraint
Business Process Module | SlapOSModuleIdGeneratorConstraint
Campaign Module | SlapOSModuleIdGeneratorConstraint
Certificate Authority Tool | CertificateAuthorityToolConsistencyConstraint
Cloud Contract Module | SlapOSModuleIdGeneratorConstraint
Component Module | SlapOSModuleIdGeneratorConstraint
Computer Model Module | SlapOSModuleIdGeneratorConstraint
Computer Module | SlapOSModuleIdGeneratorConstraint
Computer Network Module | SlapOSModuleIdGeneratorConstraint
Consumption Document Module | SlapOSModuleIdGeneratorConstraint
Credential Recovery Module | SlapOSModuleIdGeneratorConstraint
Credential Request Module | SlapOSModuleIdGeneratorConstraint
Credential Update Module | SlapOSModuleIdGeneratorConstraint
Currency Module | SlapOSModuleIdGeneratorConstraint
Data Set Module | SlapOSModuleIdGeneratorConstraint
Document Ingestion Module | SlapOSModuleIdGeneratorConstraint
Document Module | SlapOSModuleIdGeneratorConstraint
Event Module | SlapOSModuleIdGeneratorConstraint
External Source Module | SlapOSModuleIdGeneratorConstraint
Glossary Module | SlapOSModuleIdGeneratorConstraint
Hosting Subscription Module | SlapOSModuleIdGeneratorConstraint
Image Module | SlapOSModuleIdGeneratorConstraint
Implicit Item Movement Module | SlapOSModuleIdGeneratorConstraint
Internal Order Module | SlapOSModuleIdGeneratorConstraint
Internal Packing List Module | SlapOSModuleIdGeneratorConstraint
Internal Supply Module | SlapOSModuleIdGeneratorConstraint
Internal Trade Condition Module | SlapOSModuleIdGeneratorConstraint
Inventory Module | SlapOSModuleIdGeneratorConstraint
Item Module | SlapOSModuleIdGeneratorConstraint
Knowledge Pad Module | SlapOSModuleIdGeneratorConstraint
Meeting Module | SlapOSModuleIdGeneratorConstraint
Memcached Tool | MemcachedToolServerConstraint
Notification Message Module | SlapOSModuleIdGeneratorConstraint
Open Internal Order Module | SlapOSModuleIdGeneratorConstraint
Open Purchase Order Module | SlapOSModuleIdGeneratorConstraint
Open Sale Order Module | SlapOSModuleIdGeneratorConstraint
Organisation Module | SlapOSModuleIdGeneratorConstraint
Person Module | SlapOSModuleIdGeneratorConstraint
Product Module | SlapOSModuleIdGeneratorConstraint
Project Module | SlapOSModuleIdGeneratorConstraint
Purchase Order Module | SlapOSModuleIdGeneratorConstraint
Purchase Packing List Module | SlapOSModuleIdGeneratorConstraint
Purchase Supply Module | SlapOSModuleIdGeneratorConstraint
Purchase Trade Condition Module | SlapOSModuleIdGeneratorConstraint
Quantity Unit Conversion Module | SlapOSModuleIdGeneratorConstraint
Query Module | SlapOSModuleIdGeneratorConstraint
Regularisation Request Module | SlapOSModuleIdGeneratorConstraint
Requirement Module | SlapOSModuleIdGeneratorConstraint
Returned Purchase Packing List Module | SlapOSModuleIdGeneratorConstraint
Returned Sale Packing List Module | SlapOSModuleIdGeneratorConstraint
Sale Opportunity Module | SlapOSModuleIdGeneratorConstraint
Sale Order Module | SlapOSModuleIdGeneratorConstraint
Sale Supply Module | SlapOSModuleIdGeneratorConstraint
Sale Trade Condition Module | SlapOSModuleIdGeneratorConstraint
Service Module | SlapOSModuleIdGeneratorConstraint
Service Report Module | SlapOSModuleIdGeneratorConstraint
Software Installation Module | SlapOSModuleIdGeneratorConstraint
Software Instance Module | SlapOSModuleIdGeneratorConstraint
Software Licence Module | SlapOSModuleIdGeneratorConstraint
Software Product Module | SlapOSModuleIdGeneratorConstraint
Software Publication Module | SlapOSModuleIdGeneratorConstraint
Software Release Module | SlapOSModuleIdGeneratorConstraint
Support Request Module | SlapOSModuleIdGeneratorConstraint
System Event Module | SlapOSModuleIdGeneratorConstraint
Task Module | SlapOSModuleIdGeneratorConstraint
Task Report Module | SlapOSModuleIdGeneratorConstraint
Transformation Module | SlapOSModuleIdGeneratorConstraint
Upgrade Decision Module | SlapOSModuleIdGeneratorConstraint
Web Page Module | SlapOSModuleIdGeneratorConstraint
Web Site Module | SlapOSModuleIdGeneratorConstraint
Workflow Module | SlapOSModuleIdGeneratorConstraint
\ No newline at end of file
Id Tool | SlapOSModuleIdGeneratorConstraint
Memcached Tool | MemcachedToolServerConstraint
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment