Migrating Libero Manufacturing to iDempiere

The migration of Adempiere modules to iDempiere

Migrating Libero Manufacturing to iDempiere

Postby red1 » Wed Sep 18, 2013 11:28 pm

Libero Manufacturing was previously reviewed in the Manufacturing forum. It was also tested here and here.

Now we have also converted it into a full fledge OSGi plugin for use in iDempiere. The bitbucket of the project in progress is https://bitbucket.org/red1/org.idempiere.liberomfg.

There are list of trackers raised from time to time when bugs are found or core changes are needed.
1. https://idempiere.atlassian.net/browse/IDEMPIERE-1371
2. https://idempiere.atlassian.net/browse/IDEMPIERE-1373

The status of the project is:
1. Base plugin created and all code transferred
1.2 MStorage upgraded to MStorageOnHand and all its reference refactored.
2. Callouts removed from metadata and converted to Extensions
3. Forms attached as extensions also in plugin.xml
4. ModelFactory wrapping of table classes done.
5. ModelValidator wrapped in OSGi service xml with all code events intact and resolved.
6. Menu meta-model and underlying structure of windows and functions exported out as LiberoMfg.zip and Pack In do be done via Swing UI window and not auto start.
(TODO tasks further down)

Plugin and 2Pack as well as ExpDat of PackOut is at http://sf.net/projects/red1/files/p2/LiberoMFG/

Following are screenshots of Tables belonging to EE01 (Libero Manufacturing Management EntityType), the Callout columns and successful Pack In of the meta-model.

Screen Shot 2013-09-18 at 6.18.00 PM.png
Screen Shot 2013-09-18 at 6.18.00 PM.png (68 KiB) Viewed 30705 times

Screen Shot 2013-09-18 at 6.18.08 PM.png
Screen Shot 2013-09-18 at 6.18.08 PM.png (65.42 KiB) Viewed 30705 times

Screen Shot 2013-09-18 at 7.22.32 PM.png
Screen Shot 2013-09-18 at 7.22.32 PM.png (18.36 KiB) Viewed 30705 times

Screen Shot 2013-09-18 at 5.25.39 PM.png
Screen Shot 2013-09-18 at 5.25.39 PM.png (19.82 KiB) Viewed 30705 times

Screen Shot 2013-09-18 at 5.23.47 PM.png
Screen Shot 2013-09-18 at 5.23.47 PM.png (20.02 KiB) Viewed 30705 times

Screen Shot 2013-09-17 at 11.29.46 AM.png
Screen Shot 2013-09-17 at 11.29.46 AM.png (16.14 KiB) Viewed 30705 times

Screen Shot 2013-09-17 at 11.29.30 AM.png
Screen Shot 2013-09-17 at 11.29.30 AM.png (15.66 KiB) Viewed 30705 times

Screen Shot 2013-09-17 at 11.23.52 AM.png
Screen Shot 2013-09-17 at 11.23.52 AM.png (21.44 KiB) Viewed 30705 times

Screen Shot 2013-09-17 at 10.10.54 AM.png
Screen Shot 2013-09-17 at 10.10.54 AM.png (43.19 KiB) Viewed 30705 times

Screen Shot 2013-09-17 at 10.10.37 AM.png
Screen Shot 2013-09-17 at 10.10.37 AM.png (27.47 KiB) Viewed 30705 times

Here Hengsin advised not to create extensions for the above 3 Callouts but retain the old way its done in the Table/Column > Callout field definition. So you will not find these 3 in the plugin.xml. Another useful point about this is that the adempiere.base.callout plugin also need not export out its org.compiere.model package to be used in LiberoMfg plugin.

Screen Shot 2013-09-17 at 6.17.18 AM.png
Screen Shot 2013-09-17 at 6.17.18 AM.png (53.6 KiB) Viewed 30705 times
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating Libero Manufacturing to iDempiere

Postby red1 » Wed Sep 18, 2013 11:30 pm

