Most Powerful Open Source ERP

How To How to upgade ERP5 (Notes)

How To showing a list of upgrade notes and required changes from 2006-2011
  • Last Update:2016-02-09
  • Version:003
  • Language:en

All important changes that require manual migration are described in this page.

Table of Contents


r42977 - r42978 (2011-02-03)

MySQL full_text table column SearchableText changed its type from 'TEXT' to 'MEDIUMTEXT'. Although migration to new type is not absolutely mandatory it's recommended to do by executing following SQL code:

alter table full_text change  SearchableText SearchableText mediumtext;
r41981 - r41987 (2011-01-04)

"File" and "Image" portal types have been replaced by "Embedded File" in erp5_base business template. This change is important only for embedded "File" and "Image" objects (i.e. does not affect normal DMS). In order to handle properly migration of already created data a new (portal_alarms/upgrader_migrate_to_embedded_file) upgrade alarms has been created. If you happen to upgrade manually please trigger this alarm.

r40057 (2010-11-08)

The schema 'subject' and 'versioning' tables has changed. They must be recreated. Only objects having 'getVersion' method must be reindexed.

r39918 - r39922 (2010-11-04)

Amount generator is reimplemented and new simulation is used by default. In order to keep using legacy simulation, ERP5Legacy product and erp5_simulation_legacy BT must be installed, as well as any existing erp5_XYZ_simulation_legacy BT for each erp5_XYZ installed BT.

For more information, see also

r37339 - r38321 (2010-09-14)

In this revision range there was some renaming of listbox properties. So if you happen to upgrade to revision in this range to ensure smooth migration apply to r37339 (provides backwards compatability). Alternative this issue is solved in r38379 so upgrading to r38379+ will make problem disappear.

r37686 (2010-08-11)

The schema of activity tables has changed. You can either use "Recreate Tables" from portal_activities/manageActivitiesAdvanced or execute the following SQL command:

ALTER TABLE message_queue ADD group_method_id VARCHAR(255) NOT NULL DEFAULT '' AFTER priority;

r35690 (2010-05-27)

During upgrade of erp5_dms business template, 'portal_skins/erp5_dms/Image_view/image_view' item must be deselected.

site upgraded between the r34543 but before r34599 (2010-04-14)

The portal_ids is changed and the class which resolve the conflict error is ZODB has a bad implementation. After when you upgrade after the r34600, the site was broken because the old class has been saved in the ZODB. To fix the problem :

  • on MySQL, dump the portal_ids table (eg. mysqldump db_name portal_ids > portal_ids.dump)
  • visit [instance_url]/portal_ids/clearGenerator?id_generator=uid with your web browser
  • on MySQL, load the previous portal_ids table (eg. mysql db_name < portal_ids.dump)
  • visit [instance_url]/portal_ids/initializeGenerator?id_generator=uid with your web browser

r34440 (2010-04-09)

Many obsolete Field libraries were removed from erp5_trade. If you have custom business template using theses obsolete field libraries, you can install erp5_trade_proxy_field_legacy business templates.

r34257 (2010-04-02)

The column "language" conflict between content_translation and versioning in portal_catalog is fixed. At this revision, content_translation table have to be re-constructed.

ALTER TABLE content_translation CHANGE language content_language VARCHAR(100)

r34006 (2010-03-23)

(erp5_computer_immobilisation) Computer Partition portal type documents are using ComputerPartition class.

To migrate existing Computer Partition documents use following code:

 def fixComputerPartitionClass(self):
   """Fixes Computer Partition document class"""
   from Products.ERP5.Extensions.CheckPortalTypes import changeObjectClass
   from Products.ERP5.Document.ComputerPartition import ComputerPartition
   changeObjectClass(self.getParentValue(),, ComputerPartition)

r33977 (2010-03-23)

Trade Model Line calculation script must accept **kw argument.

r33859 (2010-03-18)

Currency Exchange Line portal type no longer acquire local roles, you'll have to define security for this portal type. (you can use the same security as Currency for simplicity)

r33837 (2010-03-18)

API for scripts used by relation fields changed, they now recieve a list of documents, and no longer a list of uids. If you were using this feature in your customisations, you'll have to update those relation fields or scripts. See r33838 for an example of update. There is a script SkinsTool_listRelationFieldWithRelationSetterId in erp5_admininstration that lists relation fields using this.

r33209 (2010-03-02)

A new catalog table has been introduced to index Transformation objects. The catalog script z_create_transformation should be invoked to create the table.

r33253 (2010-03-02)

Some rule classes moved from ERP5/Document/ to ERP5Legacy/Document/. More classes will also move there in the near future. If you are using existing simulation rules, please checkout ERP5Legacy product from under your Products directory.

