[14.0][IMP] stock_location_last_inventory_date: propagate data on empty loc…#2519
[14.0][IMP] stock_location_last_inventory_date: propagate data on empty loc…#2519devRaumschmiede wants to merge 4 commits intoOCA:14.0from
Conversation
…ation when inventory has no products, or no differences at the location is added the inventory data is not set on location
But then you wouldn't create an inventory adjustment for Stock. Because this will create inventory lines for all quants on stock and its children. You would need to delete a lot of lines if you simply want to remove just one quant. |
My point is that inventory lines are telling which locations are inventoried. You can add lines or remove lines. The location in the inventory is in my opinion only a helper to preload lines. |
Yes i understand your point. But in fact for empty Locations before and after the inventory it will be then never set. Also If you checking the Code before my change it was exaclty computed as it would be with this PR. We could add new field in the inventory adjustment which inticates If preloaded lines we're removed. If the field indicates that nothing was removed. Then set the date as it is done here otherwise set it only on Locations which are listed in the lines. @jbaudoux what do you think? |
Co-authored-by: Michael Tietz <78783475+mt-software-de@users.noreply.github.com>
ping @jbaudoux |
There was a problem hiding this comment.
Please update the post_init_hook and use it then here.
…a on empty location
…ation
when inventory has no products, or no differences at the location is added the inventory data is not set on location