Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
3 Odpowiedzi
13995 Widoki

i want to get product stock on specific date like 

what is product stock 1st Jan 2019 

product stock <= 01-jan-2019 

same like date what is product stock at 

product stock <= 01-mar-2019


may i use this type of query 

product.with_context({'warehouse': warehouse}).qty_available  but where i can specify date ?????



Awatar
Odrzuć

Hi! Does anyone know how that would work on odoo16? 
I am trying to find this exact information and I cannot.

Thank you!

checking the v16, source code, same method is expected to work, did you miss to pass the to_date in context

Najlepsza odpowiedź

Hi,

In the context pass the date, rather than passing the warehouse if not necessary.

product.with_context({'to_date': date_val}).qty_available


If you check this menu and wizard, Inventory -> Reporting -> Inventory report, choose  At a specific date and click the button.



By checking the code of the button Retrieve Inventory Quantities you can see the sample.

Thanks

Awatar
Odrzuć
Autor

warehouse also necessary .....

Then pass both values simultaneously in the context

Najlepsza odpowiedź

Hi Niyas Raphy! 
Thank you for your reply.
I am unable to try your solution because in my odoo I cannot access Inventory -> Reporting -> Inventory report.

I am usign a self-hosted odoo16 community.

This is what my inventory module looks like: (I cannot attach a picture bc I have not enough karma :(( )
In the "Reporting" tab, there are only the following sub-menus:
- Stock
- Locations
- Moves History
- Stock Moves
- Valuation

But not Inventory report.

How can I activate the Inventory report feature???

I couldn't find it anywhere in forums/official documentation/etc.

Thank you in advance!!

Awatar
Odrzuć

Hi Maria,
the Report with the name "Inventory Report" (Odoo 14-15) was renamed to "Locations" with Odoo 16.

Hola,

Estoy de fuera de la oficina hasta el día 9 de octubre. Si tiene algún mensaje urgente, por favor escriba a contacto@bleta.io o llámenos al teléfono que aparece en nuestra web.

Gracias,
Najlepsza odpowiedź

Hello,

This code doesn't work "product.with_context({'to_date': date_val}).qty_available".

It always return current stock inventory for selected product.

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
sie 19
8588
4
sie 24
6564
2
kwi 24
2111
1
mar 21
6259
1
lut 21
3650