[OFBiz] SVN: r7886 - in trunk/applications/product: config webapp/facility/WEB-INF/actions/inventory widget/facility
jacopo@svn.ofbiz.org
jacopo at svn.ofbiz.org
Wed Jun 28 00:56:41 CDT 2006
Author: jacopo
Date: 2006-06-28 00:56:15 -0500 (Wed, 28 Jun 2006)
New Revision: 7886
Modified:
trunk/applications/product/config/ProductUiLabels.properties
trunk/applications/product/config/ProductUiLabels_it.properties
trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/receiveInventory.bsh
trunk/applications/product/widget/facility/FacilityScreens.xml
Log:
Better error handling when facility is not found when receiving a purchase order.
Also, now if an invalid facility id is passed to the facility screens, an error message is shown.
I think that this pattern should be applied to other parts of the system, for example to the product screens.
Modified: trunk/applications/product/config/ProductUiLabels.properties
===================================================================
--- trunk/applications/product/config/ProductUiLabels.properties 2006-06-28 05:38:29 UTC (rev 7885)
+++ trunk/applications/product/config/ProductUiLabels.properties 2006-06-28 05:56:15 UTC (rev 7886)
@@ -526,6 +526,7 @@
ProductFacilityLocations=Facility Locations
ProductFacilityManagerApplication=Facility Manager Application
ProductFacilityNameId=Facility Name [ID]
+ProductFacilityNotFound=Facility Not Found
ProductFacilityOwner=Owner
ProductFacilityRoleMemberMaintenance=Facility Role Member Maintenance
ProductFacilityType=Facility Type
Modified: trunk/applications/product/config/ProductUiLabels_it.properties
===================================================================
--- trunk/applications/product/config/ProductUiLabels_it.properties 2006-06-28 05:38:29 UTC (rev 7885)
+++ trunk/applications/product/config/ProductUiLabels_it.properties 2006-06-28 05:56:15 UTC (rev 7886)
@@ -522,6 +522,7 @@
ProductFacilityLocations=Posizioni Stabilimento
ProductFacilityManagerApplication=Applicazione Gestione Stabilimenti
ProductFacilityNameId=Nome Stabilimento [Codice]
+ProductFacilityNotFound=Stabilimento Non Trovato
ProductFacilityOwner=Proprietario
ProductFacilityRoleMemberMaintenance=Manutenzione Membri Ruoli Stabilimento
ProductFacilityType=Tipo Stabilimento
Modified: trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/receiveInventory.bsh
===================================================================
--- trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/receiveInventory.bsh 2006-06-28 05:38:29 UTC (rev 7885)
+++ trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/receiveInventory.bsh 2006-06-28 05:56:15 UTC (rev 7886)
@@ -102,7 +102,7 @@
}
}
// convert the unit prices to that of the facility owner's currency
-if (purchaseOrder != null) {
+if (purchaseOrder != null && facility != null) {
owner = facility.getRelatedOne("OwnerParty");
acctgPref = null;
if (owner != null) acctgPref = owner.getRelatedOne("PartyAcctgPreference");
Modified: trunk/applications/product/widget/facility/FacilityScreens.xml
===================================================================
--- trunk/applications/product/widget/facility/FacilityScreens.xml 2006-06-28 05:38:29 UTC (rev 7885)
+++ trunk/applications/product/widget/facility/FacilityScreens.xml 2006-06-28 05:56:15 UTC (rev 7886)
@@ -57,11 +57,21 @@
<if-has-permission permission="FACILITY" action="_VIEW"/>
</condition>
<widgets>
- <platform-specific>
- <html><html-template location="component://product/webapp/facility/facility/FacilityTabBar.ftl"/></html>
- </platform-specific>
+ <section>
+ <condition>
+ <not><if-empty field-name="facility"/></not>
+ </condition>
+ <widgets>
+ <platform-specific>
+ <html><html-template location="component://product/webapp/facility/facility/FacilityTabBar.ftl"/></html>
+ </platform-specific>
- <decorator-section-include name="body"/>
+ <decorator-section-include name="body"/>
+ </widgets>
+ <fail-widgets>
+ <label style="head3">${uiLabelMap.ProductFacilityNotFound}: [${facilityId}]</label>
+ </fail-widgets>
+ </section>
</widgets>
<fail-widgets>
<label style="head3">${uiLabelMap.ProductFacilityViewPermissionError}</label>
More information about the Svn
mailing list