Below is the MANIFEST and Plugin.xml contents:
Code: Select all
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: LiberoMfg
Bundle-SymbolicName: org.idempiere.LiberoMfg;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.adempiere.base;bundle-version="1.0.0",
org.adempiere.base.process;bundle-version="1.0.0",
org.adempiere.ui;bundle-version="1.0.0",
org.adempiere.ui.swing,
org.adempiere.base.callout;bundle-version="1.0.0"
Service-Component: OSGI-INF/ModelFactory.xml, OSGI-INF/DocFactory.xml, OSGI-INF/Validator.xml
Import-Package: org.osgi.framework;version="1.6.0",
org.osgi.service.event;version="1.3.0"


Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
   <extension
         id="org.eevolution.process.CalculateLowLevel"
         point="org.adempiere.base.Process">
      <process
            class="org.eevolution.process.CalculateLowLevel">
      </process>
   </extension>
   <extension
         id="org.eevolution.process.CompletePrintOrder"
         point="org.adempiere.base.Process">
      <process
            class="org.eevolution.process.CompletePrintOrder">
      </process>
   </extension>
   <extension
         id="org.eevolution.process.ComponentChange"
         point="org.adempiere.base.Process">
      <process
            class="org.eevolution.process.ComponentChange">
      </process>
   </extension>
   <extension
         id="org.idempiere.liberomfg.ProcessCall4"
         point="org.adempiere.base.Process">
      <process
            class="org.idempiere.liberomfg.ProcessCall4">
      </process>
   </extension>
   <extension
         id="org.eevolution.process.CopyFromBOM"
         point="org.adempiere.base.Process">
      <process
            class="org.eevolution.process.CopyFromBOM">
      </process>
   </extension>
   <extension
         id="id6"
         point="org.adempiere.base.Process">
      <process
            class="org.eevolution.process.CopyPriceToStandard">
      </process>
   </extension>
   <extension
         id="org.eevolution.process.CreateCostElement"
         point="org.adempiere.base.Process">
      <process
            class="org.eevolution.process.CreateCostElement">
      </process>
   </extension>
   <extension
         id="org.eevolution.process.CreateDocType"
         point="org.adempiere.base.Process">
      <process
            class="org.eevolution.process.CreateDocType">
      </process>
   </extension>
   <extension
         id="org.eevolution.process.CreateProductPlanning"
         point="org.adempiere.base.Process">
      <process
            class="org.eevolution.process.CreateProductPlanning">
      </process>
   </extension>
   <extension
         id="org.eevolution.process.CRP"
         point="org.adempiere.base.Process">
      <process
            class="org.eevolution.process.CRP">
      </process>
   </extension>
   <extension
         id="org.eevolution.process.CRPSummary"
         point="org.adempiere.base.Process">
      <process
            class="org.eevolution.process.CRPSummary">
      </process>
   </extension>
   <extension
         id="org.compiere.process.DistributionRun"
         point="org.adempiere.base.Process">
      <process
            class="org.compiere.process.DistributionRun">
      </process>
   </extension>
   <extension
         id="org.eevolution.process.FixPaymentCashLine"
         point="org.adempiere.base.Process">
      <process
            class="org.eevolution.process.FixPaymentCashLine">
      </process>
   </extension>
   <extension
         id="org.eevolution.process.ImportProductPlanning"
         point="org.adempiere.base.Process">
      <process
            class="org.eevolution.process.ImportProductPlanning">
      </process>
   </extension>
   <extension
         id="org.eevolution.process.MovementGenerate"
         point="org.adempiere.base.Process">
      <process
            class="org.eevolution.process.MovementGenerate">
      </process>
   </extension>
   <extension
         id="org.eevolution.process.MRP"
         point="org.adempiere.base.Process">
      <process
            class="org.eevolution.process.MRP">
      </process>
   </extension>
   <extension
         id="org.eevolution.process.MRPUpdate"
         point="org.adempiere.base.Process">
      <process
            class="org.eevolution.process.MRPUpdate">
      </process>
   </extension>
   <extension
         id="org.eevolution.process.PP_Product_BOM_Check"
         point="org.adempiere.base.Process">
      <process
            class="org.eevolution.process.PP_Product_BOM_Check">
      </process>
   </extension>
   <extension
         id="org.eevolution.process.PrintBOM"
         point="org.adempiere.base.Process">
      <process
            class="org.eevolution.process.PrintBOM">
      </process>
   </extension>
   <extension
         id="org.eevolution.process.RollupBillOfMaterial"
         point="org.adempiere.base.Process">
      <process
            class="org.eevolution.process.RollupBillOfMaterial">
      </process>
   </extension>
   <extension
         id="org.eevolution.process.RollupWorkflow"
         point="org.adempiere.base.Process">
      <process
            class="org.eevolution.process.RollupWorkflow">
      </process>
   </extension>
   <extension
         point="org.adempiere.base.IColumnCallout">
      <callout
            class="org.idempiere.component.Callout_PP_Product_BOMLine"
            columnName="M_Product_ID"
            tableName="PP_Product_BOMLine">
      </callout>
      <callout
            class="org.idempiere.component.Callout_PP_Product_BOM"
            columnName="M_Product_ID"
            tableName="PP_Product_BOM">
      </callout>
      <callout
            class="org.idempiere.component.Callout_PP_Order"
            columnName="QtyEntered"
            tableName="PP_Order">
      </callout>
      <callout
            class="org.idempiere.component.Callout_PP_Order"
            columnName="M_Product_ID"
            tableName="PP_Order">
      </callout>
      <callout
            class="org.idempiere.component.Callout_DD_OrderLine"
            columnName="M_Product_ID"
            tableName="DD_OrderLine">
      </callout>
      <callout
            class="org.idempiere.component.Callout_DD_OrderLine"
            columnName="M_AttributeSetInstance_ID"
            tableName="DD_OrderLine">
      </callout>
      <callout
            class="org.idempiere.component.Callout_DD_OrderLine"
            columnName="C_UOM_ID"
            tableName="DD_OrderLine">
      </callout>
      <callout
            class="org.idempiere.component.Callout_DD_OrderLine"
            columnName="ConfirmedQty"
            tableName="DD_OrderLine">
      </callout>
      <callout
            class="org.idempiere.component.Callout_DD_OrderLine"
            columnName="M_AttributeSetInstanceTo_ID"
            tableName="DD_OrderLine">
      </callout>
      <callout
            class="org.idempiere.component.Callout_DD_OrderLine"
            columnName="QtyOrdered"
            tableName="DD_OrderLine">
      </callout>
      <callout
            class="org.idempiere.component.Callout_DD_OrderLine"
            columnName="QtyEntered"
            tableName="DD_OrderLine">
      </callout>
      <callout
            class="org.idempiere.component.Callout_DD_Order"
            columnName="C_DocType_ID"
            tableName="DD_Order">
      </callout>
      <callout
            class="org.idempiere.component.Callout_DD_Order"
            columnName="C_BPartner_ID"
            tableName="DD_Order">
      </callout>
      <callout
            class="org.idempiere.component.Callout_DD_Order"
            columnName="C_Order_ID"
            tableName="DD_Order">
      </callout>
      <callout
            class="org.idempiere.component.Callout_PP_Cost_Collector"
            columnName="PP_Order_ID"
            tableName="PP_Cost_Collector">
      </callout>
      <callout
            class="org.idempiere.component.Callout_PP_Cost_Collector"
            columnName="PP_Order_Node_ID"
            tableName="PP_Cost_Collector">
      </callout>
      <callout
            class="org.idempiere.component.Callout_PP_Cost_Collector"
            columnName="MovementQty"
            tableName="PP_Cost_Collector">
      </callout>
      <callout
            class="org.idempiere.component.Callout_PP_Order_BOMLine"
            columnName="QtyEntered"
            tableName="PP_Order_BOMLine">
      </callout>
      <callout
            class="org.idempiere.component.Callout_PP_Order_BOMLine"
            columnName="QtyRequiered"
            tableName="PP_Order_BOMLine">
      </callout>
   </extension>
   <extension
         id="org.eevolution.form.CAbstractBOMTree"
         point="org.adempiere.apps.Form">
      <form
            class="org.eevolution.form.CAbstractBOMTree">
      </form>
   </extension>
   <extension
         id="org.eevolution.form.CAbstractForm"
         point="org.adempiere.apps.Form">
      <form
            class="org.eevolution.form.CAbstractForm">
      </form>
   </extension>
   <extension
         id="org.eevolution.form.CCRP"
         point="org.adempiere.apps.Form">
      <form
            class="org.eevolution.form.CCRP">
      </form>
   </extension>
   <extension
         id="id4"
         point="org.adempiere.apps.Form">
      <form
            class="org.eevolution.form.COrderBOMTree">
      </form>
   </extension>
   <extension
         id="org.eevolution.form.CProductBOMTree"
         point="org.adempiere.apps.Form">
      <form
            class="org.eevolution.form.CProductBOMTree">
      </form>
   </extension>
   <extension
         id="org.eevolution.form.VCRP"
         point="org.adempiere.apps.Form">
      <form
            class="org.eevolution.form.VCRP">
      </form>
   </extension>
   <extension
         id="org.eevolution.form.VMRPDetailed"
         point="org.adempiere.apps.Form">
      <form
            class="org.eevolution.form.VMRPDetailed">
      </form>
   </extension>
   <extension
         id="org.eevolution.form.VOrderDistribution"
         point="org.adempiere.apps.Form">
      <form
            class="org.eevolution.form.VOrderDistribution">
      </form>
   </extension>
   <extension
         id="org.eevolution.form.VOrderDistributionReceipt"
         point="org.adempiere.apps.Form">
      <form
            class="org.eevolution.form.VOrderDistributionReceipt">
      </form>
   </extension>
   <extension
         id="org.eevolution.form.VOrderPlanning"
         point="org.adempiere.apps.Form">
      <form
            class="org.eevolution.form.VOrderPlanning">
      </form>
   </extension>
   <extension
         id="org.eevolution.form.VOrderReceiptIssue"
         point="org.adempiere.apps.Form">
      <form
            class="org.eevolution.form.VOrderReceiptIssue">
      </form>
   </extension>
   <extension
         id="org.eevolution.form.VProductConfigurationBOM"
         point="org.adempiere.apps.Form">
      <form
            class="org.eevolution.form.VProductConfigurationBOM">
      </form>
   </extension>
   <extension
         id="org.eevolution.form.VTreeBOM"
         point="org.adempiere.apps.Form">
      <form
            class="org.eevolution.form.VTreeBOM">
      </form>
   </extension>
   <extension
         id="org.eevolution.form.WFPanelManufacturing"
         point="org.adempiere.apps.Form">
      <form
            class="org.eevolution.form.WFPanelManufacturing">
      </form>
   </extension>

