Author: lektran
Date: Sat Jun 23 19:27:31 2007 New Revision: 550154 URL: http://svn.apache.org/viewvc?view=rev&rev=550154 Log: Applied fix from trunk for revision: 550151 Modified: ofbiz/branches/release4.0/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml ofbiz/branches/release4.0/applications/order/webapp/ordermgr/quote/QuoteForms.xml Modified: ofbiz/branches/release4.0/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml?view=diff&rev=550154&r1=550153&r2=550154 ============================================================================== --- ofbiz/branches/release4.0/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml (original) +++ ofbiz/branches/release4.0/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml Sat Jun 23 19:27:31 2007 @@ -129,6 +129,22 @@ <check-errors/> <entity-one entity-name="Quote" value-name="quote" auto-field-map="true"/> <check-errors/> + <if-empty field-name="parameters.statusId"> + <set field="parameters.statusId" from-field="quote.statusId"/> + </if-empty> + <if-compare-field field-name="quote.statusId" operator="not-equals" to-field-name="parameters.statusId"> + <!-- check if the status change is a valid change --> + <entity-and entity-name="StatusValidChange" list-name="validChange"> + <field-map field-name="statusId" env-name="quote.statusId"/> + <field-map field-name="statusIdTo" env-name="parameters.statusId"/> + </entity-and> + + <if-empty field-name="validChange"> + <add-error><fail-message message="The status change from ${quote.statusId} to ${parameters.statusId} is not a valid change"/></add-error> + <log level="error" message="The status change from ${quote.statusId} to ${parameters.statusId} is not a valid change"/> + <check-errors/> + </if-empty> + </if-compare-field> <set-nonpk-fields map-name="parameters" value-name="quote"/> <store-value value-name="quote"/> <check-errors/> Modified: ofbiz/branches/release4.0/applications/order/webapp/ordermgr/quote/QuoteForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/order/webapp/ordermgr/quote/QuoteForms.xml?view=diff&rev=550154&r1=550153&r2=550154 ============================================================================== --- ofbiz/branches/release4.0/applications/order/webapp/ordermgr/quote/QuoteForms.xml (original) +++ ofbiz/branches/release4.0/applications/order/webapp/ordermgr/quote/QuoteForms.xml Sat Jun 23 19:27:31 2007 @@ -98,6 +98,11 @@ </form> <form name="EditQuote" type="single" target="updateQuote" title="" default-map-name="quote" default-title-style="tableheadtext" default-widget-style="inputBox" default-tooltip-style="tabletext"> + <actions> + <entity-one entity-name="StatusItem" value-name="currentStatus" auto-field-map="false"> + <field-map field-name="statusId" env-name="quote.statusId"/> + </entity-one> + </actions> <alt-target use-when="quote==null" target="createQuote"/> <auto-fields-entity entity-name="Quote" default-field-type="edit"/> <field name="quoteId" title="${uiLabelMap.OrderOrderQuoteId}" widget-style="tabletext"><display/></field> @@ -119,9 +124,9 @@ <field name="partyId" title="${uiLabelMap.PartyPartyId}"><lookup target-form-name="LookupPartyName"/></field> <field name="issueDate" title="${uiLabelMap.OrderOrderQuoteIssueDate}"></field> <field name="statusId" title="${uiLabelMap.CommonStatus}" widget-style="selectBox"> - <drop-down allow-empty="false"> - <entity-options entity-name="StatusItem" description="${description}"> - <entity-constraint name="statusTypeId" value="QUOTE_STATUS"/> + <drop-down allow-empty="false" current-description="${currentStatus.description}"> + <entity-options entity-name="StatusValidChangeToDetail" key-field-name="statusIdTo" description="${transitionName} (${description})"> + <entity-constraint name="statusId" value="${quote.statusId}"/> <entity-order-by field-name="sequenceId"/> </entity-options> </drop-down> |
Free forum by Nabble | Edit this page |