simplest case: product_values in all of these records are identical
* PO/SO line == stock_move == invoice_line == account_move
if AVERAGE and REAL TIME price is used in a volatile market the product average price will change with every incoming product move.
to be able to calculate correctly the value of a product at period (month/year) end we MUST store the product value (or it's components qty and price) in every stock move.
this is also necessary to make stock reports and analysis - which must include values - returning meaningful values.
currently only the price of incoming goods is stored - IMHO the "current" price for all moves must be stored to be able to generate reproducable results.
product_product.standard_price * product_product.qty_available gives "only" the correct value for all other point in time it is WRONG!.
the patch adds the current "price_unit" to each stock move which allows to calculate
* stock value = sum(price_unit*qty) for every point in time.
I suggest to store move_value = price_unit * qty for every stock move.
* stock_value = sum(move_value) to avoid rounding differences and differences to account_move_lines.
in "Moves Analysis" there is a column "Total Value" and IMHO this must show correct figures
similar in "Inventory Analysis" grouped by "Date"
in
./report/report_stock_move.py CASE WHEN sp.type in ('in') THEN sum(sm.product_qty * pu.factor) * pt.standard_price ELSE 0.0 END AS in_value,
returns wrong and unsusable values .....
it is absulutely necessary to use the price_unit of the move line.
and instead of haveing to calcualte
- sum(sm.product_qty * pu.factor) * move.price_unit
we should have
- sum(move_value)
let's start with a bit of accounting theory
product value = qty*price
simplest case: product_values in all of these records are identical
* PO/SO line == stock_move == invoice_line == account_move
if AVERAGE and REAL TIME price is used in a volatile market the product average price will change with every incoming product move.
to be able to calculate correctly the value of a product at period (month/year) end we MUST store the product value (or it's components qty and price) in every stock move.
this is also necessary to make stock reports and analysis - which must include values - returning meaningful values.
currently only the price of incoming goods is stored - IMHO the "current" price for all moves must be stored to be able to generate reproducable results.
product_ product. standard_ price * product_ product. qty_available gives "only" the correct value for all other point in time it is WRONG!.
the patch adds the current "price_unit" to each stock move which allows to calculate
* stock value = sum(price_unit*qty) for every point in time.
I suggest to store move_value = price_unit * qty for every stock move.
* stock_value = sum(move_value) to avoid rounding differences and differences to account_move_lines.
in "Moves Analysis" there is a column "Total Value" and IMHO this must show correct figures
similar in "Inventory Analysis" grouped by "Date"
in report_ stock_move. py
CASE WHEN sp.type in ('in') THEN
sum(sm. product_ qty * pu.factor) * pt.standard_price
ELSE 0.0
END AS in_value,
./report/
returns wrong and unsusable values .....
it is absulutely necessary to use the price_unit of the move line.
and instead of haveing to calcualte
- sum(sm.product_qty * pu.factor) * move.price_unit
we should have
- sum(move_value)
BTW much if this is available in bazaar. launchpad. net/~c2c/ +junk/c2c_ austria_ dev/files/ head:/c2c_ stock_accountin g/
http://
we really should team up to get a working stock accounting ASAP.