Skip to content

Commit cfdddc4

Browse files
alexis-viajdidderen
authored andcommitted
[IMP] account_invoice_check_total: use format_amount()
1 parent 371b469 commit cfdddc4

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

account_invoice_check_total/models/account_move.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from odoo import api, fields, models
55
from odoo.exceptions import ValidationError
66
from odoo.tools.float_utils import float_compare
7+
from odoo.tools.misc import format_amount
78

89
GROUP_AICT = "account_invoice_check_total.group_supplier_inv_check_total"
910

@@ -47,9 +48,17 @@ def action_post(self):
4748
"There is a difference of %(diff)s"
4849
)
4950
% {
50-
"amount_total": inv.amount_total,
51-
"check_total": inv.check_total,
52-
"diff": inv.check_total_display_difference,
51+
"amount_total": format_amount(
52+
self.env, inv.amount_total, inv.currency_id
53+
),
54+
"check_total": format_amount(
55+
self.env, inv.check_total, inv.currency_id
56+
),
57+
"diff": format_amount(
58+
self.env,
59+
inv.check_total_display_difference,
60+
inv.currency_id,
61+
),
5362
}
5463
)
5564
return super().action_post()

0 commit comments

Comments
 (0)