Fixed: Conveted createInvoiceContactMech service form entity-auto to simple method, there is an bug in EntityAutoEngine. It causing test case failure. This is an quick fix. EntityAuto bug reported under ticket id OFBIZ-9117
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1769650 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/applications/accounting/minilang/invoice/InvoiceServices.xml b/applications/accounting/minilang/invoice/InvoiceServices.xml
index e50ca79..8b2ba2a 100644
--- a/applications/accounting/minilang/invoice/InvoiceServices.xml
+++ b/applications/accounting/minilang/invoice/InvoiceServices.xml
@@ -1013,4 +1013,10 @@
</if-compare-field>
<field-to-result field="isForeign"/>
</simple-method>
+ <simple-method method-name="createInvoiceContactMech" short-description="Create a ContactMech for an invoice">
+ <make-value value-field="invoiceContactMech" entity-name="InvoiceContactMech"/>
+ <set-pk-fields map="parameters" value-field="invoiceContactMech"/>
+ <create-value value-field="invoiceContactMech"/>
+ <field-to-result field="contactMechId" result-name="invoiceContactMech"/>
+ </simple-method>
</simple-methods>
diff --git a/applications/accounting/minilang/test/AutoAcctgFinAccountTests.xml b/applications/accounting/minilang/test/AutoAcctgFinAccountTests.xml
index 1a6af03..b344f79 100644
--- a/applications/accounting/minilang/test/AutoAcctgFinAccountTests.xml
+++ b/applications/accounting/minilang/test/AutoAcctgFinAccountTests.xml
@@ -206,9 +206,7 @@
<entity-one entity-name="UserLogin" value-field="userLogin">
<field-map field-name="userLoginId" value="system"/>
</entity-one>
- <set field="serviceCtx.userLogin" from-field="userLogin">
- <results-to-map map-name="finAccountAuthResult"/>
- </set>
+ <set field="serviceCtx.userLogin" from-field="userLogin"/>
<call-service service-name="setFinAccountTransStatus" in-map-name="serviceCtx">
<results-to-map map-name="serviceResult"/>
</call-service>
diff --git a/applications/accounting/servicedef/services_invoice.xml b/applications/accounting/servicedef/services_invoice.xml
index b8fdbde..5f414f6 100644
--- a/applications/accounting/servicedef/services_invoice.xml
+++ b/applications/accounting/servicedef/services_invoice.xml
@@ -301,7 +301,8 @@
<description>Checks to see if the payments applied to an invoice total up to the invoice total; if so sets to PAID</description>
<attribute name="invoiceId" type="String" mode="IN" optional="false"/>
</service>
- <service name="createInvoiceContactMech" engine="entity-auto" invoke="create" default-entity-name="InvoiceContactMech">
+ <service name="createInvoiceContactMech" engine="simple" location="component://accounting/minilang/invoice/InvoiceServices.xml"
+ invoke="createInvoiceContactMech" default-entity-name="InvoiceContactMech">
<description>Create a ContactMech for an invoice</description>
<permission-service service-name="acctgInvoicePermissionCheck" main-action="CREATE"/>
<auto-attributes include="pk" mode="IN" optional="false"/>