diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-04-16 18:34:56 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-04-16 18:34:56 +0200 |
| commit | 5f2d080cf85d54bc52895f9dbc4075b10989d324 (patch) | |
| tree | c925509b609fb07f6fbef8896710b756c3c6a86f /addons/payment_authorize/models | |
| parent | 026be48ccbbb15daefda070697b135f089f49564 (diff) | |
| parent | ad825b673b57344a6a1571234f62a0b3aa543bf7 (diff) | |
[MERGE] forward port branch 11.0 up to ad825b673b5
Diffstat (limited to 'addons/payment_authorize/models')
| -rw-r--r-- | addons/payment_authorize/models/payment.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/payment_authorize/models/payment.py b/addons/payment_authorize/models/payment.py index b10f2824733..fe17ee4add9 100644 --- a/addons/payment_authorize/models/payment.py +++ b/addons/payment_authorize/models/payment.py @@ -11,7 +11,7 @@ import time from odoo import _, api, fields, models from odoo.addons.payment.models.payment_acquirer import ValidationError from odoo.addons.payment_authorize.controllers.main import AuthorizeController -from odoo.tools.float_utils import float_compare +from odoo.tools.float_utils import float_compare, float_repr from odoo.tools.safe_eval import safe_eval _logger = logging.getLogger(__name__) @@ -64,7 +64,7 @@ class PaymentAcquirerAuthorize(models.Model): temp_authorize_tx_values = { 'x_login': self.authorize_login, 'x_trans_key': self.authorize_transaction_key, - 'x_amount': str(values['amount']), + 'x_amount': float_repr(values['amount'], values['currency'].decimal_places if values['currency'] else 2), 'x_show_form': 'PAYMENT_FORM', 'x_type': 'AUTH_CAPTURE' if not self.capture_manually else 'AUTH_ONLY', 'x_method': 'CC', |
