← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 780394] [NEW] Location Content Report is invalid with currencies

 

Public bug reported:

in 6.0 How to reproduce:
Change price type currency for purchase (EUR instead of CNY the main currency).
CNY/EUR = 0.1
Buy 1 product for 1 Eur
Make reception in location (1eur)
in postgresql (stock_move), there is 1 as price_unit
When printing the location content report, the value is 100 CNY instead of 10 expect.
in product/price_get, the price is converted 2 times as the currency is passed in content:
- in:
            res[product.id] = product[ptype] or 0.0 (gives already 10 CNY)

- and in 
            if 'currency_id' in context:
                # Take the price_type currency from the product field
                # This is right cause a field cannot be in more than one currency
                res[product.id] = self.pool.get('res.currency').compute(cr, uid, price_type_currency_id,
                    context['currency_id'], res[product.id],context=context)

** Affects: openobject-addons
     Importance: Undecided
         Status: New

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

Title:
  Location Content Report is invalid with currencies

Status in OpenERP Modules (addons):
  New

Bug description:
  in 6.0 How to reproduce:
  Change price type currency for purchase (EUR instead of CNY the main currency).
  CNY/EUR = 0.1
  Buy 1 product for 1 Eur
  Make reception in location (1eur)
  in postgresql (stock_move), there is 1 as price_unit
  When printing the location content report, the value is 100 CNY instead of 10 expect.
  in product/price_get, the price is converted 2 times as the currency is passed in content:
  - in:
              res[product.id] = product[ptype] or 0.0 (gives already 10 CNY)

  - and in 
              if 'currency_id' in context:
                  # Take the price_type currency from the product field
                  # This is right cause a field cannot be in more than one currency
                  res[product.id] = self.pool.get('res.currency').compute(cr, uid, price_type_currency_id,
                      context['currency_id'], res[product.id],context=context)


Follow ups

References