Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
3255 Näkymät

I want to know by how much (financially) the adjustment will affect my inventory.


In our industry, adjustments of more than 3% of our average monthly sales can cause us to be out of compliance with the state.


How can I see the "cost" of the adjustment to make sure the variance in a given month is within 3%?

 

Avatar
Hylkää
Paras vastaus

You can add a custom field to the stock.quant model to calculate the financial impact (tested with Odoo 18.0).


Given the following values and costing methods for Products:


The Physical Inventory Menu would then show something like this:

Here, the loss of 1 unit of each product has a financial impact of $29 in lost value.


Custom Field:

Dependencies:

inventory_quantity_set, product_id

Compute:

for record in self:
    cost = 0.0
    if record.inventory_quantity_set:
        product = record.product_id
        if product.cost_method in ['standard', 'average']:
            cost = product.standard_price
        elif product.cost_method == 'fifo':
            valuation_layers = record.env['stock.valuation.layer'].search([
                ('product_id', '=', product.id),('remaining_qty', '>', 0)], order='create_date asc')
            qty_to_consume = abs(record.inventory_diff_quantity)
            cost = 0.0
            for layer in valuation_layers:
                if qty_to_consume <= 0:
                    break
                qty_from_layer = min(layer.remaining_qty, qty_to_consume)
                cost += qty_from_layer * (layer.unit_cost or 0.0)
                qty_to_consume -= qty_from_layer
    record['x_impact'] = record.inventory_diff_quantity * cost


Note: this is a prototype, not a solution, and makes assumptions about how products are deplenished from inventory (financial fifo). Your Odoo Digital Advisor or Odoo Partner can help you implement something similar in your own Odoo database. You can also extend this approach to calculate the percentage variance.

    

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
kesäk. 23
3124
2
maalisk. 21
2873
1
marrask. 19
6124
0
marrask. 18
2815
2
maalisk. 24
6032