r33140 (2010-02-26)

New table "content_translation" in the erp5_content_translation for searching translated content of document. You can use the feature by defining custom ScriptableSearchKey. See the sample code in CatalogTool_getContentTranslationDictList and !SQLCatalog_makeContentTranslationSearchQuery.

r32877 (2010-02-19)

The schema of activity tables has changed. You can either use "Recreate Tables" from portal_activities/manageActivitiesAdvanced or execute the following SQL command:

ALTER TABLE message_queue ADD retry TINYINT UNSIGNED NOT NULL DEFAULT 0 AFTER serialization_tag;

Observed traceback:

ERROR ActivityTool process_timer received an exception
Traceback (most recent call last):
  File "Products/CMFActivity/", line 915, in process_timer
  File "Products/CMFActivity/", line 979, in tic
    activity.tic(inner_self, processing_node) # Transaction processing is the responsability of the activity
  File "Products/CMFActivity/Activity/", line 143, in tic
    if self.dequeueMessage(activity_tool, processing_node):
  File "Products/CMFActivity/Activity/", line 268, in dequeueMessage
  File "Products/CMFActivity/Activity/", line 176, in finalizeMessageExecution
    retry = m.line.retry
AttributeError: retry

32583 (2010-02-16)

Gadget portal type uses a file system based class after this change. This change affects only Gadget instances in custom bt5s (public business template have been updated) where change of class is required (see below sample script that will do this migration).

Additionally Gadget uses default_image property sheet so adjusting custom Gadgets' images might be required (it is enough to rename (manually or by script) image to 'default_image')

def fixGadgetInstanceNewPortalType(self):
    Fix Gadget instance new portal type.
  from Products.ERP5.Extensions.CheckPortalTypes import changeObjectClass
  from Products.ERP5.Document.Gadget import Gadget
  portal_gadgets = self.getPortalObject().portal_gadgets
  for id in portal_gadgets.objectIds():
    changeObjectClass(portal_gadgets, id, Gadget)

32519 (2010-02-15)

The hierarchy of simulation tree is modified, and we no longer use 'order' category in Simulation Movements. To keep the compatibility, existing rule and existing simulation tree should work as they are.

To support both legacy simulation tree and new simulation tree, you need to modify your rules' test methods and your builders' select movement methods. Please see HowToConfigureRule and HowToConfigureBuilder for the detail.

32277 (2010-02-05)

versioning table has two more columns now. You can use the following SQL to modify existing table

alter table versioning add column `creation_date_index` INT, add column `frequency_index` INT, add KEY `frequency_index` (`creation_date_index`, `frequency_index`);

32275 (2010-02-05)

A permission name (i.e. the View permission) was included into the keys of security uids, and this was removed. This will cause existing keys not to match any security uid, so the user won't be able to view documents that should be viewable to the user. In order to fix this incompatibility, the best way is to reindex your site from scratch by ERP5Site_reindexAll?clear_catalog:int=1.

If you don't want to reindex your site, the alternative is to convert existing keys in the cache of security uids in your SQLCatalog object by, for example, an External Method. But this would be tricky, so we may not recommend this way.

31979 (2010-01-26)

Two columns have been removed from movement table. You can use the following SQL to modify the existing table:

alter table movement drop column is_orderable, drop column is_deliverable;

31858 (2010-01-21)

A new catalog table needs to be created to index Quantity Unit Conversion Definitions. The catalog script z_create_quantity_unit_conversion needs to be invoked to create the table.

31652 (2010-01-07)

Item table has new column. You can use the following SQL to modify the existing table:

alter table item drop primary key;
alter table item add column `order_id` TINYINT UNSIGNED NOT NULL after uid;
update item set order_id=1;
alter table item add primary key (`uid`, `aggregate_uid`, `order_id`);

31617 (2010-01-07)

The 'language' column in the 'versioning' table has now length 5 instead of 2. You can use the following SQL to modify the existing table.

mysql> alter table versioning modify column language varchar(5) default '';

28993 (2009-09-11)

Glossary Terms now use existing 'language' property instead of 'language' category. To migrate existing Glossary Terms, please use GlossaryTerm_migrateLanguageProperty script.

28501 (2009-08-24)

All previous system of Tax Model Lines and Tax Lines have been moved to erp5_legacy_tax_system business template. Install this BT and dependency if you don't want to adapt project customisation to Trade Model Line.

28344 (2009-08-12)

portal_categories/resource/packing is no longer included in erp5_trade. A new system preference "preferred_packing_use" has been introduced to configure which resources shall be used as packing containers.

