c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #23372
[Bug 740964] Re: Stock Input/Output Accounts doesn't work well
Hi, I just run in to this. The issue is not in the stock module, but in
the purchase module.
In purchase/stock.py it overrides
_get_reference_accounting_values_for_valuation and within that function,
if move.price_unit is not already written it takes the value from the PO
Line, but does not multiply it by the quantity.
Function below
def _get_reference_accounting_values_for_valuation(self, cr, uid, move, context=None):
"""
Overrides the default stock valuation to take into account the currency that was specified
on the purchase order in case the valuation data was not directly specified during picking
confirmation.
"""
reference_amount, reference_currency_id = super(stock_move, self)._get_reference_accounting_values_for_valuation(cr, uid, move, context=context)
if move.product_id.cost_method != 'average' or not move.price_unit:
# no average price costing or cost not specified during picking validation, we will
# plug the purchase line values if they are found.
if move.purchase_line_id and move.picking_id.purchase_id.pricelist_id:
reference_amount, reference_currency_id = move.purchase_line_id.price_unit, move.picking_id.purchase_id.pricelist_id.currency_id.id
return reference_amount, reference_currency_id
As you will see by comparing to the stock/stock.py version of this
function it fails to multiply by quantity.
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/740964
Title:
Stock Input/Output Accounts doesn't work well
Status in OpenERP Modules (addons):
Confirmed
Bug description:
OpenERP v6.1, spanish account localization installed on a common stock
profile. Video Example attached.
1) I correctly define in product information the Stock Input/Output Accounts
2) I also define in the product category the information of the Stock Variation Account
3) I made a purchase order of:
Product A: 5 units x 63,28 € = 316,4 €
Pruduct B: 1 unitx x 1 € = 1 €
4) Listing the movements from the stock journal, it's not multiplying
the units and the price, and instead of that it's just accounting the
price of a single unit.
Best regards.
References