Author: jacopoc
Date: Tue Sep 5 05:24:39 2006 New Revision: 440330 URL: http://svn.apache.org/viewvc?view=rev&rev=440330 Log: In the purchase order entry requirements' screen, now by default only the requirements that have a role of SUPPLIER for the given party are shown. Modified: incubator/ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/requirement/RequirementServices.xml incubator/ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryForms.xml incubator/ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryScreens.xml Modified: incubator/ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml?view=diff&rev=440330&r1=440329&r2=440330 ============================================================================== --- incubator/ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml (original) +++ incubator/ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml Tue Sep 5 05:24:39 2006 @@ -1155,6 +1155,7 @@ <member-entity entity-alias="RQR" entity-name="RequirementRole"/> <alias entity-alias="RQ" name="requirementId"/> <alias entity-alias="RQ" name="requirementTypeId"/> + <alias entity-alias="RQ" name="statusId"/> <alias entity-alias="RQ" name="facilityId"/> <alias entity-alias="RQ" name="deliverableId"/> <alias entity-alias="RQ" name="fixedAssetId"/> Modified: incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/requirement/RequirementServices.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/requirement/RequirementServices.xml?view=diff&rev=440330&r1=440329&r2=440330 ============================================================================== --- incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/requirement/RequirementServices.xml (original) +++ incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/requirement/RequirementServices.xml Tue Sep 5 05:24:39 2006 @@ -65,13 +65,26 @@ <simple-method method-name="getRequirementsForSupplier" short-description="Get the requirements applicable to a given supplier"> <make-value value-name="newEntity" entity-name="Requirement"/> - <entity-condition entity-name="Requirement" list-name="requirementsForSupplier"> - <condition-list> - <condition-object field-name="parameters.requirementConditions"/> - <condition-expr field-name="statusId" value="REQ_APPROVED"/> - <condition-expr field-name="requirementTypeId" value="PRODUCT_REQUIREMENT"/> - </condition-list> - </entity-condition> + <if-empty field-name="parameters.partyId"> + <entity-condition entity-name="Requirement" list-name="requirementsForSupplier"> + <condition-list> + <condition-object field-name="parameters.requirementConditions"/> + <condition-expr field-name="statusId" value="REQ_APPROVED"/> + <condition-expr field-name="requirementTypeId" value="PRODUCT_REQUIREMENT"/> + </condition-list> + </entity-condition> + <else> + <entity-condition entity-name="RequirementAndRole" list-name="requirementsForSupplier"> + <condition-list> + <condition-object field-name="parameters.requirementConditions"/> + <condition-expr field-name="statusId" value="REQ_APPROVED"/> + <condition-expr field-name="roleTypeId" value="SUPPLIER"/> + <condition-expr field-name="requirementTypeId" value="PRODUCT_REQUIREMENT"/> + <condition-expr field-name="partyId" env-name="parameters.partyId"/> + </condition-list> + </entity-condition> + </else> + </if-empty> <field-to-result field-name="requirementsForSupplier" result-name="requirementsForSupplier"/> </simple-method> Modified: incubator/ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryForms.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryForms.xml?view=diff&rev=440330&r1=440329&r2=440330 ============================================================================== --- incubator/ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryForms.xml (original) +++ incubator/ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryForms.xml Tue Sep 5 05:24:39 2006 @@ -18,8 +18,9 @@ <forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/widget-form.xsd"> <form name="FindRequirements" type="single" target="RequirementsForSupplier" title="" default-title-style="tableheadtext" default-widget-style="tabletext" default-tooltip-style="tabletext"> - <field name="hideSearch"><hidden value="Y"/></field> + <field name="showList"><hidden value="Y"/></field> <field name="requirementId"><text-find/></field> + <field name="partyId" title="${uiLabelMap.PartySupplier}"><lookup target-form-name="LookupPartyName"/></field> <field name="productId" title="${uiLabelMap.ProductProductId}"><lookup target-form-name="LookupProduct"/></field> <field name="requirementByDate"><date-find type="date"/></field> <field name="submitButton" title="${uiLabelMap.CommonLookup}" widget-style="smallSubmit"><submit button-type="button"/></field> @@ -34,6 +35,7 @@ <service service-name="getRequirementsForSupplier" result-map-name="result" result-map-list-name="requirementsForSupplier"> <!--<field-map field-name="orderByList" env-name="resultConditions.orderByList"/>--> <field-map field-name="requirementConditions" env-name="resultConditions.entityConditionList"/> + <field-map field-name="partyId" env-name="parameters.partyId"/> </service> </actions> <field name="requirementId"><display/></field> Modified: incubator/ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryScreens.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryScreens.xml?view=diff&rev=440330&r1=440329&r2=440330 ============================================================================== --- incubator/ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryScreens.xml (original) +++ incubator/ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryScreens.xml Tue Sep 5 05:24:39 2006 @@ -56,6 +56,7 @@ <set field="entityName" value="Requirement"/> <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/> <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="50"/> + <script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/SetShoppingCart.bsh"/> </actions> <widgets> <decorator-screen name="CommonOrderCatalogDecorator" location="component://order/widget/ordermgr/OrderEntryCommonScreens.xml"> @@ -65,12 +66,19 @@ </container> <container> <label style="head2" text="Find Requirements"/> - <include-form name="FindRequirements" location="component://order/widget/ordermgr/OrderEntryForms.xml"/> </container> - <container> - <label style="head2" text="Requirement List"/> + <include-form name="FindRequirements" location="component://order/widget/ordermgr/OrderEntryForms.xml"/> + <section> + <condition> + <not><if-empty field-name="parameters.showList"/></not> + </condition> + <widgets> + <container> + <label style="head2" text="Requirement List"/> + </container> <include-form name="RequirementsList" location="component://order/widget/ordermgr/OrderEntryForms.xml"/> - </container> + </widgets> + </section> </decorator-section> </decorator-screen> </widgets> |
Free forum by Nabble | Edit this page |