</plugin>
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating Libero Manufacturing to iDempiere

Postby red1 » Wed Sep 18, 2013 11:35 pm

The plugin successfully installed:

Screen Shot 2013-09-19 at 3.23.42 AM.png
Screen Shot 2013-09-19 at 3.23.42 AM.png (34.04 KiB) Viewed 30704 times

Follow previous tutorials for the basics of setting up iDempiere new plugins.
The plugin and 2Pack can be fetched from the SourceForge link above.

Below is the screenshot of Libero MFG menu structure named 'Manufacturing Management'.

Screen Shot 2013-09-19 at 4.15.30 AM.png
Screen Shot 2013-09-19 at 4.15.30 AM.png (30.55 KiB) Viewed 30691 times

Below is the Eclipse IDE view of the project and the ModelFactory class already done.

EclipseMFGscreen.png
EclipseMFGscreen.png (293.62 KiB) Viewed 30621 times
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating Libero Manufacturing to iDempiere

Postby red1 » Thu Sep 19, 2013 3:39 am

The next steps are:
1. Further review and refactoring of code according to iDempiere best practice.
2. Review of customised forms in Swing and ZK WebUI.
3. Proposal to setup of Fitnesse plugin Testing at Jenkins iDempiere server.
4. Extensive users testing. (This is where you all come in and help me test this and report back any outcome for improvement.)
5. Documentation and User Guide.

