Skip to content

Conversation

@SilvioC2C
Copy link

@SilvioC2C SilvioC2C commented Oct 15, 2025

Fixes portal template incorrect rendering of discounted unit prices.

SO lines info

From the SO form view's order_line tree view (using quantity as sequence to ease comparison w/ the template reports below):
Screenshot from 2025-10-15 09-43-08

NB: the fact that the "Disc. %" on the second line is 0 even though the "Discount (Fixed)" is 0.10 is not an error: since field discount is computed but not readonly, there are cases in which field discount could be assigned a value which is different than the one assigned by the compute method (for example, when importing the SO through the Odoo file importer).

Portal report before the fix

Screenshot from 2025-10-15 09-43-17

🔴 line 1: the discounted unit price is 1.00 instead of 0.90 (10% applied on 1.00)
🔴 line 2: the discounted unit price is not shown at all
🟢 line 3: the discounted unit price is shown correctly (3.00 w/ 0.30 or 10% discount = 2.70)
🟢 line 4: no discount applied

Portal report after the fix

Screenshot from 2025-10-15 09-43-24

🟢 line 1: the discounted unit price is shown correctly (1.00 w/ 10% discount = 0.90)
🟢 line 2: the discounted unit price is shown correctly (2.00 w/ 0.10 discount = 1.90)
🟢 line 3: the discounted unit price is shown correctly (3.00 w/ 0.30 or 10% discount = 2.70)
🟢 line 4: no discount applied

Fixes portal template incorrect rendering of discounted unit prices
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants