← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 740964] Re: Stock Input/Output Accounts doesn't work well

 

This patch fixes the problem correctly, anyway I dont understand why it
fails.

the problem is in stock.py in return of function
_get_reference_accounting_values_for_valuation (line 2025)

if you print value before return, it appear ok:

        amount_unit = move.product_id.price_get('standard_price', currency_ctx)[move.product_id.id]
        reference_amount = amount_unit * qty or 1.0
        print ('check 1: '+str(reference_amount))
        return reference_amount, reference_currency_id

       ------> check 1: 601.0    (4 products with cost 150,25)

but if you print the returned variable:

        
                reference_amount, reference_currency_id = self._get_reference_accounting_values_for_valuation(cr,
                uid,move, src_company_ctx)
                print ('check 2: '+ str(reference_amount))

        ------> check 2: 150.25




** Patch added: "patch to bug #740964 v2"
   https://bugs.launchpad.net/openobject-addons/+bug/740964/+attachment/2073093/+files/patch740964_3.patch

-- 
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