28333 (2009-08-11)

As the REQUEST argument was removed from isHideRowsOnNoSearchCriterion's parameter, please update first the business template erp5_xhtml_style to revision 28332 in order to keep compatibility.

27964 (2009-07-06)

Workflow method calls are not ignored any more if the transition does not exist for the current state or if the guard rejects it. If your project relies on the old behaviour, it is easy to revert 27964 locally until you have updated it. For example:

$ svn merge -c -27964 ERP5Type/


$ sed -i '/raise UnsupportedWorkflowMethod/s/^ /#/' ERP5Type/

27921 (2009-07-03)

To enable document_cache_factory, flare should be installed and running on port 12121 please follow instructions at to enable a master node

27896 (2009-07-03)

process_status_workflow doesn't track "edit" actions anymore and the following portal types need edit_workflow:

  • Drawing
  • File
  • Image
  • PDF
  • Presentation
  • Spreadsheet
  • Text

After upgrading erp5_dms, make sure they are chained to edit_workflow (portal_workflow/manage_selectWorkflows) and fix them manually if this is not the case. edit_workflow is required for "revision" field to work.

27869, 27881, 27882 (2009-07-02)

/!\ Do not use erp5_bpm above r27882 (BT5 revision >= 203) anymore on production sites. This is development playground.


  • trade_phase
  • end_of
  • order_builder
  • delivery_builder
  • Actions related to BPM.
  • Portal types and its configuration.

Are moved from erp5_bpm to generic business templates. Watch out during update of erp5_bpm and do not remove those objects.

27854 (2009-07-01)

Catalog methods are moved from erp5_bpm to erp5_invoicing, so if you are using erp5_bpm and update it after updating erp5_invoicing do not remove those methods by mistake.

27847 (2009-07-01)

portal_rules/default_trade_model_rule path is moved from erp5_bpm to erp5_invoicing, so if you are using erp5_bpm and update it after updating erp5_invoicing do not remove this path by mistake.

27724,27725 (2009-06-22)

The erp5_invoicing is split into three business templates; 'erp5_invoicing', 'erp5_simplified_invoicing' and 'erp5_advanced_invoicing'. The erp5_invoicing now only have common invoicing setting.

When you want them to work compatible with previous erp5_invoicing, you just install 'erp5_invoicing' and 'erp5_simplified_invoicing' When you want to create invoices independently, you just install 'erp5_invoicing' and 'erp5_advanced_invoicing'. Note: You can not install both 'erp5_simplified_invoicing' and 'erp5_advanced_invoicing' together. They cause conflicts.

27694 (2009-06-20)

Stock table have a new column "is_cancellation". Reindex the site, or use this SQL (assuming you never used cancellation):

 alter table stock add is_cancellation boolean after quantity;
 update stock set is_cancellation=0;

27484 - 27489 (2009-06-10)

Payroll Service portal_type is replaced by Service. Payroll Service were used only for payroll, so if you don't have yet use payroll (and have Payroll Services), don't care about this note.

First, if you update erp5_payroll, take care, by default, the system will propose you to remove all your old Payroll Services (they all will be lost if you accept) because of the payroll_service_module deletion.

Here is two script that permit to create new Services corresponding to old Payroll Services and updates all object that used Payroll Services.

## Script (Python) "PayrollServiceModule_upgradePayrollServiceToService"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
Payroll Service should not be used now and should be replaces by Service.
This script will create Service corresponding to existing Payroll Services and
replace everywhere there are used by the corresponding new Service

# in your preference you should set the use category you want to use for
# services used in payroll.

PAYROLL_USE_CATEGORY = 'payroll' # change here if you want to use another one
DEFAULT_USE_CATEGORY = 'payroll/tax'

portal = context.getPortalObject()
if getattr(portal.portal_categories.use, PAYROLL_USE_CATEGORY, None) is None:
  raise ValueError, "Cannot find use category '%s'" % PAYROLL_USE_CATEGORY

# check preference is set
if 'use/'+PAYROLL_USE_CATEGORY not in\
  raise ValueError, "payroll use category '%s' is not set on your prefered_payroll_resource_use_category (in system preference)" % PAYROLL_USE_CATEGORY

# check tax_category and salary range are in
# prefered_service_variation_base_category_list :

if 'tax_category' not in\
  raise ValueError, "'tax_category' is not in your '\
if 'salary_range' not in\
  raise ValueError, "'salary_range' is not in your '\

payroll_service_list = portal.payroll_service_module.contentValues(\
    portal_type='Payroll Service')

service_module = portal.service_module

