Contributors mailing list archives

contributors@odoo-community.org

Browse archives

Avatar

Re: Inventory on a past date ?

by
ForgeFlow, S.L., Lois Rilo Antelo
- 19/11/2021 10:28:31
Hi Clement,

You can have a look at this module https://github.com/OCA/stock-logistics-warehouse/tree/12.0/stock_account_inventory_force_date. It does not cover all the cases, if you do not use standard cost it can at least get you half the way. I'll be glad to review any improvement you can come up with.

Best regards,

El jue, 18 nov 2021 a las 17:12, Richard deMeester (<richard.demeester@willdooit.com>) escribió:

Hi Clément.

In older versions, we had a stock freeze function.

You freeze the figures at the point in time you want to count them.  The adjustment is made when you apply (the stock moves need to be dated at the current date/time) but rather than comparing against the current on hand, we compare them against the frozen quantity.

Example:

Freeze quantity: 5
Current quantity: 9
Counted quantity: 4

Stock adjustment is then for -1, creating a new onhand of 8

Now, it should be possible to instead of having a freeze quantity, pick up the quantity on hand at a past time (with to_date in the context) and that would achieve the same result, in my quick thinking.

But you really need the adjustment to be written as of now, not as at the past time.  It could screw up so much trying to backdate the move itself....

Richard



Richard deMeester

Senior Development Analyst

WilldooIT Pty Ltd

E: richard.demeester@willdooit.com

M: +61 403 76 76 76

P: +61 3 9135 1900

A: 10/435 Williamstown Road, Port Melbourne, Vic 3207

 

 

Making growth through technology easy

 

 

DISCLAIMER | This electronic message together with any attachments is confidential. If you are not the recipient, do not copy, disclose, or use the contents in any way. Please also advise us by e-mail that you have received this message in error and then please destroy this email and any of its attachments. WilldooIT Pty. Ltd. is not responsible for any changes made to this message and/or any attachments after sending by WilldooIT Pty. Ltd. WilldooIT Pty. Ltd. use virus scanning software but exclude all liability for virus or anything similar in this email or attachment.



From: Clément Mombereau <clement.mombereau@akretion.com.br>
Sent: Friday, 19 November 2021 3:01 AM
To: Contributors <contributors@odoo-community.org>
Subject: Inventory on a past date ?
 
Hello contributors,

There is a few days delay between the moment the physical inventory is done at my client's warehouses and the moment he actually registers this inventory adjustment in Odoo.
So he would like to make inventory adjustments on a past date (only a few days ago mainly).

Anyone have an idea on how to achieve this ?

There is this accounting_date on stock.inventory but it looks like it only forces the account.move's date related to the inventory adjustment.

As far as I've understood the problem, when we click on Inventory's "action_start" it catches the  quants quantities... And a quant by definition can only shows the actual product quantity in stock.

So instead, it would mean to recalculate the past stock.moves for each products, a bit like what is done with the _compute_quantities when clicking on "Inventory at date" in the Inventory Report menu... (the big difference with this "_compute_quantities" being that we would have to group the moves calculation by location_id and lot_id because we need to make these distinctions)

Anyway, it does not look so easy at first glance. At least, would it be the good method to achieve this inventory on a past date?

Thank you very much for your opinion on this topic! 🙏

Abraço,
Clément.

_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe

_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe



--
Lois Rilo Antelo
Odoo consultant at ForgeFlow S.L.

Reference