Screen Shot 2013-09-19 at 4.02.48 AM.png
Screen Shot 2013-09-19 at 4.02.48 AM.png (57.03 KiB) Viewed 30698 times
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating Libero Manufacturing to iDempiere

Postby red1 » Thu Sep 19, 2013 10:12 am

The beauty and power of OSGi is demonstrated here. When we start up iDempiere without the LiberoMFG plugin, and click on the MRP Info window which is a customized form and separate Java code, we hit the following error.

Code: Select all
09:54:34.455 DefaultFormFactory.newFormInstance: org.eevolution.form.VMRPDetailed [58]
java.lang.ClassNotFoundException: org.eevolution.form.VMRPDetailed
   at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
   at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
   at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
   at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)

Here we look at the AD Window of MRP Info to confirm that it is indeed a Special Form calling a customized Swing GUI code called org.eevolution.form.VMRPDetailed.

Screen Shot 2013-09-19 at 10.21.08 AM.png
Screen Shot 2013-09-19 at 10.21.08 AM.png (41.22 KiB) Viewed 30658 times

Then when we install the plugin again:

Screen Shot 2013-09-19 at 10.06.33 AM.png
Screen Shot 2013-09-19 at 10.06.33 AM.png (33.13 KiB) Viewed 30664 times

We can now click on the MRP Info window and get a different but awesome response.

Screen Shot 2013-09-19 at 10.04.29 AM.png
Screen Shot 2013-09-19 at 10.04.29 AM.png (81.58 KiB) Viewed 30664 times

This proves the concept of decoupling (even on a hot running day) of independent modules written on ADempiere years ago without modification to its Form class to run on top of iDempiere right away when wrapped in an OSGi plugin. The rest of our long lives shall be easy and we can go for more holidays from now on.
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating Libero Manufacturing to iDempiere

