You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ap...@apache.org on 2009/05/26 05:46:45 UTC
svn commit: r778558 - in /ofbiz/trunk/applications:
marketing/widget/sfa/forms/OpportunityForms.xml
order/script/org/ofbiz/order/opportunity/OpportunityServices.xml
order/servicedef/secas.xml order/servicedef/services_opportunity.xml
Author: apatel
Date: Tue May 26 03:46:45 2009
New Revision: 778558
URL: http://svn.apache.org/viewvc?rev=778558&view=rev
Log:
add field to add lead party from create sales opportunity screen.
Modified:
ofbiz/trunk/applications/marketing/widget/sfa/forms/OpportunityForms.xml
ofbiz/trunk/applications/order/script/org/ofbiz/order/opportunity/OpportunityServices.xml
ofbiz/trunk/applications/order/servicedef/secas.xml
ofbiz/trunk/applications/order/servicedef/services_opportunity.xml
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=778558&r1=778557&r2=778558&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/widget/sfa/forms/OpportunityForms.xml (original)
+++ ofbiz/trunk/applications/marketing/widget/sfa/forms/OpportunityForms.xml Tue May 26 03:46:45 2009
@@ -79,6 +79,7 @@
<field name="opportunityName" title="${uiLabelMap.SfaOpportunityName}" widget-style="required"><text size="30"/></field>
<field name="accountPartyId" title="${uiLabelMap.SfaInitialAccount}" widget-style="required"><lookup target-form-name="LookupPartyName"/></field>
+ <field name="leadPartyId" title="${uiLabelMap.SfaLead}" widget-style="required"><lookup target-form-name="LookupPartyName"/></field>
<field name="typeEnumId" title="${uiLabelMap.SfaType}"></field>
<field name="opportunityName" title="${uiLabelMap.SfaOpportunityName}" widget-style="required"><text size="25"></text></field>
<field name="typeEnumId" position="1" title="${uiLabelMap.SfaType}">
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=778558&r1=778557&r2=778558&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 Tue May 26 03:46:45 2009
@@ -139,14 +139,28 @@
<call-service service-name="createSalesOpportunityRole" in-map-name="salesOpportunityRole"/>
</if-compare-field>
</simple-method>
+ <simple-method method-name="createSalesOpportunityLeadRole" short-description="Create Sales Opportunity Lead Role">
+ <entity-and list="salesOpportunityRoles" entity-name="SalesOpportunityRole">
+ <field-map field-name="salesOpportunityId" from-field="parameters.salesOpportunityId"/>
+ <field-map field-name="roleTypeId" value="LEAD"/>
+ </entity-and>
+ <first-from-list entry="lookedUpValue" list="salesOpportunityRoles"/>
+ <if-compare-field operator="not-equals" field="lookedUpValue.partyId" to-field="parameters.leadPartyId">
+ <if-not-empty field="lookedUpValue">
+ <remove-value value-field="lookedUpValue"/>
+ </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"/>
+ <call-service service-name="createSalesOpportunityRole" in-map-name="salesOpportunityRole"/>
+ </if-compare-field>
+ </simple-method>
<simple-method method-name="findPartyInSalesOpportunityRole" short-description="find party in role specified by in parameter">
<entity-and list="salesOpportunityRoles" entity-name="SalesOpportunityRole">
<field-map field-name="roleTypeId" from-field="parameters.roleTypeId"/>
<field-map field-name="salesOpportunityId" from-field="parameters.salesOpportunityId"/>
</entity-and>
<first-from-list entry="lookedUpValue" list="salesOpportunityRoles"/>
- <log level="info" message="Some good message ${lookedUpValue.partyId}"></log>
-
<field-to-result field="lookedUpValue.partyId" result-name="partyId"/>
</simple-method>
Modified: ofbiz/trunk/applications/order/servicedef/secas.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/servicedef/secas.xml?rev=778558&r1=778557&r2=778558&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/servicedef/secas.xml (original)
+++ ofbiz/trunk/applications/order/servicedef/secas.xml Tue May 26 03:46:45 2009
@@ -368,4 +368,12 @@
<condition field-name="accountPartyId" operator="is-not-empty"/>
<action service="createSalesOpportunityAccountRole" mode="sync"/>
</eca>
+ <eca service="createSalesOpportunity" event="commit">
+ <condition field-name="leadPartyId" operator="is-not-empty"/>
+ <action service="createSalesOpportunityLeadRole" mode="sync"/>
+ </eca>
+ <eca service="updateSalesOpportunity" event="commit">
+ <condition field-name="leadPartyId" operator="is-not-empty"/>
+ <action service="createSalesOpportunityLeadRole" mode="sync"/>
+ </eca>
</service-eca>
\ No newline at end of file
Modified: ofbiz/trunk/applications/order/servicedef/services_opportunity.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/servicedef/services_opportunity.xml?rev=778558&r1=778557&r2=778558&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/servicedef/services_opportunity.xml (original)
+++ ofbiz/trunk/applications/order/servicedef/services_opportunity.xml Tue May 26 03:46:45 2009
@@ -77,6 +77,7 @@
<exclude field-name="createdByUserLogin"/>
</auto-attributes>
<attribute name="accountPartyId" mode="IN" type="String" optional="true"/>
+ <attribute name="leadPartyId" mode="IN" type="String" optional="true"/>
</service>
<service name="updateSalesOpportunity" engine="simple" default-entity-name="SalesOpportunity"
location="component://order/script/org/ofbiz/order/opportunity/OpportunityServices.xml" invoke="updateSalesOpportunity">
@@ -84,6 +85,7 @@
<auto-attributes mode="IN" include="pk" optional="false"/>
<auto-attributes mode="IN" include="nonpk" optional="true"/>
<attribute name="accountPartyId" mode="IN" type="String" optional="true"/>
+ <attribute name="leadPartyId" mode="IN" type="String" optional="true"/>
</service>
<service name="createSalesOpportunityRole" engine="simple" default-entity-name="SalesOpportunityRole"
location="component://order/script/org/ofbiz/order/opportunity/OpportunityServices.xml" invoke="createSalesOpportunityRole">
@@ -96,6 +98,12 @@
<attribute name="accountPartyId" mode="IN" type="String"/>
<attribute name="salesOpportunityId" mode="IN" type="String"/>
</service>
+ <service name="createSalesOpportunityLeadRole" engine="simple" default-entity-name="SalesOpportunityRole"
+ location="component://order/script/org/ofbiz/order/opportunity/OpportunityServices.xml" invoke="createSalesOpportunityLeadRole">
+ <description>Create sales opportunity lead role</description>
+ <attribute name="leadPartyId" mode="IN" type="String"/>
+ <attribute name="salesOpportunityId" mode="IN" type="String"/>
+ </service>
<service name="findPartyInSalesOpportunityRole" engine="simple" default-entity-name="SalesOpportunityRole"
location="component://order/script/org/ofbiz/order/opportunity/OpportunityServices.xml" invoke="findPartyInSalesOpportunityRole">
<description>find sales opportunity role party</description>