İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
3189 Görünümler

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
Vazgeç
En İyi Yanıt

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
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Haz 23
3084
2
Mar 21
2822
1
Kas 19
6078
0
Kas 18
2761
2
Mar 24
5892