Author: hansbak
Date: Thu Oct 1 09:00:19 2009 New Revision: 820578 URL: http://svn.apache.org/viewvc?rev=820578&view=rev Log: create a sales opportunity from a incoming email and be able to list related communication events on a sales opportunity Modified: ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml ofbiz/trunk/applications/marketing/webapp/sfa/party/findContactParty.ftl ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml ofbiz/trunk/applications/marketing/widget/sfa/ContactScreens.xml ofbiz/trunk/applications/marketing/widget/sfa/OpportunityScreens.xml ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml ofbiz/trunk/applications/marketing/widget/sfa/forms/OpportunityForms.xml ofbiz/trunk/applications/order/script/org/ofbiz/order/opportunity/OpportunityServices.xml ofbiz/trunk/applications/party/config/PartyUiLabels.xml ofbiz/trunk/applications/party/widget/partymgr/CommonScreens.xml ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventScreens.xml ofbiz/trunk/applications/party/widget/partymgr/PartyMenus.xml ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml ofbiz/trunk/specialpurpose/myportal/webapp/myportal/WEB-INF/controller.xml ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml Modified: ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml?rev=820578&r1=820577&r2=820578&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml (original) +++ ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml Thu Oct 1 09:00:19 2009 @@ -2000,4 +2000,7 @@ <value xml:lang="fr">vCard</value> <value xml:lang="it">vCard</value> </property> + <property key="SfaOpportunityCommunications"> + <value xml:lang="en">Opportunity Communications</value> + </property> </resource> Modified: ofbiz/trunk/applications/marketing/webapp/sfa/party/findContactParty.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/sfa/party/findContactParty.ftl?rev=820578&r1=820577&r2=820578&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/webapp/sfa/party/findContactParty.ftl (original) +++ ofbiz/trunk/applications/marketing/webapp/sfa/party/findContactParty.ftl Thu Oct 1 09:00:19 2009 @@ -42,6 +42,7 @@ <input type="hidden" name="lookupFlag" value="Y"/> <input type="hidden" name="hideFields" value="Y"/> <input type="hidden" name="roleTypeId" value="${roleTypeId}"/> + <input type="hidden" name="partyRelationshipTypeId" value="${partyRelationshipTypeId?if_exists}"/> <table cellspacing="0"> <tr> <td class="label">${uiLabelMap.PartyContactInformation}</td> Modified: ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml?rev=820578&r1=820577&r2=820578&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml (original) +++ ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml Thu Oct 1 09:00:19 2009 @@ -394,4 +394,47 @@ </widgets> </section> </screen> + <screen name="CommonCommunicationEventDecorator"> + <section> + <condition> + <if-empty field="parameters.partyId"/> + </condition> + <widgets> + <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <section> + <widgets> + <section> + <widgets> + <include-menu name="OpportunityTabBar" location="component://marketing/widget/sfa/SfaMenus.xml"/> + </widgets> + </section> + <decorator-section-include name="body"/> + </widgets> + </section> + </decorator-section> + </decorator-screen> + </widgets> + <fail-widgets> + <section> + <actions> + <set field="headerItem" from-field="parameters.headerItem"/> + </actions> + <widgets> + <decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <container style="screenlet-body"> + <container style="no-clear"> + <screenlet title="${uiLabelMap.PageTitleListCommunications}"> + <decorator-section-include name="body"/> + </screenlet> + </container> + </container> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </fail-widgets> + </section> + </screen> </screens> Modified: ofbiz/trunk/applications/marketing/widget/sfa/ContactScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/ContactScreens.xml?rev=820578&r1=820577&r2=820578&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/widget/sfa/ContactScreens.xml (original) +++ ofbiz/trunk/applications/marketing/widget/sfa/ContactScreens.xml Thu Oct 1 09:00:19 2009 @@ -23,6 +23,7 @@ <screen name="FindContacts"> <section> <actions> + <set field="partyRelationshipTypeId" value="CONTACT_REL"/> <set field="roleTypeId" value="CONTACT"/> <set field="partyTypeId" value="PERSON"/> <set field="headerItem" value="Contacts"/> Modified: ofbiz/trunk/applications/marketing/widget/sfa/OpportunityScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/OpportunityScreens.xml?rev=820578&r1=820577&r2=820578&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/widget/sfa/OpportunityScreens.xml (original) +++ ofbiz/trunk/applications/marketing/widget/sfa/OpportunityScreens.xml Thu Oct 1 09:00:19 2009 @@ -78,12 +78,18 @@ <field-map field-name="salesOpportunityId" from-field="parameters.salesOpportunityId"/> <field-map field-name="roleTypeId" value="ACCOUNT"/> </service> - <set field="accountPartyId" from-field="accountPartyResult.partyId"/> <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="leadPartyId" from-field="leadPartyResult.partyId"/> + <entity-one entity-name="CommunicationEvent" value-field="communicationEvent"/> + <entity-and entity-name="PartyRelationshipAndDetail" list="partyAccount"> + <field-map field-name="partyIdTo" from-field="communicationEvent.partyIdFrom"/> + <field-map field-name="roleTypeIdFrom" value="ACCOUNT"/> + <field-map field-name="roleTypeIdTo" value="CONTACT"/> + </entity-and> + <set field="accountPartyId" from-field="accountPartyResult.partyId" default-value="${partyAccount[0].partyIdFrom}"/> </actions> <widgets> <decorator-screen name="CommonOpportunityDecorator" location="${parameters.mainDecoratorLocation}"> Modified: ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml?rev=820578&r1=820577&r2=820578&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml (original) +++ ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml Thu Oct 1 09:00:19 2009 @@ -40,6 +40,11 @@ <parameter param-name="salesOpportunityId" from-field="parameters.salesOpportunityId"/> </link> </menu-item> + <menu-item name="ViewOpportunityCommEvent" title="${uiLabelMap.PartyCommunications}"> + <link target="ListPartyCommEvents"> + <parameter param-name="salesOpportunityId" from-field="parameters.salesOpportunityId"/> + </link> + </menu-item> </menu> <menu name="AccountTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> @@ -57,6 +62,15 @@ <menu-item name="AssignAccountToMe" title="${uiLabelMap.PageTitleAssignAccountFromExisting}"> <link target="AssignAccountToMe"/> </menu-item> + <menu-item name="ViewSfaCommEvent" title="${uiLabelMap.PartyCommunications}"> + <condition> + <not><if-empty field="partyId"/></not> + </condition> + <link target="ListPartyCommEvents"> + <parameter param-name="partyId" from-field="partyId"/> + <parameter param-name="headerItem" value="Accounts"/> + </link> + </menu-item> </menu> <menu name="LeadTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> @@ -97,6 +111,15 @@ <menu-item name="AssignLeadToMe" title="${uiLabelMap.PageTitleAssignLeadFromExisting}"> <link target="AssignLeadToMe"/> </menu-item> + <menu-item name="ViewSfaCommEvent" title="${uiLabelMap.PartyCommunications}"> + <condition> + <not><if-empty field="partyId"/></not> + </condition> + <link target="ListPartyCommEvents"> + <parameter param-name="partyId" from-field="partyId"/> + <parameter param-name="headerItem" value="Leads"/> + </link> + </menu-item> </menu> <menu name="ContactTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> @@ -117,6 +140,15 @@ <menu-item name="NewContactFromVCard" title="${uiLabelMap.SfaCreateContactFromVCard}"> <link target="NewContactFromVCard"/> </menu-item> + <menu-item name="ViewSfaCommEvent" title="${uiLabelMap.PartyCommunications}"> + <condition> + <not><if-empty field="partyId"/></not> + </condition> + <link target="ListPartyCommEvents"> + <parameter param-name="partyId" from-field="partyId"/> + <parameter param-name="headerItem" value="Contacts"/> + </link> + </menu-item> </menu> <menu name="SalesForecastTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> <menu-item name="EditSalesForecast" title="${uiLabelMap.SfaSalesForecast}"> Modified: ofbiz/trunk/applications/marketing/widget/sfa/forms/OpportunityForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/forms/OpportunityForms.xml?rev=820578&r1=820577&r2=820578&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/widget/sfa/forms/OpportunityForms.xml (original) +++ ofbiz/trunk/applications/marketing/widget/sfa/forms/OpportunityForms.xml Thu Oct 1 09:00:19 2009 @@ -76,16 +76,19 @@ header-row-style="header-row" default-table-style="basic-table"> <alt-target use-when="salesOpportunity==null" target="createSalesOpportunity"/> <auto-fields-service service-name="createSalesOpportunity"/> - <field use-when="salesOpportunity!=null" name="salesOpportunityId" tooltip="${uiLabelMap.CommonNotModifRecreat}"><display/></field> - <field use-when="salesOpportunity==null&&salesOpportunityId==null" name="salesOpportunityId"><text/></field> - <field use-when="salesOpportunity==null&&salesOpportunityId!=null" name="salesOpportunityId" tooltip="${uiLabelMap.CommonCannotBeFound}: [${salesOpportunityId}]"><display/></field> - - <field name="opportunityName" title="${uiLabelMap.SfaOpportunityName}" widget-style="required"><text size="30"/></field> - - <field name="leadPartyId" title="${uiLabelMap.SfaLead}" widget-style="required"><lookup target-form-name="LookupLeads" default-value="${leadPartyId}"/></field> - <field name="accountPartyId" title="${uiLabelMap.SfaInitialAccount}" ><lookup target-form-name="LookupAccounts" default-value="${accountPartyId}"/></field> + <field name="salesOpportunityId" use-when="salesOpportunity!=null" tooltip="${uiLabelMap.CommonNotModifRecreat}"><display/></field> + <field name="salesOpportunityId" use-when="salesOpportunity==null&&salesOpportunityId==null"><text/></field> + <field name="salesOpportunityId" use-when="salesOpportunity==null&&salesOpportunityId!=null" tooltip="${uiLabelMap.CommonCannotBeFound}: [${salesOpportunityId}]"><display/></field> + + <field name="opportunityName" use-when="communicationEvent==null&&salesOpportunityId==null" title="${uiLabelMap.SfaOpportunityName}" widget-style="required"><text size="25"/></field> + <field name="opportunityName" use-when="communicationEvent!=null" title="${uiLabelMap.SfaOpportunityName}"><text default-value="${communicationEvent.subject}" size="30"/></field> + + <field name="leadPartyId" use-when="communicationEvent==null" title="${uiLabelMap.SfaLead}" widget-style="required"><lookup target-form-name="LookupLeads" default-value="${leadPartyId}"/></field> + <field name="leadPartyId" use-when="communicationEvent!=null" title="${uiLabelMap.SfaLead}" widget-style="required"><lookup target-form-name="LookupLeads" default-value="${communicationEvent.partyIdFrom}"/></field> + <field name="accountPartyId" use-when="communicationEvent==null" title="${uiLabelMap.SfaInitialAccount}" ><lookup target-form-name="LookupAccounts" default-value="${accountPartyId}"/></field> + <field name="accountPartyId" use-when="communicationEvent!=null" title="${uiLabelMap.SfaInitialAccount}" ><lookup target-form-name="LookupAccounts" default-value="${accountPartyId}"/></field> <field name="typeEnumId" title="${uiLabelMap.SfaType}"></field> - <field name="opportunityName" title="${uiLabelMap.SfaOpportunityName}" widget-style="required"><text size="25"></text></field> + <field name="estimatedAmount" position="1" title="${uiLabelMap.SfaEstimatedAmount}"><text size="25"/></field> <field name="currencyUomId" position="2" title="${uiLabelMap.CommonCurrency}"> <drop-down allow-empty="true" no-current-selected-key="${defaultOrganizationPartyCurrencyUomId}"> @@ -97,7 +100,7 @@ </field> <field name="estimatedProbability" position="1" title="${uiLabelMap.SfaProbability}"><text size="25"/></field> <field name="estimatedCloseDate" position="2" title="${uiLabelMap.SfaCloseDate}" widget-style="required"><date-time/></field> - <field name="dataSourceId" position="1" title="${uiLabelMap.SfaDataSourceLabel}"> + <field name="dataSourceId" use-when="communicationEvent==null" position="1" title="${uiLabelMap.SfaDataSourceLabel}"> <drop-down allow-empty="true"> <entity-options key-field-name="dataSourceId" description="${description}" entity-name="DataSource"> <entity-constraint name="dataSourceTypeId" operator="equals" value="LEAD_SOURCE"/> @@ -105,6 +108,14 @@ </entity-options> </drop-down> </field> + <field name="dataSourceId" use-when="communicationEvent!=null" position="1" title="${uiLabelMap.SfaDataSourceLabel}"> + <drop-down allow-empty="false" no-current-selected-key="EMAIL"> + <entity-options key-field-name="dataSourceId" description="${description}" entity-name="DataSource"> + <entity-constraint name="dataSourceTypeId" operator="equals" value="LEAD_SOURCE"/> + <entity-order-by field-name="description"/> + </entity-options> + </drop-down> + </field> <field name="opportunityStageId" position="1" title="${uiLabelMap.SfaInitialStage}" widget-style="required"> <drop-down> <entity-options description="${description}" entity-name="SalesOpportunityStage"> @@ -126,7 +137,8 @@ </entity-options> </drop-down> </field> - <field name="description" title="${uiLabelMap.MarketingSegmentGroupDescription}"><textarea/></field> + <field name="description" use-when="communicationEvent!=null" title="${uiLabelMap.MarketingSegmentGroupDescription}"><textarea default-value="${communicationEvent.content}"/></field> + <field name="description" use-when="communicationEvent==null" title="${uiLabelMap.MarketingSegmentGroupDescription}"><textarea/></field> <field name="nextStep" title="${uiLabelMap.SfaNextStep}"><textarea/></field> <field name="submitButton" title="${uiLabelMap.CommonSave}" use-when="salesOpportunity==null"><submit button-type="button"/></field> <field name="submitButton" title="${uiLabelMap.CommonUpdate}" use-when="salesOpportunity!=null"><submit button-type="button"/></field> @@ -141,7 +153,9 @@ <field name="estimatedAmount" position="1" title="${uiLabelMap.SfaEstimatedAmount} ${currencyUomId}"><display/></field> <field name="typeEnumId" position="1" title="${uiLabelMap.SfaType}"><display/></field> <field name="estimatedCloseDate" position="1" title="${uiLabelMap.SfaCloseDate}"><display/></field> - <field name="opportunityStageId" position="2" title="${uiLabelMap.SfaInitialStage}"><display/></field> + <field name="opportunityStageId" position="2" title="${uiLabelMap.SfaInitialStage}"> + <display-entity entity-name="SalesOpportunityStage" description="${description}"/> + </field> <field name="estimatedProbability" position="1" title="${uiLabelMap.SfaProbability}"><display/></field> <field name="dataSourceId" position="2" title="${uiLabelMap.SfaDataSourceLabel}"><display/></field> <field name="marketingCampaignId" position="1" title="${uiLabelMap.MarketingCampaign}"><display/></field> Modified: ofbiz/trunk/applications/order/script/org/ofbiz/order/opportunity/OpportunityServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/script/org/ofbiz/order/opportunity/OpportunityServices.xml?rev=820578&r1=820577&r2=820578&view=diff ============================================================================== --- ofbiz/trunk/applications/order/script/org/ofbiz/order/opportunity/OpportunityServices.xml (original) +++ ofbiz/trunk/applications/order/script/org/ofbiz/order/opportunity/OpportunityServices.xml Thu Oct 1 09:00:19 2009 @@ -133,6 +133,12 @@ <if-not-empty field="lookedUpValue"> <remove-value value-field="lookedUpValue"/> </if-not-empty> + <!-- Check party role for create Account Role --> + <if-not-empty field="parameters.accountPartyId"> + <set field="roleMap.roleTypeId" value="ACCOUNT"/> + <set field="roleMap.partyId" from-field="parameters.accountPartyId"/> + <call-service service-name="createPartyRole" in-map-name="roleMap"/> + </if-not-empty> <set field="salesOpportunityRole.roleTypeId" value="ACCOUNT"/> <set field="salesOpportunityRole.salesOpportunityId" from-field="parameters.salesOpportunityId"/> <set field="salesOpportunityRole.partyId" from-field="parameters.accountPartyId"/> @@ -149,6 +155,12 @@ <if-not-empty field="lookedUpValue"> <remove-value value-field="lookedUpValue"/> </if-not-empty> + <!-- Check party role for create Lead Role --> + <if-not-empty field="parameters.leadPartyId"> + <set field="roleMap.roleTypeId" value="LEAD"/> + <set field="roleMap.partyId" from-field="parameters.leadPartyId"/> + <call-service service-name="createPartyRole" in-map-name="roleMap"/> + </if-not-empty> <set field="salesOpportunityRole.roleTypeId" value="LEAD"/> <set field="salesOpportunityRole.salesOpportunityId" from-field="parameters.salesOpportunityId"/> <set field="salesOpportunityRole.partyId" from-field="parameters.leadPartyId"/> Modified: ofbiz/trunk/applications/party/config/PartyUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/config/PartyUiLabels.xml?rev=820578&r1=820577&r2=820578&view=diff ============================================================================== --- ofbiz/trunk/applications/party/config/PartyUiLabels.xml (original) +++ ofbiz/trunk/applications/party/config/PartyUiLabels.xml Thu Oct 1 09:00:19 2009 @@ -10086,4 +10086,22 @@ <value xml:lang="th">à¹à¸¡à¹à¹à¸à¹à¹à¸ªà¹à¸£à¸«à¸±à¸ªà¹à¸à¸£à¸©à¸à¸µà¸¢à¹/รหัสà¸à¸·à¹à¸à¸à¸µà¹</value> <value xml:lang="zh">æ¾ä¸å°é®æ¿ç¼ç </value> </property> + <property key="RelatedCompany"> + <value xml:lang="en">Related Company</value> + </property> + <property key="PartyIdFrom"> + <value xml:lang="en">Party Id From</value> + </property> + <property key="PartyStatusId"> + <value xml:lang="en">Status ID</value> + </property> + <property key="PartyDateCreated"> + <value xml:lang="en">Created</value> + </property> + <property key="PartyDateSend"> + <value xml:lang="en">Send</value> + </property> + <property key="PartyCreateSaleOpportunityFromCommEvent"> + <value xml:lang="en">Create Opportunity</value> + </property> </resource> Modified: ofbiz/trunk/applications/party/widget/partymgr/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/CommonScreens.xml?rev=820578&r1=820577&r2=820578&view=diff ============================================================================== --- ofbiz/trunk/applications/party/widget/partymgr/CommonScreens.xml (original) +++ ofbiz/trunk/applications/party/widget/partymgr/CommonScreens.xml Thu Oct 1 09:00:19 2009 @@ -233,6 +233,18 @@ </widgets> </section> </screen> + <screen name="CommonOpportunityDecorator"> + <section> + <actions/> + <widgets> + <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <decorator-section-include name="body"/> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> </screens> Modified: ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventScreens.xml?rev=820578&r1=820577&r2=820578&view=diff ============================================================================== --- ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventScreens.xml (original) +++ ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventScreens.xml Thu Oct 1 09:00:19 2009 @@ -72,7 +72,15 @@ <set field="titleProperty" value="PageTitleListCommunications"/> <set field="tabButtonItem" value="PartyCommEvents"/> <set field="subTabButtonItem" value="CommunicationEvent"/> - <set field="partyId" value="${parameters.partyId}"/> + <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"/> @@ -98,7 +106,7 @@ <condition> <not><if-empty field="contacts"/></not> </condition> - <widgets> + <widgets> <horizontal-separator></horizontal-separator> <container style="h1"><label text="${uiLabelMap.PageTitleListCommunicationsRelatedParties} ${partyId}"/></container> <iterate-section entry="contact" list="contacts"> @@ -120,6 +128,79 @@ </iterate-section> </widgets> </section> + <!-- commevent list of partytypeId = PERSON --> + <section> + <condition> + <not><if-empty field="partyperson"/></not> + </condition> + <actions> + <entity-condition entity-name="PartyRelationship" list="accounts"> + <condition-list> + <condition-expr field-name="partyIdTo" from-field="partyId"/> + <condition-expr field-name="roleTypeIdFrom" value="ACCOUNT"/> + <condition-expr field-name="roleTypeIdTo" value="CONTACT"/> + </condition-list> + <select-field field-name="partyIdFrom"/> + </entity-condition> + <set field="partyIdFrom" from-field="accounts[0].partyIdFrom"/> + <entity-condition entity-name="CommunicationEventAndRole" list="commEvents"> + <condition-expr field-name="partyId" operator="equals" from-field="partyIdFrom"/> + <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="partyIdFrom"/> + <field-map field-name="roleTypeIdFrom" value="ACCOUNT"/> + <field-map field-name="roleTypeIdTo" value="CONTACT"/> + <order-by field-name="partyIdTo"/> + </entity-and> + </actions> + <widgets> + <section> + <condition> + <or> + <not><if-empty field="partyIdFrom"/></not> + <not><if-empty field="contacts"/></not> + </or> + </condition> + <widgets> + <horizontal-separator></horizontal-separator> + <container style="h1"><label text="${uiLabelMap.PageTitleListCommunicationsRelatedParties} ${partyId}"/></container> + <container style="h2"><label text="${partyIdFrom}"/></container> + <iterate-section entry="account" list="accounts"> + <section> + <widgets> + <include-form location="component://party/widget/partymgr/CommunicationEventForms.xml" name="ListCommEvents"/> + </widgets> + </section> + </iterate-section> + <iterate-section entry="contact" list="contacts"> + <section> + <condition> + <not><if-empty field="contacts"/></not> + </condition> + <actions> + <entity-condition entity-name="CommunicationEventAndRole" list="commEvents"> + <condition-expr field-name="partyId" operator="equals" value="${contact.partyIdTo}"/> + <order-by field-name="-entryDate"/> + </entity-condition> + </actions> + <widgets> + <section> + <condition> + <if-compare field="contact.partyIdTo" operator="not-equals" value="${partyId}"/> + </condition> + <widgets> + <container style="h2"><label text="${contact.partyIdTo}"/></container> + <include-form location="component://party/widget/partymgr/CommunicationEventForms.xml" name="ListCommEvents"/> + </widgets> + </section> + </widgets> + </section> + </iterate-section> + </widgets> + </section> + </widgets> + </section> </widgets> <fail-widgets> <label style="h3">${uiLabelMap.PartyMgrViewPermissionError}</label> Modified: ofbiz/trunk/applications/party/widget/partymgr/PartyMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/PartyMenus.xml?rev=820578&r1=820577&r2=820578&view=diff ============================================================================== --- ofbiz/trunk/applications/party/widget/partymgr/PartyMenus.xml (original) +++ ofbiz/trunk/applications/party/widget/partymgr/PartyMenus.xml Thu Oct 1 09:00:19 2009 @@ -474,6 +474,18 @@ <parameter param-name="my" from-field="parameters.my"/> </link> </menu-item> + <menu-item name="createSalesOpportunity" title="${uiLabelMap.PartyCreateSaleOpportunityFromCommEvent}"> + <condition> + <and> + <not><if-empty field="communicationEvent"/></not> + <if-compare field="communicationEvent.statusId" operator="not-equals" value="COM_PENDING"/> + <if-compare field="communicationEvent.statusId" operator="equals" value="COM_ENTERED"/> + </and> + </condition> + <link target="/sfa/control/EditSalesOpportunity" url-mode="inter-app"> + <parameter param-name="communicationEventId" from-field="parameters.communicationEventId"/> + </link> + </menu-item> <menu-item name="close" title="${uiLabelMap.CommonClose}"> <condition> <and> @@ -637,6 +649,18 @@ <parameter param-name="communicationEventId" from-field="parameters.communicationEventId"/> </link> </menu-item> + <menu-item name="createSalesOpportunity" title="${uiLabelMap.PartyCreateSaleOpportunityFromCommEvent}"> + <condition> + <and> + <not><if-empty field="communicationEvent"/></not> + <if-compare field="communicationEvent.statusId" operator="not-equals" value="COM_PENDING"/> + <if-compare field="communicationEvent.statusId" operator="equals" value="COM_ENTERED"/> + </and> + </condition> + <link target="/sfa/control/EditSalesOpportunity" url-mode="inter-app"> + <parameter param-name="communicationEventId" from-field="parameters.communicationEventId"/> + </link> + </menu-item> <menu-item name="delete" title="${uiLabelMap.CommonDelete}"> <condition> <and> Modified: ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml?rev=820578&r1=820577&r2=820578&view=diff ============================================================================== --- ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml (original) +++ ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml Thu Oct 1 09:00:19 2009 @@ -193,8 +193,14 @@ </section> <section> <condition> - <if-has-permission permission="PARTYMGR" action="_CREATE"/> + <if-has-permission permission="PARTYMGR" action="_CREATE"/> </condition> + <actions> + <entity-condition entity-name="RoleType" list="parentRoleList"> + <condition-expr field-name="parentTypeId" operator="equals" from-field="nullField"/> + <order-by field-name="description"/> + </entity-condition> + </actions> <widgets> <screenlet title="${uiLabelMap.PartyNewRoleType}"> <include-form name="AddRoleType" location="component://party/webapp/partymgr/party/PartyForms.xml"/> Modified: ofbiz/trunk/specialpurpose/myportal/webapp/myportal/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/webapp/myportal/WEB-INF/controller.xml?rev=820578&r1=820577&r2=820578&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/myportal/webapp/myportal/WEB-INF/controller.xml (original) +++ ofbiz/trunk/specialpurpose/myportal/webapp/myportal/WEB-INF/controller.xml Thu Oct 1 09:00:19 2009 @@ -29,6 +29,7 @@ <include location="component://order/webapp/ordermgr/WEB-INF/controller.xml"/> <include location="component://workeffort/webapp/workeffort/WEB-INF/controller.xml"/> <include location="component://projectmgr/webapp/projectmgr/WEB-INF/controller.xml"/> + <include location="component://marketing/webapp/sfa/WEB-INF/controller.xml"/> <description>Show personal information in the system</description> Modified: ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml?rev=820578&r1=820577&r2=820578&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml (original) +++ ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml Thu Oct 1 09:00:19 2009 @@ -250,4 +250,18 @@ </widgets> </section> </screen> + <screen name="CommonOpportunityDecorator"> + <section> + <actions> + <property-map resource="MarketingUiLabels" map-name="uiLabelMap" global="true"/> + </actions> + <widgets> + <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <decorator-section-include name="body"/> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> </screens> |
Free forum by Nabble | Edit this page |