Related to issue 24991: Fix TestCosting
authorAlvaro Ferraz <alvaro.ferraz@openbravo.com>
Thu, 21 May 2015 17:09:29 +0200
changeset 26872 0d48aea6e4c8
parent 26871 4bcd10789da1
child 26873 9660c62a65e2
Related to issue 24991: Fix TestCosting

ProcessInstance must have the client information to avoid errors while calling to store procedures.
src-test/src/org/openbravo/test/costing/TestCosting.java
--- a/src-test/src/org/openbravo/test/costing/TestCosting.java	Thu May 21 17:06:23 2015 +0200
+++ b/src-test/src/org/openbravo/test/costing/TestCosting.java	Thu May 21 17:09:29 2015 +0200
@@ -11189,6 +11189,7 @@
         setGeneralData(processInstance);
         processInstance.setProcess(OBDal.getInstance().get(Process.class, processId));
         processInstance.setRecordID(document.getId().toString());
+        processInstance.setClient(OBDal.getInstance().get(Client.class, CLIENT_ID));
         processInstance.setUserContact(OBDal.getInstance().get(User.class, USER_ID));
         OBDal.getInstance().save(processInstance);
         OBDal.getInstance().flush();
@@ -11292,6 +11293,7 @@
       processInstance.setProcess(OBDal.getInstance().get(Process.class,
           PROCESSPRODUCTION_PROCESS_ID));
       processInstance.setRecordID(billOfMaterialsProduction.getId());
+      processInstance.setClient(OBDal.getInstance().get(Client.class, CLIENT_ID));
       processInstance.setUserContact(OBDal.getInstance().get(User.class, USER_ID));
       OBDal.getInstance().save(processInstance);
       OBDal.getInstance().flush();