Author: hansbak
Date: Tue Sep 20 06:25:58 2011 New Revision: 1172990 URL: http://svn.apache.org/viewvc?rev=1172990&view=rev Log: show communications of the party of the opportunity the same organization as the opportunity itself Modified: ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml ofbiz/trunk/applications/marketing/widget/sfa/OpportunityScreens.xml ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml 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=1172990&r1=1172989&r2=1172990&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml Tue Sep 20 06:25:58 2011 @@ -299,6 +299,8 @@ under the License. <view-map name="LookupLeads" type="screen" page="component://marketing/widget/sfa/LookupScreens.xml#LookupLeads"/> <view-map name="LookupAccounts" type="screen" page="component://marketing/widget/sfa/LookupScreens.xml#LookupAccounts"/> <view-map name="LookupAccountLeads" type="screen" page="component://marketing/widget/sfa/LookupScreens.xml#LookupAccountLeads"/> + + <view-map name="ListPartyCommEvents" type="screen" page="component://marketing/widget/sfa/OpportunityScreens.xml#OpportunityCommEvent"/> <!-- end of view mappings --> </site-conf> Modified: ofbiz/trunk/applications/marketing/widget/sfa/OpportunityScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/OpportunityScreens.xml?rev=1172990&r1=1172989&r2=1172990&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/widget/sfa/OpportunityScreens.xml (original) +++ ofbiz/trunk/applications/marketing/widget/sfa/OpportunityScreens.xml Tue Sep 20 06:25:58 2011 @@ -117,4 +117,45 @@ under the License. </widgets> </section> </screen> + + <screen name="OpportunityCommEvent"> + <section> + <actions> + <set field="titleProperty" value="PageTitleListCommunications"/> + <set field="tabButtonItem" value="PartyCommEvents"/> + <set field="subTabButtonItem" value="CommunicationEvent"/> + <set field="salesOpportunityId" from-field="parameters.salesOpportunityId"/> + <service service-name="findPartyInSalesOpportunityRole" result-map="leadPartyResult"> + <field-map field-name="salesOpportunityId" from-field="parameters.salesOpportunityId"/> + <field-map field-name="roleTypeId" value="LEAD"/> + </service> + <set field="partyId" from-field="leadPartyResult.partyId" default-value="${parameters.partyId}"/> + <entity-and entity-name="Party" list="partyperson"> + <field-map field-name="partyId" from-field="partyId"/> + <field-map field-name="partyTypeId" value="PERSON"/> + </entity-and> + <entity-condition entity-name="CommunicationEventAndRole" list="commEvents"> + <condition-expr field-name="partyId" operator="equals" value="${partyId}"/> + <order-by field-name="-entryDate"/> + </entity-condition> + <entity-and list="contacts" entity-name="PartyRelationship" filter-by-date="true"> + <field-map field-name="partyIdFrom" from-field="partyId"/> + <field-map field-name="roleTypeIdFrom" value="ACCOUNT"/> + <field-map field-name="roleTypeIdTo" value="CONTACT"/> + <order-by field-name="partyIdTo"/> + </entity-and> + </actions> + <widgets> + <decorator-screen name="CommonOpportunityDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <include-menu location="component://party/widget/partymgr/PartyMenus.xml" name="CommEventTabBar"/> + <include-menu location="component://party/widget/partymgr/PartyMenus.xml" name="CommSubTabBar"/> + <screenlet title="${uiLabelMap.PageTitleListCommunications} ${partyId}"> + <include-form location="component://party/widget/partymgr/CommunicationEventForms.xml" name="ListCommEvents"/> + </screenlet> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> </screens> Modified: ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml?rev=1172990&r1=1172989&r2=1172990&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml (original) +++ ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml Tue Sep 20 06:25:58 2011 @@ -46,6 +46,16 @@ under the License. </link> </menu-item> <menu-item name="PartyCommEvents" title="${uiLabelMap.PartyCommunications}"> + <condition> + <and> + <not><if-empty field="parameters.salesOpportunityId"/></not> + <or> + <not><if-empty field="leadPartyId"/></not> + <not><if-empty field="leadParty.leadPartyId"/></not> + <not><if-empty field="partyId"/></not> + </or> + </and> + </condition> <link target="ListPartyCommEvents"> <parameter param-name="salesOpportunityId" from-field="parameters.salesOpportunityId"/> </link> |
Free forum by Nabble | Edit this page |