Upgrading from opentaps 1.0 to opentaps 1.4
From Opentaps Wiki
Jump to navigationJump to searchData Changes
- Run the service opentaps.setSupplementalDataForAllParties to populate primary contact data for all parties.
- Configuration of GL accounts for invoice writeoffs have been changed. Instead of using GlAccountTypeDefault, they are now configured with InvoiceAdjustmentGlAccount with the adjustment type "WRITEOFF"
- If you have custom UI labels, they may be loaded by adding them to LabelConfiguration.properties in opentaps-common/config/
- If previously you were using UtilMessage.registerLabelMap() to load custom labels, you may now remove all calls to this function as it is no longer needed.
- Run the upgrade SQL script in hot-deploy/opentaps-common/scripts/sql for the following:
- ProductAverageCost has been re-factored to use a single productAverageCostId as its primary key. The script will alter the table and automatically fill in its values and update SequenceValueItem so that opentaps will generate correct future keys.
- Add the following to your custom component's build.xml:
<fileset dir="${ofbiz.dir}/hot-deploy/opentaps-common/lib" includes="*.jar"/> <fileset dir="${ofbiz.dir}/hot-deploy/opentaps-common/lib/hibernate" includes="*.jar"/>
- Set SupplierProduct.supplierPrefOrderId to 10_MAIN_SUPPL where it is null.
Coding Changes
Changes in the ofbiz framework would require the following changes to your code:
URL Parameter Security
You can no longer pass parameters to a service request directly in the URL. These requests must be part of a POST form. To make buttons work as before, you need to change them to forms and then activate them with javascript. For example, in earlier versions, you could have a button to delete a lead like this:
<#assign update_options = update_options + "<a class='subMenuButtonDangerous' href='deleteLead?leadPartyId=" + partySummary.partyId + "'>" + uiLabelMap.CommonDelete + "</a>" />
In opentaps 1.4, you must do it this way:
<form name="deleteLeadForm" method="post" action="<@ofbizUrl>deleteLead</@ofbizUrl>"/> <@inputHidden name="leadPartyId" value="${partySummary.partyId}"/> </form> <#assign update_options = update_options + "<a class='subMenuButtonDangerous' href='javascript:document.deleteLeadForm.submit()'>" + uiLabelMap.CommonDelete + "</a>" />