new_service_count = 0
for payroll_service in payroll_service_list:
 print '\npayroll_service : %s ; %s' % (payroll_service.getTitle(),
 service = service_module.newContent()
 new_service_count += 1
              use_list=payroll_service.getUseList() or (DEFAULT_USE_CATEGORY,))
 print 'new service : %s ; %s' % (service.getTitle(), service.getRelativeUrl())

print '%s new services added' % new_service_count
return printed

## Script (Python) "PayrollService_updateResourceRelatedMovementList"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
resource_related_value_list = context.getResourceRelatedValueList()
if len(resource_related_value_list)> 0:
  for related_object in resource_related_value_list[:100]:

After this create this script on your instance, launch PayrollServiceModule_upgradePayrollServiceToService to create the new services. Old Payroll Services will not be deleted after this script execution. If you want it, you have to do it by hand.

r27343 (2009-06-03)

We no longer have SQLCache and ZODBCache. All kind of Cache usage will be managed by RamCache and DistributedRamCache. DistributedRamCache will evolve to support persistent storage with memcached like server as backend.

r27319 (2009-06-01)

Except for persons, security groups is computed by looking at:

'codification' first;
then 'reference';
'id' at last.

No more difference is done between categories and other objects.

Before r27319, 'reference' was ignored for categories, as well as 'codification' for other objects. You review the security of your instance to make sure no property (codification or reference) masks another (reference or id).

r27277 (2009-06-01)

