Author: hansbak
Date: Sun Nov 27 07:33:35 2011 New Revision: 1206676 URL: http://svn.apache.org/viewvc?rev=1206676&view=rev Log: Added field nextActionDate to Sales Opportunity, moved all opportunity and related (view) entities from the order to the marketing component Modified: ofbiz/trunk/applications/commonext/data/EntityDiagramGroupData.xml ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml ofbiz/trunk/applications/marketing/entitydef/entitymodel.xml ofbiz/trunk/applications/marketing/widget/sfa/forms/OpportunityForms.xml ofbiz/trunk/applications/order/entitydef/entitymodel.xml ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml Modified: ofbiz/trunk/applications/commonext/data/EntityDiagramGroupData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/data/EntityDiagramGroupData.xml?rev=1206676&r1=1206675&r2=1206676&view=diff ============================================================================== --- ofbiz/trunk/applications/commonext/data/EntityDiagramGroupData.xml (original) +++ ofbiz/trunk/applications/commonext/data/EntityDiagramGroupData.xml Sun Nov 27 07:33:35 2011 @@ -197,8 +197,8 @@ under the License. <EntityGroup entityGroupId="6440" entityGroupName="Detail Order: Return"/> <EntityGroupEntry entityGroupId="6440" entityOrPackage="org.ofbiz.order.return" applEnumId="ESIA_INCLUDE"/> <EntityGroupEntry entityGroupId="6440" entityOrPackage="OrderItem" applEnumId="ESIA_INCLUDE"/> - <EntityGroup entityGroupId="6450" entityGroupName="Detail Order: Opportunity, Shopping List"/> - <EntityGroupEntry entityGroupId="6450" entityOrPackage="org.ofbiz.order.opportunity" applEnumId="ESIA_INCLUDE"/> + <EntityGroup entityGroupId="6450" entityGroupName="Detail Order: Opportunity, Shopping List, Shopping Cart"/> + <EntityGroupEntry entityGroupId="6450" entityOrPackage="org.ofbiz.marketing.opportunity" applEnumId="ESIA_INCLUDE"/> <EntityGroupEntry entityGroupId="6450" entityOrPackage="org.ofbiz.order.shoppinglist" applEnumId="ESIA_INCLUDE"/> <EntityGroupEntry entityGroupId="6450" entityOrPackage="org.ofbiz.order.shoppingcart" applEnumId="ESIA_INCLUDE"/> Modified: ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml?rev=1206676&r1=1206675&r2=1206676&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml (original) +++ ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml Sun Nov 27 07:33:35 2011 @@ -2583,6 +2583,9 @@ <value xml:lang="zh">ä¸ä¸æ¥</value> <value xml:lang="zh_TW">ä¸ä¸æ¥</value> </property> + <property key="SfaNextStepDate"> + <value xml:lang="en">Next Step Date</value> + </property> <property key="SfaNoLeadsSelectedToMerged"> <value xml:lang="en">No leads selected to merge</value> <value xml:lang="fr">Aucun prospect sélectionné pour la fusion</value> Modified: ofbiz/trunk/applications/marketing/entitydef/entitymodel.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/entitydef/entitymodel.xml?rev=1206676&r1=1206675&r2=1206676&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/entitydef/entitymodel.xml (original) +++ ofbiz/trunk/applications/marketing/entitydef/entitymodel.xml Sun Nov 27 07:33:35 2011 @@ -34,6 +34,7 @@ under the License. <!-- - org.ofbiz.marketing.contact --> <!-- - org.ofbiz.marketing.segment --> <!-- - org.ofbiz.marketing.tracking --> + <!-- - org.ofbiz.marketing.opportunity --> <!-- ========================================================= --> @@ -643,4 +644,300 @@ under the License. <key-map field-name="orderId"/> </view-link> </view-entity> + <!-- ========================================================= --> + <!-- org.ofbiz.marketing.opportunity --> + <!-- ========================================================= --> + + <entity entity-name="SalesOpportunity" + package-name="org.ofbiz.marketing.opportunity" + title="Main entity of information about sales opportunities"> + <field name="salesOpportunityId" type="id-ne"></field> + <field name="opportunityName" type="name"></field> + <field name="description" type="very-long"/> + <field name="nextStep" type="very-long"/> + <field name="nextStepDate" type="date-time"/> + <field name="estimatedAmount" type="currency-amount"/> + <field name="estimatedProbability" type="fixed-point"/> + <field name="currencyUomId" type="id-ne"/> + <field name="marketingCampaignId" type="id-ne"/> + <field name="dataSourceId" type="id-ne"/> + <field name="estimatedCloseDate" type="date-time"/> + <field name="opportunityStageId" type="id-ne"/> + <field name="typeEnumId" type="id-ne"/> + <field name="createdByUserLogin" type="id-vlong"/> + <prim-key field="salesOpportunityId"/> + <relation fk-name="SLSOPP_CRNCY_UOM" rel-entity-name="Uom" type="one"> + <key-map field-name="currencyUomId" rel-field-name="uomId"/> + </relation> + <relation fk-name="SLSOPP_STAGE" rel-entity-name="SalesOpportunityStage" type="one"> + <key-map field-name="opportunityStageId"/> + </relation> + <relation title="Type" fk-name="SLSOPP_TYP_ENUM" rel-entity-name="Enumeration" type="one"> + <key-map field-name="typeEnumId" rel-field-name="enumId"/> + </relation> + <relation fk-name="SLSOPP_MKTGCMPG" rel-entity-name="MarketingCampaign" type="one"> + <key-map field-name="marketingCampaignId"/> + </relation> + <relation fk-name="SLSOPP_USRLGN" rel-entity-name="UserLogin" type="one"> + <key-map field-name="createdByUserLogin" rel-field-name="userLoginId"/> + </relation> + </entity> + + <entity entity-name="SalesOpportunityHistory" + package-name="org.ofbiz.marketing.opportunity" + title="Tracks a history of sales opportunity information"> + <field name="salesOpportunityHistoryId" type="id-ne"></field> + <field name="salesOpportunityId" type="id-ne"></field> + <field name="description" type="very-long"/> + <field name="nextStep" type="very-long"/> + <field name="estimatedAmount" type="currency-amount"/> + <field name="estimatedProbability" type="fixed-point"/> + <field name="currencyUomId" type="id-ne"/> + <field name="estimatedCloseDate" type="date-time"/> + <field name="opportunityStageId" type="id-ne"/> + <field name="changeNote" type="very-long"> + <description>Used to track a reason for this change</description> <!-- maybe one day this should be a link to NoteData --> + </field> + <field name="modifiedByUserLogin" type="id-vlong"/> + <field name="modifiedTimestamp" type="date-time"/> + <prim-key field="salesOpportunityHistoryId"/> + <relation fk-name="SLOPHI_CRNCY_UOM" rel-entity-name="Uom" type="one"> + <key-map field-name="currencyUomId" rel-field-name="uomId"/> + </relation> + <relation fk-name="SLOPHI_STAGE" rel-entity-name="SalesOpportunityStage" type="one"> + <key-map field-name="opportunityStageId"/> + </relation> + <relation fk-name="SLOPHI_SLSOPP" rel-entity-name="SalesOpportunity" type="one"> + <key-map field-name="salesOpportunityId"/> + </relation> + <relation fk-name="SLOPHI_USRLGN" rel-entity-name="UserLogin" type="one"> + <key-map field-name="modifiedByUserLogin" rel-field-name="userLoginId"/> + </relation> + </entity> + + <entity entity-name="SalesOpportunityRole" + package-name="org.ofbiz.marketing.opportunity" + title="Describes roles of different parties involved in a sales opportunity"> + <field name="salesOpportunityId" type="id-ne"></field> + <field name="partyId" type="id-ne"></field> + <field name="roleTypeId" type="id-ne"/> + <!-- it may be nice to add fromDate and thruDate at some point to track changing roles if that's ever important --> + <prim-key field="salesOpportunityId"/> + <prim-key field="partyId"/> + <prim-key field="roleTypeId"/> + <relation fk-name="SLSOPPRL_SLSOPP" rel-entity-name="SalesOpportunity" type="one"> + <key-map field-name="salesOpportunityId"/> + </relation> + <relation fk-name="SLSOPPRL_PARTY" rel-entity-name="Party" type="one"> + <key-map field-name="partyId"/> + </relation> + <relation fk-name="SLSOPPRL_ROLETYPE" rel-entity-name="RoleType" type="one"> + <key-map field-name="roleTypeId"/> + </relation> + <relation fk-name="SLSOPPRL_PTYROLE" rel-entity-name="PartyRole" type="one"> <!-- make sure the party actually is in the role specified --> + <key-map field-name="partyId"/> + <key-map field-name="roleTypeId"/> + </relation> + </entity> + + <view-entity entity-name="SalesOpportunityAndRole" package-name="org.ofbiz.marketing.opportunity" title="SalesOpportunity And Role View Entity"> + <member-entity entity-alias="SO" entity-name="SalesOpportunity"/> + <member-entity entity-alias="SR" entity-name="SalesOpportunityRole"/> + <alias-all entity-alias="SO"/> + <alias name="partyId" entity-alias="SR"/> + <alias name="roleTypeId" entity-alias="SR"/> + <view-link entity-alias="SO" rel-entity-alias="SR"> + <key-map field-name="salesOpportunityId"/> + </view-link> + </view-entity> + + <entity entity-name="SalesOpportunityStage" + package-name="org.ofbiz.marketing.opportunity" + title="Describes stages of a sales opportunity with associated probability factors."> + <field name="opportunityStageId" type="id-ne"></field> + <field name="description" type="description"/> + <field name="defaultProbability" type="fixed-point"/> + <field name="sequenceNum" type="numeric"/> + <prim-key field="opportunityStageId"/> + </entity> + + <entity entity-name="SalesOpportunityWorkEffort" + package-name="org.ofbiz.marketing.opportunity" + title="Relates sales opportunities to their work efforts."> + <field name="salesOpportunityId" type="id-ne"></field> + <field name="workEffortId" type="id-ne"></field> + <prim-key field="salesOpportunityId"/> + <prim-key field="workEffortId"/> + <relation type="one" fk-name="SOPPWEFF_SOPP" rel-entity-name="SalesOpportunity"> + <key-map field-name="salesOpportunityId"/> + </relation> + <relation type="one" fk-name="SOPPWEFF_WEFF" rel-entity-name="WorkEffort"> + <key-map field-name="workEffortId"/> + </relation> + </entity> + + <entity entity-name="SalesOpportunityQuote" + package-name="org.ofbiz.marketing.opportunity" + title="Relates sales opportunities to their quotes."> + <field name="salesOpportunityId" type="id-ne"></field> + <field name="quoteId" type="id-ne"></field> + <prim-key field="salesOpportunityId"/> + <prim-key field="quoteId"/> + <relation type="one" fk-name="SOPPQTE_SOPP" rel-entity-name="SalesOpportunity"> + <key-map field-name="salesOpportunityId"/> + </relation> + <relation type="one" fk-name="SOPPQTE_QTE" rel-entity-name="Quote"> + <key-map field-name="quoteId"/> + </relation> + </entity> + + <entity entity-name="SalesForecast" + package-name="org.ofbiz.marketing.opportunity" + title="Stores sales forecast data for sales opportunities."> + <field name="salesForecastId" type="id-ne"></field> + <field name="parentSalesForecastId" type="id"></field> + <field name="organizationPartyId" type="id"></field> + <field name="internalPartyId" type="id"></field> + <field name="customTimePeriodId" type="id"></field> + <field name="currencyUomId" type="id"></field> + <field name="quotaAmount" type="currency-amount"></field> + <field name="forecastAmount" type="currency-amount"></field> + <field name="bestCaseAmount" type="currency-amount"></field> + <field name="closedAmount" type="currency-amount"/> + <field name="percentOfQuotaForecast" type="fixed-point"/> + <field name="percentOfQuotaClosed" type="fixed-point"/> + <field name="pipelineAmount" type="currency-amount"></field> + <field name="createdByUserLoginId" type="id-vlong"></field> + <field name="modifiedByUserLoginId" type="id-vlong"></field> + <prim-key field="salesForecastId"/> + <relation type="one" fk-name="SALES4C_PARENT" title="Parent" rel-entity-name="SalesForecast"> + <key-map field-name="parentSalesForecastId" rel-field-name="salesForecastId"/> + </relation> + <relation type="one" fk-name="SALES4C_ORG_PARTY" title="Organization" rel-entity-name="Party"> + <key-map field-name="organizationPartyId" rel-field-name="partyId"/> + </relation> + <relation type="one" fk-name="SALES4C_INT_PARTY" title="Internal" rel-entity-name="Party"> + <key-map field-name="internalPartyId" rel-field-name="partyId"/> + </relation> + <relation type="one" fk-name="SALES4C_TIME_PER" rel-entity-name="CustomTimePeriod"> + <key-map field-name="customTimePeriodId"/> + </relation> + <relation type="one" fk-name="SALES4C_CUR_UOM" rel-entity-name="Uom"> + <key-map field-name="currencyUomId" rel-field-name="uomId"/> + </relation> + <relation type="one" fk-name="SALES4C_CRT_USER" title="CreatedBy" rel-entity-name="UserLogin"> + <key-map field-name="createdByUserLoginId" rel-field-name="userLoginId"/> + </relation> + <relation type="one" fk-name="SALES4C_MOD_USER" title="ModifiedBy" rel-entity-name="UserLogin"> + <key-map field-name="modifiedByUserLoginId" rel-field-name="userLoginId"/> + </relation> + </entity> + + <entity entity-name="SalesForecastDetail" + package-name="org.ofbiz.marketing.opportunity" + title="Stores Details of Resourses of Sales Forecast for simulation of MRP"> + <field name="salesForecastId" type="id-ne"/> + <field name="salesForecastDetailId" type="id-ne"/> + <field name="amount" type="currency-amount"/> + <field name="quantityUomId" type="id"/> + <field name="quantity" type="fixed-point"/> + <field name="productId" type="id"/> + <field name="productCategoryId" type="id"/> + <prim-key field="salesForecastId"/> + <prim-key field="salesForecastDetailId"/> + <relation type="one" fk-name="SALES4CDTL_SALES4C" rel-entity-name="SalesForecast"> + <key-map field-name="salesForecastId"/> + </relation> + <relation type="one" fk-name="SALES4CDTL_QTY_UOM" title="Quantity" rel-entity-name="Uom"> + <key-map field-name="quantityUomId" rel-field-name="uomId"/> + </relation> + <relation type="one" fk-name="SALES4CDTL_PROD" rel-entity-name="Product"> + <key-map field-name="productId"/> + </relation> + <relation type="one" fk-name="SALES4CDTL_PCTGRY" rel-entity-name="ProductCategory"> + <key-map field-name="productCategoryId"/> + </relation> + </entity> + + <entity entity-name="SalesForecastHistory" + package-name="org.ofbiz.marketing.opportunity" + title="Keeps a record of changes to a sales forecast."> + <field name="salesForecastHistoryId" type="id-ne"></field> + <field name="salesForecastId" type="id-ne"></field> + <field name="parentSalesForecastId" type="id"></field> + <field name="organizationPartyId" type="id"></field> + <field name="internalPartyId" type="id"></field> + <field name="customTimePeriodId" type="id"></field> + <field name="currencyUomId" type="id"></field> + <field name="quotaAmount" type="currency-amount"></field> + <field name="forecastAmount" type="currency-amount"></field> + <field name="bestCaseAmount" type="currency-amount"></field> + <field name="closedAmount" type="currency-amount"/> + <field name="percentOfQuotaForecast" type="fixed-point"/> + <field name="percentOfQuotaClosed" type="fixed-point"/> + <field name="changeNote" type="very-long"> + <description>Used to track a reason for this change</description> <!-- maybe one day this should be a link to NoteData --> + </field> + <field name="modifiedByUserLoginId" type="id-vlong"></field> + <field name="modifiedTimestamp" type="date-time"/> + <prim-key field="salesForecastHistoryId"/> + <relation type="one" fk-name="SALES4CH_SALES4C" rel-entity-name="SalesForecast"> + <key-map field-name="salesForecastId"/> + </relation> + <relation type="one" fk-name="SALES4CH_ORG_PARTY" title="Organization" rel-entity-name="Party"> + <key-map field-name="organizationPartyId" rel-field-name="partyId"/> + </relation> + <relation type="one" fk-name="SALES4CH_INT_PARTY" title="Internal" rel-entity-name="Party"> + <key-map field-name="internalPartyId" rel-field-name="partyId"/> + </relation> + <relation type="one" fk-name="SALES4CH_TIME_PER" rel-entity-name="CustomTimePeriod"> + <key-map field-name="customTimePeriodId"/> + </relation> + <relation type="one" fk-name="SALES4CH_CUR_UOM" rel-entity-name="Uom"> + <key-map field-name="currencyUomId" rel-field-name="uomId"/> + </relation> + <relation type="one" fk-name="SALES4CH_MOD_USER" title="ModifiedBy" rel-entity-name="UserLogin"> + <key-map field-name="modifiedByUserLoginId" rel-field-name="userLoginId"/> + </relation> + </entity> + <entity entity-name="SalesOpportunityCompetitor" + package-name="org.ofbiz.marketing.opportunity" + title="Sales opportunity competitors record"> + <field name="salesOpportunityId" type="id-ne"></field> + <field name="competitorPartyId" type="id-ne"></field> + <field name="positionEnumId" type="id-ne"></field> + <field name="strengths" type="very-long"></field> + <field name="weaknesses" type="very-long"></field> + <prim-key field="salesOpportunityId"/> + <prim-key field="competitorPartyId"/> + <relation type="one" fk-name="SOPPCOMP_SOPP" rel-entity-name="SalesOpportunity"> + <key-map field-name="salesOpportunityId"/> + </relation> + </entity> + <entity entity-name="SalesOpportunityTrckCode" + package-name="org.ofbiz.marketing.opportunity" + title="Sales opportunity traking code"> + <field name="salesOpportunityId" type="id-ne"></field> + <field name="trackingCodeId" type="id-ne"></field> + <field name="receivedDate" type="date-time"></field> + <prim-key field="salesOpportunityId"/> + <prim-key field="trackingCodeId"/> + <relation type="one" fk-name="SOPPTRKCD_SOPP" rel-entity-name="SalesOpportunity"> + <key-map field-name="salesOpportunityId"/> + </relation> + </entity> + <view-entity entity-name="SalesForecastAndCustomTimePeriod" + package-name="org.ofbiz.marketing.opportunity" + title="View for selecting the forecast with its time period."> + <member-entity entity-alias="SF" entity-name="SalesForecast"/> + <member-entity entity-alias="CTP" entity-name="CustomTimePeriod"/> + <alias-all entity-alias="SF"/> + <alias-all entity-alias="CTP"> + <exclude field="organizationPartyId"/> + </alias-all> + <view-link entity-alias="SF" rel-entity-alias="CTP"> + <key-map field-name="customTimePeriodId"/> + </view-link> + </view-entity> + </entitymodel> 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=1206676&r1=1206675&r2=1206676&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/widget/sfa/forms/OpportunityForms.xml (original) +++ ofbiz/trunk/applications/marketing/widget/sfa/forms/OpportunityForms.xml Sun Nov 27 07:33:35 2011 @@ -44,13 +44,13 @@ under the License. </form> <form name="ListSalesOpportunity" type="list" list-name="listIt" paginate-target="FindSalesOpportunity" view-size="20" - odd-row-style="alternate-row" default-table-style="basic-table hover-bar" separate-columns="true"> + odd-row-style="alternate-row" default-table-style="basic-table hover-bar" header-row-style="header-row-2"> <actions> <set field="parameters.noConditionFind" value="Y"/> <service service-name="performFind" result-map="result" result-map-list="listIt"> <field-map field-name="inputFields" from-field="parameters"/> <field-map field-name="entityName" value="SalesOpportunity"/> - <field-map field-name="orderBy" value="salesOpportunityId"/> + <field-map field-name="orderBy" from-field="parameters.sortField"/> <field-map field-name="viewIndex" from-field="viewIndex"/> <field-map field-name="viewSize" from-field="viewSize"/> </service> @@ -67,6 +67,7 @@ under the License. <field name="opportunityStageId" title="${uiLabelMap.SfaInitialStage}"><display-entity entity-name="SalesOpportunityStage" description="${description}"/></field> <field name="nextStep"><display/></field> <field name="estimatedAmount" title="${uiLabelMap.SfaEstimatedAmount}"><display/></field> + <field name="nextStepDate" position="1" title="${uiLabelMap.SfaNextStepDate}" sort-field="true"><display/></field> <field name="estimatedCloseDate" title="${uiLabelMap.SfaCloseDate}"><display/></field> <field name="editButton" title="${uiLabelMap.CommonClose}" use-when="${groovy: estimatedCloseDate == null || isDateAfterNow == true || opportunityStageId != "SOSTG_CLOSED"}" widget-style="buttontext"> <hyperlink target="closeSalesOpportunity" description="${uiLabelMap.CommonClose}"> @@ -79,21 +80,20 @@ under the License. <form name="EditSalesOpportunity" type="single" target="updateSalesOpportunity" default-map-name="salesOpportunity" 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 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}"><text default-value="${communicationEvent.subject}" size="30"/></field> + <field name="description" title="${uiLabelMap.MarketingSegmentGroupDescription}"><textarea default-value="${communicationEvent.content}"/></field> + <field name="nextStep" title="${uiLabelMap.SfaNextStep}"><textarea/></field> <field name="estimatedAmount" position="1" title="${uiLabelMap.SfaEstimatedAmount}"><text size="25"/></field> + <field name="estimatedProbability" position="2" title="${uiLabelMap.SfaProbability}"><text size="25"/></field> + <field name="marketingCampaignId" position="1" title="${uiLabelMap.MarketingCampaign}"> + <drop-down allow-empty="true"> + <entity-options description="${campaignName}" entity-name="MarketingCampaign" key-field-name="marketingCampaignId"> + </entity-options> + </drop-down> + </field> <field name="currencyUomId" position="2" title="${uiLabelMap.CommonCurrency}"> <drop-down allow-empty="true" no-current-selected-key="${defaultOrganizationPartyCurrencyUomId}"> <entity-options key-field-name="uomId" description="${description} - ${abbreviation}" entity-name="Uom"> @@ -102,24 +102,8 @@ under the License. </entity-options> </drop-down> </field> - <field name="estimatedProbability" position="1" title="${uiLabelMap.SfaProbability}"><text size="25"/></field> + <field name="nextStepDate" position="1" title="${uiLabelMap.SfaNextStepDate}"><date-time/></field> <field name="estimatedCloseDate" position="2" title="${uiLabelMap.SfaCloseDate}" widget-style="required"><date-time/></field> - <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"/> - <entity-order-by field-name="description"/> - </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"> @@ -135,34 +119,47 @@ under the License. </entity-options> </drop-down> </field> - <field name="marketingCampaignId" position="1" title="${uiLabelMap.MarketingCampaign}"> + <field name="dataSourceId" use-when="communicationEvent==null" position="1" title="${uiLabelMap.SfaDataSourceLabel}"> <drop-down allow-empty="true"> - <entity-options description="${campaignName}" entity-name="MarketingCampaign" key-field-name="marketingCampaignId"> + <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="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="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="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="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="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> </form> <form name="ViewSalesOpportunity" type="single" default-map-name="salesOpportunity" header-row-style="header-row" default-table-style="basic-table"> - <field name="salesOpportunityId"><hidden/></field> + <field name="salesOpportunityId"><display/></field> <field name="opportunityName" position="1" title="${uiLabelMap.SfaOpportunityName}"><display/></field> <field name="accountPartyId" position="1" title="${uiLabelMap.SfaInitialAccount}" map-name="accountParty" field-name="partyId"><display-entity description="${firstName} ${lastName} ${groupName} [${partyId}]" entity-name="PartyNameView"/></field> <field name="leadPartyId" position="1" title="${uiLabelMap.SfaLead}" map-name="leadParty" field-name="partyId"><display-entity description="${firstName} ${lastName} ${groupName} [${partyId}]" entity-name="PartyNameView"/></field> <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}"> + <field name="estimatedProbability" position="2" title="${uiLabelMap.SfaProbability}"><display/></field> + <field name="nextStepDate" position="1" title="${uiLabelMap.SfaNextStepDate}"><display/></field> + <field name="estimatedCloseDate" position="2" title="${uiLabelMap.SfaCloseDate}"><display/></field> + <field name="opportunityStageId" position="1" 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="typeEnumId" position="2" title="${uiLabelMap.SfaType}"><display/></field> <field name="marketingCampaignId" position="1" title="${uiLabelMap.MarketingCampaign}"><display/></field> + <field name="currencyUomId" position="2" title="${uiLabelMap.CommonCurrency}"><display/></field> + <field name="dataSourceId" position="1" title="${uiLabelMap.SfaDataSourceLabel}"><display/></field> <field name="description" position="1" title="${uiLabelMap.MarketingSegmentGroupDescription}"><display/></field> <field name="nextStep" position="1" title="${uiLabelMap.SfaNextStep}"><display/></field> </form> Modified: ofbiz/trunk/applications/order/entitydef/entitymodel.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/entitydef/entitymodel.xml?rev=1206676&r1=1206675&r2=1206676&view=diff ============================================================================== --- ofbiz/trunk/applications/order/entitydef/entitymodel.xml (original) +++ ofbiz/trunk/applications/order/entitydef/entitymodel.xml Sun Nov 27 07:33:35 2011 @@ -2877,285 +2877,5 @@ under the License. </relation> </entity> - <!-- ========================================================= --> - <!-- org.ofbiz.order.opportunity --> - <!-- ========================================================= --> - - <entity entity-name="SalesOpportunity" - package-name="org.ofbiz.order.opportunity" - title="Main entity of information about sales opportunities"> - <field name="salesOpportunityId" type="id-ne"></field> - <field name="opportunityName" type="name"></field> - <field name="description" type="very-long"/> - <field name="nextStep" type="very-long"/> - <field name="estimatedAmount" type="currency-amount"/> - <field name="estimatedProbability" type="fixed-point"/> - <field name="currencyUomId" type="id-ne"/> - <field name="marketingCampaignId" type="id-ne"/> - <field name="dataSourceId" type="id-ne"/> - <field name="estimatedCloseDate" type="date-time"/> - <field name="opportunityStageId" type="id-ne"/> - <field name="typeEnumId" type="id-ne"/> - <field name="createdByUserLogin" type="id-vlong"/> - <prim-key field="salesOpportunityId"/> - <relation fk-name="SLSOPP_CRNCY_UOM" rel-entity-name="Uom" type="one"> - <key-map field-name="currencyUomId" rel-field-name="uomId"/> - </relation> - <relation fk-name="SLSOPP_STAGE" rel-entity-name="SalesOpportunityStage" type="one"> - <key-map field-name="opportunityStageId"/> - </relation> - <relation title="Type" fk-name="SLSOPP_TYP_ENUM" rel-entity-name="Enumeration" type="one"> - <key-map field-name="typeEnumId" rel-field-name="enumId"/> - </relation> - <relation fk-name="SLSOPP_MKTGCMPG" rel-entity-name="MarketingCampaign" type="one"> - <key-map field-name="marketingCampaignId"/> - </relation> - <relation fk-name="SLSOPP_USRLGN" rel-entity-name="UserLogin" type="one"> - <key-map field-name="createdByUserLogin" rel-field-name="userLoginId"/> - </relation> - </entity> - - <entity entity-name="SalesOpportunityHistory" - package-name="org.ofbiz.order.opportunity" - title="Tracks a history of sales opportunity information"> - <field name="salesOpportunityHistoryId" type="id-ne"></field> - <field name="salesOpportunityId" type="id-ne"></field> - <field name="description" type="very-long"/> - <field name="nextStep" type="very-long"/> - <field name="estimatedAmount" type="currency-amount"/> - <field name="estimatedProbability" type="fixed-point"/> - <field name="currencyUomId" type="id-ne"/> - <field name="estimatedCloseDate" type="date-time"/> - <field name="opportunityStageId" type="id-ne"/> - <field name="changeNote" type="very-long"> - <description>Used to track a reason for this change</description> <!-- maybe one day this should be a link to NoteData --> - </field> - <field name="modifiedByUserLogin" type="id-vlong"/> - <field name="modifiedTimestamp" type="date-time"/> - <prim-key field="salesOpportunityHistoryId"/> - <relation fk-name="SLOPHI_CRNCY_UOM" rel-entity-name="Uom" type="one"> - <key-map field-name="currencyUomId" rel-field-name="uomId"/> - </relation> - <relation fk-name="SLOPHI_STAGE" rel-entity-name="SalesOpportunityStage" type="one"> - <key-map field-name="opportunityStageId"/> - </relation> - <relation fk-name="SLOPHI_SLSOPP" rel-entity-name="SalesOpportunity" type="one"> - <key-map field-name="salesOpportunityId"/> - </relation> - <relation fk-name="SLOPHI_USRLGN" rel-entity-name="UserLogin" type="one"> - <key-map field-name="modifiedByUserLogin" rel-field-name="userLoginId"/> - </relation> - </entity> - - <entity entity-name="SalesOpportunityRole" - package-name="org.ofbiz.order.opportunity" - title="Describes roles of different parties involved in a sales opportunity"> - <field name="salesOpportunityId" type="id-ne"></field> - <field name="partyId" type="id-ne"></field> - <field name="roleTypeId" type="id-ne"/> - <!-- it may be nice to add fromDate and thruDate at some point to track changing roles if that's ever important --> - <prim-key field="salesOpportunityId"/> - <prim-key field="partyId"/> - <prim-key field="roleTypeId"/> - <relation fk-name="SLSOPPRL_SLSOPP" rel-entity-name="SalesOpportunity" type="one"> - <key-map field-name="salesOpportunityId"/> - </relation> - <relation fk-name="SLSOPPRL_PARTY" rel-entity-name="Party" type="one"> - <key-map field-name="partyId"/> - </relation> - <relation fk-name="SLSOPPRL_ROLETYPE" rel-entity-name="RoleType" type="one"> - <key-map field-name="roleTypeId"/> - </relation> - <relation fk-name="SLSOPPRL_PTYROLE" rel-entity-name="PartyRole" type="one"> <!-- make sure the party actually is in the role specified --> - <key-map field-name="partyId"/> - <key-map field-name="roleTypeId"/> - </relation> - </entity> - - <view-entity entity-name="SalesOpportunityAndRole" package-name="org.ofbiz.order.opportunity" title="SalesOpportunity And Role View Entity"> - <member-entity entity-alias="SO" entity-name="SalesOpportunity"/> - <member-entity entity-alias="SR" entity-name="SalesOpportunityRole"/> - <alias-all entity-alias="SO"/> - <alias name="partyId" entity-alias="SR"/> - <alias name="roleTypeId" entity-alias="SR"/> - <view-link entity-alias="SO" rel-entity-alias="SR"> - <key-map field-name="salesOpportunityId"/> - </view-link> - </view-entity> - - <entity entity-name="SalesOpportunityStage" - package-name="org.ofbiz.order.opportunity" - title="Describes stages of a sales opportunity with associated probability factors."> - <field name="opportunityStageId" type="id-ne"></field> - <field name="description" type="description"/> - <field name="defaultProbability" type="fixed-point"/> - <field name="sequenceNum" type="numeric"/> - <prim-key field="opportunityStageId"/> - </entity> - - <entity entity-name="SalesOpportunityWorkEffort" - package-name="org.ofbiz.order.opportunity" - title="Relates sales opportunities to their work efforts."> - <field name="salesOpportunityId" type="id-ne"></field> - <field name="workEffortId" type="id-ne"></field> - <prim-key field="salesOpportunityId"/> - <prim-key field="workEffortId"/> - <relation type="one" fk-name="SOPPWEFF_SOPP" rel-entity-name="SalesOpportunity"> - <key-map field-name="salesOpportunityId"/> - </relation> - <relation type="one" fk-name="SOPPWEFF_WEFF" rel-entity-name="WorkEffort"> - <key-map field-name="workEffortId"/> - </relation> - </entity> - - <entity entity-name="SalesOpportunityQuote" - package-name="org.ofbiz.order.opportunity" - title="Relates sales opportunities to their quotes."> - <field name="salesOpportunityId" type="id-ne"></field> - <field name="quoteId" type="id-ne"></field> - <prim-key field="salesOpportunityId"/> - <prim-key field="quoteId"/> - <relation type="one" fk-name="SOPPQTE_SOPP" rel-entity-name="SalesOpportunity"> - <key-map field-name="salesOpportunityId"/> - </relation> - <relation type="one" fk-name="SOPPQTE_QTE" rel-entity-name="Quote"> - <key-map field-name="quoteId"/> - </relation> - </entity> - - <entity entity-name="SalesForecast" - package-name="org.ofbiz.order.opportunity" - title="Stores sales forecast data for sales opportunities."> - <field name="salesForecastId" type="id-ne"></field> - <field name="parentSalesForecastId" type="id"></field> - <field name="organizationPartyId" type="id"></field> - <field name="internalPartyId" type="id"></field> - <field name="customTimePeriodId" type="id"></field> - <field name="currencyUomId" type="id"></field> - <field name="quotaAmount" type="currency-amount"></field> - <field name="forecastAmount" type="currency-amount"></field> - <field name="bestCaseAmount" type="currency-amount"></field> - <field name="closedAmount" type="currency-amount"/> - <field name="percentOfQuotaForecast" type="fixed-point"/> - <field name="percentOfQuotaClosed" type="fixed-point"/> - <field name="pipelineAmount" type="currency-amount"></field> - <field name="createdByUserLoginId" type="id-vlong"></field> - <field name="modifiedByUserLoginId" type="id-vlong"></field> - <prim-key field="salesForecastId"/> - <relation type="one" fk-name="SALES4C_PARENT" title="Parent" rel-entity-name="SalesForecast"> - <key-map field-name="parentSalesForecastId" rel-field-name="salesForecastId"/> - </relation> - <relation type="one" fk-name="SALES4C_ORG_PARTY" title="Organization" rel-entity-name="Party"> - <key-map field-name="organizationPartyId" rel-field-name="partyId"/> - </relation> - <relation type="one" fk-name="SALES4C_INT_PARTY" title="Internal" rel-entity-name="Party"> - <key-map field-name="internalPartyId" rel-field-name="partyId"/> - </relation> - <relation type="one" fk-name="SALES4C_TIME_PER" rel-entity-name="CustomTimePeriod"> - <key-map field-name="customTimePeriodId"/> - </relation> - <relation type="one" fk-name="SALES4C_CUR_UOM" rel-entity-name="Uom"> - <key-map field-name="currencyUomId" rel-field-name="uomId"/> - </relation> - <relation type="one" fk-name="SALES4C_CRT_USER" title="CreatedBy" rel-entity-name="UserLogin"> - <key-map field-name="createdByUserLoginId" rel-field-name="userLoginId"/> - </relation> - <relation type="one" fk-name="SALES4C_MOD_USER" title="ModifiedBy" rel-entity-name="UserLogin"> - <key-map field-name="modifiedByUserLoginId" rel-field-name="userLoginId"/> - </relation> - </entity> - - <entity entity-name="SalesForecastDetail" - package-name="org.ofbiz.order.opportunity" - title="Stores Details of Resourses of Sales Forecast for simulation of MRP"> - <field name="salesForecastId" type="id-ne"/> - <field name="salesForecastDetailId" type="id-ne"/> - <field name="amount" type="currency-amount"/> - <field name="quantityUomId" type="id"/> - <field name="quantity" type="fixed-point"/> - <field name="productId" type="id"/> - <field name="productCategoryId" type="id"/> - <prim-key field="salesForecastId"/> - <prim-key field="salesForecastDetailId"/> - <relation type="one" fk-name="SALES4CDTL_SALES4C" rel-entity-name="SalesForecast"> - <key-map field-name="salesForecastId"/> - </relation> - <relation type="one" fk-name="SALES4CDTL_QTY_UOM" title="Quantity" rel-entity-name="Uom"> - <key-map field-name="quantityUomId" rel-field-name="uomId"/> - </relation> - <relation type="one" fk-name="SALES4CDTL_PROD" rel-entity-name="Product"> - <key-map field-name="productId"/> - </relation> - <relation type="one" fk-name="SALES4CDTL_PCTGRY" rel-entity-name="ProductCategory"> - <key-map field-name="productCategoryId"/> - </relation> - </entity> - - <entity entity-name="SalesForecastHistory" - package-name="org.ofbiz.order.opportunity" - title="Keeps a record of changes to a sales forecast."> - <field name="salesForecastHistoryId" type="id-ne"></field> - <field name="salesForecastId" type="id-ne"></field> - <field name="parentSalesForecastId" type="id"></field> - <field name="organizationPartyId" type="id"></field> - <field name="internalPartyId" type="id"></field> - <field name="customTimePeriodId" type="id"></field> - <field name="currencyUomId" type="id"></field> - <field name="quotaAmount" type="currency-amount"></field> - <field name="forecastAmount" type="currency-amount"></field> - <field name="bestCaseAmount" type="currency-amount"></field> - <field name="closedAmount" type="currency-amount"/> - <field name="percentOfQuotaForecast" type="fixed-point"/> - <field name="percentOfQuotaClosed" type="fixed-point"/> - <field name="changeNote" type="very-long"> - <description>Used to track a reason for this change</description> <!-- maybe one day this should be a link to NoteData --> - </field> - <field name="modifiedByUserLoginId" type="id-vlong"></field> - <field name="modifiedTimestamp" type="date-time"/> - <prim-key field="salesForecastHistoryId"/> - <relation type="one" fk-name="SALES4CH_SALES4C" rel-entity-name="SalesForecast"> - <key-map field-name="salesForecastId"/> - </relation> - <relation type="one" fk-name="SALES4CH_ORG_PARTY" title="Organization" rel-entity-name="Party"> - <key-map field-name="organizationPartyId" rel-field-name="partyId"/> - </relation> - <relation type="one" fk-name="SALES4CH_INT_PARTY" title="Internal" rel-entity-name="Party"> - <key-map field-name="internalPartyId" rel-field-name="partyId"/> - </relation> - <relation type="one" fk-name="SALES4CH_TIME_PER" rel-entity-name="CustomTimePeriod"> - <key-map field-name="customTimePeriodId"/> - </relation> - <relation type="one" fk-name="SALES4CH_CUR_UOM" rel-entity-name="Uom"> - <key-map field-name="currencyUomId" rel-field-name="uomId"/> - </relation> - <relation type="one" fk-name="SALES4CH_MOD_USER" title="ModifiedBy" rel-entity-name="UserLogin"> - <key-map field-name="modifiedByUserLoginId" rel-field-name="userLoginId"/> - </relation> - </entity> - <entity entity-name="SalesOpportunityCompetitor" - package-name="org.ofbiz.order.opportunity" - title="Sales opportunity competitors record"> - <field name="salesOpportunityId" type="id-ne"></field> - <field name="competitorPartyId" type="id-ne"></field> - <field name="positionEnumId" type="id-ne"></field> - <field name="strengths" type="very-long"></field> - <field name="weaknesses" type="very-long"></field> - <prim-key field="salesOpportunityId"/> - <prim-key field="competitorPartyId"/> - <relation type="one" fk-name="SOPPCOMP_SOPP" rel-entity-name="SalesOpportunity"> - <key-map field-name="salesOpportunityId"/> - </relation> - </entity> - <entity entity-name="SalesOpportunityTrckCode" - package-name="org.ofbiz.order.opportunity" - title="Sales opportunity traking code"> - <field name="salesOpportunityId" type="id-ne"></field> - <field name="trackingCodeId" type="id-ne"></field> - <field name="receivedDate" type="date-time"></field> - <prim-key field="salesOpportunityId"/> - <prim-key field="trackingCodeId"/> - <relation type="one" fk-name="SOPPTRKCD_SOPP" rel-entity-name="SalesOpportunity"> - <key-map field-name="salesOpportunityId"/> - </relation> - </entity> -</entitymodel> + </entitymodel> + \ No newline at end of file Modified: ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml?rev=1206676&r1=1206675&r2=1206676&view=diff ============================================================================== --- ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml (original) +++ ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml Sun Nov 27 07:33:35 2011 @@ -36,6 +36,7 @@ under the License. <!-- - org.ofbiz.order.request --> <!-- - org.ofbiz.order.shoppingcart --> <!-- - org.ofbiz.order.shoppinglist --> + <!-- - org.ofbiz.order.communication --> <!-- ========================================================= --> @@ -1589,22 +1590,9 @@ under the License. </view-entity> <!-- ========================================================= --> - <!-- org.ofbiz.order.opportunity --> + <!-- org.ofbiz.order.communication --> <!-- ========================================================= --> - <view-entity entity-name="SalesForecastAndCustomTimePeriod" - package-name="org.ofbiz.order.opportunity" - title="View for selecting the forecast with its time period."> - <member-entity entity-alias="SF" entity-name="SalesForecast"/> - <member-entity entity-alias="CTP" entity-name="CustomTimePeriod"/> - <alias-all entity-alias="SF"/> - <alias-all entity-alias="CTP"> - <exclude field="organizationPartyId"/> - </alias-all> - <view-link entity-alias="SF" rel-entity-alias="CTP"> - <key-map field-name="customTimePeriodId"/> - </view-link> - </view-entity> <view-entity entity-name="CommunicationEventAndOrder" package-name="org.ofbiz.order.communication" title="Communication Event And Order View Entity"> |
Free forum by Nabble | Edit this page |