diff --git a/l10n_ch_base_bank/i18n/de.po b/l10n_ch_base_bank/i18n/de.po index aaa9a4b2d..4f2e38c61 100644 --- a/l10n_ch_base_bank/i18n/de.po +++ b/l10n_ch_base_bank/i18n/de.po @@ -18,6 +18,30 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#. module: l10n_ch_base_bank +#: code:addons/l10n_ch_base_bank/models/invoice.py:58 +#, python-format +msgid "ISR Reference" +msgstr "ESR Referenznummer" + +#. module: l10n_ch_base_bank +#: code:addons/l10n_ch_base_bank/models/invoice.py:101 +#, python-format +msgid "ISR Reference is required" +msgstr "ESR Referenznummer ist erforderlich" + +#. module: l10n_ch_base_bank +#: code:addons/l10n_ch_base_bank/models/invoice.py:82 +#, python-format +msgid "ISR Reference type needs a postal account number on the customer." +msgstr "ESR Referenznummer benötigt eine Postkonto Nummer beim Kunden." + +#. module: l10n_ch_base_bank +#: code:addons/l10n_ch_base_bank/models/invoice.py:87 +#, python-format +msgid "ISR Reference type needs a postal account number on your company" +msgstr "ESR Referenznummer benötigt eine Postkonto Nummer bei der Firma." + #. module: l10n_ch_base_bank #: model:ir.model,name:l10n_ch_base_bank.model_res_bank msgid "Bank" @@ -31,7 +55,7 @@ msgstr "" #. module: l10n_ch_base_bank #: model:ir.model.fields,field_description:l10n_ch_base_bank.field_res_partner_bank_isr_adherent_num msgid "Bank ISR adherent number" -msgstr "" +msgstr "Die zur Bank zugehörige ESR Nummer" #. module: l10n_ch_base_bank #: code:addons/l10n_ch_base_bank/models/bank.py:248 @@ -109,7 +133,7 @@ msgstr "" #: code:addons/l10n_ch_base_bank/models/invoice.py:113 #, python-format msgid "Invalid ISR Number (wrong checksum)." -msgstr "" +msgstr "Ungültige ESR Nummer (Falsche Prüfziffer)." #. module: l10n_ch_base_bank #: model:ir.model,name:l10n_ch_base_bank.model_account_invoice @@ -142,15 +166,17 @@ msgstr "" #. module: l10n_ch_base_bank #: sql_constraint:res.partner.bank:0 -msgid "The ISR adherent number/ccp pair must be unique !" -msgstr "" +msgid "The ISR adherent number must be unique !" +msgstr "Die zugehörige ESR Nummer muss eindeutig sein!" #. module: l10n_ch_base_bank #: model:ir.model.fields,help:l10n_ch_base_bank.field_res_partner_bank_isr_adherent_num msgid "" -"Your Bank adherent number to be printed in references of your ISR. This is " -"not a postal account number." +"Your Bank adherent number to be printed in references of your ISR. This " +"is not a postal account number." msgstr "" +"Die Banknummer, welche als Referenz zur ESR Nummer gedruckt wird. Dies " +"ist nicht die Postkontonummer." #. module: l10n_ch_base_bank #: code:addons/l10n_ch_base_bank/models/bank.py:220 @@ -159,3 +185,5 @@ msgid "" "Your bank ISR adherent number must contain only digits!\n" "Please check your company bank account." msgstr "" +"Ihre zur Bank zugehörige ESR Nummer darf nur Ziffern enthalten.\n" +"Bitte überprüfen Sie die Bankkontoeinstellungen der Firma" diff --git a/l10n_ch_base_bank/i18n/fr.po b/l10n_ch_base_bank/i18n/fr.po index 1ffd192fc..a65e05c47 100644 --- a/l10n_ch_base_bank/i18n/fr.po +++ b/l10n_ch_base_bank/i18n/fr.po @@ -19,6 +19,33 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" +#. module: l10n_ch_base_bank +#: code:addons/l10n_ch_base_bank/models/invoice.py:56 +#, python-format +msgid "ISR Reference" +msgstr "Référence BVR" + +#. module: l10n_ch_base_bank +#: code:addons/l10n_ch_base_bank/models/invoice.py:99 +#, python-format +msgid "ISR Reference is required" +msgstr "La référence BVR est requise" + +#. module: l10n_ch_base_bank +#: code:addons/l10n_ch_base_bank/models/invoice.py:80 +#, python-format +msgid "ISR Reference type needs a postal account number on the customer." +msgstr "" +"Le type de référence BVR nécessite un numéro de compte postal sur le client." + +#. module: l10n_ch_base_bank +#: code:addons/l10n_ch_base_bank/models/invoice.py:85 +#, python-format +msgid "ISR Reference type needs a postal account number on your company" +msgstr "" +"Le type de référence BVR nécessite un numéro de compte postal sur votre " +"compagnie." + #. module: l10n_ch_base_bank #: model:ir.model,name:l10n_ch_base_bank.model_res_bank msgid "Bank" @@ -32,7 +59,7 @@ msgstr "Comptes bancaires" #. module: l10n_ch_base_bank #: model:ir.model.fields,field_description:l10n_ch_base_bank.field_res_partner_bank_isr_adherent_num msgid "Bank ISR adherent number" -msgstr "" +msgstr "Numéro d'adhérent BVR" #. module: l10n_ch_base_bank #: code:addons/l10n_ch_base_bank/models/bank.py:248 @@ -110,7 +137,7 @@ msgstr "Référence interne" #: code:addons/l10n_ch_base_bank/models/invoice.py:113 #, python-format msgid "Invalid ISR Number (wrong checksum)." -msgstr "" +msgstr "Numéro BVR invalide" #. module: l10n_ch_base_bank #: model:ir.model,name:l10n_ch_base_bank.model_account_invoice @@ -143,14 +170,14 @@ msgstr "" #. module: l10n_ch_base_bank #: sql_constraint:res.partner.bank:0 -msgid "The ISR adherent number/ccp pair must be unique !" -msgstr "" +msgid "The ISR adherent number must be unique !" +msgstr "Le numéro d'adhérent BVR doit être unique" #. module: l10n_ch_base_bank #: model:ir.model.fields,help:l10n_ch_base_bank.field_res_partner_bank_isr_adherent_num msgid "" -"Your Bank adherent number to be printed in references of your ISR. This is " -"not a postal account number." +"Your Bank adherent number to be printed in references of your ISR. This " +"is not a postal account number." msgstr "" #. module: l10n_ch_base_bank @@ -160,3 +187,5 @@ msgid "" "Your bank ISR adherent number must contain only digits!\n" "Please check your company bank account." msgstr "" +"Votre numéro d'adhérent BVR de votre banque ne doit contenir que des chiffres!\n" +"Veuillez vérifier le compte bancaire de votre société" diff --git a/l10n_ch_base_bank/i18n/it.po b/l10n_ch_base_bank/i18n/it.po index b7396b92b..cd8fecf37 100644 --- a/l10n_ch_base_bank/i18n/it.po +++ b/l10n_ch_base_bank/i18n/it.po @@ -19,6 +19,30 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#. module: l10n_ch_base_bank +#: code:addons/l10n_ch_base_bank/models/invoice.py:56 +#, python-format +msgid "ISR Reference" +msgstr "" + +#. module: l10n_ch_base_bank +#: code:addons/l10n_ch_base_bank/models/invoice.py:99 +#, python-format +msgid "ISR Reference is required" +msgstr "" + +#. module: l10n_ch_base_bank +#: code:addons/l10n_ch_base_bank/models/invoice.py:80 +#, python-format +msgid "ISR Reference type needs a postal account number on the customer." +msgstr "" + +#. module: l10n_ch_base_bank +#: code:addons/l10n_ch_base_bank/models/invoice.py:85 +#, python-format +msgid "ISR Reference type needs a postal account number on your company" +msgstr "" + #. module: l10n_ch_base_bank #: model:ir.model,name:l10n_ch_base_bank.model_res_bank msgid "Bank" @@ -110,7 +134,7 @@ msgstr "Riferimento interno" #: code:addons/l10n_ch_base_bank/models/invoice.py:113 #, python-format msgid "Invalid ISR Number (wrong checksum)." -msgstr "" +msgstr "Numero PVR errato (checksum invalido)." #. module: l10n_ch_base_bank #: model:ir.model,name:l10n_ch_base_bank.model_account_invoice @@ -143,14 +167,14 @@ msgstr "" #. module: l10n_ch_base_bank #: sql_constraint:res.partner.bank:0 -msgid "The ISR adherent number/ccp pair must be unique !" -msgstr "" +msgid "The ISR adherent number must be unique !" +msgstr "Il numero di adesione PVR deve essere univoco" #. module: l10n_ch_base_bank #: model:ir.model.fields,help:l10n_ch_base_bank.field_res_partner_bank_isr_adherent_num msgid "" -"Your Bank adherent number to be printed in references of your ISR. This is " -"not a postal account number." +"Your Bank adherent number to be printed in references of your ISR. This " +"is not a postal account number." msgstr "" #. module: l10n_ch_base_bank diff --git a/l10n_ch_payment_slip/README.rst b/l10n_ch_payment_slip/README.rst index 7cb1287c4..8f4ce3405 100644 --- a/l10n_ch_payment_slip/README.rst +++ b/l10n_ch_payment_slip/README.rst @@ -2,52 +2,55 @@ :target: http://www.gnu.org/licenses/agpl :alt: License: AGPL-3 -=================================== -Swiss Payment slip known as ESR/BVR -=================================== +====================================== +Swiss inpayment slip (ISR/PVR/BVR/ESR) +====================================== -This addon allows you to print the ESR/BVR report Using Qweb report. +This addon allows you to print the ISR report Using Qweb report. -The ESR/BVR is grenerated as an image and is availabe in a fields -of the `l10n_ch.payment_slip` Model. +ISR is called: +- PVR in italian +- BVR in french +- ESR in german -This module will also allow you to import v11 files provided -by financial institute into a bank statement +The ISR is grenerated as an image and is availabe in a fields +of the `l10n_ch.payment_slip` Model. This module also adds transaction_ref field on entries in order to manage reconciliation in multi payment context (unique reference needed on -account.move.line). Many BVR can now be printed from on invoice for each +account.move.line). Many ISR can now be printed from one invoice for each payment terms. Configuration ============= -You can adjust the print out of ESR/BVR, which depend on each printer, -for every company in the "BVR Data" tab. +You can adjust the print out of ISR, which depend on each printer, +In the General Settings - Invoicing. The settings are specific for every +company. This is especialy useful when using pre-printed paper. -Options also allow you to print the ESR/BVR in background when using +Options also allow you to print the ISR in background when using white paper and printing customer address in the page header. -By default address format on ESR/BVR is +By default address format on ISR is `%(street)s\n%(street2)s\n%(zip)s %(city)s` This can be change by setting System parameter -`bvr.address.format` +`isr.address.format` Usage ===== -The ESR/BVR is created each time an invoice is validated. +The ISR is created each time an invoice is validated. To modify it you have to cancel it and reconfirm the invoice. To import v11, use the wizard provided in bank statement. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/125/10.0 + :target: https://runbot.odoo-community.org/runbot/125/11.0 Bug Tracker =========== diff --git a/l10n_ch_payment_slip/__init__.py b/l10n_ch_payment_slip/__init__.py index 7660e7bf6..07837ea52 100644 --- a/l10n_ch_payment_slip/__init__.py +++ b/l10n_ch_payment_slip/__init__.py @@ -1,3 +1,4 @@ +from . import controllers from . import models from . import report from . import wizard diff --git a/l10n_ch_payment_slip/__manifest__.py b/l10n_ch_payment_slip/__manifest__.py index 59f618a34..a5fe01a59 100644 --- a/l10n_ch_payment_slip/__manifest__.py +++ b/l10n_ch_payment_slip/__manifest__.py @@ -1,32 +1,35 @@ -# -*- coding: utf-8 -*- -# © 2012-2016 Camptocamp SA +# Copyright 2012-2016 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -{'name': 'Switzerland - Payment Slip (BVR/ESR)', - 'summary': 'Print ESR/BVR payment slip with your invoices', - 'version': '10.0.1.1.0', +{'name': 'Switzerland - ISR inpayment slip (PVR/BVR/ESR)', + 'summary': 'Print inpayment slip from your invoices', + 'version': '11.0.1.0.0', 'author': "Camptocamp,Odoo Community Association (OCA)", 'category': 'Localization', 'website': 'http://www.camptocamp.com', 'license': 'AGPL-3', 'depends': [ - 'base', 'account', - 'report', + 'account_invoicing', 'l10n_ch_base_bank', 'base_transaction_id', # OCA/bank-statement-reconcile + 'web', ], 'data': [ - "views/company.xml", + "views/report_xml_templates.xml", "views/bank.xml", "views/account_invoice.xml", - "wizard/bvr_batch_print.xml", - "wizard/bvr_import_view.xml", + "views/res_config_settings_views.xml", + "wizard/isr_batch_print.xml", "report/report_declaration.xml", "security/ir.model.access.csv" ], 'demo': [], - 'test': [], 'auto_install': False, - 'installable': False, - 'images': [] + 'installable': True, + 'images': [], + 'external_dependencies': { + 'python': [ + 'PyPDF2', + ] + } } diff --git a/l10n_ch_payment_slip/controllers/__init__.py b/l10n_ch_payment_slip/controllers/__init__.py new file mode 100644 index 000000000..d6194da2b --- /dev/null +++ b/l10n_ch_payment_slip/controllers/__init__.py @@ -0,0 +1 @@ +from . import web diff --git a/l10n_ch_payment_slip/controllers/web.py b/l10n_ch_payment_slip/controllers/web.py new file mode 100644 index 000000000..df206f6d0 --- /dev/null +++ b/l10n_ch_payment_slip/controllers/web.py @@ -0,0 +1,34 @@ +# Copyright 2018 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) + + +from odoo.models import _ +from odoo.addons.web.controllers import main as report +from odoo.http import content_disposition, request, route + + +class ReportController(report.ReportController): + @route() + def report_routes(self, reportname, docids=None, converter=None, **data): + if converter == "reportlab_pdf": + report_slip = request.env.ref( + 'l10n_ch_payment_slip.one_slip_per_page_from_invoice') + filename = '' + invoice_id = [] + if docids: + invoice_id = [int(i) for i in docids.split(',')] + filename = ''.join([ + _('ISR'), + '_multiple_invoices' if len(invoice_id) > 1 + else '{0:05d}'.format(invoice_id[0]), + '.pdf' + ]) + data, format = report_slip.render(invoice_id) + pdfhttpheaders = [ + ('Content-Type', 'application/pdf'), + ('Content-Disposition', content_disposition(filename)), + ('Content-Length', len(data)), + ] + return request.make_response(data, headers=pdfhttpheaders) + return super(ReportController, self).report_routes( + reportname, docids, converter, **data) diff --git a/l10n_ch_payment_slip/i18n/de.po b/l10n_ch_payment_slip/i18n/de.po index 943466b0b..db7ae7d21 100644 --- a/l10n_ch_payment_slip/i18n/de.po +++ b/l10n_ch_payment_slip/i18n/de.po @@ -20,82 +20,82 @@ msgstr "" #. module: l10n_ch_payment_slip #: model:ir.ui.view,arch_db:l10n_ch_payment_slip.company_form_view -msgid "BVR Data" +msgid "ISR Data" msgstr "ESR-Daten" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_delta_horz -msgid "BVR Horz. Delta (inch)" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_delta_horz +msgid "ISR Horz. Delta (inch)" msgstr "ESR horiz. Differenz (Inch)" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_delta_vert -msgid "BVR Vert. Delta (inch)" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_delta_vert +msgid "ISR Vert. Delta (inch)" msgstr "ESR vert. Differenz (Inch)" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_add_horz -msgid "BVR horiz. position address (inch)" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_add_horz +msgid "ISR horiz. position address (inch)" msgstr "ESR horiz. Adressposition (Inch)" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_amount_line_horz -msgid "BVR horiz. position for amount line (inch)" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_amount_line_horz +msgid "ISR horiz. position for amount line (inch)" msgstr "" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_scan_line_horz -msgid "BVR horiz. position for scan line(inch)" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_scan_line_horz +msgid "ISR horiz. position for scan line(inch)" msgstr "ESR horiz. Position der Scanzeile (Inch)" #. module: l10n_ch_payment_slip #: model:ir.ui.view,arch_db:l10n_ch_payment_slip.l10n_ch_view_res_partner_bank_from_invoice_slip -msgid "BVR options" +msgid "ISR options" msgstr "ESR Einstellungen" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_account_invoice_bvr_reference -msgid "BVR ref" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_account_invoice_isr_reference +msgid "ISR ref" msgstr "ESR Ref." #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_scan_line_font_size -msgid "BVR scan line font size (pt)" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_scan_line_font_size +msgid "ISR scan line font size (pt)" msgstr "ESR Schriftgrösse der Kodierungszeile in pt" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_scan_line_letter_spacing -msgid "BVR scan line letter spacing" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_scan_line_letter_spacing +msgid "ISR scan line letter spacing" msgstr "ESR Scanzeile Zeichenabstand" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_add_vert -msgid "BVR vert. position for address (inch)" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_add_vert +msgid "ISR vert. position for address (inch)" msgstr "ESR vert. Adressposition (Inch)" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_amount_line_vert -msgid "BVR vert. position for amount line (inch)" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_amount_line_vert +msgid "ISR vert. position for amount line (inch)" msgstr "" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_scan_line_vert -msgid "BVR vert. position for scan line (inch)" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_scan_line_vert +msgid "ISR vert. position for scan line (inch)" msgstr "ESR vert. Position der Scanzeile (Inch)" #. module: l10n_ch_payment_slip -#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.invoice_form_add_bvr_ref -msgid "BVR/ESR" +#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.invoice_form_add_isr_ref +msgid "ISR" msgstr "ESR" #. module: l10n_ch_payment_slip #: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_reference -msgid "BVR/ESR Ref." +msgid "ISR Ref." msgstr "ESR Ref." #. module: l10n_ch_payment_slip #: sql_constraint:l10n_ch.payment_slip:0 -msgid "BVR/ESR reference must be unique" +msgid "ISR reference must be unique" msgstr "ESR Referenz muss eindeutig sein" #. module: l10n_ch_payment_slip @@ -133,17 +133,17 @@ msgid "Display Name" msgstr "Anzeigename" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_bvr_add_horz +#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_add_horz msgid "Horiz. position in inch for address" msgstr "Horiz. Adressposition (inch)" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_bvr_amount_line_horz +#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_amount_line_horz msgid "Horiz. position in inch for amount line" msgstr "" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_bvr_scan_line_horz +#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_scan_line_horz msgid "Horiz. position in inch for scan line" msgstr "Horiz. Position der Scanzeile (inch)" @@ -165,12 +165,12 @@ msgid "Import v11" msgstr "Import v11" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_background -msgid "Insert BVR background ?" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_background +msgid "Insert ISR background ?" msgstr "ESR Hintergrund einfügen?" #. module: l10n_ch_payment_slip -#: code:addons/l10n_ch_payment_slip/wizard/bvr_import.py:196 +#: code:addons/l10n_ch_payment_slip/wizard/isr_import.py:196 #, python-format msgid "Inv. no %s" msgstr "Rg Nr. %s" @@ -225,13 +225,13 @@ msgid "No invoice related to move line %s" msgstr "Keine Rechnung bezieht sich auf Buchungszeile %s " #. module: l10n_ch_payment_slip -#: code:addons/l10n_ch_payment_slip/wizard/bvr_import.py:147 +#: code:addons/l10n_ch_payment_slip/wizard/isr_import.py:147 #, python-format msgid "Number of records differ from the computed one" msgstr "Zahl der Datensätze unterscheidet sich von der errechneten Anzahl" #. module: l10n_ch_payment_slip -#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.invoice_form_add_bvr_ref +#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.invoice_form_add_isr_ref msgid "Open Payment Slips" msgstr "Offene Einzahlungsscheine" @@ -266,34 +266,34 @@ msgid "Please enter a correct postal number like: 01-23456-1" msgstr "Bitte fügen Sie eine korrekte Postkontonummer ein: zB 01-23456-1" #. module: l10n_ch_payment_slip -#: code:addons/l10n_ch_payment_slip/wizard/bvr_import.py:212 +#: code:addons/l10n_ch_payment_slip/wizard/isr_import.py:212 #, python-format msgid "Please select a file first!" msgstr "Bitte zuerst eine Datei auswählen!" #. module: l10n_ch_payment_slip #: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_partner_bank_print_account -msgid "Print Account Number on BVR" +msgid "Print Account Number on ISR" msgstr "Kontonummer auf ESR drucken" #. module: l10n_ch_payment_slip #: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_partner_bank_print_bank -msgid "Print Bank on BVR" +msgid "Print Bank on ISR" msgstr "Bank auf ESR drucken" #. module: l10n_ch_payment_slip #: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_partner_bank_print_partner -msgid "Print Partner Address on BVR" +msgid "Print Partner Address on ISR" msgstr "Partner-Adresse auf ESR drucken" #. module: l10n_ch_payment_slip -#: code:addons/l10n_ch_payment_slip/wizard/bvr_import.py:143 +#: code:addons/l10n_ch_payment_slip/wizard/isr_import.py:143 #, python-format msgid "Record found after total record" msgstr "Weiteren Datensatz nach der Totalzeile gefunden " #. module: l10n_ch_payment_slip -#: code:addons/l10n_ch_payment_slip/wizard/bvr_import.py:112 +#: code:addons/l10n_ch_payment_slip/wizard/isr_import.py:112 #, python-format msgid "Recursive mod10 is invalid for reference: %s" msgstr "Rekursiver mod10 ist ungültig für Referenz: %s " @@ -336,7 +336,7 @@ msgstr "Einzahlungsschein Bild" #. module: l10n_ch_payment_slip #: code:addons/l10n_ch_payment_slip/models/invoice.py:152 #, python-format -msgid "The bank account {} used in invoice has no BVR/ESR adherent number." +msgid "The bank account {} used in invoice has no ISR adherent number." msgstr "" "Das in der Rechnung verwendete Bankkonto {} hat keine ESR-konforme Nummer." @@ -363,26 +363,26 @@ msgid "The invoice needs a partner bank account." msgstr "Die Rechnung muss ein Partner-Bankkonto definiert haben." #. module: l10n_ch_payment_slip -#: code:addons/l10n_ch_payment_slip/wizard/bvr_import.py:190 +#: code:addons/l10n_ch_payment_slip/wizard/isr_import.py:190 #, python-format msgid "Too many receivable/payable lines for reference %s" msgstr "Zu viele Debitoren-/Kreditoren-Zeilen für Referenz %s" #. module: l10n_ch_payment_slip -#: code:addons/l10n_ch_payment_slip/wizard/bvr_import.py:138 +#: code:addons/l10n_ch_payment_slip/wizard/isr_import.py:138 #, python-format msgid "Too many total record found!" msgstr "Zuviele Total-Sätze gefunden!" #. module: l10n_ch_payment_slip -#: code:addons/l10n_ch_payment_slip/wizard/bvr_import.py:53 +#: code:addons/l10n_ch_payment_slip/wizard/isr_import.py:53 #, python-format msgid "Total amount differ from the computed amount" msgstr "Gesamtbetrag unterscheidet sich vom errechneten Betrag" #. module: l10n_ch_payment_slip #: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_amount_total -msgid "Total amount of BVR/ESR" +msgid "Total amount of ISR" msgstr "Gesamtbetrag des ESR" #. module: l10n_ch_payment_slip @@ -391,7 +391,7 @@ msgid "Total amount of V11" msgstr "Gesamtbetrag von V11" #. module: l10n_ch_payment_slip -#: code:addons/l10n_ch_payment_slip/wizard/bvr_import.py:85 +#: code:addons/l10n_ch_payment_slip/wizard/isr_import.py:85 #, python-format msgid "Total cost differ from the computed amount" msgstr "Totalkosten unterscheiden sich vom errechneten Betrag" @@ -403,12 +403,12 @@ msgstr "Totalkosten von V11" #. module: l10n_ch_payment_slip #: model:ir.actions.act_window,name:l10n_ch_payment_slip.wizard_v11_import -msgid "V11 (BVR/ESR) Import" +msgid "V11 (ISR) Import" msgstr "V11 (ESR) Import" #. module: l10n_ch_payment_slip #: model:ir.ui.view,arch_db:l10n_ch_payment_slip.v11_import_view -msgid "V11 BVR/ESR Import" +msgid "V11 ISR Import" msgstr "V11 ESR-Import" #. module: l10n_ch_payment_slip @@ -417,24 +417,24 @@ msgid "V11 File" msgstr "V11 File" #. module: l10n_ch_payment_slip -#: code:addons/l10n_ch_payment_slip/wizard/bvr_import.py:221 +#: code:addons/l10n_ch_payment_slip/wizard/isr_import.py:221 #, python-format msgid "V11 file can not be decoded, it contains invalid caracter %s" msgstr "" "V11-Datei kann nicht decodiert werden, sie enthält ungültige Zeichen %s" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_bvr_add_vert +#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_add_vert msgid "Vert. position in inch for address" msgstr "Vert. Position in Inch für Adresse" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_bvr_amount_line_vert +#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_amount_line_vert msgid "Vert. position in inch for amount line" msgstr "" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_bvr_scan_line_vert +#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_scan_line_vert msgid "Vert. position in inch for scan line" msgstr "Vert. Position in Inch für Scan-Zeile" @@ -442,14 +442,14 @@ msgstr "Vert. Position in Inch für Scan-Zeile" #: code:addons/l10n_ch_payment_slip/models/payment_slip.py:348 #, python-format msgid "" -"Your bank BVR number should be of the form 0X-XXX-X! Please check your company information for the invoice:\n" +"Your bank ISR number should be of the form 0X-XXX-X! Please check your company information for the invoice:\n" "%s" msgstr "%s" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_bvr_delta_horz +#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_delta_horz msgid "" -"horiz. delta in inch 1.2 will print the bvr 1.2 inch lefter, negative value " +"horiz. delta in inch 1.2 will print the ISR 1.2 inch on the left, negative value " "is possible" msgstr "" "Horiz. Differenz z.B. 1.2 inch, druckt den ESR 1.2 Inch weiter links, ein " @@ -481,9 +481,9 @@ msgid "v11.import.wizard" msgstr "v11.import.wizard" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_bvr_delta_vert +#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_delta_vert msgid "" -"vert. delta in inch 1.2 will print the bvr 1.2 inch lower, negative value is" +"vert. delta in inch 1.2 will print the ISR 1.2 inch lower, negative value is" " possible" msgstr "" "Vertikale Differenz z.B. 1.2 Inch, druckt den ESR 1.2 Inch weiter unten, ein" diff --git a/l10n_ch_payment_slip/i18n/fr.po b/l10n_ch_payment_slip/i18n/fr.po index 76a8a6f40..a2df7842a 100644 --- a/l10n_ch_payment_slip/i18n/fr.po +++ b/l10n_ch_payment_slip/i18n/fr.po @@ -20,82 +20,82 @@ msgstr "" #. module: l10n_ch_payment_slip #: model:ir.ui.view,arch_db:l10n_ch_payment_slip.company_form_view -msgid "BVR Data" +msgid "ISR Data" msgstr "Données BVR" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_delta_horz -msgid "BVR Horz. Delta (inch)" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_delta_horz +msgid "ISR Horz. Delta (inch)" msgstr "Décalage horizontal global en pouces" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_delta_vert -msgid "BVR Vert. Delta (inch)" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_delta_vert +msgid "ISR Vert. Delta (inch)" msgstr "Décalage vertical global en pouces" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_add_horz -msgid "BVR horiz. position address (inch)" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_add_horz +msgid "ISR horiz. position address (inch)" msgstr "Décalage horizontal de l'adresse en pouces" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_amount_line_horz -msgid "BVR horiz. position for amount line (inch)" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_amount_line_horz +msgid "ISR horiz. position for amount line (inch)" msgstr "" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_scan_line_horz -msgid "BVR horiz. position for scan line(inch)" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_scan_line_horz +msgid "ISR horiz. position for scan line(inch)" msgstr "Décalage horizontal de la scanline en pouces" #. module: l10n_ch_payment_slip #: model:ir.ui.view,arch_db:l10n_ch_payment_slip.l10n_ch_view_res_partner_bank_from_invoice_slip -msgid "BVR options" +msgid "ISR options" msgstr "Options BVR" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_account_invoice_bvr_reference -msgid "BVR ref" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_account_invoice_isr_reference +msgid "ISR ref" msgstr "Référence du BVR" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_scan_line_font_size -msgid "BVR scan line font size (pt)" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_scan_line_font_size +msgid "ISR scan line font size (pt)" msgstr "Taille de la police de la scanline en points" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_scan_line_letter_spacing -msgid "BVR scan line letter spacing" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_scan_line_letter_spacing +msgid "ISR scan line letter spacing" msgstr "Espace entre les caractères de la scanline" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_add_vert -msgid "BVR vert. position for address (inch)" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_add_vert +msgid "ISR vert. position for address (inch)" msgstr "Décalage vertical de l'adresse en pouces" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_amount_line_vert -msgid "BVR vert. position for amount line (inch)" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_amount_line_vert +msgid "ISR vert. position for amount line (inch)" msgstr "" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_scan_line_vert -msgid "BVR vert. position for scan line (inch)" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_scan_line_vert +msgid "ISR vert. position for scan line (inch)" msgstr "Décalage vertical de la scanline en pouces" #. module: l10n_ch_payment_slip -#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.invoice_form_add_bvr_ref -msgid "BVR/ESR" +#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.invoice_form_add_isr_ref +msgid "ISR" msgstr "" #. module: l10n_ch_payment_slip #: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_reference -msgid "BVR/ESR Ref." +msgid "ISR Ref." msgstr "Réf. BVR" #. module: l10n_ch_payment_slip #: sql_constraint:l10n_ch.payment_slip:0 -msgid "BVR/ESR reference must be unique" +msgid "ISR reference must be unique" msgstr "La référence BVR doit être unique" #. module: l10n_ch_payment_slip @@ -133,17 +133,17 @@ msgid "Display Name" msgstr "Nom affiché" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_bvr_add_horz +#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_add_horz msgid "Horiz. position in inch for address" msgstr "Décalage horizontal de l'addresse en pouces" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_bvr_amount_line_horz +#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_amount_line_horz msgid "Horiz. position in inch for amount line" msgstr "" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_bvr_scan_line_horz +#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_scan_line_horz msgid "Horiz. position in inch for scan line" msgstr "Décalage horizontal de la scanline en pouces" @@ -165,12 +165,12 @@ msgid "Import v11" msgstr "Importer le fichier V11" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_background -msgid "Insert BVR background ?" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_background +msgid "Insert ISR background ?" msgstr "Insérer l'arrière-plan dans le BVR" #. module: l10n_ch_payment_slip -#: code:addons/l10n_ch_payment_slip/wizard/bvr_import.py:196 +#: code:addons/l10n_ch_payment_slip/wizard/isr_import.py:196 #, python-format msgid "Inv. no %s" msgstr "Facture no. %s" @@ -223,13 +223,13 @@ msgid "No invoice related to move line %s" msgstr "Aucune facture liée à la ligne %s" #. module: l10n_ch_payment_slip -#: code:addons/l10n_ch_payment_slip/wizard/bvr_import.py:147 +#: code:addons/l10n_ch_payment_slip/wizard/isr_import.py:147 #, python-format msgid "Number of records differ from the computed one" msgstr "Le nombre d'entrée diffère du nombre calculé" #. module: l10n_ch_payment_slip -#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.invoice_form_add_bvr_ref +#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.invoice_form_add_isr_ref msgid "Open Payment Slips" msgstr "BVR ouverts" @@ -264,34 +264,34 @@ msgid "Please enter a correct postal number like: 01-23456-1" msgstr "Veuillez saisir un CCP valide exemple: 01-23456-1" #. module: l10n_ch_payment_slip -#: code:addons/l10n_ch_payment_slip/wizard/bvr_import.py:212 +#: code:addons/l10n_ch_payment_slip/wizard/isr_import.py:212 #, python-format msgid "Please select a file first!" msgstr "Veuillez choisir un fichier" #. module: l10n_ch_payment_slip #: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_partner_bank_print_account -msgid "Print Account Number on BVR" +msgid "Print Account Number on ISR" msgstr "Imprimer le CCP sur le BVR" #. module: l10n_ch_payment_slip #: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_partner_bank_print_bank -msgid "Print Bank on BVR" +msgid "Print Bank on ISR" msgstr "Imprimer la banque sur le BVR" #. module: l10n_ch_payment_slip #: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_partner_bank_print_partner -msgid "Print Partner Address on BVR" +msgid "Print Partner Address on ISR" msgstr "Imprimer l'adresse sur le BVR" #. module: l10n_ch_payment_slip -#: code:addons/l10n_ch_payment_slip/wizard/bvr_import.py:143 +#: code:addons/l10n_ch_payment_slip/wizard/isr_import.py:143 #, python-format msgid "Record found after total record" msgstr "Enregistrement trouvé après la validation du total" #. module: l10n_ch_payment_slip -#: code:addons/l10n_ch_payment_slip/wizard/bvr_import.py:112 +#: code:addons/l10n_ch_payment_slip/wizard/isr_import.py:112 #, python-format msgid "Recursive mod10 is invalid for reference: %s" msgstr "La référence %s est invalide" @@ -334,7 +334,7 @@ msgstr "" #. module: l10n_ch_payment_slip #: code:addons/l10n_ch_payment_slip/models/invoice.py:152 #, python-format -msgid "The bank account {} used in invoice has no BVR/ESR adherent number." +msgid "The bank account {} used in invoice has no ISR adherent number." msgstr "" #. module: l10n_ch_payment_slip @@ -358,19 +358,19 @@ msgid "The invoice needs a partner bank account." msgstr "" #. module: l10n_ch_payment_slip -#: code:addons/l10n_ch_payment_slip/wizard/bvr_import.py:190 +#: code:addons/l10n_ch_payment_slip/wizard/isr_import.py:190 #, python-format msgid "Too many receivable/payable lines for reference %s" msgstr "Trop de lignes débiteurs & créditeurs pour la référence %s" #. module: l10n_ch_payment_slip -#: code:addons/l10n_ch_payment_slip/wizard/bvr_import.py:138 +#: code:addons/l10n_ch_payment_slip/wizard/isr_import.py:138 #, python-format msgid "Too many total record found!" msgstr "Trop d'enregistrements trouvés" #. module: l10n_ch_payment_slip -#: code:addons/l10n_ch_payment_slip/wizard/bvr_import.py:53 +#: code:addons/l10n_ch_payment_slip/wizard/isr_import.py:53 #, python-format msgid "Total amount differ from the computed amount" msgstr "Le montant total est différent du montant calculé" @@ -386,7 +386,7 @@ msgid "Total amount of V11" msgstr "Montant total du fichier v11" #. module: l10n_ch_payment_slip -#: code:addons/l10n_ch_payment_slip/wizard/bvr_import.py:85 +#: code:addons/l10n_ch_payment_slip/wizard/isr_import.py:85 #, python-format msgid "Total cost differ from the computed amount" msgstr "Le coût total diffère du total calculé" @@ -398,12 +398,12 @@ msgstr "Coût total du fichier v11" #. module: l10n_ch_payment_slip #: model:ir.actions.act_window,name:l10n_ch_payment_slip.wizard_v11_import -msgid "V11 (BVR/ESR) Import" +msgid "V11 (ISR) Import" msgstr "Importer le fichier BVR (V11)" #. module: l10n_ch_payment_slip #: model:ir.ui.view,arch_db:l10n_ch_payment_slip.v11_import_view -msgid "V11 BVR/ESR Import" +msgid "V11 ISR Import" msgstr "Import du fichier BVR V11" #. module: l10n_ch_payment_slip @@ -412,7 +412,7 @@ msgid "V11 File" msgstr "Fichier V11" #. module: l10n_ch_payment_slip -#: code:addons/l10n_ch_payment_slip/wizard/bvr_import.py:221 +#: code:addons/l10n_ch_payment_slip/wizard/isr_import.py:221 #, python-format msgid "V11 file can not be decoded, it contains invalid caracter %s" msgstr "" @@ -420,17 +420,17 @@ msgstr "" "%s." #. module: l10n_ch_payment_slip -#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_bvr_add_vert +#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_add_vert msgid "Vert. position in inch for address" msgstr "Décalage vertical de l'adresse en pouces" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_bvr_amount_line_vert +#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_amount_line_vert msgid "Vert. position in inch for amount line" msgstr "" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_bvr_scan_line_vert +#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_scan_line_vert msgid "Vert. position in inch for scan line" msgstr "Décalage vertical de la scanline en pouces" @@ -438,16 +438,16 @@ msgstr "Décalage vertical de la scanline en pouces" #: code:addons/l10n_ch_payment_slip/models/payment_slip.py:348 #, python-format msgid "" -"Your bank BVR number should be of the form 0X-XXX-X! Please check your company information for the invoice:\n" +"Your bank ISR number should be of the form 0X-XXX-X! Please check your company information for the invoice:\n" "%s" msgstr "" "Le CCP doit respecter le format suivant 0X-XXX-X pour la facture\n" "%s" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_bvr_delta_horz +#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_delta_horz msgid "" -"horiz. delta in inch 1.2 will print the bvr 1.2 inch lefter, negative value " +"horiz. delta in inch 1.2 will print the ISR 1.2 inch on the left, negative value " "is possible" msgstr "Décalage global horizontal du BVR en pouces" @@ -477,8 +477,8 @@ msgid "v11.import.wizard" msgstr "" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_bvr_delta_vert +#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_delta_vert msgid "" -"vert. delta in inch 1.2 will print the bvr 1.2 inch lower, negative value is" +"vert. delta in inch 1.2 will print the ISR 1.2 inch lower, negative value is" " possible" msgstr "Décalage global vertical du BVR en pouces" diff --git a/l10n_ch_payment_slip/i18n/it.po b/l10n_ch_payment_slip/i18n/it.po index 19a91ec70..b8febb35a 100644 --- a/l10n_ch_payment_slip/i18n/it.po +++ b/l10n_ch_payment_slip/i18n/it.po @@ -20,82 +20,82 @@ msgstr "" #. module: l10n_ch_payment_slip #: model:ir.ui.view,arch_db:l10n_ch_payment_slip.company_form_view -msgid "BVR Data" +msgid "ISR Data" msgstr "" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_delta_horz -msgid "BVR Horz. Delta (inch)" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_delta_horz +msgid "ISR Horz. Delta (inch)" msgstr "" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_delta_vert -msgid "BVR Vert. Delta (inch)" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_delta_vert +msgid "ISR Vert. Delta (inch)" msgstr "" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_add_horz -msgid "BVR horiz. position address (inch)" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_add_horz +msgid "ISR horiz. position address (inch)" msgstr "" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_amount_line_horz -msgid "BVR horiz. position for amount line (inch)" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_amount_line_horz +msgid "ISR horiz. position for amount line (inch)" msgstr "" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_scan_line_horz -msgid "BVR horiz. position for scan line(inch)" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_scan_line_horz +msgid "ISR horiz. position for scan line(inch)" msgstr "" #. module: l10n_ch_payment_slip #: model:ir.ui.view,arch_db:l10n_ch_payment_slip.l10n_ch_view_res_partner_bank_from_invoice_slip -msgid "BVR options" +msgid "ISR options" msgstr "" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_account_invoice_bvr_reference -msgid "BVR ref" -msgstr "BVR ref" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_account_invoice_isr_reference +msgid "ISR ref" +msgstr "PVR ref" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_scan_line_font_size -msgid "BVR scan line font size (pt)" -msgstr "BVR scan line dimensione carattere (pt)" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_scan_line_font_size +msgid "ISR scan line font size (pt)" +msgstr "" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_scan_line_letter_spacing -msgid "BVR scan line letter spacing" -msgstr "BVR scan line distanza lettere" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_scan_line_letter_spacing +msgid "ISR scan line letter spacing" +msgstr "PVR scan line distanza lettere" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_add_vert -msgid "BVR vert. position for address (inch)" -msgstr "BVR posizione verticale indirizzo (inch)" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_add_vert +msgid "ISR vert. position for address (inch)" +msgstr "PVR posizione verticale indirizzo (inch)" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_amount_line_vert -msgid "BVR vert. position for amount line (inch)" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_amount_line_vert +msgid "ISR vert. position for amount line (inch)" msgstr "" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_scan_line_vert -msgid "BVR vert. position for scan line (inch)" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_scan_line_vert +msgid "ISR vert. position for scan line (inch)" msgstr "" #. module: l10n_ch_payment_slip -#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.invoice_form_add_bvr_ref -msgid "BVR/ESR" +#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.invoice_form_add_isr_ref +msgid "ISR" msgstr "" #. module: l10n_ch_payment_slip #: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_reference -msgid "BVR/ESR Ref." +msgid "ISR Ref." msgstr "" #. module: l10n_ch_payment_slip #: sql_constraint:l10n_ch.payment_slip:0 -msgid "BVR/ESR reference must be unique" +msgid "ISR reference must be unique" msgstr "" #. module: l10n_ch_payment_slip @@ -133,17 +133,17 @@ msgid "Display Name" msgstr "Nome da visualizzare" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_bvr_add_horz +#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_add_horz msgid "Horiz. position in inch for address" msgstr "" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_bvr_amount_line_horz +#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_amount_line_horz msgid "Horiz. position in inch for amount line" msgstr "" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_bvr_scan_line_horz +#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_scan_line_horz msgid "Horiz. position in inch for scan line" msgstr "" @@ -165,12 +165,12 @@ msgid "Import v11" msgstr "" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_bvr_background -msgid "Insert BVR background ?" +#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_background +msgid "Insert ISR background ?" msgstr "" #. module: l10n_ch_payment_slip -#: code:addons/l10n_ch_payment_slip/wizard/bvr_import.py:196 +#: code:addons/l10n_ch_payment_slip/wizard/isr_import.py:196 #, python-format msgid "Inv. no %s" msgstr "Fatt. n. %s" @@ -221,13 +221,13 @@ msgid "No invoice related to move line %s" msgstr "" #. module: l10n_ch_payment_slip -#: code:addons/l10n_ch_payment_slip/wizard/bvr_import.py:147 +#: code:addons/l10n_ch_payment_slip/wizard/isr_import.py:147 #, python-format msgid "Number of records differ from the computed one" msgstr "Numero di record diverso da quello calcolato" #. module: l10n_ch_payment_slip -#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.invoice_form_add_bvr_ref +#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.invoice_form_add_isr_ref msgid "Open Payment Slips" msgstr "" @@ -262,34 +262,34 @@ msgid "Please enter a correct postal number like: 01-23456-1" msgstr "Inserire un codice di conto postale corretto es. 01-23456-1" #. module: l10n_ch_payment_slip -#: code:addons/l10n_ch_payment_slip/wizard/bvr_import.py:212 +#: code:addons/l10n_ch_payment_slip/wizard/isr_import.py:212 #, python-format msgid "Please select a file first!" msgstr "Bisogna prima selezionare un file" #. module: l10n_ch_payment_slip #: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_partner_bank_print_account -msgid "Print Account Number on BVR" +msgid "Print Account Number on ISR" msgstr "" #. module: l10n_ch_payment_slip #: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_partner_bank_print_bank -msgid "Print Bank on BVR" +msgid "Print Bank on ISR" msgstr "" #. module: l10n_ch_payment_slip #: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_partner_bank_print_partner -msgid "Print Partner Address on BVR" +msgid "Print Partner Address on ISR" msgstr "" #. module: l10n_ch_payment_slip -#: code:addons/l10n_ch_payment_slip/wizard/bvr_import.py:143 +#: code:addons/l10n_ch_payment_slip/wizard/isr_import.py:143 #, python-format msgid "Record found after total record" msgstr "" #. module: l10n_ch_payment_slip -#: code:addons/l10n_ch_payment_slip/wizard/bvr_import.py:112 +#: code:addons/l10n_ch_payment_slip/wizard/isr_import.py:112 #, python-format msgid "Recursive mod10 is invalid for reference: %s" msgstr "" @@ -332,7 +332,7 @@ msgstr "" #. module: l10n_ch_payment_slip #: code:addons/l10n_ch_payment_slip/models/invoice.py:152 #, python-format -msgid "The bank account {} used in invoice has no BVR/ESR adherent number." +msgid "The bank account {} used in invoice has no ISR adherent number." msgstr "" #. module: l10n_ch_payment_slip @@ -356,26 +356,26 @@ msgid "The invoice needs a partner bank account." msgstr "" #. module: l10n_ch_payment_slip -#: code:addons/l10n_ch_payment_slip/wizard/bvr_import.py:190 +#: code:addons/l10n_ch_payment_slip/wizard/isr_import.py:190 #, python-format msgid "Too many receivable/payable lines for reference %s" msgstr "Troppi incassi / pagamenti riferiti a %s" #. module: l10n_ch_payment_slip -#: code:addons/l10n_ch_payment_slip/wizard/bvr_import.py:138 +#: code:addons/l10n_ch_payment_slip/wizard/isr_import.py:138 #, python-format msgid "Too many total record found!" msgstr "Trovati troppi record." #. module: l10n_ch_payment_slip -#: code:addons/l10n_ch_payment_slip/wizard/bvr_import.py:53 +#: code:addons/l10n_ch_payment_slip/wizard/isr_import.py:53 #, python-format msgid "Total amount differ from the computed amount" msgstr "L'importo totale differisce da quello calcolato." #. module: l10n_ch_payment_slip #: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_amount_total -msgid "Total amount of BVR/ESR" +msgid "Total amount of ISR" msgstr "" #. module: l10n_ch_payment_slip @@ -384,7 +384,7 @@ msgid "Total amount of V11" msgstr "Importo totale del V11" #. module: l10n_ch_payment_slip -#: code:addons/l10n_ch_payment_slip/wizard/bvr_import.py:85 +#: code:addons/l10n_ch_payment_slip/wizard/isr_import.py:85 #, python-format msgid "Total cost differ from the computed amount" msgstr "Il totale differisce da quello calcolato" @@ -396,13 +396,13 @@ msgstr "Importo totale del V11" #. module: l10n_ch_payment_slip #: model:ir.actions.act_window,name:l10n_ch_payment_slip.wizard_v11_import -msgid "V11 (BVR/ESR) Import" -msgstr "V11 (BVR/ESR) Import" +msgid "V11 (ISR) Import" +msgstr "V11 (PVR) Import" #. module: l10n_ch_payment_slip #: model:ir.ui.view,arch_db:l10n_ch_payment_slip.v11_import_view -msgid "V11 BVR/ESR Import" -msgstr "V11 BVR/ ESR import" +msgid "V11 ISR Import" +msgstr "V11 PVR import" #. module: l10n_ch_payment_slip #: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_v11_import_wizard_v11file @@ -410,24 +410,24 @@ msgid "V11 File" msgstr "V11 File" #. module: l10n_ch_payment_slip -#: code:addons/l10n_ch_payment_slip/wizard/bvr_import.py:221 +#: code:addons/l10n_ch_payment_slip/wizard/isr_import.py:221 #, python-format msgid "V11 file can not be decoded, it contains invalid caracter %s" msgstr "" "Il file V11 non può essere decodificato, contiene il carattere non valido %s" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_bvr_add_vert +#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_add_vert msgid "Vert. position in inch for address" msgstr "" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_bvr_amount_line_vert +#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_amount_line_vert msgid "Vert. position in inch for amount line" msgstr "" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_bvr_scan_line_vert +#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_scan_line_vert msgid "Vert. position in inch for scan line" msgstr "" @@ -435,16 +435,16 @@ msgstr "" #: code:addons/l10n_ch_payment_slip/models/payment_slip.py:348 #, python-format msgid "" -"Your bank BVR number should be of the form 0X-XXX-X! Please check your company information for the invoice:\n" +"Your bank ISR number should be of the form 0X-XXX-X! Please check your company information for the invoice:\n" "%s" msgstr "" -"Il numero BVR della vostra banca deve essere nel formato 0X-XXX-X! Per favore controllate i vostri dati di fatturazione.\n" +"Il numero PVR della vostra banca deve essere nel formato 0X-XXX-X! Per favore controllate i vostri dati di fatturazione.\n" "%s" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_bvr_delta_horz +#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_delta_horz msgid "" -"horiz. delta in inch 1.2 will print the bvr 1.2 inch lefter, negative value " +"horiz. delta in inch 1.2 will print the ISR 1.2 inch on the left, negative value " "is possible" msgstr "" @@ -474,8 +474,8 @@ msgid "v11.import.wizard" msgstr "" #. module: l10n_ch_payment_slip -#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_bvr_delta_vert +#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_delta_vert msgid "" -"vert. delta in inch 1.2 will print the bvr 1.2 inch lower, negative value is" +"vert. delta in inch 1.2 will print the ISR 1.2 inch lower, negative value is" " possible" msgstr "" diff --git a/l10n_ch_payment_slip/models/__init__.py b/l10n_ch_payment_slip/models/__init__.py index cf416a2d4..f566b0fdc 100644 --- a/l10n_ch_payment_slip/models/__init__.py +++ b/l10n_ch_payment_slip/models/__init__.py @@ -2,3 +2,4 @@ from . import payment_slip from . import invoice from . import bank +from . import res_config_settings diff --git a/l10n_ch_payment_slip/models/bank.py b/l10n_ch_payment_slip/models/bank.py index 16874e560..4b59b7735 100644 --- a/l10n_ch_payment_slip/models/bank.py +++ b/l10n_ch_payment_slip/models/bank.py @@ -1,5 +1,4 @@ -# -*- coding: utf-8 -*- -# © 2012-2016 Camptocamp SA +# Copyright 2012-2016 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import models, fields @@ -8,12 +7,12 @@ class ResPartnerBank(models.Model): """ Inherit res.partner.bank class in order to add swiss specific fields such as: - - BVR data - - BVR print options for company accounts + - ISR data + - ISR print options for company accounts We leave it here in order """ _inherit = "res.partner.bank" - print_bank = fields.Boolean('Print Bank on BVR') - print_account = fields.Boolean('Print Account Number on BVR') - print_partner = fields.Boolean('Print Partner Address on BVR') + print_bank = fields.Boolean('Print Bank on ISR') + print_account = fields.Boolean('Print Account Number on ISR') + print_partner = fields.Boolean('Print Partner Address on ISR') diff --git a/l10n_ch_payment_slip/models/company.py b/l10n_ch_payment_slip/models/company.py index 5b9aacca4..e8edf95bf 100644 --- a/l10n_ch_payment_slip/models/company.py +++ b/l10n_ch_payment_slip/models/company.py @@ -1,62 +1,70 @@ -# -*- coding: utf-8 -*- -# © 2012-2015 Camptocamp SA +# Copyright 2012-2015 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import models, fields class ResCompany(models.Model): - """override company in order to add bvr vertical and - Horizontal print delta""" + """Add ISR vertical/horizontal print delta and functionalities.""" _inherit = "res.company" - bvr_delta_horz = fields.Float( - 'BVR Horz. Delta (inch)', - help='horiz. delta in inch 1.2 will print the bvr 1.2 inch lefter, ' - 'negative value is possible' + isr_delta_horz = fields.Float( + 'ISR Horz. Delta (inch)', + oldname='bvr_delta_horz', + help='horiz. delta in inch 1.2 will print the ISR 1.2 inch on the ' + 'left, negative value is possible' ) - bvr_delta_vert = fields.Float( - 'BVR Vert. Delta (inch)', - help='vert. delta in inch 1.2 will print the bvr 1.2 inch lower, ' - 'negative value is possible' + isr_delta_vert = fields.Float( + 'ISR Vert. Delta (inch)', + oldname='bvr_delta_vert', + help='vert. delta in inch 1.2 will print the ISR 1.2 inch lower,' + ' negative value is possible' ) - bvr_scan_line_vert = fields.Float( - 'BVR vert. position for scan line (inch)', + isr_scan_line_vert = fields.Float( + 'ISR vert. position for scan line (inch)', + oldname='bvr_scan_line_vert', help='Vert. position in inch for scan line' ) - bvr_scan_line_horz = fields.Float( - 'BVR horiz. position for scan line(inch)', + isr_scan_line_horz = fields.Float( + 'ISR horiz. position for scan line(inch)', + oldname='bvr_scan_line_horz', help='Horiz. position in inch for scan line' ) - bvr_add_vert = fields.Float( - 'BVR vert. position for address (inch)', + isr_add_vert = fields.Float( + 'ISR vert. position for address (inch)', + oldname='bvr_add_vert', help='Vert. position in inch for address' ) - bvr_add_horz = fields.Float( - 'BVR horiz. position address (inch)', + isr_add_horz = fields.Float( + 'ISR horiz. position address (inch)', + oldname='bvr_add_horz', help='Horiz. position in inch for address' ) - bvr_scan_line_font_size = fields.Integer( - 'BVR scan line font size (pt)' + isr_scan_line_font_size = fields.Integer( + 'ISR scan line font size (pt)', + oldname='bvr_scan_line_font_size', ) - bvr_scan_line_letter_spacing = fields.Float( - 'BVR scan line letter spacing' + isr_scan_line_letter_spacing = fields.Float( + 'ISR scan line letter spacing', + oldname='bvr_scan_line_letter_spacing', ) - bvr_amount_line_horz = fields.Float( - 'BVR horiz. position for amount line (inch)', + isr_amount_line_horz = fields.Float( + 'ISR horiz. position for amount line (inch)', + oldname='bvr_amount_line_horz', help='Horiz. position in inch for amount line', default=0.00 ) - bvr_amount_line_vert = fields.Float( - 'BVR vert. position for amount line (inch)', + isr_amount_line_vert = fields.Float( + 'ISR vert. position for amount line (inch)', + oldname='bvr_amount_line_vert', help='Vert. position in inch for amount line', default=0.00, ) @@ -68,10 +76,14 @@ class ResCompany(models.Model): required=True, default="in_memory" ) - bvr_background = fields.Boolean('Insert BVR background ?') + isr_background = fields.Boolean( + 'Insert ISR background ?', + oldname='bvr_background', + ) - bvr_header_partner_address = fields.Boolean( + isr_header_partner_address = fields.Boolean( 'Header partner address', + oldname='bvr_header_partner_address', default=False, help='Enabling this will print partner address top-right on the ' 'page header', diff --git a/l10n_ch_payment_slip/models/invoice.py b/l10n_ch_payment_slip/models/invoice.py index 644d99524..e8dba21cc 100644 --- a/l10n_ch_payment_slip/models/invoice.py +++ b/l10n_ch_payment_slip/models/invoice.py @@ -1,5 +1,4 @@ -# -*- coding: utf-8 -*- -# © 2012-2016 Camptocamp SA +# Copyright 2012-2017 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import _, api, exceptions, fields, models @@ -24,8 +23,7 @@ class AccountMoveLine(models.Model): class AccountInvoice(models.Model): - """Inherit account.invoice in order to add bvr - printing functionnalites. BVR is a Swiss payment vector""" + """Add ISR (Swiss payment vector).""" _inherit = "account.invoice" @@ -38,9 +36,10 @@ class AccountInvoice(models.Model): 'Keep empty to use the default' ) - bvr_reference = fields.Text( - string='BVR ref', - compute='_compute_full_bvr_name', + isr_reference = fields.Text( + string='ISR ref', + compute='_compute_full_isr_name', + oldname='bvr_reference', store=True, ) @@ -51,7 +50,7 @@ class AccountInvoice(models.Model): ) @api.depends('slip_ids', 'state') - def _compute_full_bvr_name(self): + def _compute_full_isr_name(self): """Concatenate related slip references :return: reference comma separated @@ -61,7 +60,7 @@ def _compute_full_bvr_name(self): if (rec.state not in ('open', 'paid') or not rec.slip_ids): continue - rec.bvr_reference = ', '.join(x.reference + rec.isr_reference = ', '.join(x.reference for x in rec.slip_ids if x.reference) @@ -91,7 +90,7 @@ def _update_ref_on_account_analytic_line(self, ref, move_id): return True @api.model - def _action_bvr_number_move_line(self, move_line, ref): + def _action_isr_number_move_line(self, move_line, ref): """Propagate reference on move lines and analytic lines""" if not ref: return @@ -99,48 +98,51 @@ def _action_bvr_number_move_line(self, move_line, ref): self.env.cr.execute('UPDATE account_move_line SET transaction_ref=%s' ' WHERE id=%s', (ref, move_line.id)) self._update_ref_on_account_analytic_line(ref, move_line.move_id.id) - self.env.invalidate_all() + self.env.cache.invalidate() @api.multi def invoice_validate(self): - """ Copy the BVR/ESR reference in the transaction_ref of move lines. + """ Copy the ISR reference in the transaction_ref of move lines. - For customers invoices: the BVR reference is computed using - ``get_bvr_ref()`` on the invoice or move lines. + For customers invoices: the ISR reference is computed using + ``get_isr_ref()`` on the invoice or move lines. - For suppliers invoices: the BVR reference is stored in the reference + For suppliers invoices: the ISR reference is stored in the reference field of the invoice. """ pay_slip = self.env['l10n_ch.payment_slip'] for inv in self: if inv.type in ('in_invoice', 'in_refund'): - if inv.reference_type == 'bvr' and inv._check_bvr(): + if inv.reference_type == 'isr' and inv._check_isr(): ref = inv.reference else: ref = False move_lines = inv.get_payment_move_line() for move_line_id in move_lines: - self._action_bvr_number_move_line(move_line_id, + self._action_isr_number_move_line(move_line_id, ref) else: for pay_slip in pay_slip._compute_pay_slips_from_invoices(inv): ref = pay_slip.reference - self._action_bvr_number_move_line(pay_slip.move_line_id, + self._action_isr_number_move_line(pay_slip.move_line_id, ref) return super(AccountInvoice, self).invoice_validate() @api.multi - def print_bvr(self): - self._check_bvr_generatable() + def print_isr(self): + self._check_isr_generatable() self.write({ 'sent': True }) - return self.env['report'].get_action( - self, 'l10n_ch_payment_slip.one_slip_per_page_from_invoice') + report_name = 'l10n_ch_payment_slip.one_slip_per_page_from_invoice' + docids = self + act_report = self.env['ir.actions.report'].search( + [('report_name', '=', report_name)], limit=1) + return act_report.report_action(docids) @api.multi - def _check_bvr_generatable(self): + def _check_isr_generatable(self): errors = [] for inv in self: msg = [] @@ -150,10 +152,10 @@ def _check_bvr_generatable(self): if not bank_acc: msg.append(_('- The invoice needs a partner bank account.')) else: - if not bank_acc.bvr_adherent_num: + if not bank_acc.isr_adherent_num: msg.append( - _('- The bank account {} used in invoice has no ' - 'BVR/ESR adherent number.' + _('- The bank account {} used in invoice has no' + ' ISR adherent number.' ).format(bank_acc.acc_number)) if not (bank_acc.acc_type == 'postal' or bank_acc.ccp): msg.append( @@ -169,3 +171,24 @@ def _check_bvr_generatable(self): errors.append(invoice + '\n'.join(msg)) if errors: raise exceptions.UserError('\n'.join(errors)) + + @api.multi + def action_invoice_draft(self): + res = super().action_invoice_draft() + # Delete former printed payment slip + ActionReport = self.env['ir.actions.report'] + try: + report_payment_slip = ActionReport._get_report_from_name( + 'l10n_ch_payment_slip.one_slip_per_page_from_invoice') + except IndexError: + report_payment_slip = False + if report_payment_slip and report_payment_slip.attachment: + for invoice in self: + with invoice.env.do_in_draft(): + invoice.number, invoice.state = invoice.move_name, 'open' + attachment = self.env.ref( + 'l10n_ch_payment_slip.one_slip_per_page_from_invoice' + ).retrieve_attachment(invoice) + if attachment: + attachment.unlink() + return res diff --git a/l10n_ch_payment_slip/models/payment_slip.py b/l10n_ch_payment_slip/models/payment_slip.py index f2f7329b8..d85b1933b 100644 --- a/l10n_ch_payment_slip/models/payment_slip.py +++ b/l10n_ch_payment_slip/models/payment_slip.py @@ -1,9 +1,8 @@ -# -*- coding: utf-8 -*- -# © 2014-2016 Camptocamp SA +# Copyright 2014-2017 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from __future__ import division + import base64 -import StringIO +import io import contextlib import re import textwrap @@ -13,9 +12,8 @@ from reportlab.pdfbase.ttfonts import TTFont from reportlab.lib.units import inch from odoo import models, fields, api, _, exceptions -from odoo.report import report_sxw from odoo.modules import get_module_resource -from odoo.tools.misc import mod10r +from odoo.tools.misc import mod10r, format_date FontMeta = namedtuple('FontMeta', ('name', 'size')) @@ -27,7 +25,7 @@ class PaymentSlipSettings(object): """Slip report setting container""" def __init__(self, report_name, **kwargs): - for param, value in kwargs.iteritems(): + for param, value in list(kwargs.items()): setattr(self, param, value) self.report_name = report_name self.validate() @@ -53,12 +51,12 @@ class PaymentSlip(models.Model): _default_scan_font_size = 11 _default_amount_font_size = 16 _compile_get_ref = re.compile(r'[^0-9]') - _compile_check_bvr = re.compile(r'[0-9][0-9]-[0-9]{3,6}-[0-9]') + _compile_check_isr = re.compile(r'[0-9][0-9]-[0-9]{3,6}-[0-9]') _name = 'l10n_ch.payment_slip' _rec_name = 'reference' - reference = fields.Char('BVR/ESR Ref.', + reference = fields.Char('ISR Ref.', compute='_compute_ref', index=True, store=True) @@ -68,7 +66,7 @@ class PaymentSlip(models.Model): readonly=True, ondelete='cascade') - amount_total = fields.Float('Total amount of BVR/ESR', + amount_total = fields.Float('Total amount of ISR', compute='_compute_amount') scan_line = fields.Char('Scan Line', @@ -91,7 +89,7 @@ class PaymentSlip(models.Model): _sql_constraints = [('unique reference', 'UNIQUE (reference)', - 'BVR/ESR reference must be unique')] + 'ISR reference must be unique')] @api.model def _can_generate(self, move_line): @@ -107,7 +105,7 @@ def _can_generate(self, move_line): if not invoice: return False return (invoice.partner_bank_id and - invoice.partner_bank_id.bvr_adherent_num and + invoice.partner_bank_id.isr_adherent_num and ( invoice.partner_bank_id.acc_type == 'postal' or invoice.partner_bank_id.ccp @@ -122,8 +120,8 @@ def _get_adherent_number(self): self.ensure_one() move_line = self.move_line_id ad_number = '' - if move_line.invoice_id.partner_bank_id.bvr_adherent_num: - ad_number = move_line.invoice_id.partner_bank_id.bvr_adherent_num + if move_line.invoice_id.partner_bank_id.isr_adherent_num: + ad_number = move_line.invoice_id.partner_bank_id.isr_adherent_num return ad_number def _compute_amount_hook(self): @@ -154,9 +152,9 @@ def _compute_amount(self): @api.depends('move_line_id', 'move_line_id.invoice_id.number') def _compute_ref(self): - """Retrieve ESR/BVR reference from move line in order to print it + """Retrieve ISR reference from move line in order to print it - Returns False when no BVR reference should be generated. No + Returns False when no ISR reference should be generated. No reference is generated when a transaction reference already exists for the line (likely been generated by a payment service). """ @@ -342,10 +340,10 @@ def _validate(self): _('No invoice related to move line %s' ) % rec.move_line_id.ref ) - if not rec._compile_check_bvr.match( + if not rec._compile_check_isr.match( invoice.partner_bank_id.get_account_number() or ''): raise exceptions.ValidationError( - _('Your bank BVR number should be of the form 0X-XXX-X! ' + _('Your bank ISR number should be of the form 0X-XXX-X! ' 'Please check your company ' 'information for the invoice:\n%s') % (invoice.name) ) @@ -437,21 +435,21 @@ def _get_scan_line_text_font(self, print_settings): font_identifier = 'ocrb_font' # pdfmetrics.registerFont(TTFont(font_identifier, # self.font_absolute_path())) - size = (print_settings.bvr_scan_line_font_size or + size = (print_settings.isr_scan_line_font_size or self._default_scan_font_size) return FontMeta(name=font_identifier, size=size) @api.model def _get_address_lines(self, com_partner): - bvr_address_format = ( - self.env['ir.config_parameter'].get_param('bvr.address.format') or + isr_address_format = ( + self.env['ir.config_parameter'].get_param('isr.address.format') or ADDR_FORMAT) # use onchange to define our own temporary address format with self.env.do_in_onchange(): # assign a fake country in case partner has no country set com_partner.country_id = self.env['res.country'].new( - {'address_format': bvr_address_format} + {'address_format': isr_address_format} ) address_lines = com_partner._display_address( without_company=True).split("\n") @@ -492,7 +490,7 @@ def _draw_address(self, canvas, print_settings, initial_position, font, """Draw an address on canvas Address format can be changed by adding system parameter - `bvr.address.format`. + `isr.address.format`. :param canvas: payment slip reportlab component to be drawn :type canvas: :py:class:`reportlab.pdfgen.canvas.Canvas` @@ -516,8 +514,8 @@ def _draw_address(self, canvas, print_settings, initial_position, font, font.size, address_lines, com_partner) x, y = initial_position - x += print_settings.bvr_add_horz * inch - y += print_settings.bvr_add_vert * inch + x += print_settings.isr_add_horz * inch + y += print_settings.isr_add_vert * inch text = canvas.beginText() text.setTextOrigin(x, y) text.setFont(font.name, font_size) @@ -551,16 +549,12 @@ def _draw_description_line(self, canvas, print_settings, initial_position, """ x, y = initial_position # align with the address - x += print_settings.bvr_add_horz * inch + x += print_settings.isr_add_horz * inch invoice = self.move_line_id.invoice_id date_maturity = self.move_line_id.date_maturity message = _('Payment slip related to invoice %s ' 'due on the %s') - rml_parser = report_sxw.rml_parse(self.env.cr, - self.env.uid, - 'payment_slip', - context=self.env.context) - fmt_date = rml_parser.formatLang(date_maturity, date=True) + fmt_date = format_date(self.env, date_maturity) canvas.setFont(font.name, font.size) canvas.drawString(x, y, message % (invoice.number, fmt_date)) @@ -586,8 +580,8 @@ def _draw_bank(self, canvas, print_settings, initial_position, font, bank): """ x, y = initial_position - x += print_settings.bvr_delta_horz * inch - y += print_settings.bvr_delta_vert * inch + x += print_settings.isr_delta_horz * inch + y += print_settings.isr_delta_vert * inch text = canvas.beginText() text.setTextOrigin(x, y) text.setFont(font.name, font.size) @@ -629,8 +623,8 @@ def _draw_bank_account(self, canvas, print_settings, initial_position, """ x, y = initial_position - x += print_settings.bvr_delta_horz * inch - y += print_settings.bvr_delta_vert * inch + x += print_settings.isr_delta_horz * inch + y += print_settings.isr_delta_vert * inch canvas.setFont(font.name, font.size) canvas.drawString(x, y, acc) @@ -655,8 +649,8 @@ def _draw_ref(self, canvas, print_settings, initial_position, font, ref): """ x, y = initial_position - x += print_settings.bvr_delta_horz * inch - y += print_settings.bvr_delta_vert * inch + x += print_settings.isr_delta_horz * inch + y += print_settings.isr_delta_vert * inch canvas.setFont(font.name, font.size) canvas.drawString(x, y, ref) @@ -682,8 +676,8 @@ def _draw_recipe_ref(self, canvas, print_settings, initial_position, """ x, y = initial_position - x += print_settings.bvr_add_horz * inch - y += print_settings.bvr_add_vert * inch + x += print_settings.isr_add_horz * inch + y += print_settings.isr_add_vert * inch canvas.setFont(font.name, font.size) canvas.drawString(x, y, ref) @@ -709,10 +703,10 @@ def _draw_amount(self, canvas, print_settings, initial_position, """ x, y = initial_position - x += (print_settings.bvr_delta_horz * inch + - print_settings.bvr_amount_line_horz * inch) - y += (print_settings.bvr_delta_vert * inch + - print_settings.bvr_amount_line_vert * inch) + x += (print_settings.isr_delta_horz * inch + + print_settings.isr_amount_line_horz * inch) + y += (print_settings.isr_delta_vert * inch + + print_settings.isr_amount_line_vert * inch) indice = 0 canvas.setFont(font.name, font.size) for car in amount[::-1]: @@ -743,8 +737,8 @@ def _draw_scan_line(self, canvas, print_settings, initial_position, font): """ x, y = initial_position - x += print_settings.bvr_scan_line_horz * inch - y += print_settings.bvr_scan_line_vert * inch + x += print_settings.isr_scan_line_horz * inch + y += print_settings.isr_scan_line_vert * inch canvas.setFont(font.name, font.size) for car in self._compute_scan_line_list()[::-1]: canvas.drawString(x, y, car) @@ -762,8 +756,8 @@ def _draw_background(self, canvas, print_settings): :type print_settings: :py:class:`PaymentSlipSettings` or subclass """ - if print_settings.bvr_background: - canvas.drawImage(self.image_absolute_path('bvr.png'), + if print_settings.isr_background: + canvas.drawImage(self.image_absolute_path('isr.png'), 0, 0, 8.271 * inch, 4.174 * inch) @api.model @@ -776,7 +770,7 @@ def _get_settings(self, report_name): company = self.env.user.company_id company_settings = { col: getattr(company, col) for col in company._fields if - col.startswith('bvr_') + col.startswith('isr_') } return PaymentSlipSettings(report_name, **company_settings) @@ -818,7 +812,7 @@ def _draw_payment_slip(self, a4=False, out_format='PDF', scale=None, canvas_size = (595.27, 841.89) else: canvas_size = (595.27, 286.81) - with contextlib.closing(StringIO.StringIO()) as buff: + with contextlib.closing(io.BytesIO()) as buff: canvas = Canvas(buff, pagesize=canvas_size, pageCompression=None) @@ -832,14 +826,14 @@ def _draw_payment_slip(self, a4=False, out_format='PDF', scale=None, default_font) if invoice.partner_bank_id.print_partner: if (invoice.partner_bank_id.print_account or - invoice.partner_bank_id.bvr_adherent_num): + invoice.partner_bank_id.isr_adherent_num): initial_position = (0.05 * inch, 3.30 * inch) else: initial_position = (0.05 * inch, 3.75 * inch) self._draw_address(canvas, print_settings, initial_position, default_font, company.partner_id) if (invoice.partner_bank_id.print_account or - invoice.partner_bank_id.bvr_adherent_num): + invoice.partner_bank_id.isr_adherent_num): initial_position = (2.45 * inch, 3.30 * inch) else: initial_position = (2.45 * inch, 3.75 * inch) @@ -888,7 +882,7 @@ def _draw_payment_slip(self, a4=False, out_format='PDF', scale=None, default_font, bank_acc.get_account_number()) - if print_settings.bvr_header_partner_address: + if print_settings.isr_header_partner_address: self._draw_address(canvas, print_settings, (4.9 * inch, 9.0 * inch), default_font, com_partner) diff --git a/l10n_ch_payment_slip/models/res_config_settings.py b/l10n_ch_payment_slip/models/res_config_settings.py new file mode 100644 index 000000000..a210a1fa0 --- /dev/null +++ b/l10n_ch_payment_slip/models/res_config_settings.py @@ -0,0 +1,48 @@ +# Copyright 2018 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) + +from odoo import fields, models + + +class ResConfigSettings(models.TransientModel): + _inherit = 'res.config.settings' + + isr_delta_horz = fields.Float( + related='company_id.isr_delta_horz', + ) + isr_delta_vert = fields.Float( + related='company_id.isr_delta_vert', + ) + isr_scan_line_vert = fields.Float( + related='company_id.isr_scan_line_vert', + ) + isr_scan_line_horz = fields.Float( + related='company_id.isr_scan_line_horz', + ) + isr_add_vert = fields.Float( + related='company_id.isr_add_vert', + ) + isr_add_horz = fields.Float( + related='company_id.isr_add_horz', + ) + isr_scan_line_font_size = fields.Integer( + related='company_id.isr_scan_line_font_size', + ) + isr_scan_line_letter_spacing = fields.Float( + related='company_id.isr_scan_line_letter_spacing', + ) + isr_amount_line_horz = fields.Float( + related='company_id.isr_amount_line_horz', + ) + isr_amount_line_vert = fields.Float( + related='company_id.isr_amount_line_vert', + ) + merge_mode = fields.Selection( + related='company_id.merge_mode' + ) + isr_background = fields.Boolean( + related='company_id.isr_background', + ) + isr_header_partner_address = fields.Boolean( + related='company_id.isr_header_partner_address', + ) diff --git a/l10n_ch_payment_slip/report/ir_action.py b/l10n_ch_payment_slip/report/ir_action.py index 43b312b0e..013a9650f 100644 --- a/l10n_ch_payment_slip/report/ir_action.py +++ b/l10n_ch_payment_slip/report/ir_action.py @@ -1,46 +1,201 @@ -# -*- coding: utf-8 -*- -# © 2012-2016 Camptocamp SA +# Copyright 2012-2017 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +import os +import tempfile +import io +import logging +from contextlib import closing +import base64 + from odoo import models, fields, api +from odoo.exceptions import AccessError + + +_logger = logging.getLogger(__name__) + +try: + import PyPDF2 +except (ImportError, IOError) as err: + _logger.debug(err) -class IrActionsReportXMLReportlab(models.Model): - _inherit = 'ir.actions.report.xml' +class IrActionsReportReportlab(models.Model): - report_type = fields.Selection(selection_add=[('reportlab-pdf', + _inherit = 'ir.actions.report' + + report_type = fields.Selection(selection_add=[('reportlab_pdf', 'Report renderer')]) + @api.multi + def _generate_one_slip_per_page_from_invoice_pdf(self, report_name=None, + save_in_attachment=None): + """Generate payment slip PDF(s) from report model. + + If there are many pdf they are merged in memory or on + file system based on company settings + + :return: the generated PDF content + """ + if not save_in_attachment: + save_in_attachment = {} + user_model = self.env['res.users'] + slip_model = self.env['l10n_ch.payment_slip'] + invoice_model = self.env['account.invoice'] + company = user_model.browse(self.env.uid).company_id + invoices = invoice_model.browse(self.ids) + + docs = slip_model._compute_pay_slips_from_invoices(invoices) + + pdfdocuments = [] + temporary_files = [] + + for doc in docs: + pdfreport_fd, pdfreport_path = tempfile.mkstemp( + suffix='.pdf', prefix='report.tmp.') + temporary_files.append(pdfreport_path) + + # Directly load the document if we already have it + if ( + save_in_attachment and + save_in_attachment['loaded_documents'].get( + doc.invoice_id.id) + ): + with closing(os.fdopen(pdfreport_fd, 'w')) as pdfreport: + pdfreport.write(save_in_attachment['loaded_documents'] + [doc.invoice_id.id]) + pdfdocuments.append(pdfreport_path) + continue + + with closing(os.fdopen(pdfreport_fd, 'wb')) as pdfreport: + pdf = doc._draw_payment_slip(a4=True, b64=False, + out_format='PDF', + report_name=report_name) + pdfreport.write(pdf) + + # Save the pdf in attachment if marked + if save_in_attachment and save_in_attachment.get( + doc.invoice_id.id): + with open(pdfreport_path, 'rb') as pdfreport: + attachment = { + 'name': save_in_attachment.get(doc.invoice_id.id), + 'datas': base64.encodestring(pdfreport.read()), + 'datas_fname': save_in_attachment.get( + doc.invoice_id.id), + 'res_model': save_in_attachment.get('model'), + 'res_id': doc.invoice_id.id, + } + try: + self.env['ir.attachment'].create(attachment) + except AccessError: + _logger.info("Cannot save PDF report %r as attachment", + attachment['name']) + else: + _logger.info( + 'The PDF document %s is now saved in the database', + attachment['name']) + + pdfdocuments.append(pdfreport_path) + + # Return the entire document + if len(pdfdocuments) == 1: + entire_report_path = pdfdocuments[0] + else: + if company.merge_mode == 'in_memory': + content = self.merge_pdf_in_memory(pdfdocuments) + entire_report_path = False + else: + entire_report_path = self._merge_pdf(pdfdocuments) + + if entire_report_path: + with open(entire_report_path, 'rb') as pdfdocument: + content = pdfdocument.read() + if entire_report_path not in temporary_files: + temporary_files.append(entire_report_path) + + # Manual cleanup of the temporary files + for temporary_file in temporary_files: + try: + os.unlink(temporary_file) + except (OSError, IOError): + _logger.error( + 'Error when trying to remove file %s' % temporary_file) + + return content + @api.model - def _lookup_report(self, name): - self.env.cr.execute( - "SELECT * FROM ir_act_report_xml WHERE report_name=%s", (name,)) - report = self.env.cr.dictfetchone() - if report and report['report_type'] == 'reportlab-pdf': - return report['report_name'] + def _get_report_from_name(self, report_name): + """Return also report of report_type reportlab-pdf and not only qweb + """ + report = super()._get_report_from_name(report_name) + if not report: + report = report.search([ + ('report_type', '=', 'reportlab-pdf'), + ('report_name', '=', report_name)], + limit=1 + ) + return report + + @api.multi + def render_qweb_pdf(self, res_ids=None, data=None): + if (self.name == 'l10n_ch_payment_slip.' + 'one_slip_per_page_from_invoice'): + report = self._get_report_from_name(self.name) + save_in_attachment = self._check_attachment_use( + docids, report) + + reports = self.browse(docids) + return reports._generate_one_slip_per_page_from_invoice_pdf( + report_name=report_name, save_in_attachment=save_in_attachment + ) else: - return super(IrActionsReportXMLReportlab, self)._lookup_report( - name) + return super().render_qweb_pdf(res_ids, data=data) @api.multi - def render_report(self, res_ids, name, data): - """ - Override to work with real pdf in testing and not html - as we use reportlab as renderer - """ - context = self._context - if context is None: - context = {} - if context.get('force_pdf'): - new_report = self._lookup_report(name) - if isinstance(new_report, (str, unicode)): - return self.env['report'].get_pdf( - res_ids, - new_report, - data=data, - ), 'pdf' - return super(IrActionsReportXMLReportlab, self).render_report( - res_ids, - name, - data, + def render_reportlab_pdf(self, docids, data=None): + if (self.report_name == 'l10n_ch_payment_slip.' + 'one_slip_per_page_from_invoice'): + reports = self.browse(docids) + pdf_content = reports._generate_one_slip_per_page_from_invoice_pdf( + report_name=self.report_name, ) + return pdf_content, 'pdf' + + def merge_pdf_in_memory(self, docs): + writer = PyPDF2.PdfFileWriter() + for doc in docs: + pdfreport = os.fdopen(doc, 'rb') + reader = PyPDF2.PdfFileReader(pdfreport) + for page in range(reader.getNumPages()): + writer.addPage(reader.getPage(page)) + buff = io.BytesIO() + try: + # The writer close the reader file here + writer.write(buff) + return buff.getvalue() + except IOError: + raise + finally: + buff.close() + + def merge_pdf_on_disk(self, docs): + writer = PyPDF2.PdfFileWriter() + for doc in docs: + pdfreport = os.fdopen(doc, 'rb') + reader = PyPDF2.PdfFileReader(pdfreport) + for page in range(reader.getNumPages()): + writer.addPage(reader.getPage(page)) + buff = tempfile.mkstemp( + suffix='.pdf', + prefix='credit_control_slip_merged')[0] + try: + buff = os.fdopen(buff, 'w+b') + # The writer close the reader file here + buff.seek(0) + writer.write(buff) + buff.seek(0) + return buff.read() + except IOError: + raise + finally: + buff.close() diff --git a/l10n_ch_payment_slip/report/report.py b/l10n_ch_payment_slip/report/report.py index 326d1bb60..7c541ef76 100644 --- a/l10n_ch_payment_slip/report/report.py +++ b/l10n_ch_payment_slip/report/report.py @@ -1,112 +1,7 @@ -# -*- coding: utf-8 -*- -# © 2014-2016 Camptocamp SA +# Copyright 2014-2017 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from odoo import models, api -import os -import tempfile -import StringIO -import pyPdf +from odoo import models -class BVRFromInvoice(models.AbstractModel): +class ISRFromInvoice(models.AbstractModel): _name = 'report.one_slip_per_page_from_invoice' - - -class Report(models.Model): - - _inherit = 'report' - - @api.multi - def _generate_one_slip_per_page_from_invoice_pdf(self, report_name=None): - """Generate payment slip PDF(s) from report model. - If there is many pdf they are merged in memory or on - file system based on company settings - - :return: the generated PDF content - """ - user_model = self.env['res.users'] - slip_model = self.env['l10n_ch.payment_slip'] - invoice_model = self.env['account.invoice'] - company = user_model.browse(self.env.uid).company_id - invoices = invoice_model.browse(self.ids) - - docs = slip_model._compute_pay_slips_from_invoices(invoices) - if len(docs) == 1: - return docs[0]._draw_payment_slip(a4=True, - b64=False, - report_name=report_name, - out_format='PDF') - else: - pdfs = (x._draw_payment_slip(a4=True, b64=False, out_format='PDF', - report_name=report_name) - for x in docs) - if company.merge_mode == 'in_memory': - return self.merge_pdf_in_memory(pdfs) - return self.merge_pdf_on_disk(pdfs) - - @api.multi - def get_pdf(self, docids, report_name, html=None, data=None): - if (report_name == 'l10n_ch_payment_slip.' - 'one_slip_per_page_from_invoice'): - reports = self.browse(docids) - return reports._generate_one_slip_per_page_from_invoice_pdf( - report_name=report_name, - ) - else: - return super(Report, self).get_pdf(docids, report_name, html=html, - data=data) - - def merge_pdf_in_memory(self, docs): - streams = [] - writer = pyPdf.PdfFileWriter() - for doc in docs: - current_buff = StringIO.StringIO() - streams.append(current_buff) - current_buff.write(doc) - current_buff.seek(0) - reader = pyPdf.PdfFileReader(current_buff) - for page in xrange(reader.getNumPages()): - writer.addPage(reader.getPage(page)) - buff = StringIO.StringIO() - try: - # The writer close the reader file here - writer.write(buff) - return buff.getvalue() - except IOError: - raise - finally: - buff.close() - for stream in streams: - stream.close() - - def merge_pdf_on_disk(self, docs): - streams = [] - writer = pyPdf.PdfFileWriter() - for doc in docs: - current_buff = tempfile.mkstemp( - suffix='.pdf', - prefix='credit_control_slip')[0] - current_buff = os.fdopen(current_buff, 'w+b') - current_buff.seek(0) - streams.append(current_buff) - current_buff.write(doc) - current_buff.seek(0) - reader = pyPdf.PdfFileReader(current_buff) - for page in xrange(reader.getNumPages()): - writer.addPage(reader.getPage(page)) - buff = tempfile.mkstemp( - suffix='.pdf', - prefix='credit_control_slip_merged')[0] - try: - buff = os.fdopen(buff, 'w+b') - # The writer close the reader file here - buff.seek(0) - writer.write(buff) - buff.seek(0) - return buff.read() - except IOError: - raise - finally: - buff.close() - for stream in streams: - stream.close() diff --git a/l10n_ch_payment_slip/report/report_declaration.xml b/l10n_ch_payment_slip/report/report_declaration.xml index ac6fce2ab..1daf776db 100644 --- a/l10n_ch_payment_slip/report/report_declaration.xml +++ b/l10n_ch_payment_slip/report/report_declaration.xml @@ -20,13 +20,13 @@ id="one_slip_per_page_from_invoice" model="account.invoice" string="Payment Slip" - report_type="reportlab-pdf" + report_type="reportlab_pdf" name="l10n_ch_payment_slip.one_slip_per_page_from_invoice" file="l10n_ch_payment_slip.one_slip_per_page" menu="False" /> - + diff --git a/l10n_ch_payment_slip/sample/sample.v11 b/l10n_ch_payment_slip/sample/sample.v11 deleted file mode 100644 index 75293fd41..000000000 --- a/l10n_ch_payment_slip/sample/sample.v11 +++ /dev/null @@ -1,2 +0,0 @@ -00201012162700509500000000000000000001300005415000001 000106101722101706101700000000010000000000000 -999010121627999999999999999999999999999000000054150000000000001061018000000000000000000 diff --git a/l10n_ch_payment_slip/static/src/js/qwebactionmanager.js b/l10n_ch_payment_slip/static/src/js/qwebactionmanager.js new file mode 100644 index 000000000..57e9ab84f --- /dev/null +++ b/l10n_ch_payment_slip/static/src/js/qwebactionmanager.js @@ -0,0 +1,37 @@ +odoo.define('l10n_ch_payment_slip.report', function(require){ +'use strict'; + +var ActionManager= require('web.ActionManager'); +var crash_manager = require('web.crash_manager'); +var framework = require('web.framework'); + + +ActionManager.include({ + ir_actions_report: function (action, options){ + var report_url = ''; + + if (action.report_type !== 'reportlab_pdf') { + return this._super(action, options); + } + framework.blockUI(); + report_url = '/report/reportlab_pdf/'.concat( + action.report_name,'/', + action.context.active_ids.join(',') + ); + this.getSession().get_file({ + url: report_url, + data: {data: JSON.stringify([report_url, + action.report_type, + ])}, + error: crash_manager.rpc_error.bind(crash_manager), + success: function() { + if(action && options && !action.dialog){ + options.on_close(); + } + }, + }); + framework.unblockUI(); + return; + } +}); +}); diff --git a/l10n_ch_payment_slip/tests/__init__.py b/l10n_ch_payment_slip/tests/__init__.py index 1a38513ff..ee6a4f4d2 100644 --- a/l10n_ch_payment_slip/tests/__init__.py +++ b/l10n_ch_payment_slip/tests/__init__.py @@ -1,2 +1 @@ from . import test_payment_slip -from . import test_v11_import diff --git a/l10n_ch_payment_slip/tests/test_payment_slip.py b/l10n_ch_payment_slip/tests/test_payment_slip.py index b8052ee7d..f1679177e 100644 --- a/l10n_ch_payment_slip/tests/test_payment_slip.py +++ b/l10n_ch_payment_slip/tests/test_payment_slip.py @@ -1,15 +1,19 @@ -# -*- coding: utf-8 -*- -# © 2014-2016 Camptocamp SA +# Copyright 2014-2017 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). import time import re import odoo.tests.common as test_common -from odoo.report import render_report class TestPaymentSlip(test_common.TransactionCase): _compile_get_ref = re.compile(r'[^0-9]') + def setUp(self): + super(TestPaymentSlip, self).setUp() + self.report1slip_from_inv = self.env.ref( + 'l10n_ch_payment_slip.one_slip_per_page_from_invoice', + ) + def make_bank(self): company = self.env.ref('base.main_company') self.assertTrue(company) @@ -29,7 +33,7 @@ def make_bank(self): 'bank_id': bank.id, 'bank_bic': bank.bic, 'acc_number': '01-1234-1', - 'bvr_adherent_num': '1234567', + 'isr_adherent_num': '1234567', 'print_bank': True, 'print_account': True, 'print_partner': True, @@ -131,14 +135,7 @@ def test_slip_validity(self): def test_print_report(self): invoice = self.make_invoice() - data, format = render_report( - self.env.cr, - self.env.uid, - [invoice.id], - 'l10n_ch_payment_slip.one_slip_per_page_from_invoice', - {}, - context={'force_pdf': True}, - ) + data, format = self.report1slip_from_inv.render(invoice.id) self.assertTrue(data) self.assertEqual(format, 'pdf') @@ -147,14 +144,8 @@ def test_print_multi_report_merge_in_memory(self): self.assertEqual(self.env.user.company_id.merge_mode, 'in_memory') invoice1 = self.make_invoice() invoice2 = self.make_invoice() - data, format = render_report( - self.env.cr, - self.env.uid, - [invoice1.id, invoice2.id], - 'l10n_ch_payment_slip.one_slip_per_page_from_invoice', - {}, - context={'force_pdf': True}, - ) + data, format = self.report1slip_from_inv.render( + [invoice1.id, invoice2.id]) self.assertTrue(data) self.assertEqual(format, 'pdf') @@ -162,14 +153,8 @@ def test_print_multi_report_merge_on_disk(self): self.env.user.company_id.merge_mode = 'on_disk' invoice1 = self.make_invoice() invoice2 = self.make_invoice() - data, format = render_report( - self.env.cr, - self.env.uid, - [invoice1.id, invoice2.id], - 'l10n_ch_payment_slip.one_slip_per_page_from_invoice', - {}, - context={'force_pdf': True}, - ) + data, format = self.report1slip_from_inv.render( + [invoice1.id, invoice2.id]) self.assertTrue(data) self.assertEqual(format, 'pdf') @@ -182,6 +167,21 @@ def test_address_format(self): ) com_partner = slip.get_comm_partner() address_lines = slip._get_address_lines(com_partner) + self.assertEqual( + address_lines, + ['93, Press Avenue', '', '73377 Le Bourget du Lac'] + ) + + def test_address_format_user_demo(self): + invoice = self.make_invoice() + self.assertTrue(invoice.move_id) + line = invoice.move_id.line_ids[0] + slip = self.env['l10n_ch.payment_slip'].search( + [('move_line_id', '=', line.id)] + ) + com_partner = slip.get_comm_partner() + demo_user = self.env.ref('base.user_demo') + address_lines = slip.sudo(demo_user)._get_address_lines(com_partner) self.assertEqual( address_lines, [u'93, Press Avenue', u'', u'73377 Le Bourget du Lac'] @@ -199,7 +199,7 @@ def test_address_format_no_country(self): address_lines = slip._get_address_lines(com_partner) self.assertEqual( address_lines, - [u'93, Press Avenue', u'', u'73377 Le Bourget du Lac'] + ['93, Press Avenue', '', '73377 Le Bourget du Lac'] ) def test_address_format_special_format(self): @@ -207,7 +207,7 @@ def test_address_format_special_format(self): ICP = self.env['ir.config_parameter'] ICP.set_param( - 'bvr.address.format', + 'isr.address.format', "%(street)s\n%(zip)s %(city)s" ) invoice = self.make_invoice() @@ -221,7 +221,7 @@ def test_address_format_special_format(self): address_lines = slip._get_address_lines(com_partner) self.assertEqual( address_lines, - [u'93, Press Avenue', u'73377 Le Bourget du Lac'] + ['93, Press Avenue', '73377 Le Bourget du Lac'] ) def test_address_length(self): @@ -252,10 +252,60 @@ def test_address_length(self): self.assertEqual(res, result, "Wrong result for len %s" % text_len) - def test_print_bvr(self): + def test_print_isr(self): invoice = self.make_invoice() - bvr = invoice.print_bvr() - self.assertEqual(bvr['report_name'], + isr = invoice.print_isr() + self.assertEqual(isr['report_name'], 'l10n_ch_payment_slip.one_slip_per_page_from_invoice') - self.assertEqual(bvr['report_file'], + self.assertEqual(isr['report_file'], 'l10n_ch_payment_slip.one_slip_per_page') + + def test_reload_from_attachment(self): + + def _find_invoice_attachment(self, invoice): + return self.env['ir.attachment'].search([ + ('res_model', '=', invoice._name), + ('res_id', '=', invoice.id) + ]) + + invoice = self.make_invoice() + report_name = 'l10n_ch_payment_slip.one_slip_per_page_from_invoice' + report_payment_slip = self.env[ + 'ir.actions.report']._get_report_from_name(report_name) + bvr_action = invoice.print_isr() + # Print the report a first time + pdf = self.env['ir.actions.report'].with_context(bvr_action['context']).get_pdf( + invoice.ids, report_name) + # Ensure no attachment was stored + attachment = _find_invoice_attachment(self, invoice) + self.assertEqual(len(attachment), 0) + # Set the report to store and reload from attachment + report_payment_slip.write({ + 'attachment_use': True, + 'attachment': + "('ESR'+(object.number or '').replace('/','')+'.pdf')" + }) + # Print the report again + pdf1 = self.env['ir.actions.report'].with_context( + bvr_action['context']).get_pdf(invoice.ids, report_name) + # Ensure pdf is the same + self.assertEqual(pdf, pdf1) + # Ensure attachment was stored + attachment1 = _find_invoice_attachment(self, invoice) + self.assertEqual(len(attachment1), 1) + # Print the report another time + pdf2 = self.env['ir.actions.report'].with_context( + bvr_action['context']).get_pdf(invoice.ids, report_name) + # Ensure pdf and attachment are the same as before + attachment2 = _find_invoice_attachment(self, invoice) + self.assertEqual(len(attachment2), 1) + self.assertEqual(pdf1, pdf2) + self.assertEqual(attachment1, attachment2) + # Allow cancelling entries on the journal + invoice.journal_id.update_posted = True + # Cancel the invoice and set back to draft + invoice.action_invoice_cancel() + invoice.action_invoice_draft() + # Ensure attachment was unlinked + attachment = _find_invoice_attachment(self, invoice) + self.assertEqual(len(attachment), 0) diff --git a/l10n_ch_payment_slip/tests/test_v11_files/test1.v11 b/l10n_ch_payment_slip/tests/test_v11_files/test1.v11 deleted file mode 100644 index 75293fd41..000000000 --- a/l10n_ch_payment_slip/tests/test_v11_files/test1.v11 +++ /dev/null @@ -1,2 +0,0 @@ -00201012162700509500000000000000000001300005415000001 000106101722101706101700000000010000000000000 -999010121627999999999999999999999999999000000054150000000000001061018000000000000000000 diff --git a/l10n_ch_payment_slip/tests/test_v11_import.py b/l10n_ch_payment_slip/tests/test_v11_import.py deleted file mode 100644 index 89c7737cf..000000000 --- a/l10n_ch_payment_slip/tests/test_v11_import.py +++ /dev/null @@ -1,62 +0,0 @@ -# -*- coding: utf-8 -*- -# © 2014-2016 Camptocamp SA -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -import base64 -from odoo.modules import get_module_resource -import openerp.tests.common as test_common - - -class TestV11import(test_common.TransactionCase): - - def test_file_parsing(self): - v11_path = get_module_resource('l10n_ch_payment_slip', - 'tests', - 'test_v11_files', - 'test1.v11') - with open(v11_path) as v11_file: - importer = self.env['v11.import.wizard'].create( - {'v11file': base64.encodestring(v11_file.read())} - ) - v11_file.seek(0) - lines = v11_file.readlines() - records = importer._parse_lines(lines) - self.assertTrue(len(records), 1) - record = records[0] - self.assertEqual( - record, - {'date': '2022-10-17', - 'amount': 5415.0, - 'cost': 0.0, - 'reference': '005095000000000000000000013'} - ) - - def test_statement_import(self): - journal_usd = self.env['account.journal'].create({ - 'name': 'USD Bank Journal - (test)', - 'code': 'TUBK', - 'type': 'bank', - 'currency_id': self.env.ref('base.USD').id, - }) - statement = self.env['account.bank.statement'].create( - { - 'journal_id': journal_usd.id, - } - ) - importer_model = self.env['v11.import.wizard'].with_context( - active_id=statement.id - ) - v11_path = get_module_resource('l10n_ch_payment_slip', - 'tests', - 'test_v11_files', - 'test1.v11') - with open(v11_path) as v11_file: - importer = importer_model.create( - {'v11file': base64.encodestring(v11_file.read())} - ) - importer.import_v11() - statement.refresh() - self.assertTrue(len(statement.line_ids), 1) - line = statement.line_ids[0] - self.assertEqual(line.name, '005095000000000000000000013') - self.assertEqual(line.ref, '/') - self.assertEqual(line.amount, 5415.0) diff --git a/l10n_ch_payment_slip/views/account_invoice.xml b/l10n_ch_payment_slip/views/account_invoice.xml index 5c3ea1a44..2d482a38f 100644 --- a/l10n_ch_payment_slip/views/account_invoice.xml +++ b/l10n_ch_payment_slip/views/account_invoice.xml @@ -8,33 +8,33 @@ [('invoice_id', '=', active_id)] - - account.invoice.form.bvr.ref + + account.invoice.form.isr.ref account.invoice form - + + attrs="{'invisible': ['|', ('type', '!=', 'out_invoice'), ('isr_reference', '=', False)]}"/> diff --git a/l10n_ch_payment_slip/views/bank.xml b/l10n_ch_payment_slip/views/bank.xml index 31508f08e..03cf1a9a4 100644 --- a/l10n_ch_payment_slip/views/bank.xml +++ b/l10n_ch_payment_slip/views/bank.xml @@ -7,8 +7,8 @@ - - + + diff --git a/l10n_ch_payment_slip/views/company.xml b/l10n_ch_payment_slip/views/company.xml deleted file mode 100644 index 3536a0abc..000000000 --- a/l10n_ch_payment_slip/views/company.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - res.company.form.inherit.bvr - res.company - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/l10n_ch_payment_slip/views/report_xml_templates.xml b/l10n_ch_payment_slip/views/report_xml_templates.xml new file mode 100644 index 000000000..ae7e4e588 --- /dev/null +++ b/l10n_ch_payment_slip/views/report_xml_templates.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/l10n_ch_payment_slip/views/res_config_settings_views.xml b/l10n_ch_payment_slip/views/res_config_settings_views.xml new file mode 100644 index 000000000..260a80ba3 --- /dev/null +++ b/l10n_ch_payment_slip/views/res_config_settings_views.xml @@ -0,0 +1,79 @@ + + + + + res.config.settings.view.form.inherit.payment_slip + res.config.settings + + + + ISR + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/l10n_ch_payment_slip/wizard/__init__.py b/l10n_ch_payment_slip/wizard/__init__.py index 785d28ed2..23a227dd8 100644 --- a/l10n_ch_payment_slip/wizard/__init__.py +++ b/l10n_ch_payment_slip/wizard/__init__.py @@ -1,2 +1 @@ -from . import bvr_import -from . import bvr_batch_print +from . import isr_batch_print diff --git a/l10n_ch_payment_slip/wizard/bvr_import.py b/l10n_ch_payment_slip/wizard/bvr_import.py deleted file mode 100644 index facc2e898..000000000 --- a/l10n_ch_payment_slip/wizard/bvr_import.py +++ /dev/null @@ -1,255 +0,0 @@ -# -*- coding: utf-8 -*- -# © 2014-2016 Camptocamp SA -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -import base64 -import time -import re - -from odoo.tools.translate import _ -from odoo import models, fields, exceptions, api -from odoo.tools.misc import mod10r - -REF = re.compile(r'[^0-9]') - - -class BvrImporterWizard(models.TransientModel): - - _name = 'v11.import.wizard' - _total_line_codes = ('999', '995') - - v11file = fields.Binary('V11 File') - total_cost = fields.Float('Total cost of V11') - total_amount = fields.Float('Total amount of V11') - - @api.model - def _get_line_amount(self, line, sum_amount=True): - """Returns the V11 line amount value - :param line: raw v11 line - :type line: str - - :param sum_amount: if True total_amount will be sum with current amount - :type sum_amount: bool - - :return: current line amount - :rtype: float - """ - if line[0:3] in self._total_line_codes: - amount = float(line[39:51]) / 100.0 - else: - amount = float(line[39:49]) / 100.0 - if line[2] == '5': - amount *= -1 - if sum_amount: - self.total_amount += amount - return amount - - def _validate_total_amount(self, amount): - """Ensure total amount match given amount - :param: amount to validate - :type amount: float - """ - if round(amount - self.total_amount, 2) >= 0.01: - raise exceptions.UserError( - _('Total amount differ from the computed amount') - ) - - @api.model - def _get_line_cost(self, line, sum_cost=True): - """Returns the V11 line cost value - :param line: raw v11 line - :type line: str - - :param sum_cost: if True cost_amount will be sum with current amount - :type sum_cost: bool - - :return: current line cost - :rtype: float - """ - if line[0:3] in self._total_line_codes: - cost = float(line[69:78]) / 100.0 - else: - cost = float(line[96:100]) / 100.0 - if line[2] == '5': - cost *= -1 - if sum_cost: - self.total_cost += cost - return cost - - def _validate_total_cost(self, cost): - """Ensure total cost match given cost - :param: cost to validate - :type cost: float - """ - if round(cost - self.total_cost, 2) >= 0.01: - raise exceptions.UserError( - _('Total cost differ from the computed amount') - ) - - @api.model - def _create_record(self, line): - """Create a v11 record dict - :param line: raw v11 line - :type line: str - - :return: current line dict representation - :rtype: dict - - """ - amount = self._get_line_amount(line) - cost = self._get_line_cost(line) - record = { - 'reference': line[12:39], - 'amount': amount, - 'date': time.strftime( - '%Y-%m-%d', - time.strptime(line[65:71], '%y%m%d') - ), - 'cost': cost, - } - - if record['reference'] != mod10r(record['reference'][:-1]): - raise exceptions.UserError( - _('Recursive mod10 is invalid for reference: %s') % - record['reference'] - ) - return record - - @api.model - def _parse_lines(self, inlines): - """Parses raw v11 line and populate records list with dict - - :param inlines: string buffer of the V11 file - :type inlines: str - - :return: list of dict representing a v11 entry - :rtype: list of dict - """ - records = [] - find_total = False - for lines in inlines: - if not lines: # manage new line at end of file - continue - (line, lines) = (lines[:128], lines[128:]) - record = {} - # If line is a validation line - if line[0:3] in self._total_line_codes: - if find_total: - raise exceptions.UserError( - _('Too many total record found!') - ) - find_total = True - if lines: - raise exceptions.UserError( - _('Record found after total record') - ) - if int(line[51:63]) != len(records): - raise exceptions.UserError( - _('Number of records differ from the computed one') - ) - # Validaton of amount and costs - amount = self._get_line_amount(line, sum_amount=False) - cost = self._get_line_cost(line, sum_cost=False) - self._validate_total_amount(amount) - self._validate_total_cost(cost) - else: - record = self._create_record(line) - records.append(record) - return records - - @api.model - def _prepare_line_vals(self, statement, record): - """Compute bank statement values to be used by `models.Model.create' - :param statement: current statement record - :type statement: :py:class:`openerp.models.Models` record - - :param record: dict reprenting parsed V11 line - :type record: dict - - :returns: values - :rtype: dict - """ - # Remove the 11 first char because it can be adherent number - # TODO check if 11 is the right number - move_line_obj = self.env['account.move.line'] - reference = record['reference'] - values = {'name': reference or '/', - 'date': record['date'], - 'amount': record['amount'], - 'ref': '/', - 'statement_id': statement.id, - } - line = move_line_obj.search( - [('transaction_ref', '=', reference), - ('reconciled', '=', False), - ('account_id.user_type_id.type', 'in', ['receivable', 'payable']), - ('journal_id.type', '=', 'sale')], - order='date desc', - ) - if len(line) > 1: - raise exceptions.UserError( - _("Too many receivable/payable lines for reference %s") - % reference) - if line: - # transaction_ref is propagated on all lines - partner_id = line.partner_id.id - num = line.invoice_id.number if line.invoice_id else False - values['ref'] = _('Inv. no %s') % num if num else values['name'] - values['partner_id'] = partner_id - return values - - def _import_v11(self): - """Import v11 file and transfor it into statement lines - - :returns: action dict - :rtype: dict - """ - statement_line_obj = self.env['account.bank.statement.line'] - attachment_obj = self.env['ir.attachment'] - statement_obj = self.env['account.bank.statement'] - v11file = self.v11file - if not v11file: - raise exceptions.UserError( - _('Please select a file first!') - ) - statement_id = self.env.context.get('active_id') - if not statement_id: - raise ValueError('The id of current satement is not in statement') - try: - lines = base64.decodestring(v11file).split("\r\n") - except ValueError as decode_err: - raise exceptions.UserError( - _('V11 file can not be decoded, ' - 'it contains invalid caracter %s'), - repr(decode_err) - ) - records = self._parse_lines(lines) - - statement = statement_obj.browse(statement_id) - for record in records: - values = self._prepare_line_vals(statement, - record) - statement_line_obj.create(values) - attachment_obj.create( - { - 'name': 'V11 %s' % time.strftime( - "%Y-%m-%d_%H:%M:%S", time.gmtime() - ), - 'datas': self.v11file, - 'datas_fname': 'BVR %s.txt' % time.strftime( - "%Y-%m-%d_%H:%M:%S", time.gmtime() - ), - 'res_model': 'account.bank.statement', - 'res_id': statement.id, - }, - ) - - return {} - - @api.multi - def import_v11(self): - """Import v11 file and transfor it into statement lines - - :returns: action dict - :rtype: dict - """ - return self._import_v11() diff --git a/l10n_ch_payment_slip/wizard/bvr_import_view.xml b/l10n_ch_payment_slip/wizard/bvr_import_view.xml deleted file mode 100644 index 52f1d5b06..000000000 --- a/l10n_ch_payment_slip/wizard/bvr_import_view.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - V11 (BVR/ESR) Import Wizard - v11.import.wizard - form - - - - - - - - - - - - - V11 (BVR/ESR) Import - ir.actions.act_window - v11.import.wizard - form - form - - new - - - - account.bank.statement.form.inherit - account.bank.statement - form - - - - - - - - - diff --git a/l10n_ch_payment_slip/wizard/bvr_batch_print.py b/l10n_ch_payment_slip/wizard/isr_batch_print.py similarity index 76% rename from l10n_ch_payment_slip/wizard/bvr_batch_print.py rename to l10n_ch_payment_slip/wizard/isr_batch_print.py index 012caf1f4..e9ec1dc2c 100644 --- a/l10n_ch_payment_slip/wizard/bvr_batch_print.py +++ b/l10n_ch_payment_slip/wizard/isr_batch_print.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2017 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). @@ -6,9 +5,9 @@ from odoo.exceptions import UserError -class BvrBatchPrintWizard(models.TransientModel): +class ISRBatchPrintWizard(models.TransientModel): - _name = 'bvr.batch.print.wizard' + _name = 'isr.batch.print.wizard' invoice_ids = fields.Many2many(comodel_name='account.invoice', string='Invoices') @@ -16,7 +15,7 @@ class BvrBatchPrintWizard(models.TransientModel): @api.model def default_get(self, fields): - res = super(BvrBatchPrintWizard, self).default_get(fields) + res = super(ISRBatchPrintWizard, self).default_get(fields) active_ids = self.env.context.get('active_ids') if active_ids: invoices = self.env['account.invoice'].browse(active_ids) @@ -29,13 +28,13 @@ def default_get(self, fields): @api.model def check_generatable(self, invoices): try: - invoices._check_bvr_generatable() - except UserError, e: + invoices._check_isr_generatable() + except UserError as e: return e.name @api.multi def print_payment_slips(self): if self.invoice_ids: - return self.invoice_ids.print_bvr() + return self.invoice_ids.print_isr() else: return {'type': 'ir.actions.act_window_close'} diff --git a/l10n_ch_payment_slip/wizard/bvr_batch_print.xml b/l10n_ch_payment_slip/wizard/isr_batch_print.xml similarity index 78% rename from l10n_ch_payment_slip/wizard/bvr_batch_print.xml rename to l10n_ch_payment_slip/wizard/isr_batch_print.xml index ee708a00e..d91358402 100644 --- a/l10n_ch_payment_slip/wizard/bvr_batch_print.xml +++ b/l10n_ch_payment_slip/wizard/isr_batch_print.xml @@ -1,11 +1,11 @@ - - BVR Batch Print Wizard - bvr.batch.print.wizard + + ISR Batch Print Wizard + isr.batch.print.wizard form - + These invoices were successfully checked for the payment slip to be printed. @@ -22,11 +22,11 @@ -
These invoices were successfully checked for the payment slip to be printed.