Files
odoo_source/addons/purchase_requisition
Touati Djamel (otd) 6af53f5f48 [FIX] purchase_requisition: convert purchase price to current currency
Bug introduced in:
https://github.com/odoo/odoo/pull/128327/commits/8f96e08985ebac3309745f1036a5e83d287e6382

Steps to reproduce the bug:
- Activate 2 currencies (assume EUR and USD, conversion
   rate: 0.65 EUR = 1 USD)
- Create new product “P1”:
    - Purchase tab:
        - add two vendors:
- Vendor_USD, currency = USD, price = 100
- Vendor_EUR, currency = EUR, price = 80
 - Create PO:
    - vendor = vendor_EUR
    - Currency = Eur
    - Add P1, Unit price should be 80

- Alternative tab > Create alternative > Vendor = Vendor_EUR
- Compare product lines Issue: The line with price = 100 USD is
 highlighted as being the cheapest option, but if we apply conversion
 rules, 80 EUR = 123,07 USD > 100 USD.

Solution:
Before selecting the cheapest line, we convert the prices of the
purchase order lines that are in a currency other than the current
currency of the company.

opw-3378253

closes odoo/odoo#137642

X-original-commit: c45272828ee85bc23dd97dc93dc741f8f59a5305
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2023-10-05 15:36:26 +00:00
..
…
…