Author: hansbak
Date: Thu Mar 19 07:42:14 2009 New Revision: 755865 URL: http://svn.apache.org/viewvc?rev=755865&view=rev Log: only show default organization partyId if at least one have been setup in accounting Modified: ofbiz/trunk/applications/commonext/widget/CommonScreens.xml Modified: ofbiz/trunk/applications/commonext/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/widget/CommonScreens.xml?rev=755865&r1=755864&r2=755865&view=diff ============================================================================== --- ofbiz/trunk/applications/commonext/widget/CommonScreens.xml (original) +++ ofbiz/trunk/applications/commonext/widget/CommonScreens.xml Thu Mar 19 07:42:14 2009 @@ -30,29 +30,35 @@ <entity-one entity-name="PartyNameView" value-field="partyNameView"> <field-map field-name="partyId" from-field="userLogin.partyId"/> </entity-one> - <property-to-field resource="general" property="defaultOrganizationPartyId" field="defaultOrganizationPartyIdProperties"/> - <set field="defaultOrganizationPartyId" value="${bsh:"DEFAULT".equals(userPreferences.get("ORGANIZATION_PARTY"))?defaultOrganizationPartyIdProperties:userPreferences.get("ORGANIZATION_PARTY")}" global="true"/> - <property-to-field resource="general" property="currency.uom.id.default" field="defaultCurrencyUomId"/> - <entity-one entity-name="PartyAcctgPrefAndGroup" value-field="orgParty"> - <field-map field-name="partyId" from-field="defaultOrganizationPartyId"/> - </entity-one> - <set field="defaultOrganizationPartyCurrencyUomId" from-field="orgParty.baseCurrencyUomId" default-value="defaultCurrencyUomId" global="true"/> - <set field="defaultOrganizationPartyGroupName" from-field="orgParty.groupName" global="true"/> <set field="line.text" value="${uiLabelMap.CommonWelcome} ${person.firstName} ${person.middleName} ${person.lastName}"/> <set field="line.urlText" value="[${userLogin.userLoginId}]"/> <set field="line.url" value="/partymgr/control/viewprofile?partyId=${userLogin.partyId}"/> <set field="layoutSettings.topLines[]" from-field="line" global="true"/> <script location="component://commonext/script/changeOrgPartyId.groovy"/> - <set field="dropdown.hiddenFieldList" from-field="hiddenFields" global="true"/> - <set field="dropdown.action" value="setUserPreference"/> - <set field="dropdown.textBegin" value="${uiLabelMap.CommonDefaultOrganizationPartyId} :"/> - <set field="dropdown.dropDownList" from-field="PartyAcctgPrefAndGroupList"/> - <set field="dropdown.selectionName" value="userPrefValue"/> - <set field="dropdown.selectedKey" value="${defaultOrganizationPartyId}"/> - <set field="dropdown.textEnd" value="[${defaultOrganizationPartyId}]"/> - <set field="layoutSettings.topLines[]" from-field="dropdown" global="true"/> </actions> <widgets> + <section> + <condition><not><if-empty field="PartyAcctgPrefAndGroupList"/></not></condition><!-- produced by changeOrgPartyId.groovy--> + <actions> + <property-to-field resource="general" property="defaultOrganizationPartyId" field="defaultOrganizationPartyIdProperties"/> + <set field="defaultOrganizationPartyId" value="${bsh:"DEFAULT".equals(userPreferences.get("ORGANIZATION_PARTY"))?defaultOrganizationPartyIdProperties:userPreferences.get("ORGANIZATION_PARTY")}" global="true"/> + <property-to-field resource="general" property="currency.uom.id.default" field="defaultCurrencyUomId"/> + <entity-one entity-name="PartyAcctgPrefAndGroup" value-field="orgParty"> + <field-map field-name="partyId" from-field="defaultOrganizationPartyId"/> + </entity-one> + <set field="defaultOrganizationPartyCurrencyUomId" from-field="orgParty.baseCurrencyUomId" default-value="defaultCurrencyUomId" global="true"/> + <set field="defaultOrganizationPartyGroupName" from-field="orgParty.groupName" global="true"/> + <set field="dropdown.hiddenFieldList" from-field="hiddenFields" global="true"/> + <set field="dropdown.action" value="setUserPreference"/> + <set field="dropdown.textBegin" value="${uiLabelMap.CommonDefaultOrganizationPartyId} :"/> + <set field="dropdown.dropDownList" from-field="PartyAcctgPrefAndGroupList"/> + <set field="dropdown.selectionName" value="userPrefValue"/> + <set field="dropdown.selectedKey" value="${defaultOrganizationPartyId}"/> + <set field="dropdown.textEnd" value="[${defaultOrganizationPartyId}]"/> + <set field="layoutSettings.topLines[]" from-field="dropdown" global="true"/> + </actions> + <widgets/> + </section> <include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/> </widgets> </section> |
Free forum by Nabble | Edit this page |