dolibarr icon indicating copy to clipboard operation
dolibarr copied to clipboard

New batch stock mouvements to global stock mouvement

Open atm-gauthier opened this issue 1 year ago • 1 comments

atm-gauthier avatar Aug 09 '22 08:08 atm-gauthier

Hi @eldy, in this PR i did corrections you asked to @atm-adrien (old PR : https://github.com/Dolibarr/dolibarr/pull/21503). Now we check llx_product_batch table and loop on results to move batch stock into global stock.

atm-gauthier avatar Aug 09 '22 08:08 atm-gauthier

Hi @eldy, you can see here what's added :

First i we stop using serial numbers or batch, this message appears : image

Second thing if our product status batch was batch, we'll no longer be able to choose serial number, because Dolibarr doesn't know in which serial number dispatch each quantity : image

atm-gauthier avatar Nov 07 '22 10:11 atm-gauthier

Ok for first point.

For the second point, "Second thing if our product status batch was batch, we'll no longer be able to choose serial number, because Dolibarr doesn't know in which serial number dispatch each quantity" We should not block the selection of "Use serial". Showing a warning like this should be enough: "If you currently have a quantity higher or equal to 2 for the product, switching to this choice means you will still have a product with different object with the same serial (when you want it to be unique). The duplicate will remain until an inventory or a manual stock movement to fix this is done."

Switching first to "no" choice, to "delete" existing serial seems is a bad idea as we will loose information. For example we may want to convert lot A into Lot A-1, Lot A-2, ... and lot B into Lot B into Lot B-1, Lot B-2. Can you just show a warning whit no data deletion (cleaning of data will be done later by inventory or manual stock move) ? So only a warning must be shown. This is not a problem for dolibarr there is a protection to disallow any stock movement if product is not unique, except if we make a movement to make the serial unique. So warning is enough. Can you change this way ? Also this change the behaviour, so thanks to push it on develop.

eldy avatar Dec 28 '22 18:12 eldy