Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix l10n_ch_payment_slip report write problem #4

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 34 additions & 6 deletions l10n_ch_base_bank/i18n/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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"
41 changes: 35 additions & 6 deletions l10n_ch_base_bank/i18n/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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é"
34 changes: 29 additions & 5 deletions l10n_ch_base_bank/i18n/it.po
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
35 changes: 19 additions & 16 deletions l10n_ch_payment_slip/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
===========
Expand Down
1 change: 1 addition & 0 deletions l10n_ch_payment_slip/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from . import controllers
from . import models
from . import report
from . import wizard
29 changes: 16 additions & 13 deletions l10n_ch_payment_slip/__manifest__.py
Original file line number Diff line number Diff line change
@@ -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',
]
}
}
1 change: 1 addition & 0 deletions l10n_ch_payment_slip/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import web
34 changes: 34 additions & 0 deletions l10n_ch_payment_slip/controllers/web.py
Original file line number Diff line number Diff line change
@@ -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)
Loading