Interfaces directory now follows the zope naming convention.

  • interfaces/ directory instead of Interface directory
  • interface files use small caps (eg., not
  • interface class use IClassName converntion (eg. IPredicate, not Predicate)

Please update your custom Document classes like the following:

-from Products.ERP5Type import Interface
+from Products.ERP5Type import interfaces

-  __implements__ = ( Interface.Predicate, )
+  zope.interface.implements(interfaces.IPredicate,)

Please also note that modifying all Products and Business Templates related to this change finished in r27312.

r26873 (2009-05-07)

Formulator Products is now available on erp5 svn repository. if you upgrade ERP5Form, you should checkout Formulator from this new location.

svn co

r26559 (2009-04-21)

Categories predecessor and successor were moved to erp5_base.

Category predecessor was removed from erp5_project, watch out during update and do not remove it.

Categories predecessor and successor were removed from erp5_dms, watch out during update and do not remove them.

r26229 (2009-04-01)

Versionning table have been moved from erp5_dms_innodb_catalog to erp5_mysql_innodb_catalog. erp5_dms_innodb_catalog no longer exists. After updating erp5_mysql_innodb_catalog. you'll have to recreate versionning table using erp5_mysql_innodb/z_create_versioning because the table structure is different.

r25274 (2009-01-22)

It is needed to recreate activity tables. Go to portal_activities/manageActivitiesAdvanced and click Recreate Tables.

In case of problems with running site, before doing above workaround:

alter table message_queue add column active_process_uid int(10) unsigned default null after path;
alter table message add column active_process_uid int(10) unsigned default null after path;

r25124 (2009-01-15)

base_amount has been removed from Pay Sheet Model Lines and from Payroll Services. If you have paysheet models or payroll services before this upgrade, you can update them using a script like :

# we decide to use base_contribution and base_application on model lines
# instead of base_amount on model lines and base_amount on payroll services

model_module = context.getPortalObject().getDefaultModule(portal_type='Pay Sheet Model')
model_list = model_module.contentValues(portal_type='Pay Sheet Model')

for model in model_list:
  model_line_list = model.contentValues(portal_type='Pay Sheet Model Line')
  for model_line in model_line_list:
    if len(model_line.getBaseAmountList()):
      amount_list = ['base_amount/%s' % amount for amount in model_line.getBaseAmountList()]
    if model_line.getResourceValue() is not None and len(model_line.getResourceValue().getBaseAmountList()):
      amount_list = ['base_amount/%s' % amount for amount in model_line.getResourceValue().getBaseAmountList()]

# remove all base_amount on payroll services
service_module = context.getPortalObject().getDefaultModule(portal_type='Payroll Service')
service_list = service_module.contentValues(portal_type='Payroll Service')

for service in service_list:
    if len(service.getBaseAmountList()):
return "Done"

r23647 (2008-09-16)

Movement Group becomes ERP5 Document

So builders configuration is incompatible. We already ported all builders in our public repository. And We will provide a utility script that helps developers porting their custom builders. Please see HowToConfigureBuilder for the detail.

  • unify *_causality_workflow into one delivery_causality_workflow - Please see HowToUseDeliveryCausalityWorkflow for the detail.
  • 'Accept Decision' and 'Adopt Prevision' are removed - Now 'Solve Divergence' action in delivery_causality_workflow can solve each divergence in both Accept way and Adopt way. If you call 'Accept Decision' or 'Adopt Prevision' in your unit tests, they will fail.
  • 'Choose Solve Actions' is removed - Now 'Split and Defer' action in delivery_causality_workflow supports partial splitting. If you call 'Choose Solve Actions' in your unit tests, they will fail.
  • Simulation related stuffs is moved from erp5_core to erp5_base
  • Several portal types (Divergence Tester, Delivery Builder, Delivery Tool, Order Builder, and Order Tool) and several workflows (delivery_causality_interaction_workflow, delivery_causality_workflow, delivery_movement_causality_interaction_workflow, delivery_movement_simulation_interaction_workflow, delivery_simulation_interaction_workflow, order_movement_simulation_interaction_workflow, order_simulation_interaction_workflow, and simulation_movement_causality_interaction_workflow) are moved from erp5_core to erp5_base. Please be careful not to 'Remove' Tool or Workflow when you update erp5_core.

r23048 (2008-08-20)

The business template update bug has been fixed ! If you were using erp5_core version > 882, you will get an error like ValueError, Unkown action "[backup]" when installing business templates. To fix this, you'll have to manually change:

object_to_update[item['listbox_key']] = item['choice']


object_to_update[item['listbox_key']] = item['choice'][0]

in portal_workflow/business_template_installation_workflow/scripts/BusinessTemplate_install (ie. applying manually this change )

To fix update from repositories, you'll have to update portal_skins/erp5_core/TemplateTool_installBusinessTemplateListAction to change:

  if bt_dict.has_key(bt_id):
    bt_dict[bt_id][object_id] = item['choice']
    bt_dict[bt_id] = {}
    bt_dict[bt_id][object_id] = item['choice']


  if bt_dict.has_key(bt_id):
    bt_dict[bt_id][object_id] = item['choice'][0]
    bt_dict[bt_id] = {}
    bt_dict[bt_id][object_id] = item['choice'][0]

( ie applying manually )

r22967 (2008-08-12)

getStartDate method on Email Document now handle timezone.

Please reindex your event module.

r22737 (2008-07-29)

BugTracker was refactored. In the new design, Bug is a Ticket and Messages (Bug Lines) are events following a similar design of CRM. If you update only, it will not require use data migration (it is expected not).

If you update erp5_forge, one script is provided (at erp5_bug_migration bt5) to migrate old contents to the new design. BugModule_migrate in erp5_bug_migration bt5, run the migration through activities.

  • Download erp5_bug_migration.bt5

Guide for Migrate the old content at Bug Module to the new implementation:

Desactivate Notification Mail Sending. (It is necessary because during the migration the Bug / BugLines have the workflow state changed and when a workflow state is changed the related persons are notified throw e-mail.)

Open the script BugEvent_sendNotification, into the bug_event_workflow;

Comment the followed lines in the script to disable the e-mail notification during the migration;

#portal = bug_message.getPortalObject()
#                    recipient=bug_message.getDestinationValueList(),
#                    subject="[ERP5 Bug] [Message] %s" % bug_message.getTitle(),
#                    message=body)

Run migration

Migration Scripts

BugModule_migrate creates the activities calling the bug_migrate for each Bug into context.

Changes the reference of each old Bug;
Changes the old Source to new Source Trade;
Changes the old bug_type to new Resource;
Changes the old Destination to new Source;
Migrates the old States to the new Bugs;
Migrates the old Files to the new Bugs.

Call the migration script throw URL:


Look the portal_activities for check the status of activities.

r22404 (2008-07-09)

This Upgrade will break all workflows on Internal Packing List. A Migration Script will be published in erp5_trade in few days.

r22163 (2008-07-01)

CMFCategory "buildAdvancedSQLSelector" using the new query ("left join"-based) requires an ZSQLCatalog and erp5_mysql_innodb_catalog update. Failing to do so will cause invalid sql to be generated ("Unknown column 'base_xxx.category_uid'") because the left join will not be part of the query.

r21477 (2008-06-10)

Notification Tool scripts and mail templates are now in erp5_core. You need MailTemplates products. For now we have a copy of MailTemplates in our repository ( with this patch applied ).

r21153-21156 (2008-05-26)

New Telephone stuff was committed. The new configuration is explained at: TechnicalNoteOnTelephone. Please try to not use version r21153-21155.

r21118 (2008-05-26)

System Preference has been added, they are use for preferences which are defined only by site manager (PDM, CRM and DMS). If you want to use it, just create a System Preference (only available for manager) and register all the form, by default they are displaying default value, but it's not set on it. Note that System Preference outranks Preference.

r20964 - r20968 (2008-05-15)

I (rafael) committed the integration of access_tab and xhtml_style. It is required to update ERP5 product and erp5_core over than r20965. Notes that this commit should not change the front page for any site at beginning, after update NO access_tab will be showed.

  • For projects that does not use access tab, this commit should change nothing.
  • For projects that use access tab, it required to check Access Tab Front Page at User Interface Preferences. This field is only available for managers by default and check only at the site level is enough.
  • For projects that has their own front pages, increase their business_template_skin_layer_priority at your project skin folder over than 100. This make your index_html got instead at access_tab.
  • Sites with many managers and use access tab with their own preferences can have problems with these accounts. For this just ask for the user check Access Tab front Page at User Interface in Preferences.
  • I tried many combinations of issues and tested it with many different accounts. So if you have any problem, contact me (mail or jabber) I can explain or fix any unexpected issue.

r20888 (2008-05-06)

erp5_new_toppage was renamed to erp5_access_tab. To update top page, install erp5_access_tab and remove erp5_new_toppage after.

r20782 (2008-04-23)

variation category has been removed from erp5_core, because it already exists in erp5_pdm. Be careful not to select "remove" when updating erp5_core.

r20580 - r20586(2008-04-16)

Supplies have been moved from ERP5 Trade to ERP5 PDM. When upgrading a site, make sure you do not trash the existing supply modules if they are not empty. Also, you should update ERP5 Trade before ERP5 PDM.


Added new parameter to round scripts. This is usefull to round that values in a different way for begin and the end of the block. See also: Is required to update erp5_core revision to 792 (r20504) or more.


Change InvoiceTransactionRule_asCellRange to use the IDs and not relative_url, because after a copy & paste, matrix range was not applicable. relative_url contains the full path of the object, so obviously after copy & paste it's not the same path, that's why we'll use subobjects IDs. This requires manual migration of existing invoice transaction rule. Migration script introduced in r21581.


In erp5_core, causality in acquired base categories is deleted from following categories.


Due to this changes, if you have a document which uses causality and above categories, you need to migrate documents.

This is a example for migrating Task Report document.

def migrate_task_report(task_report):
  task = task_report.getCausalityValue()
  if task is None:
  destination_decision = task.getDestinationDecision()
  if destination_decision != task_report.getDestinationDecision():
    return True


Update Resource_zGetTrackingList: to_date was not correctly handled, and if used the ZSQLMethod will crash. This revision changes code flow in the ZSQLMethod when to_date is provided, which causes a crash when at_date is None.


Catalog tables item and inventory_item contain new columns. Clear catalog and reindex.


Security on portal_preferences was not set correctly. It is now set correctly when creating the tool. Old sites can be updated with:

context.portal_preferences.manage_permission('Add portal content',
          ['Member', 'Author', 'Manager'])
context.portal_preferences.manage_permission('Add portal folders',
          ['Member', 'Author', 'Manager'])
          ['Member', 'Auditor', 'Manager'])
