Skip to Content

Contributors

Delayed stock valuation in a specific situation

Hello,

another peculiar problem which occurs quite often here in Slovakia in SO-PO 
scenarios. By the law we use Average Cost for stock valuation. I am not 
skilled enough in accounting and stock valuation principles so I might be 
guessing here and there - especially on how Odoo worksin this regard. Feel 
free to correct where necessary.

In certain situations it can happen that you receive a product from vendor but 
you don't have an invoice for that yet and don't know exact price. I know it 
sounds strange but we work as partners with certain producers and sometimes we 
just do not have 100% updated pricelists. We do not use RfQs and just straight 
order - usually with zeroed prices and wait for invoice to fill them in. You 
want to ship the product to the customer ASAP. Now in here they solve it using 
what is called "delayed stock out" (not sure about correct translation). The 
idea here is that because we didn't receive the invoice from vendor yet, we 
cannot calculate stock value yet. But at the same time we need to send the 
product to customer with customer invoice. But in that case we cannot 
recalculate stock value because we do not yet know the average value (because 
that depends on that invoice we're yet to receive).

Have you stumbled upon anything similar? Is there an existing way to deal with 
this? As far as I understand the inner working of Odoo here, the value of 
incoming stock is taken from POL and put into stock.move to be later used for 
stock value recalculation. But we might not have the correct price in POL.

The way AFAIK various accounting softwares deal with this is to put the 
incoming stcok value recalculation into some kind of queue until the invoice 
comes in and then process them. But that also means putting into that queue 
all the other moves regarding the same product. Implementing this into Odoo 
seems quite a big change.

Any kind of help is welcome. Best regards

	Radovan Skolnik



by Radovan Skolnik - 11:05 - 4 Dec 2020

Follow-Ups

  • Re: Delayed stock valuation in a specific situation
    Hi Radovan,
    
    we have the same workflow in Romania, you can check the module 
    https://github.com/OCA/l10n-romania/tree/14.0/l10n_ro_stock_account, so
    in the purchase you  have basically the price from the pricelist of the
    supplier, or the normal cost price of the product. In teh reception,
    you have one checkbox, name "Notice" to flag the reception of being one
    without invoice. This will add the products in stock at the price from
    purchase (probably not the one that will came on the invoice). In the
    Setting, in the Romania Tab, we have one checkbox "Stock Valuation
    Update" which when you will receive the invoice from supplier goes back
    to the purchased valuation layer and update the price (also creating
    the corresponding account move lines) for the price difference. I will
    have to check if this one is propagated also to the delivery of the
    product to have the whole workflow.
    
    Regards,
    
    -----Original Message-----
    From: Pedro M. Baeza (Tecnativa) <pedro.baeza@tecnativa.com>
    Reply-To: Odoo Community Association (OCA) Contributors <
    contributors@odoo-community.org>
    To: Contributors <contributors@odoo-community.org>
    Subject: Re: Delayed stock valuation in a specific situation
    Date: Fri, 04 Dec 2020 14:37:06 -0000
    
    I'm not the creator/designer of the module, but I would say that it's more or less that way.
    
    I'm afraid I can't be your hero in the calendar thing.
    
    Regards.
    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe
    
    -- 
    Mihai Fekete
    
    NextERP Romania S.R.L.
    600B, Peciu Nou, Romania
    
    E-mail: feketemihai@nexterp.ro
    Telefon: 0788-749989
    Website: https://nexterp.ro id="-x-evo-selection-start-marker">
    
    

    by Mihai Fekete - 05:31 - 4 Dec 2020
  • Re: Delayed stock valuation in a specific situation
    I'm not the creator/designer of the module, but I would say that it's more or less that way.

    I'm afraid I can't be your hero in the calendar thing.

    Regards.

    by Pedro M. Baeza - 03:35 - 4 Dec 2020
  • Re: Delayed stock valuation in a specific situation

    Pedro,

     

    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

     

    Radovan

     

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

    > See

    > https://odoo-community.org/shop/product/product-cost-price-avco-sync-5169

    > [1] and

    > https://odoo-community.org/shop/product/purchase-stock-price-unit-sync-5062

    > [2] Regards.

    >

    > _______________________________________________

    > Mailing-List: https://odoo-community.org/groups/contributors-15 [3]

    > Post to: mailto:contributors@odoo-community.org

    > Unsubscribe: https://odoo-community.org/groups?unsubscribe [4]

    >

    >

    >

    > [1]

    > https://odoo-community.org/shop/product/product-cost-price-avco-sync-5169

    > [2]

    > https://odoo-community.org/shop/product/purchase-stock-price-unit-sync-5062

    > [3] https://odoo-community.org/groups/contributors-15

    > [4] https://odoo-community.org/groups?unsubscribe

     

     


    by Radovan Skolnik - 01:41 - 4 Dec 2020