From 5f99aa3046f76e6cf84663d97b490ca579227d27 Mon Sep 17 00:00:00 2001 From: bat-odoo Date: Tue, 10 Jan 2023 10:25:21 +0000 Subject: [PATCH] [IMP] l10n_in_upi: updated generate QR code method name In this commit, changed the method `generate_qr_code` to `_generate_qr_code`. closes odoo/odoo#109717 Related: odoo/enterprise#35693 Signed-off-by: Josse Colpaert --- addons/l10n_in_upi/models/account_invoice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/l10n_in_upi/models/account_invoice.py b/addons/l10n_in_upi/models/account_invoice.py index d7ffab93a17..d0c4411efd3 100644 --- a/addons/l10n_in_upi/models/account_invoice.py +++ b/addons/l10n_in_upi/models/account_invoice.py @@ -9,7 +9,7 @@ from odoo.tools.image import image_data_uri class AccountMove(models.Model): _inherit = "account.move" - def generate_qr_code(self): + def _generate_qr_code(self): self.ensure_one() if self.company_id.country_code == 'IN': payment_url = 'upi://pay?pa=%s&pn=%s&am=%s&tr=%s&tn=%s' % ( @@ -20,4 +20,4 @@ class AccountMove(models.Model): ("Payment for %s" % self.name)) barcode = self.env['ir.actions.report'].barcode(barcode_type="QR", value=payment_url, width=120, height=120) return image_data_uri(base64.b64encode(barcode)) - return super().generate_qr_code() + return super()._generate_qr_code()