Postby red1 » Mon Sep 23, 2013 5:22 am

I have brought over the last changes of Libero Mfg project at eEvolution repository in its GitHub.

I also began to look at bringing over the eEvolution stuff over from the idempiere core so as not to impact there. Carlos Ruiz has begun himself when he dropped some DB Functions. Thus I further asked if he can drop all of eEvolution from the core and just use this plugin for dedicated LiberoMfg. I thus will keep the plugin as is where is bases vis-a-vis to the original GitHub of the creator.

Any enhancements thereafter to LiberoMfg must be done as fragments or addons to it to allow maximum adaptation from global community. This also makes maintenance easier as cause of concern or focus of project is separated from each other.

These latest changes are already committed to my bitbucket.

The updated plugin.jar and LiberoMfg 2Pack is sent to the usual SourceForge files section.
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating Libero Manufacturing to iDempiere

Postby tanveerkhan1 » Sat Sep 28, 2013 3:19 pm

Dear Red1,
First of all congratulations and thanks for the effort.It's very helpful.
I wanted to know when would the plugin be available to be used through felix console. As i dont know how to run eclipse and i want to participate by functional testing it on idempiere.
tanveerkhan1
 
Posts: 4
Joined: Fri Sep 27, 2013 4:28 pm

Re: Migrating Libero Manufacturing to iDempiere

Postby red1 » Sat Sep 28, 2013 5:18 pm

It is mostly via the Java swing client as described above. This is because many of its customized dialog forms or window panels are created in swing. There is hardly any for Web UI forms. Thus test it after you setup as above:
1. Install plugin
2. Login as System and Pack In 'LiberoMfg.zip'
4. Run Sequence Check
3. Login in GardenAdmin, and run Role Access Update.
4. Relogin and proceed to play around, test it and report back any errors.

However i have divided the plugin into base (for both swing and server) and forms (for the swing only) so that the base contains most of the process and model logic for testing with Fitnesse. This is useful if you wish to do testing that way. You can learn up more from http://wiki.idempiere.org/en/Fitnesse.HowTo.
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating Libero Manufacturing to iDempiere

Postby tanveerkhan1 » Sun Sep 29, 2013 4:16 pm

I dont understand what you meant by Install Plugin. I know how to packin and do rest of the stuff you mentioned. But how to install that plugin ? From the felix console it cant happen i guess then how ?
tanveerkhan1
 
Posts: 4
Joined: Fri Sep 27, 2013 4:28 pm

Re: Migrating Libero Manufacturing to iDempiere

Postby tanveerkhan1 » Sun Sep 29, 2013 4:18 pm

I must tell i only know about functional side. i don't know about Java at all.
tanveerkhan1
 
Posts: 4
Joined: Fri Sep 27, 2013 4:28 pm

Re: Migrating Libero Manufacturing to iDempiere

Postby tanveerkhan1 » Sun Sep 29, 2013 4:58 pm

i ran the packin process and it gave me an error that a table was missing. i suppose it was due to the database structure that have not changed.and i have to do that database changes. now my question is stated below as i want to make the changes to the database.

"ExpDat20130918_210017.jar (timestamp may change) is the ExpDat dump of the latest iDempiere ready database where the PackOut is set to provide the 2Pack. DB is tested on PG only. "

Now what i understand is when we run the process of importidempiere.bat from $IDEMPIERE_HOME$/utils it imports the database present in idempiere/data/seed/adempiere_pg.dmp
this folder also has the file adempiere_pg.jar
which of the above file would i have to replace to add the file provided by you.
tanveerkhan1
 
Posts: 4
Joined: Fri Sep 27, 2013 4:28 pm

Re: Migrating Libero Manufacturing to iDempiere

Postby red1 » Thu Oct 03, 2013 6:07 am

Yes you should have latest iDempiere to try out. I maybe bit outdated at some weeks, but i will always like to test against the latest DailyBuild. So if mine is broken just inform me here.

After your done RUN_ImportIdempiere then just import the 2Pack of latest time stamp. I may delete the older ones as they are no use if we are using latest. Also older ones may have errors i fixed and submitted in latest ones.

Just check the timestamp to be latest.
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating Libero Manufacturing to iDempiere

Postby red1 » Thu Oct 03, 2013 6:39 am

LiberoMfg is testable using SLIM. See my other post: viewtopic.php?f=45&t=1777
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating Libero Manufacturing to iDempiere

Postby red1 » Mon Oct 07, 2013 1:05 pm