context.portal_preferences.manage_permission('Copy or Move',
          ['Member', 'Auditor', 'Manager'])
context.portal_preferences.manage_permission('Manage properties',
          ['Manager'], acquire=0)
context.portal_preferences.manage_permission('Set own password',
          ['Member', 'Author', 'Manager'])

This is required if you want to use templates.


CMFActivity SQL tables contain a new column. Recreate activity tables.


Rename owner column to viewable owner, in order to handle Owner based security in a more generic way. Please update ERP5, ERP5Type, ERP5Catalog, ZSQLCatalog products and erp5_core, erp5_mysql_innodb_catalog business templates. Recreate the catalog tables.


Due to refactoring of ZSQLCatalog you need to install "ply": on your machines


Show comment on main view for accounting transactions instead of description. You may want to migrate your existing transactions with something like this:

for tr in context.accounting_module.objectValues():
  # commit subtransaction every n iterations if you have many documents


Due to add a new option "Anchor Column" in listbox, erp5_xhtml_style/ListBox_asHTML has been changed.

if you have customized ListBox template, please merge this changes.

ListBox_asHTML.xml changes


Added a "src__" parameter to search_result call, which might be a script (named Base_getCountFromWorklistTable) when using SQL-cached worklists. This script must be updated to accept and honor this parameter (the script is expected to return a string composed of the SQL code which would have been executed if src__ is False). Note: this is not needed with default version of this script (takes a **kw parameter transmitted verbatim, and returns the value without any processing).


