Inconsistent Sales Order State


Test Case:

  1. Create a new Standard Sales Order

  2. Add 1 Sales Order Line with quantity of 1

  3. Prepare the order. Sales Order Line 1 should have quantity reserved of 1

  4. Add another sales order line with quantity of 1

  5. Note that the newly added line will have quantity reserved of 0.

The test case above leave you with a sales order document in an inconsistent state - effectively a Prepared Order that's not fully prepare.

Suggested solution:
1. Move reservation of stock to "Complete".
2. When order is with Prepared status, auto prepare the order or just the newly added order line.




Carlos Ruiz
February 3, 2020, 9:32 PM

that’s a bad user experience

I think is about the wrong expectation - Prepared doesn’t mean everything is reserved - it means it passed validations and reservations at some point of time in past.

But anyways, again I think is a different point of view - to improve user experience we can add a flag (Virtual UI column) or a quick info that shows the reservations are stale - that would be a straight way to show user that his/her expectation is not correct.

Heng Sin Low
February 3, 2020, 9:49 PM

Well, we can do what you describe here. However, I have to say I strongly disagree that’s the wrong expectation.

Carlos Ruiz
February 4, 2020, 3:37 PM

Sorry I worded it incorrectly, as this is mainly a difference in points of view, is not correct to say there is one right and one wrong.

What I mean is, that's how the system works (and have worked since compiere) and I feel is not a bug per-se, because it has good reasons to do it that way (performance and other potential conflicts).

I agree with you it can be misleading - is not for me because I'm too used to this - but it can be misleading to somebody new.
And we can help with some changes to make it work as the other point of view (I suggest to make it configurable for performance reasons) - or make changes in the UI to make obvious how the system is working (Prepared with stale reservations).

Carlos Ruiz
August 22, 2020, 4:45 PM


  • Recategorized from bug to improvement as this is the expected behavior of the system

  • There is a potential improvement suggested, however if implemented it must be made configurable as it can impact heavily performance

  • This is probably better to be done as an extension plugin

Heng Sin Low
August 22, 2020, 4:52 PM

Closing this as Carlos will not agree with what I believe is the expected behaviour.

Won't Fix




Heng Sin Low


Tested By