Rise of The Ninja

The migration of Adempiere modules to iDempiere

Re: Rise of The Ninja

Postby red1 » Thu May 11, 2017 9:07 pm

Now Ninja is improved for CSV importing to accept:
1. Commas in a field i.e. "Patio Fun, Inc"
2. Mixup Casing i.e. 'M_PRICELiST_id"
It will also now process BeforeSave and AfterSave of any model class if the dataset belongs to a present model particularly for core models such as C_BPartner and M_Product. This will result in Accounting Defaults created as expected. C_Order/Lines will also need less values such as PriceList.
red1
Site Admin
 
Posts: 2740
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Rise of The Ninja

Postby red1 » Mon Aug 07, 2017 12:38 pm

I have made a template Ninja Excel for any use here https://sourceforge.net/projects/red1/f ... leCreator/
(I be including a data-set to automatically Pack Out / Pack In your new data model!
Review and then Import Model the _4 and 05 sheets after GenerateModule of the imported model.).

You use this together with the blank plugin here https://bitbucket.org/red1/org.red1.blank

We all know it is always the very first part that is the steepest learning curve, so I be making a movie how to make the first baby steps from nothing. Hopefully from there you can follow and complete easily the whole series shown prior to this.
red1
Site Admin
 
Posts: 2740
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Rise of The Ninja

Postby red1 » Wed Aug 09, 2017 12:22 pm

ModelMaker.png
ModelMaker.png (76.86 KiB) Viewed 3473 times
Notice the use of formula in cell to ensure correct typo. Spelling must be sharp and exact. Header column names are not case-sensitive as forced UPPERCASE will be used.

CodeMaker.png
CodeMaker.png (69.84 KiB) Viewed 3473 times
PackOutDetail.png
PackOutDetail.png (90.55 KiB) Viewed 3473 times
Note how the CONCATENATE cell formula is used to good effect using other fields arbitrarily that has no effect during import into PackOut model. It be ready to export your 2Pack on the fly. Note that AD_Menu_ID look up expects your MenuName to be spaced before leading caps. You have to do that manually.
red1
Site Admin
 
Posts: 2740
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Rise of The Ninja

Postby red1 » Sat Feb 10, 2018 6:07 am

Referring to https://groups.google.com/forum/#!topic ... Q2hUxwPFR0 ,
Dr Leonard Walletzky of Brno University in Czech Republic when using iDempiere and now Ninja for his classes, found a bug which is not a bug but a feature. You need not use D#Date Y#IsSumtin, Q#Qty if the prefix names already as such. Otherwise Ninja will parse it into D#D#DateSumtin.

Since he tested it via binary which i hardly do as i test fully from Eclipse source, while replicating his condition, I discovered a real bug that MField creation in the DocEvent validating of New MColumn and Changed MColumn doesn't work if the plugin is not refreshed each time. This is inconvenient and failure prone. So the best way is to bring such MField code into Ninja core process and i did that.

Enroute i made Ninja able to refresh changes to the Module Creator without falling back on previous backup for correcting mistakes such as 1. Column>Field.Name and 2.Adding DocAction structure to a freshly created model.

1. The Column>Field.Name can be changed repeatedly without concern of corruption because it is merely a change of the Window/Tab/Field.Name displayed without disturbing any column properties.

2. Basic model generation can be further regenerated with DocAction structure by checking the Workflow Structure box and then further for Kanban display. However such action cannot be reversed i.e. to delete back the additional properties. But you can hide its display in window and act as a basic model.

Next on my wish list is to make Ninja able to facilitate WebServices access to newly created data model on the fly.
red1
Site Admin
 
Posts: 2740
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Rise of The Ninja

Postby red1 » Thu Mar 22, 2018 6:09 pm

Here is a real killer boost I have finally got out a working POC last night, to make your generated Kanban Board having own DocumentEngine and DocAction as generic and empty so that the cards can traverse any status without tied down by the inherent business rules of the ERP. Now you can implement own rules freely. Make your own M[model] to implement the org.ninja.component.DocumentEngine and DocAction instead of the core adempiere.base.

The status labels can also be easily changed to your own business usage using the Ninja Import Model for the KB_KanbanStatus as shown below. You can copy paste into your Excel to change to the labels you want.

Code: Select all
KDB_KanbanBoard_ID   Name   kdb_statuslistvalue   StatusAlias   SeqNo   Description
BedRegistration   Drafted   DR   Arrived   10   Non assgined DocStatus=NULL. DR=Arrived during WMS’ DS
BedRegistration   In Progress   IP   Putaway   20   
BedRegistration   Waiting Confirmation   WC   QC   30   
BedRegistration   Not Approved   NA   Start MFG   40   
BedRegistration   Approved   AP   Cut   50   
BedRegistration   Reversed   RE   Sew   60   
BedRegistration   Waiting Payment   WP   Packed   70   
BedRegistration   Completed   CO   Raw   80   
BedRegistration   Invalid   IN   Finished   90   
BedRegistration   Closed   CL   Rejected   100   
BedRegistration   Voided   VO   Returns   110   
BedRegistration   Unknown   ??   Scrap   120   

KanbanStatusExcel.png
KanbanStatusExcel.png (67.37 KiB) Viewed 1905 times
You can see above how the Excel is laid out.

KanbanStatusImported.png
KanbanStatusImported.png (61.28 KiB) Viewed 1905 times
After it is imported, finally the results as if magic.

KanbanStatusChanged.png
KanbanStatusChanged.png (22.78 KiB) Viewed 1905 times
Then you implement your logic in code as below:

DocActionLogic.png
DocActionLogic.png (171.6 KiB) Viewed 1905 times

I did a movie to quickly show what the idea is all about.
Code and scripts uploaded here viewtopic.php?f=45&t=1848#p8947
red1
Site Admin
 
Posts: 2740
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Previous

Return to iDempiere

Who is online

Users browsing this forum: No registered users and 1 guest

cron