Contributors mailing list archives

Browse archives


Re: Delayed stock valuation in a specific situation

Data Dance s.r.o., Radovan Skolnik
- 04/12/2020 13:36:07



did I tell you previously that you're my hero? You are. Thank you!!!

Let me check if I understand the code correctly (mainly product_cost_price_avco_sync):

  • stock.picking action_done prevents all associated stock.moves from running cost_price_avco_sync
  • cost_price_avco_sync is run when stock.move is updated with price_unit or quantity_done from somewhere else than stock.picking action_done - i.e. updating from PO as in purchase_stock_price_unit_sync
  • cost_price_avco_sync processes not yet processed in(side) movements only in date order
  • in that it looks into approriate history for stock level and price, calulates new values
  • after that looks for affected moves - i.e. moves that have the same product_id and occured later and processes these. Here I see an assumption on subsequent in(side) moves that they are with the same price as the initial one. Is that right?

So I guess this pretty much covers what I need. I guess with some modification this could be used also to restart the stock valuation calculation from a certain point - i.e. I made an initial mistake on incoming move valuation.


Do I understand it correctly? Thank you very much again. If I might be so daring - I posted another question regarding calendar view. Would you be so kind and have a look at it? Thank you.


Best regards




On piatok 4. decembra 2020 11:16:51 CET Pedro M. Baeza (Tecnativa) wrote:

> See


> [1] and


> [2] Regards.


> _______________________________________________

> Mailing-List: [3]

> Post to:

> Unsubscribe: [4]




> [1]


> [2]


> [3]

> [4]