Commit f5569b1
committed
fix(spp_programs): force currency symbol on the LEFT of amount on entitlement summary (#941 r3 followup)
QA flagged that the previous round-3 fix (which used odoo.tools.misc.
format_amount) rendered the currency symbol on the RIGHT for currency
records configured with position='after'. The program overview should
always show the symbol on the LEFT for consistency.
Replace format_amount with a small static helper _format_money that:
- groups thousands with Python's :, formatter,
- pads to currency.decimal_places (default 2),
- always prefixes the symbol on the left, regardless of currency.position.
Adds test_items_summary_symbol_appears_left_of_amount which explicitly
sets currency.position='after' before asserting the rendered summary
still puts the symbol left of the amount.1 parent 5c962ba commit f5569b1
2 files changed
Lines changed: 48 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
479 | 478 | | |
480 | 479 | | |
481 | 480 | | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
482 | 497 | | |
483 | 498 | | |
484 | 499 | | |
| |||
488 | 503 | | |
489 | 504 | | |
490 | 505 | | |
491 | | - | |
| 506 | + | |
492 | 507 | | |
493 | 508 | | |
494 | 509 | | |
| |||
516 | 531 | | |
517 | 532 | | |
518 | 533 | | |
519 | | - | |
| 534 | + | |
520 | 535 | | |
521 | 536 | | |
522 | 537 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
0 commit comments