Added scriptable key in business template. Please use erp5_core(rev 670 or newer).


Fixed dependency of erp5_crm. please install MimetypesRegistry and PortalTransforms. You need these products, if you use erp5_crm or business templates which depends on it.

r18480 - r18525 (2008-02-07)

At revision 18480 Base_updateListboxSelection script was introduced, which at revision 18525 is used in Products in Base_doDialog method. So lack of it prior to 18480 after upgrading Products past 18525 blocks Business Template import dialog to work and consequently disables upgrade of erp5_core.

To sucessfully upgrade from before 18480 to after 18525 there is a simple workaround:

  • in custom skin create an empty script with id = Base_updateListboxSelection.
  • update erp5_catalog and erp5_core
  • remove the dummy script
  • keep on upgrading

The other way would be to upgrade business templates before the Products, but that might be dangerous if at all possible.

r18471 (2007-12-21)

DMS ingestion system was refactored. Please update business templates(erp5_web, erp5_dms) and Products(ERP5OOo, ERP5) and also oood.

r18291 (2007-12-13)

Planning box was refactored. Update your business templates. if there is another planning box that not use proxy field from Base_viewFieldLibrary/planning_box. Please set the lane_root list as:

base_day_domain | Day base_week_domain | Week base_month_domain | Month base_year_domain | Year 

r17867 (2007-11-28)

ERP5 converts and saves now all passed to ZSQLMethod DateTime values from local time to 'UTC'.

This conversion is done automatically for every ZSQLMethod using dtml sqlvar tag of type "datetime" and affects indexing so please reindex your site.

Please also note that ZMySQLDA product from ERP5 repository is required.

r17656 (2007-11-16)

