Commit 23a8749
Juan Ignacio Carreras
[FIX] product_replenishment_cost: skip currency convert when same currency in compute
_compute_price_unit_and_date_planned_and_name was calling _convert()
unconditionally, which applies currency rounding even for same-currency
pairs. For supplier prices below currency precision (e.g. 0.0046 USD
rounded to 2 decimals = 0.00), this caused price_unit to compute as 0
on manually added PO lines.
_prepare_purchase_order_line already guards with
if supplier.currency_id != po.currency_id
Apply the same guard in the compute method.1 parent e93c66b commit 23a8749
2 files changed
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
38 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
0 commit comments