How to monitor stock levels at Tryton startup screen?

Hello fellow friends,

one of my basic every day tasks is to monitor my stock levels.
Sergi once advised me to set up a workflow, but to be honest: It does not work for me, because it needs more attention than I can grant.

So what I would like to have - and I guess I may not be alone with this - that at the Tryton home screen, a list is displayd with shows:

Item name | current stock | order threshold

and preferably highlighted in orange when the stock level is approaching the order threshold, and highlighted in red when the order threshold is reached.
And there should be options

  • to sort the display in descending order of the most urgent orders,
  • mark products with ongoing orders,
  • to actually create orders.

Can such be achieved with Tryton onboard equipment ? - Maybe the dashboard module? - If not, do more people think it’s a desired feature?

Thanks a lot in advance, Wolf
cc @Gruenfischer

As you don’t explain/link the workflow you tried and why it asks so much of your time resources, we may be answering the same recommendation workflow without knowing.

What you are asking exactly does not exist. For what you’ve explained the easiest solution is to setup stock rules (order points) and you will have purchase request generated for the threshold defined.

Thank you, Adrià. Yes, I’m using automated purchase requests, but as I’m ordering bigger quantities from CN once a year, order logics are more complex than just “stock under threshold > order”.

A cheap win would be if I simply could get stock location window opened at client launch, perfect would be with a search request carried out. Is that possible? To be honest, I have no idea how “actions” or such may work


Cheers,
Wolf

How to view stock level is explained at Viewing stock levels.

Thank you for pointing me to this info. But AFAIS, it does not cover my question:
Is it possible to display stock level info at Tryton client start page ?

I remember that Dolibarr has that by default.

Thanks, Wolf

To open a window on Tryton start just put the Window Action inside Administration / Users / Users. Select the user you want this window to be started as and add the action under Actions tab.

My question is how to open a window with custom search/records.
I have for a long time suspected that the right way is to create a new Window Action just for this purpose, and change the parameters of the action window. Then use this action window to launch on start-up. Could this be the best way, or is there a simpler way to do it?

Hey great, there seems to be an approach :slight_smile: I added the “products by location” action to my user and after a relaunch it appears. Fine. Unluckily, it shows all values by “zero”, reload does not change that.

In the header, it does not mention the actual location, as it does if I call it over the menu. So I guess I need to pass that as a parameter
 - How would I do so?

Cheers,
Wolf

You should create a new action and set in the context the ids of the locations you want to check.

If you look at the original action there is an Eval('active_ids') which should be replaced with [id] where id is the internal id of the locations you want to check. You should use the id of the warehouse or the storage location.

Thank you for taking care.
Unluckily, I don’t know how to proceed. Trying to create a new action, I went to Administration > User Interface > Action. Correct?

  • Now, where would I find Eval('active_ids'), I cannot see it.
  • What is meant by “in the context”?

Sorry, I’m just a dumb user
 (;

Cheers,
Wolf

I think you should go to Window Actions.

In the field Context Value, In the lower part of the Window actions form.

Oh good, now I know what you mean.
I copied the window action “product per location” and changed ‘active_ids’ to ‘17’:

with “17” being the ID which reads from “protocol” when my warehouse location is selected.
Actually, I get a window, but with zero quantity for every item. What’s wrong now?

Thank you for your patience.

Cheers,
Wolf

On the context you must set: {'locations': [17]} instead of what you have now.
That should show the right quantities.

1 Like

Yesss! - That works, great! :slight_smile: An really improves my life, thank you very much indeed.

Now a nice-to-have would be an idea how to do a search request. The search line is
products: SKR | SB | PU | APR | KU
but neither of the variants my dear friend @mstma tried, actually worked, such as [['product', '', 'SKR']] or similar.

Thank you all anyway.
Cheers,
Wolf

It seems like you are missing the operator.
Here you probably want the like operator.
Do not forget to use the wildcards such as % if the product name is not an exact match.
If it is an exact match then you could use the operator ‘=’.

Thank you for your support. I could make this one work:
[['product.categories_all', '=', 'my-product-category-name' ]]. Nice!

What I could not achieve is an ‘OR’ linkage. Something like

 [['product', 'like', 'products1%' | 'products2%' | 'products3%' ]]

or 

[['product', 'like', 'products1% | products2% | products3%' ]]

could not even be saved. How could we do this?

And yet another bit: Can we achieve a sort order, I’d think ascending expected stock level would be useful.

Thanks a lot in advance, Wolf

Probably something like this:

[['OR', ('product', 'like', 'products1%'), ('product', 'like', 'products2%'), (...)]]
1 Like