[7.0] Wrong average cost computation when price type currency is different from company currency
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Invalid
|
Undecided
|
OpenERP Publisher's Warranty Team | |||
OpenERP Community Backports (Addons) | Status tracked in 7.0 | |||||
7.0 |
Fix Released
|
High
|
Joël Grand-Guillaume @ camptocamp |
Bug Description
Test done with : http://
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
Related branches
- Christophe CHAUVET: Approve (code review, no test)
- Holger Brunn (Therp): Approve (code review)
- Guewen Baconnier @ Camptocamp: Approve (code review)
-
Diff: 639 lines (+551/-4)5 files modifiedpurchase/__openerp__.py (+3/-0)
purchase/test/process/average_price_multicurrency_company.yml (+172/-0)
purchase/test/process/average_price_multicurrency_pricelist.yml (+174/-0)
purchase/test/process/average_price_multicurrency_pricetype.yml (+172/-0)
stock/stock.py (+30/-4)
- Olivier Dony (Odoo): Disapprove
- Alexandre Fayolle - camptocamp (community): Approve (code review, no test)
-
Diff: 640 lines (+552/-4)5 files modifiedpurchase/__openerp__.py (+4/-0)
purchase/test/process/average_price_multicurrency_company.yml (+172/-0)
purchase/test/process/average_price_multicurrency_pricelist.yml (+174/-0)
purchase/test/process/average_price_multicurrency_pricetype.yml (+172/-0)
stock/stock.py (+30/-4)
- Somesh Khare (community): Disapprove
- Alexandre Fayolle - camptocamp (community): Needs Fixing (code review, no test)
- Naresh(OpenERP): Pending requested
-
Diff: 92 lines (+30/-4)1 file modifiedstock/stock.py (+30/-4)
Changed in ocb-addons: | |
status: | Confirmed → Fix Committed |
Changed in openobject-addons: | |
status: | New → Confirmed |
Changed in openobject-addons: | |
assignee: | nobody → OpenERP R&D Addons Team 2 (openerp-dev-addons2) |
importance: | Undecided → Medium |
Changed in openobject-addons: | |
assignee: | OpenERP R&D Addons Team 2 (openerp-dev-addons2) → OpenERP Publisher's Warranty Team (openerp-opw) |
Changed in openobject-addons: | |
status: | Incomplete → Invalid |
Hi,
Well, this is a very nasty one I must admit. I'm providing here a whole set of YAML test that reveal the bug. 3 tets, only the one with pricelist in different currency is ok.
Please, add and commit those tests in the "purchase" core module to ensure no more regression on that topic in the future will appear. It's too critical for a company.
Thanks !