Consumption forecast and order feature

Hello,

AFAIU, stock-forecast does not do what I need. So I’m coming up again.

My little company does ~yearly orders of parts in China. As they are labour-intensive and costly, it’s crucial to keep their frequency to the minimum, at the same time I must not run out of one essential part in between, and my warehouse capacities are very limited.

So, in order to manage orders, I need to review sales in the past and get estimations what might happen in the future. Therefore, I would like to:

  • select single or search for multiple products
  • type in a period in past which will be taken as basis for prognosis (from date - to date)
  • type in a target date - the day the upcoming planning period ends
  • type in a desired remaining stock at target date - alternatively use that from “order points”
  • type in an expected increase (or decrease) (in percent or as a factor) of consumption per year
  • type in the desired date of order

We should get out:

  • average consuption per item (to be choosen: per day, week, month, year) for plausibility checks
  • amounts to be ordered at date of order
  • endurance of new stock: date when stock will be at zero if order is carried out as suggested - these will be different ending dates for different items
  • option to change the order amount in the results, with endurance data recomputed

Of course, order amounts should be convertible into order drafts, various suppliers for different products should be possible.

I’m not really sure whether some or many of my requests already are covered by generic Tryton - please let me know in case.

Cheers,
Wolf

This can be achieved using the complete button of the forecast.

Forecast is always linked to both a start and end date.

As you already said it, this is managed using order points.

Altought this is not managed automatically, you always see the computed quantity on the purchase request. So you can adjust the real purchase based on it.

This can be managed by the purchase_request modules.

I think most of the features you are asking for are already supported by tryton. In your case the most important part is to set correct supply periods for the suppliers and also have a good configuration in supply period so the system computes the purchase request in enought advance time so you have some time to adjust everything before the real purchase.

Thank you so much for your care - really appreciated!

We already had a hard fight :wink: on that issue, I gave in that time… https://discuss.tryton.org/t/usage-of-stock-supply-forecast/5036

Now I’m trying over again. So what I’m doing (already got quite some help from fellow @timitos):

  • create a test case with sales of 100 pcs at Mar20, Apr15 and Jun15 2022.
  • open menu > Inv&Stock > stock forecast
  • create new forecast (ctrl-N)
  • location: my own warehouse
  • destination: customer
  • window opens, type in from-to date: prognosis period (in the future)
  • hit “complete forecast”
  • type in from-to date: basis (comparison) period of time (in the past)
    hit “choose product”, select one from list
  • hit “complete”

What happens: As a result I always get the number of items sold in the basis period, it does not make any difference how long the prognosis period is - and it does not matter how long the basis period is.
What I’d expect:

  • result depends on the basis period: When I choose (in my above example) Mar19 to Mar21 I have 100pcs in 3 days - so ~12.000 per year. When I choose Jan1 to Mar21, I have 100pcs in ~80days, that’s only ~450 per year.
  • prognosis period should matter: When I choose 1 month, I should get consumption per year / 12. When I choose 5 months, I should get consumption per year * 5 / 12.

I’m still not sure whether I expect wrong things from this module - and whether I’m using it on the wrong way.

Under products > suppliers > supplier I set 1M as “lead time”, but I don’t know how that affect the prognosis.

Cheers,
Wolf

This is the expected behavior. The complete wizard applies the quantity sold over the chosen period to the forecast no matter the duration of the periods. So if you want identical forecast as the past, you must choose period with the same duration (as the default values).
Now we could add an extra factor to apply which could be used to simulate growing (or adapt with the difference of period duration).

Or maybe both? Adapt with the difference of period duration would prevent misunderstanding and an extra factor to simulate growth on top.

Thank you for your thoughts.

Yesss! - At the moment, I’d call this module rather “sales-retrospect” than “~forecast”. I’d understand the “forecast” aspect more as to calculate average comsuptions and apply those to the future.

Exactly - this is a thing to be distinguished from doing prognosis.

Nevertheless, I do not understand what the ‘future period of time’ is used for at present. I think, for a prognosis, a projection of average consumption to that period is necessary. For that, I do not think a starting point makes so much sense; to me, it always is “today” - but it may not do harm as well.

Well you can create for example a forecast for each month in advance based on previous data.
With that information the system will create the needed purchase requests to fill the forecasted quantities of each months.

This way you can setup some forecasts in advance and you do not need to care about updating them. You just need to purchase the required quantities.

Thanks for holding on.
Now, I tried:

  • write a future period (May10th 2023 to May9th 2024) into the main window
  • write a past period (May1st 2021 to Feb5th 2023) into the wizard window

This sums up the sales in the past period. That’s good and really useful for me. When I now hit “confirm”, I get the message "The forecasts "[my location]" and "[my location]" overlap, you must use different dates". But they do not overlap - I tried it several times with different, non-overlapping periods. What am I doing wrong?

Bthw: This is one of the many examples of extremely poor and careless UI design. Two different input lines have the exact same labels “from date - to date”. Well - you guys know what they mean - but the rest of us does not. It is a few seconds of time to create telling labels.

You are doing such a good job in software design. Why are you so careless on the UI ? - I can understand that it’s hard to imagine how dummy user thinks, and what his limitations are. But why do you not ask dummy user - “can you understand the UI”? It’s such a pity! Just a few additional seconds from “not dummy useable” to “dummy useable”.

Cheers,
Wolf

The problem is that you already have another confirmed forecast that overlap with the forecast that you are creating. To have proper computation you should only have one forecast for the same dates.