Updated http://sourceforge.net/projects/red1/fi ... LiberoMFG/ with new note:
Above Libero plugin (1) is now split into two.
4) org.idempiere.LiberoMfg_1.0.0.201310071230.jar
5) org.idempiere.LiberoMfg_forms_1.0.0.201310071230.jar
(4) is for both adempiere-client and idempiere-server AND it has embedded 2Pack so you need not have (3)
(5) is for adempiere-client only You can install (4) and (5) directly from your OSGi console:
Code: Select all
install http://downloads.sourceforge.net/project/red1/p2/LiberoMFG/org.idempiere.LiberoMfg_1.0.0.201310071230.jar
install http://downloads.sourceforge.net/project/red1/p2/LiberoMFG/org.idempiere.LiberoMfg_forms_1.0.0.201310071230.jar
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating Libero Manufacturing to iDempiere

Postby red1 » Sat Oct 12, 2013 7:23 am

Just updated bitbucket and SF with changes:
1. Incorporate database Views that are affected by the typo change: 'requiered' to 'required'. So this affects the 2Pack in LiberoMfg.zip and the LiberoMfg plugin.
2. Refactor org.eevolution.model package from iDempiere core to org.idempiere.model of LiberoMfg plugin. IDempiere core package remains intact and await final action recommended to Carlos Ruiz to remove all Libero code so as to use only via external plugins. (This affects LiberoHR too).
3. Update of MFG_ModelFactory to register the new model classes brought over by the refactoring.
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating Libero Manufacturing to iDempiere

Postby red1 » Sun Oct 13, 2013 10:56 am

It seems that something is broken for MakeToOrder. Since my previous review more than 2 years ago, MPPMRP.java has changed and due to this discussion. What broke is during MPPOrder.updateMakeToKit:

Code: Select all
__EXCEPTION__:org.adempiere.exceptions.AdempiereException: This action is not supported
   at org.idempiere.model.MPPOrder.updateMakeToKit(MPPOrder.java:1713)
   at org.idempiere.fitnesse.mfg.ProcessHandling.updateMakeToKit(ProcessHandling.java:123)

MakeToOrder cannot do automatic Receipt and Issue (if it was still meant to) this time because the createMO.PP_order.setC_OrderLine_ID(C_OrderLine_ID) did not happen. It was due to Plant_ID been empty. The link above showing the diff snap explains better. In short the logic has become messy and cross-wired. There is also the challenge of trying to understand the real business logic underlying all of it.
My original testing of updateMakeToKit has to look at one step back in MFG_Validator: if (po instanceof MInOut && type == IEventTopics.DOC_AFTER_COMPLETE) - - updateMPPOrder(outline); to see what else has impacted since my previous review.

Meanwhile, a minor repositioning of the Plant_ID initializing should solve it:

Code: Select all
diff --git a/src/org/idempiere/model/MPPMRP.java b/src/org/idempiere/model/MPPMRP.java
--- a/src/org/idempiere/model/MPPMRP.java
+++ b/src/org/idempiere/model/MPPMRP.java
@@ -94,15 +94,14 @@
         if(workflow_id > 0)
            workflow = MWorkflow.get(ol.getCtx(), workflow_id);
         
