Enhancement to differ internal use inventory and physical inventory

96 views
Skip to first unread message

edwinang

unread,
Mar 4, 2013, 1:58:33 AM3/4/13
to idem...@googlegroups.com
Hi All,

I just noticed this lately when our user reported that some Internal Use Inventory documents are missing after complete. Upon tracing we found out that, the user has set internal use qty for all lines to 0. When completed, the document are processed as Physical Inventory document and worse the qty book is 0. 
So basically this will clear up the storage. 
This behaviour is observed at Adempiere361 and I've just confirmed that this is still a current issue on demo.idempiere.com.

A quick solution is to add a flag isInternalUse on M_Inventory to differ the document processing.

Why do you think?

Regards, 

Edwin Ang

Carlos Antonio Ruiz Gomez

unread,
Mar 4, 2013, 6:16:44 PM3/4/13
to idem...@googlegroups.com
Thanks Edwin, I reproduced the issue - is a very dangerous hole to corrupt data:

Ticket: http://jira.idempiere.com/browse/IDEMPIERE-675

Regards,

Carlos Ruiz

armenrz

unread,
Mar 4, 2013, 11:55:01 PM3/4/13
to idem...@googlegroups.com
Hi all,

M_Inventory table is quite useful for many purposes. Rather than a flag column, I would suggest to add new column called TrxType which is a list of supported transaction type. Currently they are only Physical Inventory and Internal Use.

Rgds,

Armen

edwin ang

unread,
Mar 5, 2013, 12:01:49 AM3/5/13
to idem...@googlegroups.com
Hi Armen,

I am currently working on this ticket. I think your idea is a better one. Do you already have a working code for this issue?
--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


-- 
Best Regards,

Edwin Ang 
Development | PT. Ambidexter Teknologi
Palmerah Utara III No 9, Palmerah, Jakarta Barat, Indonesia 11480
Phone: +62 (021) 533 1758
Mobile +62 819 3131 0593
Email edwi...@ambidexter-consulting.com

armenrz

unread,
Mar 5, 2013, 6:22:08 AM3/5/13
to idem...@googlegroups.com
Hi Edwin,

The code changes is minimal.

In MInventoryLine.beforeSave, instead of

if (getQtyInternalUse().signum() != 0)

you can use something like :

        if (getParent().getTrxType().equals(MInventory.TRXTYPE_INTERNALUSE))

The other places need to change is in the Window, Tab & Field of window Physical Inventory & Internal Use. You now can use TrxType in SQL Where Clause to filter the data.

Or even better idea (I never done this though), you can add DocSubTypeInventory in C_DocType, something like DocSubTypeSo where you can distinguish between the type of orders.

WDYT?

Regards,

Armen
Reply all
Reply to author
Forward
0 new messages