@ced created an issue to improve the naming for next series

So tryton is improving thanks to your valuable feedback!

Allright. Got it.
Now I confirmed the forecast, what should happen now? With stock_supply_forecast installed, my hope was to be able to create order drafts. How would I achieve that?

Hopefully, this statement does not contain too much of irony. A decent quantity is o.k. (-;

Cheers,
Wolf

You need to execute the Supply Stock wizard, which is under the Inventory & Stock menú
That will take care of your forecasted quantities and create proper Purchase Requests based on the forecasteed need. .

Hoooray. (Or something like that)

Actually, I got a result. I’ll now do some testing, and then try to sum up how I understand this modules, what its abilities and weakpoints are - and how we maybe could make it a little more accessible.

This was my by far hardest and longest approach to a Tryton module yet - and I dare to say that I see the reasons not entirely at my side… (-;

Good that you ask, so here you’ll find some feed back from my side. IMHO you have some valuable feedback for us. Thank you for this. But it is sometimes hard to retrieve the valuable parts from a demotivating noise. It is good to see, that you are improving a lot to make it easier to understand.

  1. When you say

it doesn’t feel good to me. Your generalisation with the “many examples” is pointless without naming every single example. Your “extremely poor and careless UI design” is just an overexaggeration. This disparages the work of others, by imputing careless habits, which I feel is neither true, fair nor polite.
On the other hand you describe UI as a total marginal topic, which can be addressed easily by everyone, - even yourself, - in a fraction of time.
This is not my reality. I find UI is very important, but not well understood by everyone. A good programmer neither is automatically a good administrator or a good web-site developer, nor she must be automatically be good at the UI. So your criticism coming as an accusation of a “poor and careless UI design” is pointless and marginalizes your own work in matters of UI design. This is a pity!
So thank you for just delete this frustration-texts, once you wrote it down and got calm. Its good to have it said, but really bad to have it read. Everybody understands what they want and all feel insulted or hurt.
2. When you say:

it sounds to me, that you think that it is all done intentionally, with an evil intent, to annoy you and the other users by a careless developer who spits out code just to save some time measured in seconds…
IMHO totally absurd and overexaggerating, sorry. I find the opposite is true. The conception of a module is usually broadly planned and discussed theoretical by people in a blueprint. The implementation is proposed by one developer and ideally reviewed by other people. Not every one has the ability, time and interest to deeply get an understanding of a new functionality before it is easily available to install, - as a released module, and testable in practice. After release more people test and review the functionality, same as you do. Said this, the named module is from the beginning of all time (2008) and maybe not used too often.
Getting you and others ASAP being able for testing, asking and constructive criticizing a module is an intentional goal in our development process: we release early.
So thank you for being patient in future and generally believing that nobody will intentionally waste your time with a bad UI - everybody I know wants to have a better UI, always and ever. I feel lucky, that you take care of it with so much dedication.
3. When you ask

I understand just another unnecessary allegation, which makes reading your text less fun, at least for me:

`less fun to read ==> less chance to read further`
  1. Repeating false assumptions about others work doesn’t make them true. When you write

is it not a pity. I t is your chance to get your ideas into Tryton to make it better for everyone. And it is surely not the missing seconds or a careless mind behind all this. It is about different priorities. We can easily change a label or add a help text and a translation at any time later. So we prefer to release soon, just to get more testers, to get more feedback. And everyone makes errors in its work. There is no need to get rude.

3 Likes

Thank you for taking the time to answer. As you certainly expected, I do not agree.

I checked only the two threads on this module I myself started and counted what valued fellows (not me) wrote: It was around 1900 words, around 11.000 characters. Only for my two requests. (Thank you so much by the way.)

Creating minimal guidance would maybe take something like 50-100 words. This is ~1/40 to ~1/20. Agreed, that effort to create this guidance is 10-20 times more than to write forum entries. Nevertheless, you would be even in effort with the request of one single person. Let alone all the other positive side effects improved usability would have.

I’m so deeply convinced that investing time and effort in usability and user guidance pays back manyfold. Quickly. But reality is that trying to contribute in this means is not valued by everybody, but rejected and discouraged by some.

Sad.

Cheers,
Wolf

Right. Continued with my attempts.

Now I can create order drafts for my whole warehouse. But how do I select products?

  • When I select (highlight) one or few products in the wizard window, nevertheless a forecast for the whole products list is generated.
  • When I select (highlight) one or few products in the results area, nevertheless order drafts for the whole list are created.

I’m very much convinced that you geniuses can make both behave it as dummy user expects: When highlighted, it’s selected.

I’ve just tested this and when you select products only forecast of such products are shown.
This is the way to go if you want to forecast less products

What is order draft? DId you mean purchase requests? Or what?

Hm. What am I doing wrong? - I made a screencast, see it here:

https://nextcloud.rollentausch.eu/index.php/s/e2ek3nT9zcwkdBr

What I did is to hold CTRL key and click items. I vaguely remember that fellow @timitos showed me that another procedure is required. What could it be?

Cheers,
Wolf

This is because the “Products” list is a Many2Many with all the products having quantities for the selected period are pre-selected. If you do not want some product you must remove from the list.

I created Simplify stock forecast complete wizard (!279) · Merge requests · Tryton / Tryton · GitLab because now (with the new feature of Tryton) we could have a simpler interface.

I beg your pardon, but I did not understand the answer. Should I wait for some update till I can do the selection of items? - I still rather believe that I made a mistake in handling.