Hi Olivier, Thanks for your input here, I can understand your point of view, but I find it sad :( Yes Product prices are meant to be in company currency, but OpenERP allow to setup that differently.. So IMO or remove the possibility to define a standard price in an other currency than company, or fix that bug. Currently you can make mistakes and that's not good.
Sharing product is possible using the price_type as it was originally designed to (years ago) by adding a company_id on it. Here is the module that allow a right price computation per company (and as well add the historization of prices) for both averageor standard price management : https://code.launchpad.net/~camptocamp/openerp-product-attributes/port- add-product_multi_company_7.0-bis-jge/+merge/192872 Note that this is also inspired from the last WMS work made by Quentin. So OpenERP seems to be agreed on this way to go (or I miss something may be). What we want is having one field for cost price for all companies , but having various values for them (like properties), but with history. I know we can't address all stuffs. But as long as you can make this setup in OpenERP, I don't see the point not to fix that issue ? To answer yo here: Tying 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...? => I say without the module suggested here: https://code.launchpad.net/~camptocamp/openerp-product-attributes/port- add-product_multi_company_7.0-bis-jge/+merge/192872 Company that want to share products need to define a currency for cost price (standard_price). My fix here allow to deal with the use case here: - One company in Germany (EUR) - One company in France (EUR) => They want to share product and average cost computation => Why not allow them to do that Same apply with : - One company in Switzerlan (CHF) - One company in France (EUR) => In that case you need the suggested fix here ! It's true that all compagnies must agree on the currency of the standard price, as it will be the same for all, but it can work perfectly. My arguements to fix is : - We need it in that last use - OpenERP allow to configure stuff like this, so it is a bug if the computation is wrong ! - I don't introduce an regression for all people here - I even provide the tests that ensure it ;) - Saying we're not supose to configure like that is not a valid arguments IMO to refuse a fix... Or you remove the possibility to do so Regards, Joël -- 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): Invalid 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

