From 867b53a61605592af6c96f0bd03327e33645deaa Mon Sep 17 00:00:00 2001 From: Bruno Zanotti Date: Tue, 14 Sep 2021 11:25:38 -0300 Subject: [PATCH] [IMP] l10n_ar_ux: add qr-code for invoice payments Add a new field in the journals to fill with a string that will be used to generate a QR-code that will be printed in the invoices report. Also, it adds the possibility of defining a label to be shown before the qr in the report to give to the final user more information. --- l10n_ar_ux/__manifest__.py | 2 +- l10n_ar_ux/models/account_journal.py | 8 ++++++++ l10n_ar_ux/views/account_journal_views.xml | 6 ++++++ l10n_ar_ux/views/report_invoice.xml | 13 +++++++++++++ 4 files changed, 28 insertions(+), 1 deletion(-) diff --git a/l10n_ar_ux/__manifest__.py b/l10n_ar_ux/__manifest__.py index ba0336fe3..ce56e303c 100644 --- a/l10n_ar_ux/__manifest__.py +++ b/l10n_ar_ux/__manifest__.py @@ -1,6 +1,6 @@ { 'name': 'Argentinian Accounting UX', - 'version': "13.0.1.25.0", + 'version': "13.0.1.26.0", 'category': 'Localization/Argentina', 'sequence': 14, 'author': 'ADHOC SA', diff --git a/l10n_ar_ux/models/account_journal.py b/l10n_ar_ux/models/account_journal.py index 7a51bff93..0228efb19 100644 --- a/l10n_ar_ux/models/account_journal.py +++ b/l10n_ar_ux/models/account_journal.py @@ -10,6 +10,14 @@ class AccountJournal(models.Model): _inherit = 'account.journal' l10n_ar_document_type_ids = fields.Many2many('l10n_latam.document.type', string='Document Types') + qr_code_label = fields.Char( + string="QR Code Label", + help="String to display before the QR Code on the invoice report." + ) + qr_code = fields.Char( + string="QR Code", + help="String to generate the QR Code that will be displayed on the invoice report." + ) def _get_l10n_ar_afip_pos_types_selection(self): """ Add more options to the selection field AFIP POS System, re order options by common use """ diff --git a/l10n_ar_ux/views/account_journal_views.xml b/l10n_ar_ux/views/account_journal_views.xml index e9e320e4e..6ecbd0872 100644 --- a/l10n_ar_ux/views/account_journal_views.xml +++ b/l10n_ar_ux/views/account_journal_views.xml @@ -15,6 +15,12 @@ {'invisible':['|', ('l10n_latam_country_code', '!=', 'AR'), ('type', '!=', 'sale')], 'required':[('l10n_latam_country_code', '=', 'AR'), ('l10n_latam_use_documents', '=', True), ('type', '=', 'sale')]} + + + + + + diff --git a/l10n_ar_ux/views/report_invoice.xml b/l10n_ar_ux/views/report_invoice.xml index 7e06b78c0..64b3c8a33 100644 --- a/l10n_ar_ux/views/report_invoice.xml +++ b/l10n_ar_ux/views/report_invoice.xml @@ -67,6 +67,12 @@ El total de este comprobante equivale a un total de a un tipo de cambio consignado de

+
+
+ + +
+