InventoryCountCreate still failing because of IDEMPIERE-1770

Description

Discovered a new failing case for https://idempiere.atlassian.net/browse/IDEMPIERE-1770#icft=IDEMPIERE-1770 on InventoryCountCreate.

Test case was something like:

Produce 2 Patio Chair date april-15
Sales order for 2 Patio Chair
Ship the sales order but before completing assign a serial number to each shipment line

then

Produce 3 Patio Chair date april-18
Sales order for 3 Patio Chair
Ship the sales order but before completing assign a serial number to each shipment line

In the end you'll have in storage and transaction 6 records:
Qty 2 - not asi - april-15
Qty 3 - not asi - april-18
Qty -1 - first serial
Qty -1 - second serial and so on for the other three serials

So, the summary count per ASI is zero, but we have 2+3-1-1-1-1-1 in storage.

Now, I try to create a physical inventory to clear these records.
The process InventoryCountCreate fails to create the inventory lines and inventory MA lines.

It throws error about duplicated primary key.

Environment

None

Activity

Carlos Ruiz 
July 27, 2017 at 12:19 PM

When the warehouse is configured to disallow negative - the test case must not be allowed.

But when is configured to allow negative the companies could do a post-process to serialize the inventory. In this test case the process was tried with a Physical Inventory, but can be done alternatively with Internal Use, or maybe even with Material Movement.
But I think anyways the test case illustrates that the uniqueness verified in Physical Inventory doesn't match the new uniqueness created by https://idempiere.atlassian.net/browse/IDEMPIERE-1770#icft=IDEMPIERE-1770
Similar issues have been reported in forums, like https://groups.google.com/d/msg/idempiere/1mrxI7b3Y8E/xJtocubvAQAJ
________

On the other hand - what our latest test cases have shown is that it becomes a big issue to mix without-ASI and with-ASI inventory - because the system was not able to manage the without-ASI properly with the normal documents. However, with the implementation of https://idempiere.atlassian.net/browse/IDEMPIERE-1770#icft=IDEMPIERE-1770 maybe could be possible to manage it properly as the user could fill the LineMA without ASI (I haven't tested that case) and force the system to move the without-ASI stock instead of doing FIFO (which is the behavior leaving the ASI empty on Line).

Regards,

Carlos Ruiz

Heng Sin Low 
July 27, 2017 at 9:35 AM

It seems wrong though that the steps above will create ASI/Serial storage record with -1 on hand. Perhaps the system should be smart enough to reduce on hand from the no asi storage record instead ( an autogenerated movement before complete of shipment ? ).

Details

Assignee

Reporter

Priority

Created April 19, 2016 at 3:05 AM
Updated July 27, 2017 at 12:19 PM