Some rule test scripts were no longer useful, the others were badly named. The name of a script that tests is a rule applies is now SimulationMovement_test. Please update your rules (OrderRule, DeliveryRule, AmortisationRule, InvoiceRule, ProductionOrderRule don't use a script anymore, all the other rules do).

r17537 (2007-11-12)

( You probably don't need this one )

The sub_form attribute of ProxyField is now calculated by getting it on the template field. Before that it was stored as an instance attribute.

The full explanation is that ProxyFields of DateTimeFields have a sub_form attribute that was set on the instance by render method. There are two different sub_form values, based on the "input style" value, which makes DateTimeFields are rendered with text fields or list fields. The sub_form set on ProxyFields was using text fields, so if you want to use list input style, you have to "cleanup" existing ProxyFields stored in the ZODB by deleting their "sub_form" attribute. Note that changing the input style value of a Datetime field result in a ZODB write, so this might evolve again in the future.

I used this external method do clean existing fields:

def clean(self):
  context = self
  for field_path, field in context.ZopeFind(
                context.portal_skins, obj_metatypes=['ProxyField'],
    if field.getRecursiveTemplateField().meta_type == 'DateTimeField':
      if 'sub_form' in field.__dict__:
        print field_path
        delattr(field, 'sub_form')
        field._p_changed = 1

r17417 (2007-11-06)

Rules are now used as predicates and are controlled by a validation workflow.

To upgrade your system, the simplest is, for each rule:

  • copy the id property to reference property
  • set a version (note that it is stored, and compared, as a string)
  • set a test method id (one that reproduces the previous behaviout would be named RuleType_test.*, for example InvoiceRule_testContextPortalType, look for it in the skin folder)
  • validate the rule

r17270 (2007-10-30)

Movement.getPrice does not set price automatically any longer, because this behavior is policy-oriented. The function is now implemented in pricing_interaction_workflow, which must be associated with all Movements which need to set price when getting it at the first time. From r17271 to r17280, several Business Templates have been updated for this change.

If you have any other Movements in your system, you need to update them yourself.

r17168 (2007-10-24)

Career workflow changed its state variable name from "state" to "validation_state". To fix existing careers, run the external method updateCareerValidationState in ERP5.CheckPortalTypes.

r16942 (2007-10-10)

Due to ListBox bug fix, ERP5Form/www/ListBox_asHTML.zpt has been changed.

if you have customized ListBox template, please fix the following part.

ERP5Form/www/ListBox_asHTML.zpt (line:280)

-                  tal:define="section_name python: line.getContext() is not None and line.getContext().getTitleOrId() or ''">
+                  tal:define="section_name python: line.getDomainTitle()">

r16830-r16837 (2007-10-04)

replaced delivery_edit_workflow, packing_list_interaction_workflow and production_packing_list_interaction_workflow by delivery_simulation_interaction_workflow, delivery_movement_simulation_interaction_workflow and container_interaction_workflow

This is the second part of the change initiated by Romain in r16011.

Deliveries that are related to simulation should be associated to delivery_simulation_interaction_workflow

Delivery Lines and Cells that are related to simulation should be associated to delivery_movement_simulation_interaction_workflow

Packing List Lines and Cells that are part of Packing List that must be packed into Containers, as well as Container Lines and Cells should be associated to container_interaction_workflow

It might be necessary to remove delivery_edit_workflow, packing_list_interaction_workflow and production_packing_list_interaction_workflow from workflow chains before updating erp5_trade'

r16689 (2007-09-28)

"catalog" table no longer uses AUTO_INCREMENT MySQL feature.

When clearing your catalog with a erp5_mysql_innodb_catalog revision higher that this one, you will need to make sure that your ZSQLCatalog product is at revision 16688 or higher. Incidentaly, you must make sure that ERP5/Tool/ is at revision 16687 or higher, since it fixes a bug which causes invalid hebahviour when used to generate catalog uids.

r16447 (2007-09-18)

"inventory" table has a new column. If any object gets reindexed into this table and the ZSQLMethod was updated, it will fail ("simulation_state" column will not be a part of this table).

Easy solution: clear catalog & reindex all. Faster solution: alter table to add the column, reindex just the objects referenced in that table. Also, recreate indexes to add that new column. Look at z_create_inventory for details.

r16371 (2007-09-14)

Balance Transaction now uses the new Balance Transaction class. Existing documents can be updated with an external method:

module_name: ERP5.CheckPortalTypes

function_name: updateBalanceTransactionClass

r16289 (2007-09-12)

'comment' is removed on Task_view and TaskReport_view, replaced by 'description'. Update with (you'll probably need to do this in unrestricted environment):

[task.setDescription('%s\n%s' % (task.getDescription(), task.getProperty('comment', ''))) for task in context.task_module.objectValues()]
[task_report.setDescription('%s\n%s' % (task_report.getDescription(), task_report.getProperty('comment', ''))) for task_report in context.task_report_module.objectValues()]

r16152 (2007-09-07)

simulation_movement_interaction_workflow was renamed to simulation_movement_causality_interaction_workflow. One should take care if this workflow was mofified locally.

r16115 (2007-09-07)

Added Resource_zGetFullInventoryDate which unlocks access to inventory optimisation commited earlier. As optimisation relies on the presence of new tables (inventory & inventory_stock), you can either create the tables manually (better to reindex your site if you want optimistion to actually happen) or delete that ZSQLMethod from portal_skins/erp5_core.

r16036 (2007-09-04)

For erp5_trade, 'edit' transition of the causality workflow should be renamed 'calculate'. It has to be done manually if a custom causality workflow is used.

r16011 (2007-09-03)

Expand of the simulation related to an Order is not managed by the Document directly.

Is is now required to use:

  • order_simulation_interaction_workflow
  • order_movement_simulation_interaction_workflow
  • as described in this discussion.

If you use erp5_trade, erp5_mrp or erp5_project, please update them at the same time.

r14032 (2007-04-10)

We now use a Length object to store index in result list for active process. If you use active process, update them with:

from BTrees.Length import Length
for ap in portal.portal_activities.contentValues(portal_type='Active Process'):
  ap.result_len = Length(ap.result_list.maxKey())

r13891 (2007-04-03)

SelectionTool now inherits from BaseTool, which inherits from Folder. if you get AttributeError: 'NoneType' object has no attribute 'keys' or other BTreeFolder2 related issues, you can simply delete portal_selections and recreate them by adding them from ERP5Form Tool, or try to call portal_selections._initBTrees() from filesystem or Extensions code.

r13595 (2007-03-23)

We now use a Length object to store security_uid index on SQLCatalog object. You have to clear catalog and reindex.

r12506 (2007-01-02)

Add mirror_date column to the stock table.

Do not forget to recreate your catalog.

r12286 (2007-24-01)

Add an "ERP5 User Factory" in your '/erp5/acl_users' using the ZMI.

r11019 (2006-10-31)

Error Type: AttributeError

Error Value: Could not resolve 'portal_caches'

You have to manually add a cache tool from ERP5 Type, in the ZMI, choose "Add ERP5Type Tool", then check "ERP5Cache Tool".

r10664 (2006-10-11)

Use start_date / stop_date for lifetime of Entities. Be sure to run:

[pers.setStartDate(pers.birthday) for pers in context.person_module.objectValues() if getattr(pers, 'birthday', None) is not None]
[org.setStartDate(org.creation_date) for org in context.organisation_module.objectValues() if getattr(org, 'creation_date', None) is not None]

to update existing documents.

Related Articles