multi currency + pricelist + discount => completely wrong sale orders and invoices
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Released
|
Undecided
|
OpenERP Publisher's Warranty Team |
Bug Description
Using different currencies with pricelist with the discount on sale order lines or invoice lines enabled gives completely wrong results.
Instance setup:
* Enable multiple pricelists
* Enable multiple currencies management in the instance
* Enable discount on sale order lines
* Enable purchase pricelists
* Create a new public pricelist in USD, based on the default pricelist with the formula: BasePrice * (1+0.00) + 10
* Create a new purchase price list in USD, based on the standard purchase pricelist with the formula BasePrice * (1+0.00) + 7
* Edit the partner Delta PC: set him as customer, and give him the new Public Pricelist USD as sales pricelist and the new Purchase price list USD as purchase price list
* Edit the Belle-Vue Kriek product, set the cost price to 0.25
Steps to reproduce issue with sale orders
=======
* Create a new Sale order for Delta PC, add a sale order line, choose "Belle-Vue Kriek" as the product, save the draft sale order.
Expected:
A sale order with a total amount of USD 0.83*1.5289+10 = 11.27, with 1 line with a unit price of 11.27, a discount of 0% and an amount of 11.27
Actual:
A sale order with a total amount of USD 11.27, with 1 line with a unit price of 0.83, a discount of -1257.71% and an amount of 11.27
Steps to reproduce issue with customer invoice
=======
* Create a new customer invoice for Delta PC, add an invoice line, choose "Belle-Vue Kriek" as the product, save the draft invoice.
Expected:
A sale order with a total amount of USD 0.83*1.5289+10 = 11.27, with 1 line with a unit price of 11.27, a discount of 0% and an amount of 11.27
Actual:
A sale order with a total amount of EUR 11.27, with 1 line with a unit price of 0.83, a discount of -1257.71% and an amount of 11.27
(note that in addition to the sale order, the currency is incorrect, although the amount is correct)
Steps to reproduce issue with supplier invoice
=======
* Create a new Supplier invoice for Delta PC, add an invoice line, choose "Belle-Vue Kriek" as the product, save the draft invoice.
Expected:
A sale order with a total amount of USD 0.25*1.5289+7 = 7.38, with 1 line with a unit price of 7.38, a discount of 0% and an amount of 7.38
Actual:
A sale order with a total amount of EUR 7.38, with 1 line with a unit price of 0.83, a discount of -789.42% and an amount of 7.38
Steps to reproduce with purchase order
=======
There seem to be *no bug* on purchase order:
* create a new purchase order from Delta PC, add a PO line, choose "Belle-Vue Kriek" as the product, save the draft PO
Expected:
A PO with a total amount of USD 0.25*1.5289+7 = 7.38, with 1 line with
a unit price of 7.38 and an amount of 7.38
Actual: the same.
Changed in openobject-addons: | |
assignee: | nobody → OpenERP Publisher's Warranty Team (openerp-opw) |
tags: | added: maintenance |
description: | updated |
Changed in openobject-addons: | |
status: | New → Fix Released |
I've reproduced this on runbot build 20771