diff --git a/addons/account_check_printing/models/account_payment.py b/addons/account_check_printing/models/account_payment.py index d4ab83da890..42515a8e20b 100644 --- a/addons/account_check_printing/models/account_payment.py +++ b/addons/account_check_printing/models/account_payment.py @@ -12,7 +12,7 @@ class AccountRegisterPayments(models.TransientModel): _inherit = "account.register.payments" check_amount_in_words = fields.Char(string="Amount in Words") - check_manual_sequencing = fields.Boolean(related='journal_id.check_manual_sequencing') + check_manual_sequencing = fields.Boolean(related='journal_id.check_manual_sequencing', readonly=1) # Note: a check_number == 0 means that it will be attributed when the check is printed check_number = fields.Integer(string="Check Number", readonly=True, copy=False, default=0, help="Number of the check corresponding to this payment. If your pre-printed check are not already numbered, " @@ -35,7 +35,6 @@ class AccountRegisterPayments(models.TransientModel): res = super(AccountRegisterPayments, self).get_payment_vals() if self.payment_method_id == self.env.ref('account_check_printing.account_payment_method_check'): res.update({ - 'check_amount_in_words': self.check_amount_in_words, 'check_manual_sequencing': self.check_manual_sequencing, }) return res diff --git a/addons/payment_stripe/models/payment.py b/addons/payment_stripe/models/payment.py index ca6a8d5f592..140b575071b 100644 --- a/addons/payment_stripe/models/payment.py +++ b/addons/payment_stripe/models/payment.py @@ -7,6 +7,7 @@ from odoo import api, fields, models, _ from odoo.addons.payment.models.payment_acquirer import ValidationError from odoo.exceptions import UserError from odoo.tools.safe_eval import safe_eval +from odoo.tools.float_utils import float_round _logger = logging.getLogger(__name__) @@ -90,7 +91,7 @@ class PaymentTransactionStripe(models.Model): def _create_stripe_charge(self, acquirer_ref=None, tokenid=None, email=None): api_url_charge = 'https://%s/charges' % (self.acquirer_id._get_stripe_api_url()) charge_params = { - 'amount': int(self.amount if self.currency_id.name in INT_CURRENCIES else self.amount*100), + 'amount': int(self.amount if self.currency_id.name in INT_CURRENCIES else float_round(self.amount * 100, 2)), 'currency': self.currency_id.name, 'metadata[reference]': self.reference } diff --git a/addons/purchase/i18n/purchase.pot b/addons/purchase/i18n/purchase.pot index 081dcd5cb23..a140ef02eda 100644 --- a/addons/purchase/i18n/purchase.pot +++ b/addons/purchase/i18n/purchase.pot @@ -120,8 +120,7 @@ msgstr "" #: model:mail.template,body_html:purchase.mail_template_data_notification_email_purchase_order msgid "\n" "
\n" -" % set record = ctx.get('record')\n" -" % set company = record and record.company_id or user.company_id\n" +" % set company = record and record.company_id or or ctx.get('company')\n" " \n" "