Sure normally we do that, but because this is actually a rewrite of the lead/contact/account find/list we still want to show what has been changed....
Regards, Hans On Wed, 2009-11-04 at 23:28 +1300, Scott Gray wrote: > Hi Hans, > > Please consider breaking these up a little in future so that they are > a little easier to review. There's so much going on here it's > impossible to see what is related to what. > > Thanks > Scott > > HotWax Media > http://www.hotwaxmedia.com > > On 4/11/2009, at 11:10 PM, [email protected] wrote: > > > Author: hansbak > > Date: Wed Nov 4 10:10:14 2009 > > New Revision: 832694 > > > > URL: http://svn.apache.org/viewvc?rev=832694&view=rev > > Log: > > 1. ignore parties which have the party's status = disabled, change > > FindServices.createCondition method > > 2. add 'email address', 'telephone number', 'city', 'country', > > 'company' field to list. > > 3. Accounts and Leads, the opportunity box have a link to the actual > > opportunity in sfa > > 4. viewing a communication event in SFA should have a reply/replyall/ > > new email button which links to an new email request in > > 'mycommunciations' in party > > 5. remove party's status field from list (always active) > > 6. Account Lookup screen replaced ftl by forms. > > 7. change name of party's statusId field in > > PartyRelationshipAndContactMechDetail view called 'partyStatusId' > > because It be orverrided by relationship's statusId. > > 8. delete unuse ftl file,screens, forms, request and view map. > > 9. combined partyname and id in one field > > 10. changed the performfind service with a notequal operation that a > > null value is also not selected. > > > > Removed: > > ofbiz/trunk/applications/marketing/webapp/sfa/account/ > > ListAccounts.ftl > > ofbiz/trunk/applications/marketing/webapp/sfa/contact/ > > ListContacts.ftl > > ofbiz/trunk/applications/marketing/webapp/sfa/lead/ListLeads.ftl > > ofbiz/trunk/applications/marketing/webapp/sfa/party/ > > findContactParty.ftl > > ofbiz/trunk/applications/marketing/webapp/sfa/party/ > > findSfaParty.ftl > > Modified: > > ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/ > > controller.xml > > ofbiz/trunk/applications/marketing/widget/sfa/AccountScreens.xml > > ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml > > ofbiz/trunk/applications/marketing/widget/sfa/LookupScreens.xml > > ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml > > ofbiz/trunk/applications/marketing/widget/sfa/forms/ > > AccountForms.xml > > ofbiz/trunk/applications/marketing/widget/sfa/forms/ > > ContactForms.xml > > ofbiz/trunk/applications/marketing/widget/sfa/forms/LeadForms.xml > > ofbiz/trunk/applications/marketing/widget/sfa/forms/LookupForms.xml > > ofbiz/trunk/applications/party/entitydef/entitymodel.xml > > ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml > > ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java > > > > Modified: ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/ > > controller.xml > > URL: > > http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml?rev=832694&r1=832693&r2=832694&view=diff > > = > > = > > = > > = > > = > > = > > = > > = > > ====================================================================== > > --- ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/ > > controller.xml (original) > > +++ ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/ > > controller.xml Wed Nov 4 10:10:14 2009 > > @@ -71,10 +71,6 @@ > > <response name="success" type="view" value="FindAccounts"/> > > <response name="error" type="view" value="NewAccount"/> > > </request-map> > > - <request-map uri="AssignAccountToMe"> > > - <security https="true" auth="true"/> > > - <response name="success" type="view" > > value="AssignAccountToMe"/> > > - </request-map> > > <request-map uri="ContactMechTypeOnly"> > > <security https="true" auth="true"/> > > <response name="success" type="view" > > value="ContactMechTypeOnly"/> > > @@ -125,10 +121,6 @@ > > <security https="true" auth="true"/> > > <response name="success" type="view" > > value="NewLeadFromVCard"/> > > </request-map> > > - <request-map uri="AssignLeadToMe"> > > - <security https="true" auth="true"/> > > - <response name="success" type="view" value="AssignLeadToMe"/> > > - </request-map> > > <request-map uri="createLeadFromVCard"> > > <security https="true" auth="true"/> > > <event type="service" invoke="importVCard"/> > > @@ -255,7 +247,6 @@ > > > > <view-map name="FindAccounts" type="screen" page="component:// > > marketing/widget/sfa/AccountScreens.xml#FindAccounts"/> > > <view-map name="NewAccount" type="screen" page="component:// > > marketing/widget/sfa/AccountScreens.xml#NewAccount"/> > > - <view-map name="AssignAccountToMe" type="screen" > > page="component://marketing/widget/sfa/ > > AccountScreens.xml#AssignAccountToMe"/> > > <view-map name="ContactMechTypeOnly" type="screen" > > page="component://marketing/widget/sfa/ > > AccountScreens.xml#ContactMechTypeOnly"/> > > > > <view-map name="FindLeads" type="screen" page="component:// > > marketing/widget/sfa/LeadScreens.xml#FindLeads"/> > > @@ -264,7 +255,6 @@ > > <view-map name="ConvertLead" type="screen" page="component:// > > marketing/widget/sfa/LeadScreens.xml#ConvertLead"/> > > <view-map name="MergeLeads" type="screen" page="component:// > > marketing/widget/sfa/LeadScreens.xml#MergeLeads"/> > > <view-map name="NewLeadFromVCard" type="screen" > > page="component://marketing/widget/sfa/ > > LeadScreens.xml#NewLeadFromVCard"/> > > - <view-map name="AssignLeadToMe" type="screen" page="component:// > > marketing/widget/sfa/LeadScreens.xml#AssignLeadToMe"/> > > > > <view-map name="FindContacts" type="screen" page="component:// > > marketing/widget/sfa/ContactScreens.xml#FindContacts"/> > > <view-map name="NewContact" type="screen" page="component:// > > marketing/widget/sfa/ContactScreens.xml#NewContact"/> > > > > Modified: ofbiz/trunk/applications/marketing/widget/sfa/ > > AccountScreens.xml > > URL: > > http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/AccountScreens.xml?rev=832694&r1=832693&r2=832694&view=diff > > = > > = > > = > > = > > = > > = > > = > > = > > ====================================================================== > > --- ofbiz/trunk/applications/marketing/widget/sfa/AccountScreens.xml > > (original) > > +++ ofbiz/trunk/applications/marketing/widget/sfa/AccountScreens.xml > > Wed Nov 4 10:10:14 2009 > > @@ -93,30 +93,6 @@ > > </widgets> > > </section> > > </screen> > > - <screen name="AssignAccountToMe"> > > - <section> > > - <actions> > > - <set field="headerItem" value="Accounts" /> > > - <set field="titleProperty" > > value="PageTitleCreateAccount" /> > > - <set field="accountType" from- > > field="parameters.accountType" /> > > - <property-to-field field="defaultCountryGeoId" > > - resource="general" > > property="country.geo.id.default" default="USA" /> > > - </actions> > > - <widgets> > > - <decorator-screen name="main-decorator" > > - location="${parameters.mainDecoratorLocation}"> > > - <decorator-section name="body"> > > - <container style="no-clear"> > > - <screenlet title="$ > > {uiLabelMap.PageTitleAssignAccountFromExisting}"> > > - <include-form > > name="AssignAccountToMe" > > - location="component://marketing/ > > widget/sfa/forms/AccountForms.xml" /> > > - </screenlet> > > - </container> > > - </decorator-section> > > - </decorator-screen> > > - </widgets> > > - </section> > > - </screen> > > <screen name="ContactMechTypeOnly"> > > <section> > > <actions> > > > > Modified: ofbiz/trunk/applications/marketing/widget/sfa/ > > LeadScreens.xml > > URL: > > http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml?rev=832694&r1=832693&r2=832694&view=diff > > = > > = > > = > > = > > = > > = > > = > > = > > ====================================================================== > > --- ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml > > (original) > > +++ ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml > > Wed Nov 4 10:10:14 2009 > > @@ -174,28 +174,6 @@ > > </widgets> > > </section> > > </screen> > > - > > - <screen name="AssignLeadToMe"> > > - <section> > > - <actions> > > - <set field="titleProperty" > > value="PageTitleAssignLeadFromExisting" /> > > - <set field="headerItem" value="Leads" /> > > - </actions> > > - <widgets> > > - <decorator-screen name="CommonPartyDecorator" > > - location="${parameters.mainDecoratorLocation}"> > > - <decorator-section name="body"> > > - <container style="no-clear"> > > - <screenlet title="$ > > {uiLabelMap.PageTitleAssignLeadFromExisting}"> > > - <include-form name="AssignLeadToMe" > > - location="component://marketing/ > > widget/sfa/forms/LeadForms.xml" /> > > - </screenlet> > > - </container> > > - </decorator-section> > > - </decorator-screen> > > - </widgets> > > - </section> > > - </screen> > > > > <screen name="LeadPartyDataSource"> > > <section> > > > > Modified: ofbiz/trunk/applications/marketing/widget/sfa/ > > LookupScreens.xml > > URL: > > http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/LookupScreens.xml?rev=832694&r1=832693&r2=832694&view=diff > > = > > = > > = > > = > > = > > = > > = > > = > > ====================================================================== > > --- ofbiz/trunk/applications/marketing/widget/sfa/LookupScreens.xml > > (original) > > +++ ofbiz/trunk/applications/marketing/widget/sfa/LookupScreens.xml > > Wed Nov 4 10:10:14 2009 > > @@ -27,6 +27,7 @@ > > <property-map resource="CommonUiLabels" map- > > name="uiLabelMap" global="true"/> > > <property-map resource="PartyUiLabels" map- > > name="uiLabelMap" global="true"/> > > <property-map resource="MarketingUiLabels" map- > > name="uiLabelMap" global="true"/> > > + <property-map resource="OrderUiLabels" map- > > name="uiLabelMap" global="true"/> > > <set field="partyRelationshipTypeId" > > value="LEAD_OWNER"/> > > <set field="title" value="$ > > {uiLabelMap.SfaFindLeads}"/> > > <set field="partyTypeId" value="PERSON"/> > > @@ -36,12 +37,10 @@ > > <widgets> > > <decorator-screen name="LookupDecorator" > > location="component://common/widget/CommonScreens.xml"> > > <decorator-section name="search-options"> > > - <platform-specific> > > - <html><html-template > > location="component://marketing/webapp/sfa/party/findSfaParty.ftl"/ > > ></html> > > - </platform-specific> > > + <include-form name="FindLeads" > > location="component://marketing/widget/sfa/forms/LeadForms.xml"/> > > </decorator-section> > > <decorator-section name="search-results"> > > - <include-form name="listLookupParty" > > location="component://marketing/widget/sfa/forms/LookupForms.xml"/> > > + <include-form name="listLookupLead" > > location="component://marketing/widget/sfa/forms/LookupForms.xml"/> > > </decorator-section> > > </decorator-screen> > > </widgets> > > @@ -53,6 +52,7 @@ > > <property-map resource="CommonUiLabels" map- > > name="uiLabelMap" global="true"/> > > <property-map resource="PartyUiLabels" map- > > name="uiLabelMap" global="true"/> > > <property-map resource="MarketingUiLabels" map- > > name="uiLabelMap" global="true"/> > > + <property-map resource="OrderUiLabels" map- > > name="uiLabelMap" global="true"/> > > <set field="partyRelationshipTypeId" value="ACCOUNT"/> > > <set field="title" value="$ > > {uiLabelMap.SfaFindAccounts}"/> > > <set field="partyTypeId" value="PARTY_GROUP"/> > > @@ -62,12 +62,10 @@ > > <widgets> > > <decorator-screen name="LookupDecorator" > > location="component://common/widget/CommonScreens.xml"> > > <decorator-section name="search-options"> > > - <platform-specific> > > - <html><html-template > > location="component://marketing/webapp/sfa/party/findSfaParty.ftl"/ > > ></html> > > - </platform-specific> > > + <include-form name="FindAccounts" > > location="component://marketing/widget/sfa/forms/AccountForms.xml"/> > > </decorator-section> > > <decorator-section name="search-results"> > > - <include-form name="listLookupParty" > > location="component://marketing/widget/sfa/forms/LookupForms.xml"/> > > + <include-form name="listLookupAccount" > > location="component://marketing/widget/sfa/forms/LookupForms.xml"/> > > </decorator-section> > > </decorator-screen> > > </widgets> > > > > Modified: ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml > > URL: > > http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml?rev=832694&r1=832693&r2=832694&view=diff > > = > > = > > = > > = > > = > > = > > = > > = > > ====================================================================== > > --- ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml > > (original) > > +++ ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml Wed > > Nov 4 10:10:14 2009 > > @@ -58,6 +58,24 @@ > > <parameter param-name="statusId" value="COM_PENDING"/> > > </link> > > </menu-item> > > + <menu-item name="reply" title="${uiLabelMap.PartyReply}"> > > + <link target="/partymgr/control/ > > NewDraftCommunicationEvent" url-mode="inter-app" link-type="hidden- > > form"> > > + <parameter param-name="parentCommEventId" from- > > field="parameters.communicationEventId"/> > > + <parameter param-name="my" value="My"/> > > + <parameter param-name="statusId" > > value="COM_PENDING"/> > > + <parameter param-name="partyIdFrom" from- > > field="userLogin.partyId"/> > > + <parameter param-name="action" value="REPLY"/> > > + </link> > > + </menu-item> > > + <menu-item name="replyAll" title="$ > > {uiLabelMap.PartyReplyAll}"> > > + <link target="/partymgr/control/ > > NewDraftCommunicationEvent" url-mode="inter-app" link-type="hidden- > > form"> > > + <parameter param-name="parentCommEventId" from- > > field="parameters.communicationEventId"/> > > + <parameter param-name="my" value="My"/> > > + <parameter param-name="statusId" > > value="COM_PENDING"/> > > + <parameter param-name="partyIdFrom" from- > > field="userLogin.partyId"/> > > + <parameter param-name="action" value="REPLYALL"/> > > + </link> > > + </menu-item> > > </menu> > > > > <menu name="AccountTabBar" extends="CommonTabBarMenu" extends- > > resource="component://common/widget/CommonMenus.xml"> > > > > Modified: ofbiz/trunk/applications/marketing/widget/sfa/forms/ > > AccountForms.xml > > URL: > > http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/forms/AccountForms.xml?rev=832694&r1=832693&r2=832694&view=diff > > = > > = > > = > > = > > = > > = > > = > > = > > ====================================================================== > > --- ofbiz/trunk/applications/marketing/widget/sfa/forms/ > > AccountForms.xml (original) > > +++ ofbiz/trunk/applications/marketing/widget/sfa/forms/ > > AccountForms.xml Wed Nov 4 10:10:14 2009 > > @@ -66,17 +66,8 @@ > > <field name="emailAddress" title="$ > > {uiLabelMap.CommonEmail}"><text size="50" maxlength="60"/></field> > > <field name="submitButton" title="${uiLabelMap.CommonSave}" > > widget-style="smallSubmit"><submit button-type="button"/></field> > > </form> > > - > > - <form name="AssignAccountToMe" type="single" > > target="createPartyRelationship"> > > - <field name="partyIdFrom"><hidden value="$ > > {userLogin.partyId}"/></field> > > - <field name="roleTypeIdFrom"><hidden value="OWNER"/></field> > > - <field name="roleTypeIdTo"><hidden value="ACCOUNT"/></field> > > - <field name="partyRelationshipTypeId"><hidden > > value="ACCOUNT"/></field> > > - <field name="partyId" parameter-name="partyIdTo"><lookup > > target-form-name="LookupAccount"/></field> > > - <field name="assign"><submit/></field> > > - </form> > > > > - <form name="FindAccounts" id="FindAccounts" > > target="FindAccounts" title="" type="single" default-map- > > name="parameters" > > + <form name="FindAccounts" id="FindAccounts" target="$ > > {currentUrl}" title="" type="single" default-map-name="parameters" > > header-row-style="header-row" default-table-style="basic- > > table"> > > <field name="all"><hidden/></field> > > <field name="partyId" title="$ > > {uiLabelMap.PartyPartyId}"><text-find/></field> > > @@ -93,11 +84,13 @@ > > <submit button-type="button"/> > > </field> > > </form> > > - <form name="ListAccounts" type="list" paginate- > > target="FindAccounts" list-name="listIt" > > + <form name="listAccounts" paginate-target="${currentUrl}" > > type="list" list-name="listIt" > > odd-row-style="alternate-row" header-row-style="header- > > row-2" default-table-style="basic-table hover-bar" separate- > > columns="true"> > > <actions> > > <set field="roleTypeIdFrom" value="OWNER"/> > > <set field="roleTypeIdTo" value="ACCOUNT"/> > > + <set field="parameters.statusId" value="PARTY_DISABLED"/> > > + <set field="parameters.statusId_op" value="notEqual"/> > > <set field="partyRelationshipTypeId" value="ACCOUNT"/> > > <set field="parameters.roleTypeId" from- > > field="roleTypeIdTo"/> > > <set field="fieldList" value="${groovy: > > ["partyId","roleTypeId"]}" type="List"/> > > @@ -115,30 +108,56 @@ > > <entity-one entity-name="Party" value-field="party"> > > <field-map field-name="partyId"/> > > </entity-one> > > - <set field="partyType" default-value="$ > > {groovy:party > > .getRelatedOne("PartyType").get("description", > > locale)}"/> > > <set field="partyName" value="$ > > {groovy:org.ofbiz.party.party.PartyHelper.getPartyName(party, > > true)}"/> > > - <set field="partyStatusId" from-field="party.statusId"/> > > + <entity-and entity-name="PartyAndContactMech" > > list="emailAddresses" filter-by-date="true"> > > + <field-map field-name="partyId"/> > > + <field-map field-name="contactMechTypeId" > > value="EMAIL_ADDRESS"/> > > + </entity-and> > > + <entity-and entity-name="PartyAndContactMech" > > list="telecomNumbers" filter-by-date="true"> > > + <field-map field-name="partyId"/> > > + <field-map field-name="contactMechTypeId" > > value="TELECOM_NUMBER"/> > > + </entity-and> > > + <set field="telecomNumber" from- > > field="telecomNumbers[0]" type="Object"/> > > + <entity-and entity-name="PartyAndContactMech" > > list="postalAddresses" filter-by-date="true"> > > + <field-map field-name="partyId"/> > > + <field-map field-name="contactMechTypeId" > > value="POSTAL_ADDRESS"/> > > + </entity-and> > > + <set field="postalAddress" from- > > field="postalAddresses[0]" type="Object"/> > > <entity-and entity-name="PartyRelationship" > > list="existRelationships" filter-by-date="true"> > > <field-map field-name="roleTypeIdTo"/> > > <field-map field-name="partyRelationshipTypeId"/> > > <field-map field-name="partyIdFrom" from- > > field="userLogin.partyId"/> > > <field-map field-name="partyIdTo" from- > > field="partyId"/> > > </entity-and> > > + <set field="countryGeoId" from- > > field="postalAddress.paCountryGeoId"/> > > + <entity-and entity-name="PartyRelationship" > > list="relatedCompanies" filter-by-date="true"> > > + <field-map field-name="partyIdTo" from- > > field="partyId"/> > > + <field-map field-name="roleTypeIdFrom" > > value="ACCOUNT"/> > > + <field-map field-name="roleTypeIdTo" > > value="CONTACT"/> > > + </entity-and> > > + <set field="relatedCompanyPartyId" from- > > field="relatedCompanies[0].partyIdFrom" type="Object"/> > > <set field="existRelationship" from- > > field="existRelationships[0]"/> > > </row-actions> > > <field name="partyId" title="${uiLabelMap.PartyPartyId}"> > > - <hyperlink target="viewprofile" description="${partyId}"> > > + <hyperlink target="viewprofile" description="$ > > {partyName} [${partyId}]"> > > <parameter param-name="partyId"/> > > </hyperlink> > > </field> > > - <field name="partyName" title="${uiLabelMap.PartyName}"> > > - <hyperlink target="viewprofile" description="$ > > {partyName}"> > > - <parameter param-name="partyId"/> > > + <field name="emailAddress" title="$ > > {uiLabelMap.FormFieldTitle_emailAddress}"><display description="$ > > {emailAddresses[0].infoString}"/></field> > > + <field name="telecomNumber"> > > + <display description="${telecomNumber.tnCountryCode}-$ > > {telecomNumber.tnAreaCode}-${telecomNumber.tnContactNumber} $ > > {uiLabelMap.PartyContactExt} ${telecomNumber.tnExtension}"/> > > + </field> > > + <field name="city" title="$ > > {uiLabelMap.FormFieldTitle_city}"><display description="$ > > {postalAddress.paCity}"/></field> > > + <field name="countryGeoId" title="$ > > {uiLabelMap.FormFieldTitle_country}"> > > + <display-entity entity-name="Geo" description="$ > > {geoName}" key-field-name="geoId"/> > > + </field> > > + <field name="relatedCompany" use- > > when="relatedCompanyPartyId!=null" title="$ > > {uiLabelMap.PartyRelatedCompany}"> > > + <hyperlink target="viewprofile" description="$ > > {groovy:org > > .ofbiz > > .party > > .party > > .PartyHelper.getPartyName(delegator,relatedCompanyPartyId,true);} [$ > > {relatedCompanyPartyId}]"> > > + <parameter param-name="partyId" from- > > field="relatedCompanyPartyId"/> > > </hyperlink> > > </field> > > - <field name="partyType" title="${uiLabelMap.PartyType}"> > > - <display description="${partyType}"/> > > - </field> > > + </form> > > + <form name="ListAccounts" extends="listAccounts"> > > <field name="assignToMe" use- > > when="existRelationship==null&&! > > "false".equals(parameters.get("all"))" > > title="${uiLabelMap.SfaAssignToMe}" widget- > > style="buttontext"> > > <hyperlink target="createPartyRelationshipAndRole" > > description="${uiLabelMap.SfaAssignToMe}"> > > @@ -150,12 +169,15 @@ > > <parameter param-name="partyIdTo" from- > > field="partyId"/> > > </hyperlink> > > </field> > > + <field name="relatedCompany"><hidden/></field> > > </form> > > <form name="ListMyAccounts" extends="ListAccounts"> > > <actions> > > <set field="parameters.partyIdFrom" from- > > field="userLogin.partyId"/> > > <set field="parameters.roleTypeIdFrom" value="OWNER"/> > > <set field="parameters.roleTypeIdTo" value="ACCOUNT"/> > > + <set field="parameters.partyStatusId" > > value="PARTY_DISABLED"/> > > + <set field="parameters.partyStatusId_op" > > value="notEqual"/> > > <set field="parameters.partyRelationshipTypeId" > > value="ACCOUNT"/> > > <set field="fieldList" value="${groovy: > > ["partyIdFrom","partyId"]}" type="List"/> > > <service service-name="performFind" result-map="result" > > result-map-list="listIt"> > > > > Modified: ofbiz/trunk/applications/marketing/widget/sfa/forms/ > > ContactForms.xml > > URL: > > http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/forms/ContactForms.xml?rev=832694&r1=832693&r2=832694&view=diff > > = > > = > > = > > = > > = > > = > > = > > = > > ====================================================================== > > --- ofbiz/trunk/applications/marketing/widget/sfa/forms/ > > ContactForms.xml (original) > > +++ ofbiz/trunk/applications/marketing/widget/sfa/forms/ > > ContactForms.xml Wed Nov 4 10:10:14 2009 > > @@ -21,7 +21,7 @@ > > <forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > > > xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd > > "> > > > > - <form name="FindContacts" target="FindContacts" > > extends="FindAccounts" extends-resource="component://marketing/ > > widget/sfa/forms/AccountForms.xml"> > > + <form name="FindContacts" target="${currentUrl}" > > extends="FindAccounts" extends-resource="component://marketing/ > > widget/sfa/forms/AccountForms.xml"> > > <field name="groupName"><hidden/></field> > > <field name="firstName" title="$ > > {uiLabelMap.PartyFirstName}"><text-find/></field> > > <field name="lastName" title="$ > > {uiLabelMap.PartyLastName}"><text-find/></field> > > @@ -34,13 +34,15 @@ > > <sort-field name="submitButton"/> > > </sort-order> > > </form> > > - <form name="ListContacts" paginate-target="FindContacts" > > - extends="ListAccounts" extends-resource="component:// > > marketing/widget/sfa/forms/AccountForms.xml"> > > + <form name="ListContacts" paginate-target="${currentUrl}" > > + extends="listAccounts" extends-resource="component:// > > marketing/widget/sfa/forms/AccountForms.xml"> > > <actions> > > <set field="roleTypeIdFrom" value="ACCOUNT"/> > > <set field="roleTypeIdTo" value="CONTACT"/> > > <set field="partyRelationshipTypeId" value="EMPLOYMENT"/> > > <set field="parameters.roleTypeId" from- > > field="roleTypeIdTo"/> > > + <set field="parameters.statusId" value="PARTY_DISABLED"/> > > + <set field="parameters.statusId_op" value="notEqual"/> > > <set field="fieldList" value="${groovy: > > ["partyId","roleTypeId"]}" type="List"/> > > <service service-name="performFind" result-map="result" > > result-map-list="listIt"> > > <field-map field-name="inputFields" from- > > field="parameters"/> > > @@ -52,7 +54,6 @@ > > <field-map field-name="viewSize" from- > > field="viewSize"/> > > </service> > > </actions> > > - <field name="partyType"><hidden/></field> > > <field name="export" title="${uiLabelMap.SfaVCard}"> > > <hyperlink target="createVCardFromContact" description="$ > > {uiLabelMap.SfaVCard}"> > > <parameter param-name="partyId"/> > > @@ -60,7 +61,11 @@ > > </field> > > <sort-order> > > <sort-field name="partyId"/> > > - <sort-field name="partyName"/> > > + <sort-field name="emailAddress"/> > > + <sort-field name="telecomNumber"/> > > + <sort-field name="city"/> > > + <sort-field name="countryGeoId"/> > > + <sort-field name="relatedCompany"/> > > <sort-field name="export"/> > > <sort-field name="assignToMe"/> > > </sort-order> > > @@ -69,6 +74,8 @@ > > <actions> > > <set field="parameters.partyIdFrom" from- > > field="userLogin.partyId"/> > > <set field="parameters.roleTypeIdTo" value="CONTACT"/> > > + <set field="parameters.partyStatusId" > > value="PARTY_DISABLED"/> > > + <set field="parameters.partyStatusId_op" > > value="notEqual"/> > > <set field="parameters.partyRelationshipTypeId" > > value="EMPLOYMENT"/> > > <set field="fieldList" value="${groovy: > > ["partyIdFrom","partyId"]}" type="List"/> > > <service service-name="performFind" result-map="result" > > result-map-list="listIt"> > > > > Modified: ofbiz/trunk/applications/marketing/widget/sfa/forms/ > > LeadForms.xml > > URL: > > http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/forms/LeadForms.xml?rev=832694&r1=832693&r2=832694&view=diff > > = > > = > > = > > = > > = > > = > > = > > = > > ====================================================================== > > --- ofbiz/trunk/applications/marketing/widget/sfa/forms/ > > LeadForms.xml (original) > > +++ ofbiz/trunk/applications/marketing/widget/sfa/forms/ > > LeadForms.xml Wed Nov 4 10:10:14 2009 > > @@ -119,15 +119,6 @@ > > <field name="submitButton" title="$ > > {uiLabelMap.CommonUpload}" widget-style="smallSubmit"><submit button- > > type="button"/></field> > > </form> > > > > - <form name="AssignLeadToMe" type="single" > > target="createPartyRelationship"> > > - <field name="partyIdFrom"><hidden value="$ > > {userLogin.partyId}"/></field> > > - <field name="roleTypeIdFrom"><hidden value="OWNER"/></field> > > - <field name="roleTypeIdTo"><hidden value="LEAD"/></field> > > - <field name="partyRelationshipTypeId"><hidden > > value="LEAD_OWNER"/></field> > > - <field name="partyId" parameter-name="partyIdTo"><lookup > > target-form-name="LookupLead"/></field> > > - <field name="assign"><submit/></field> > > - </form> > > - > > <form name="QuickAddLead" type="single" target="quickAddLead"> > > <field name="firstName" title="$ > > {uiLabelMap.PartyFirstName}*" widget-style="required"><text > > size="15"/></field> > > <field name="lastName" title="${uiLabelMap.PartyLastName}*" > > widget-style="required"><text size="15"/></field> > > @@ -164,7 +155,7 @@ > > > > </form> > > > > - <form name="FindLeads" target="FindLeads" > > extends="FindAccounts" extends-resource="component://marketing/ > > widget/sfa/forms/AccountForms.xml"> > > + <form name="FindLeads" target="${currentUrl}" > > extends="FindAccounts" extends-resource="component://marketing/ > > widget/sfa/forms/AccountForms.xml"> > > <field name="firstName" title="$ > > {uiLabelMap.PartyFirstName}"><text-find/></field> > > <field name="lastName" title="$ > > {uiLabelMap.PartyLastName}"><text-find/></field> > > <sort-order> > > @@ -177,11 +168,13 @@ > > <sort-field name="submitButton"/> > > </sort-order> > > </form> > > - <form name="ListLeads" paginate-target="FindLeads" > > - extends="ListAccounts" extends-resource="component:// > > marketing/widget/sfa/forms/AccountForms.xml"> > > + <form name="listLeads" paginate-target="${currentUrl}" > > + extends="listAccounts" extends-resource="component:// > > marketing/widget/sfa/forms/AccountForms.xml"> > > <actions> > > <set field="roleTypeIdFrom" value="OWNER"/> > > <set field="roleTypeIdTo" value="LEAD"/> > > + <set field="parameters.statusId" value="PARTY_DISABLED"/> > > + <set field="parameters.statusId_op" value="notEqual"/> > > <set field="partyRelationshipTypeId" value="LEAD_OWNER"/> > > <set field="parameters.roleTypeId" from- > > field="roleTypeIdTo"/> > > <set field="fieldList" value="${groovy: > > ["partyId","roleTypeId"]}" type="List"/> > > @@ -195,14 +188,26 @@ > > <field-map field-name="viewSize" from- > > field="viewSize"/> > > </service> > > </actions> > > - <field name="partyType"><hidden/></field> > > - <field name="partyStatusId" field-name="statusId" title="$ > > {uiLabelMap.CommonStatus}"> > > - <display-entity entity-name="StatusItem"/> > > + </form> > > + <form name="ListLeads" extends="listLeads"> > > + <field name="assignToMe" use- > > when="existRelationship==null&&! > > "false".equals(parameters.get("all"))" > > + title="${uiLabelMap.SfaAssignToMe}" widget- > > style="buttontext"> > > + <hyperlink target="createPartyRelationshipAndRole" > > description="${uiLabelMap.SfaAssignToMe}"> > > + <parameter param-name="partyId" from- > > field="userLogin.partyId"/> > > + <parameter param-name="roleTypeId" from- > > field="roleTypeIdFrom"/> > > + <parameter param-name="roleTypeIdFrom"/> > > + <parameter param-name="roleTypeIdTo"/> > > + <parameter param-name="partyRelationshipTypeId"/> > > + <parameter param-name="partyIdTo" from- > > field="partyId"/> > > + </hyperlink> > > </field> > > <sort-order> > > <sort-field name="partyId"/> > > - <sort-field name="partyName"/> > > - <sort-field name="partyStatusId"/> > > + <sort-field name="emailAddress"/> > > + <sort-field name="telecomNumber"/> > > + <sort-field name="city"/> > > + <sort-field name="countryGeoId"/> > > + <sort-field name="relatedCompany"/> > > <sort-field name="assignToMe"/> > > </sort-order> > > </form> > > @@ -210,6 +215,8 @@ > > <actions> > > <set field="parameters.partyIdFrom" from- > > field="userLogin.partyId"/> > > <set field="parameters.roleTypeIdTo" value="LEAD"/> > > + <set field="parameters.partyStatusId" > > value="PARTY_DISABLED"/> > > + <set field="parameters.partyStatusId_op" > > value="notEqual"/> > > <set field="parameters.partyRelationshipTypeId" > > value="LEAD_OWNER"/> > > <set field="fieldList" value="${groovy: > > ["partyIdFrom","partyId"]}" type="List"/> > > <service service-name="performFind" result-map="result" > > result-map-list="listIt"> > > > > Modified: ofbiz/trunk/applications/marketing/widget/sfa/forms/ > > LookupForms.xml > > URL: > > http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/forms/LookupForms.xml?rev=832694&r1=832693&r2=832694&view=diff > > = > > = > > = > > = > > = > > = > > = > > = > > ====================================================================== > > --- ofbiz/trunk/applications/marketing/widget/sfa/forms/ > > LookupForms.xml (original) > > +++ ofbiz/trunk/applications/marketing/widget/sfa/forms/ > > LookupForms.xml Wed Nov 4 10:10:14 2009 > > @@ -21,18 +21,16 @@ > > <forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > > > xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd > > "> > > > > - <form name="listLookupParty" type="list" list-name="partyList" > > list-entry-name="partyRow" paginate-target="${currentUrl}" > > - odd-row-style="alternate-row" default-table-style="basic- > > table hover-bar"> > > - <row-actions> > > - <entity-one entity-name="PartyNameView" value- > > field="partyName"> > > - <field-map field-name="partyId" from- > > field="partyRow.partyId"/> > > - </entity-one> > > - </row-actions> > > - <!--<auto-fields-entity entity-name="PartyNameView" default- > > field-type="display"/>--> > > - <field name="partyId" title="${uiLabelMap.PartyPartyId}" > > widget-style="smallSubmit"> > > - <hyperlink also-hidden="false" target-type="plain" > > description="${partyRow.partyId}" target="javascript:set_value('$ > > {partyRow.partyId}')"/> > > + <form name="listLookupAccount" extends="listAccounts" extends- > > resource="component://marketing/widget/sfa/forms/AccountForms.xml"> > > + <field name="partyId"> > > + <hyperlink also-hidden="false" target-type="plain" > > description="${partyName} [${partyId}]" > > target="javascript:set_value('${partyId}')"/> > > </field> > > - <field name="partyName" title="$ > > {uiLabelMap.PartyName}"><display description="${partyName.lastName}$ > > {partyName.groupName} ${partyName.firstName}"/></field> > > + <field name="relatedCompany"><hidden/></field> > > + </form> > > + <form name="listLookupLead" extends="listLeads" extends- > > resource="component://marketing/widget/sfa/forms/LeadForms.xml"> > > + <field name="partyId"> > > + <hyperlink also-hidden="false" target-type="plain" > > description="${partyName} [${partyId}]" > > target="javascript:set_value('${partyId}')"/> > > + </field> > > + <field name="relatedCompany"><hidden/></field> > > </form> > > - > > </forms> > > \ No newline at end of file > > > > Modified: ofbiz/trunk/applications/party/entitydef/entitymodel.xml > > URL: > > http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/entitydef/entitymodel.xml?rev=832694&r1=832693&r2=832694&view=diff > > = > > = > > = > > = > > = > > = > > = > > = > > ====================================================================== > > --- ofbiz/trunk/applications/party/entitydef/entitymodel.xml > > (original) > > +++ ofbiz/trunk/applications/party/entitydef/entitymodel.xml Wed > > Nov 4 10:10:14 2009 > > @@ -2370,6 +2370,7 @@ > > <member-entity entity-alias="PTYCM" entity- > > name="PartyAndContactMech"/> > > <alias-all entity-alias="PTYREL"/> > > <alias-all entity-alias="PTYCM"/> > > + <alias entity-alias="PTYCM" field="statusId" > > name="partyStatusId"/> > > <view-link entity-alias="PTYREL" rel-entity-alias="PTYCM" > > rel-optional="true"> > > <key-map field-name="partyIdTo" rel-field-name="partyId"/> > > </view-link> > > > > Modified: ofbiz/trunk/applications/party/widget/partymgr/ > > PartyForms.xml > > URL: > > http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml?rev=832694&r1=832693&r2=832694&view=diff > > = > > = > > = > > = > > = > > = > > = > > = > > ====================================================================== > > --- ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml > > (original) > > +++ ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml > > Wed Nov 4 10:10:14 2009 > > @@ -1025,7 +1025,11 @@ > > <field name="toPartyId"><display/></field> > > </form> > > <form name="PartySalesOpportunities" type="list" list- > > name="salesOpportunities" default-table-style="basic-table hover-bar"> > > - <field name="salesOpportunityId"><display/></field> > > + <field name="salesOpportunityId"> > > + <hyperlink target="ViewSalesOpportunity" description="$ > > {salesOpportunityId}"> > > + <parameter param-name="salesOpportunityId"/> > > + </hyperlink> > > + </field> > > <field name="opportunityName"><display/></field> > > <field name="estimatedAmount"><display/></field> > > <field name="partyId"><display/></field> > > > > Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/ > > FindServices.java > > URL: > > http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java?rev=832694&r1=832693&r2=832694&view=diff > > = > > = > > = > > = > > = > > = > > = > > = > > ====================================================================== > > --- ofbiz/trunk/framework/common/src/org/ofbiz/common/ > > FindServices.java (original) > > +++ ofbiz/trunk/framework/common/src/org/ofbiz/common/ > > FindServices.java Wed Nov 4 10:10:14 2009 > > @@ -40,6 +40,7 @@ > > import org.ofbiz.base.util.UtilMisc; > > import org.ofbiz.base.util.UtilProperties; > > import org.ofbiz.entity.Delegator; > > +import org.ofbiz.entity.GenericEntity; > > import org.ofbiz.entity.GenericEntityException; > > import org.ofbiz.entity.GenericValue; > > import org.ofbiz.entity.condition.EntityComparisonOperator; > > @@ -219,6 +220,9 @@ > > // If it is an "op" field, it will > > be "equals", "greaterThan", etc. > > EntityExpr cond = null; > > List<EntityCondition> tmpList = FastList.newInstance(); > > + EntityExpr nullCond = null; > > + EntityCondition orCond = null; > > + List<EntityCondition> tmpOrList = null; > > String opString = null; > > String ignoreCase = null; > > int count = 0; > > @@ -299,7 +303,17 @@ > > } else { > > cond = EntityCondition.makeCondition(fieldName, > > (EntityComparisonOperator) fieldOp, fieldObject); > > } > > - tmpList.add(cond); > > + > > + if (EntityOperator.NOT_EQUAL.equals(fieldOp) && ! > > fieldObject.equals(GenericEntity.NULL_FIELD.toString())) { > > + tmpOrList = FastList.newInstance(); > > + tmpOrList.add(cond); > > + nullCond = EntityCondition.makeCondition(fieldName, > > null); > > + tmpOrList.add(nullCond); > > + orCond = EntityCondition.makeCondition(tmpOrList, > > EntityOperator.OR); > > + tmpList.add(orCond); > > + } else { > > + tmpList.add(cond); > > + } > > count++; > > > > // Repeat above operations if there is a "range" - > > second value > > > > > -- Antwebsystems.com: Quality OFBiz services for competitive rates
