I don't think this bug report describes a valid use case, if I
understand it correctly. The main reason is that the sentence "This
means cost price in all product form are now USD costs." is incorrect.

The default cost price and list price of any product are always meant to
be expressed in the currency of the company, and the average price
calculation is based on that currency and nothing else. This is one of
the reasons why OpenERP does not yet support sharing products between
companies, especially in case of average costing.

The price types are not meant to be used to change the semantics/currency of 
the "list price" and "cost price" fields of all products. That would be 
strange, dangerous, and make existing values suddenly wrong - a bit like 
changing a company's currency. The price type are exclusively designed to be 
used for pricelist calculations - and the currency should only be relevant for 
multi-company cases or extra/custom price fields.
You could have "Cost Price USD" and "Cost Price EUR" price types and use them 
appropriately in your USD-based and EUR-based companies. But the average cost 
of each product should always be expressed in the currency of the owner company!

Trying to change this to allow a flawed use case can only lead to more hidden 
problem and inconsistencies down the road,  in my opinion. 
For example, your test and patch only consider the first price type based on 
"standard_price", but there could be many and there is no way to say which one 
is relevant for a product/company, because that's not their purpose...?

** Changed in: openobject-addons
   Importance: Medium => Undecided

** Changed in: openobject-addons
       Status: Fix Committed => Incomplete

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1238525

Title:
  [7.0] Wrong average cost computation when price type currency is
  different from company currency

Status in OpenERP Community Backports (Addons):
  Fix Committed
Status in OpenERP Addons (modules):
  Incomplete

Bug description:
  Test done with :
  http://7-0-22302.runbot.openerp.com/?db=7-0-22302-base

  Prerequisites
  ----------------------
  * Install Warehouse management & Purchase
  * Go to setting / Configuaration / Purchases and activate 'Manage pricelist 
per supplier' & 'Compute product cost price based on average cost'
  * Go to setting / Configuration / Invoicing and activate 'Allow 
multi-currency'
  * Give the Admin user the Technical Features rights and Financial Manager
  * The company is in EUR
  * Go to Purchases / Configuration / Pricelists / Price Types
  * Modify the currency of the Price type 'Cost Price' to : USD
  (This means cost price in all product form are now USD costs.)
  * Ensure the current rate of USD is : 1.528900
  * Ensure the cost of product 'USB Adapter' is 13.00 and current Qty in 
inventory is : 0

  How to reproduce the bug ?
  ------------------------------------------------
  * Create a new Supplier quotation to ASUStek with product 'USB Adapter' – Qty 
: 1 – Change the unit price to 20.(This quotation is in EUR)
  * Confirm Order
  * Receive Products effectively
  * Go to Product form and see that the Cost price is 20 → WRONG
  EXPECTED :  it should be 20€ * 1.528900 = 30.58 $ since my price type is in 
USD.

  
  Thanks

  Frederic Clementi
  Camptocamp SA

To manage notifications about this bug go to:
https://bugs.launchpad.net/ocb-addons/+bug/1238525/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~openerp-india
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-india
More help   : https://help.launchpad.net/ListHelp

Reply via email to