Why manage QtyReserved for non stocked products ?

87 views
Skip to first unread message

Nicolas Micoud

unread,
Oct 21, 2016, 6:09:38 AM10/21/16
to iDempiere
Hi,

A simple question : why do we reserve quantities for non stocked products ?
As they are not in stock, what's the interest to do those controls which annoy users (if you want to delete this kind of line, you have to set qty to 0, go on the header, reserve the order, and then you are able to delete the line).

I've tested rapidly the following patch in an Event :

MOrderLine ol = (MOrderLine) po;

if (ol.getM_Product_ID() > 0 && !ol.getProduct().isStocked()) {
  ol
.setQtyReserved(Env.ZERO);
}

And it seems to work perfectly.

Should it be put on the trunk ? Or am I missing something ?

Thanks & regards,

Nicolas

Carlos Antonio Ruiz Gomez

unread,
Oct 21, 2016, 12:22:09 PM10/21/16
to idem...@googlegroups.com
Nicolas, there is value having qty management for services - but that can be achieved with ordered vs delivered, I can't find a reason why reserved can be of value there - maybe others?.

Regards,

Carlos Ruiz


El 21/10/16 a las 12:09, Nicolas Micoud escribió:

Nicolas Micoud

unread,
Oct 21, 2016, 12:41:34 PM10/21/16
to iDempiere
Hi Carlos,

That's how we do (ordered - delivered).

Thanks for answering,

Nicolas

Nicolas Micoud

unread,
Oct 24, 2016, 7:30:00 AM10/24/16
to iDempiere
Should i create a jira ticket + patch for this purpose (maybe with a SysConfig key) ?

Nicolas

Alan Lescano

unread,
Oct 24, 2016, 8:53:32 AM10/24/16
to idem...@googlegroups.com
Hi Nicolas,

Note that a non-stocked item isn't really reserved in MStorageReservation. The value of QtyReserved column (order line) seems to be calculated just for information purposes in product info and some other reports, like replenish. I think one can have a reserved product without keeping it in stock (ex:asking for a third-party producer?) WDYT?

Alan

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/156dfb9c-0b55-46a1-9efc-bb75911b3ab7%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Alan Lescano

unread,
Oct 24, 2016, 9:10:24 AM10/24/16
to idem...@googlegroups.com
in your case, i think you can easely get rid of the reserved stock message just setting QtyReserved to zero in a BeforePrepare validator.
Alan

norber...@multimageweb.com

unread,
Oct 24, 2016, 9:52:51 AM10/24/16
to iDempiere
hi,

i'm not sure exactly related. 
sharing experience: we change strategy for reservation - we add update reservation - after/begore save action -  when change qty - without requiring - move to header and run docaction=prepare.
also difference when SOsubtype= Proposal (not reserver) or Quotation (reserve)...

related to non stocked - agree better to not reserve - never tested/used.

norbert
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.

Nicolas Micoud

unread,
Oct 24, 2016, 12:00:00 PM10/24/16
to iDempiere
Hi Alan,

Yes, that's what I do ,always overwriting the qty to 0.
As I guess we are not the only ones with this message (see Norbert post), i think that could be useful to put it in trunk.

I just don't to miss a usecase where it can be useful.

Thanks,

Nicolas
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages