[
https://issues.apache.org/jira/browse/OFBIZ-9117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15666084#comment-15666084 ]
Deepak Dixit edited comment on OFBIZ-9117 at 11/15/16 5:01 AM:
---------------------------------------------------------------
Sure Paul,
Let me try to explain,
- Following is the service in context while calling createInvoiceContactMech service (form createInvoiceFromOrder, InvoiceServices.java 358):
{contactMechPurposeTypeId=PAYMENT_LOCATION, invoiceId=10070, contactMechId=9001}
- But entity auto engine try to create InvoiceContactMech record for contactMechId=10060, Ideally it should have to use 9001 to create InvoiceContactMech.
To regenerate this issue revert r#1769650, and run following test case:
./gradlew "ofbiz --test component=accounting --test suitename=accountingtests"
was (Author: deepak.dixit):
Sure Paul,
Let try to explain,
- Following is the service in context while calling createInvoiceContactMech service:
{quote}{contactMechPurposeTypeId=PAYMENT_LOCATION, invoiceId=10070, contactMechId=9001}{quote}
- But entity auto engine try to create InvoiceContactMech record for contactMechId=10060, Ideally it should have to use 9001 to create InvoiceContactMech.
To regenerate this issue revert r#1769650, and run following test case:
./gradlew "ofbiz --test component=accounting --test suitename=accountingtests"
> EntityAuto engine override the passed service in parameters
> -----------------------------------------------------------
>
> Key: OFBIZ-9117
> URL:
https://issues.apache.org/jira/browse/OFBIZ-9117> Project: OFBiz
> Issue Type: Bug
> Components: ALL COMPONENTS
> Affects Versions: Trunk
> Reporter: Deepak Dixit
> Attachments: errorlog.txt
>
>
> There is an bug in EntityAuto engine, it override the passed service in parameters.
> In createInvoiceForOrder service calls the createInvoiceContactMech to crate invoice contactMech for PAYMENT_LOCATION purpose (at line no 357). In case of SO it should use Company PAYMENT_LOCATION contactMech. It get the Company contactMechId correctly and set it createInvoiceContactMech service in context correctly, but system throws foreign key constraints error for incorrect contactMechId.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)