-         //Search Plant for this Warehouse
-         int plant_id = 0;
+         //Search Plant for this Warehouse -
+//red1 raised the getPlantForWareHouse as later stops setC_OrderLine in PP_Order (see http://red1.org/adempiere/viewtopic.php?f=45&t=1775&p=8471#p8471)
+         int plant_id = MPPProductPlanning.getPlantForWarehouse(ol.getM_Warehouse_ID());
         
         MPPProductPlanning pp = null;
         //Search planning data if no exist BOM or Workflow Standard
         if(bom == null || workflow == null)
         {
-            plant_id = MPPProductPlanning.getPlantForWarehouse(ol.getM_Warehouse_ID());
-
            if(plant_id <= 0)
            {
               throw new NoPlantForWarehouseException(ol.getM_Warehouse_ID());
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating Libero Manufacturing to iDempiere

Postby red1 » Mon Oct 21, 2013 5:41 pm

I have completed the Technical Guide documentation that described important parts of what is done here http://sourceforge.net/projects/red1/fi ... f/download.
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating Libero Manufacturing to iDempiere

Postby hieplq » Thu Oct 31, 2013 5:04 pm

Hi Red.
when I see a bug. I can report it here or make a ticket in idempiere?

I. I see a problem. please consider is it a bug?
1. menu "BOM & Formula Info" is deactive. this menu link to org.eevolution.form.VTreeBOM
2. org.eevolution.form.VTreeBOM is exist in liberoMfg-form because i think it is ok. no deprecated
3. in "bill of materials & formula setup" when i click to "BOM & Formula Info" node. org.eevolution.form.VTreeBOM is open.
=> (1) and (2) is a bit confuse

II. as i report in https://groups.google.com/forum/#!topic ... 1ZOjdHQaZs
after I fix to compiler program. when i run in form "BOM & Formula Info" i receive cast exception.
because I fix all import org.eevolution.model to org.idempiere.model with model has in two package
but i encounter compiler error
class org.eevolution.form,OrderDistributionReceipt call function setOrderLine false because wrong type parameter
please consider code in https://bitbucket.org/red1/org.idempier ... omfg_forms is newest.

III. also consider my comment in this ticket. a change code code make swing libero break.
https://idempiere.atlassian.net/browse/IDEMPIERE-386
hieplq
 
Posts: 7
Joined: Fri Aug 30, 2013 2:19 am

Re: Migrating Libero Manufacturing to iDempiere

Postby hieplq » Fri Nov 01, 2013 11:00 am

Hi red1.
hengsin is resolved item III by change class in core for backward compatibility
hieplq
 
Posts: 7
Joined: Fri Aug 30, 2013 2:19 am

Re: Migrating Libero Manufacturing to iDempiere

Postby hieplq » Sun Nov 03, 2013 6:35 pm

please cancel prev report. I has new report after deep discover.

I revert all modified. only use origin code.
1. I run swing client (without libero plug-in)
2. install plug-in by "super setup" method
3. when debug by decompiler i see plug-in is used model class as org.eevolution.model.MPPOrder

example decompiler of org.eevolution.form.OrderReceiptIssue
// Method descriptor #210 (Lorg/eevolution/model/MPPOrder;Lorg/compiere/minigrid/IMiniTable;)V
// Stack: 8, Locals: 20
public void createIssue(org.eevolution.model.MPPOrder order, org.compiere.minigrid.IMiniTable issue);
0 aload_0 [this]
1 invokevirtual org.eevolution.form.OrderReceiptIssue.getMovementDate() : java.sql.Timestamp [211]
4 astore_3 [movementDate]

4. I search all project, but not found org.eevolution.model.MPPOrder class.
when I search in repository, I see some model class (include MPPOrder) is remove from rev:4294.

5. because loss some model class in org.eevolution.model package I encounter some problem.
a. build swing client from source.
b. run swing client form binary i don't open some form because below error (reason is by loss model class)
java.lang.IllegalStateException: org.eclipse.core.runtime.CoreException: Plug-in "org.idempiere.LiberoMfg_forms" was unable to instantiate class "org.eevolution.form.VOrderReceiptIssue".

6. list form error:
CCRP, VMRPDetailed, VOrderPlanning, VOrderReceiptIssue.

(*) from "order receipt & issue" is don't open because when process init, it use loss model class.
other form can open but i think when process event use loss model class, it will don't run complete;
hieplq
 
Posts: 7
Joined: Fri Aug 30, 2013 2:19 am

Re: Migrating Libero Manufacturing to iDempiere

Postby red1 » Wed Nov 06, 2013 5:52 pm

Yes Hiep, you can use this forum to report errors for the moment. Your report above is very detailed and it is very useful for me to resolve such issues.
The error was due to OrderReceiptIssue.java import org.eevolution.model.MPPOrder instead of import org.idempiere.model.MPPOrder;
From investigating i noticed that i have not completely pushed the final source to http://bitbucket.org/red1/org.idempiere.liberomfg_forms
Now i have done it. So please review and test again.

Thank you for the tip.
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating Libero Manufacturing to iDempiere

Postby hieplq » Fri Nov 08, 2013 9:01 pm

Hi Red1.

A some error by migrate. it's easy to fix. i report for other can continue test.

1. "Cost BOM Multi Level Review" is not run by don't make extension of class
org.eevolution.report.CostBillOfMaterial

2. "Frozen/UnFrozen Cost" is not run by don't make extension of class
org.eevolution.process.FrozenUnFrozenCost

3. "Distribution Run Orders" is not run by don't make extension of class
org.eevolution.process.DistributionRunOrders

4. "Material Receipt Distribution Order" is not run by don't make extension of class
org.eevolution.form.VOrderDistributionReceipt
hieplq
 
Posts: 7
Joined: Fri Aug 30, 2013 2:19 am

Re: Migrating Libero Manufacturing to iDempiere

Postby hieplq » Wed Dec 04, 2013 2:08 am

I. VTreeBom is still use org.eevolution.model.*
TreeBom is still use org.eevolution.model.*

II. cast exception when use VBOMDrop
when make plug-in libero mfg.
some model is move to org.idempiere.model.* but old model is remain in core code.
class VBOMDrop is still in core code because it use old model

rank of MFGModelFactory.xml is 1 to priority factory org.idempiere.component.MFG_ModelFactory

because when VBOMDrop query some model MPPOrder, MPPProductBOMLine function return model in org.idempiere.model.*
=> cast exception.

solution:
make copy of VBOMDrop to libero mfg form, use org.idempiere.model.* in new VBOMDrop
hieplq
 
Posts: 7
Joined: Fri Aug 30, 2013 2:19 am

Re: Migrating Libero Manufacturing to iDempiere

Postby red1 » Sun Jan 12, 2014 10:37 am

Hi Hiep,
Thank you very much for your feedback, i will review and update again. Please continue giving such feedback.
red1
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating Libero Manufacturing to iDempiere

Postby stevenyanzhi » Thu Dec 18, 2014 2:22 pm

Hi Red1:
I have find some issues in MFG/WMS plugin, I list as following:

1. LiberoWMS requires some code change in LiberoMFG, but it is not there:
the LiberoWMS process "ReleaseInOutbound" will create Distribution Order Lines(DD_OrderLine) as a result, there is supposed to be a column name "wm_inoutboundline_id" in table DD_OrderLine, but it is not there both in the DB and the code. I suppose this should be added to LiberoMFG.
However, when I tried to manually add a column in the DB and tried to re-generate the file "I_DD_OrderLine.java"/"X_DD_OrderLine.java", it still have error.
the code "I_DD_OrderLine.java" generated have a reference to class "MWMInOutBoundLine", which is a java file in plugin LiberoWMS, and can not be found in plugin LiberoMFG.
This is a cross reference error.
So I wander how I can solve this issue, since these are 2 plugins are co-dependent with each other, and Eclipse will not alow cross-dependency when compiling projects.

2. the MRP issue in plugin LiberoMFG, file org.idempiere.model.MPPMRP.java, function createMOMakeTo(), this function didn't consider the item type, whether it is a Purchased item or a Production item. It regards all items as production items and check the bom/workflow/planning data of it, and since Purchased items do not have BOM/planning data, it errors out when a Sales Order doing Complete process.
I think a code like following should be added on top of the function, if this item is not a BOM item, it should be ignored from the create manufacturing order function.
Code: Select all
      
MPPOrder order = MPPOrder.forC_OrderLine_ID(ol.getCtx(), ol.get_ID(), ol.get_TrxName());
    if (order == null)
        {
            final MProduct product = MProduct.get(ol.getCtx(), ol.getM_Product_ID());
   
            // if this product have no BOM defined, do not need to create manufacturing plan/order, added by zzyan
            if (!product.isBOM())
                return null;
                ......


3. The LiberoWMS is having issue in process "GenerateInOutBound" and "ReleaseInOutBound".
both first line in the doIt() function should be:
Code: Select all
String whereClause = "EXISTS (SELECT T_Selection_ID FROM T_Selection WHERE  T_Selection.AD_PInstance_ID=? AND T_Selection.T_Selection_ID=WM_InOutBoundLine.WM_InOutboundLine_ID)";   

the original code use WM_InOutbound_ID instead of WM_InOutboundLine_ID

4. The WMS process ReleaseInOutBound will allocate quantities more than the supply
when we have more than 1 locator having the same item in the same area/section, when running ReleaseInOutBound process, system will over allocate items to the InOutBound Order Line.
the problem is related with the createDDOrder() function in ReleaseInOutBound.java, it loops with "storages" it gets without dumping out of the loop.
I suppose the changed code should be following:
Code: Select all
......
oline.saveEx();
// added by ZZYAN, jump off this loop if the supply fulfills
// the bound qty demand.
if (qtySupply.equals(boundline.getQtyToPick()))
   break;


I am not sure of the change, so I forked your project in bitbucket and commit it to my own.
Could you please check these and see if I can commit it directly to your project? not sure about the code review procedure here, and need your lead on this.

Regards,
Zhi
stevenyanzhi
 
Posts: 2
Joined: Sun Dec 14, 2014 3:39 pm

Next

Return to iDempiere

Who is online

Users browsing this forum: No registered users and 2 guests

cron