Author: jacopoc
Date: Fri Sep 28 08:22:47 2007 New Revision: 580388 URL: http://svn.apache.org/viewvc?rev=580388&view=rev Log: Implemented new specialized lookup screen to search for customers associated to the logged in user where the user is a sales representative. Modified: ofbiz/trunk/applications/party/entitydef/entitygroup.xml ofbiz/trunk/applications/party/entitydef/entitymodel.xml ofbiz/trunk/applications/party/webapp/partymgr/lookup/LookupForms.xml ofbiz/trunk/applications/party/widget/partymgr/LookupScreens.xml Modified: ofbiz/trunk/applications/party/entitydef/entitygroup.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/entitydef/entitygroup.xml?rev=580388&r1=580387&r2=580388&view=diff ============================================================================== --- ofbiz/trunk/applications/party/entitydef/entitygroup.xml (original) +++ ofbiz/trunk/applications/party/entitydef/entitygroup.xml Fri Sep 28 08:22:47 2007 @@ -126,6 +126,7 @@ <entity-group group="org.ofbiz" entity="PartyRelationship" /> <entity-group group="org.ofbiz" entity="PartyRelationshipToFrom" /> <entity-group group="org.ofbiz" entity="PartyRelationshipType" /> + <entity-group group="org.ofbiz" entity="PartyRelationshipAndDetail" /> <entity-group group="org.ofbiz" entity="PartyRole" /> <entity-group group="org.ofbiz" entity="PartyRoleAndPartyDetail" /> <entity-group group="org.ofbiz" entity="PartyRoleNameDetail"/> Modified: ofbiz/trunk/applications/party/entitydef/entitymodel.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/entitydef/entitymodel.xml?rev=580388&r1=580387&r2=580388&view=diff ============================================================================== --- ofbiz/trunk/applications/party/entitydef/entitymodel.xml (original) +++ ofbiz/trunk/applications/party/entitydef/entitymodel.xml Fri Sep 28 08:22:47 2007 @@ -1885,6 +1885,37 @@ <key-map field-name="roleTypeIdValidTo" rel-field-name="roleTypeId"/> </relation> </entity> + <view-entity entity-name="PartyRelationshipAndDetail" package-name="org.ofbiz.party.party" title="Party Relationship And Details"> + <member-entity entity-alias="PTY" entity-name="Party"/> + <member-entity entity-alias="PTYREL" entity-name="PartyRelationship"/> + <member-entity entity-alias="PER" entity-name="Person"/> + <member-entity entity-alias="PTYGRP" entity-name="PartyGroup"/> + <alias-all entity-alias="PTYREL"/> + <alias entity-alias="PTY" name="partyId"/> + <alias entity-alias="PTY" name="partyTypeId"/> + <alias entity-alias="PTY" name="description"/> + <alias entity-alias="PER" name="firstName"/> + <alias entity-alias="PER" name="middleName"/> + <alias entity-alias="PER" name="lastName"/> + <alias entity-alias="PER" name="firstNameLocal"/> + <alias entity-alias="PER" name="lastNameLocal"/> + <alias entity-alias="PER" name="personalTitle"/> + <alias entity-alias="PER" name="suffix"/> + <alias entity-alias="PTYGRP" name="groupName"/> + <alias entity-alias="PTYGRP" name="groupNameLocal"/> + <view-link entity-alias="PTY" rel-entity-alias="PTYREL" rel-optional="true"> + <key-map field-name="partyId" rel-field-name="partyIdTo"/> + </view-link> + <view-link entity-alias="PTY" rel-entity-alias="PER" rel-optional="true"> + <key-map field-name="partyId"/> + </view-link> + <view-link entity-alias="PTY" rel-entity-alias="PTYGRP" rel-optional="true"> + <key-map field-name="partyId"/> + </view-link> + <relation type="one-nofk" rel-entity-name="Party"> + <key-map field-name="partyId"/> + </relation> + </view-entity> <entity entity-name="PartyRole" package-name="org.ofbiz.party.party" title="Party Role Entity"> Modified: ofbiz/trunk/applications/party/webapp/partymgr/lookup/LookupForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/lookup/LookupForms.xml?rev=580388&r1=580387&r2=580388&view=diff ============================================================================== --- ofbiz/trunk/applications/party/webapp/partymgr/lookup/LookupForms.xml (original) +++ ofbiz/trunk/applications/party/webapp/partymgr/lookup/LookupForms.xml Fri Sep 28 08:22:47 2007 @@ -91,6 +91,44 @@ <field name="groupName" title="${uiLabelMap.PartyGroupName}"><display/></field> </form> + <form name="lookupCustomerNameForSalesRep" target="LookupCustomerNameForSalesRep" type="single"> + <field name="roleTypeId"><hidden value="CUSTOMER"/></field> + <field name="roleTypeIdFrom"><hidden value="SALES_REP"/></field> + <field name="roleTypeIdTo"><hidden value="CUSTOMER"/></field> + <field name="partyIdFrom"><hidden value="${userLogin.partyId}"/></field> + <field name="filterByDate"><hidden value="Y"/></field> + <field name="partyId" title="${uiLabelMap.PartyPartyId}"><text-find/></field> + <field name="partyTypeId" title="${uiLabelMap.PartyTypeId}"> + <drop-down allow-empty="true"> + <entity-options description="${description}" entity-name="PartyType"/> + </drop-down> + </field> + <field name="firstName" title="${uiLabelMap.PartyFirstName}"><text-find/></field> + <field name="lastName" title="${uiLabelMap.PartyLastName}"><text-find/></field> + <field name="groupName" title="${uiLabelMap.PartyGroupName}"><text-find/></field> + <field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field> + <field name="submitButton" title="${uiLabelMap.CommonLookup}"><submit button-type="button"/></field> + </form> + <form name="listLookupCustomerNameForSalesRep" type="list" list-name="listIt" + paginate-target="LookupCustomerNameForSalesRep"> + <actions> + <service service-name="performFind" result-map-name="result" result-map-list-name="listIt"> + <field-map field-name="inputFields" env-name="parameters"/> + <field-map field-name="orderBy" value="lastName"/> + <field-map field-name="entityName" value="PartyRelationshipAndDetail"/> + </service> + </actions> + <field name="partyId" title="${uiLabelMap.PartyPartyId}" widget-style="smallSubmit"> + <hyperlink also-hidden="false" target-type="plain" description="${partyId}" target="javascript:set_value('${partyId}')"/> + </field> + <field name="partyTypeId" title="${uiLabelMap.PartyTypeId}"> + <display-entity also-hidden="false" entity-name="PartyType" description="${description}"/> + </field> + <field name="firstName" title="${uiLabelMap.PartyFirstName}"><display/></field> + <field name="lastName" title="${uiLabelMap.PartyLastName}"><display/></field> + <field name="groupName" title="${uiLabelMap.PartyGroupName}"><display/></field> + </form> + <!-- Person Lookup forms --> <form name="lookupPerson" type="single" target="LookupPerson"> <!--<auto-fields-entity entity-name="Person" default-field-type="find" />--> Modified: ofbiz/trunk/applications/party/widget/partymgr/LookupScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/LookupScreens.xml?rev=580388&r1=580387&r2=580388&view=diff ============================================================================== --- ofbiz/trunk/applications/party/widget/partymgr/LookupScreens.xml (original) +++ ofbiz/trunk/applications/party/widget/partymgr/LookupScreens.xml Fri Sep 28 08:22:47 2007 @@ -68,6 +68,31 @@ </widgets> </section> </screen> + <!-- A specialized lookup to search for customers to which the logged in user is associated as a sales representative --> + <screen name="LookupCustomerNameForSalesRep"> + <section> + <condition> + <or> + <if-has-permission permission="PARTYMGR" action="_VIEW"/> + </or> + </condition> + <actions> + <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/> + <set field="title" value="${uiLabelMap.PartyLookupPartyByName}"/> + <set field="queryString" from-field="result.queryString"/> + <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer" default-value="0"/> + <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="20"/> + </actions> + <widgets> + <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml"> + <decorator-section name="body"> + <include-form name="lookupCustomerNameForSalesRep" location="component://party/webapp/partymgr/lookup/LookupForms.xml"/> + <include-form name="listLookupCustomerNameForSalesRep" location="component://party/webapp/partymgr/lookup/LookupForms.xml"/> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> <screen name="LookupPerson"> <section> |
Free forum by Nabble | Edit this page |