Skip to content

Commit

Permalink
Merge 5bff8e8 into 7631ee0
Browse files Browse the repository at this point in the history
  • Loading branch information
asaunier committed Apr 19, 2019
2 parents 7631ee0 + 5bff8e8 commit e46557c
Show file tree
Hide file tree
Showing 24 changed files with 1,102 additions and 98 deletions.
41 changes: 35 additions & 6 deletions l10n_ch_base_bank/i18n/fr.po
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
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
6 changes: 4 additions & 2 deletions l10n_ch_base_bank/tests/test_bank.py
Expand Up @@ -5,12 +5,14 @@
from odoo.tools import mute_logger
from odoo import exceptions
from odoo.tests.common import Form
from odoo.tests import tagged

ch_iban = 'CH15 3881 5158 3845 3843 7'
ch_post_iban = 'CH09 0900 0000 1000 8060 7'
fr_iban = 'FR83 8723 4133 8709 9079 4002 530'


@tagged('post_install', '-at_install')
class TestBank(common.SavepointCase):

@classmethod
Expand Down Expand Up @@ -251,8 +253,8 @@ def test_onchange_post_bank_ccp_in_acc_number(self):
self.assertEqual(bank_acc.acc_number, '46-110-7')

def test_name_search(self):
self.bank.bic = 'BIC12345'
result = self.env['res.bank'].name_search('BIC12345')
self.bank.bic = 'BBAVBEBB'
result = self.env['res.bank'].name_search('BBAVBEBB')
self.assertEqual(result and result[0][0], self.bank.id)
self.bank.code = 'CODE123'
result = self.env['res.bank'].name_search('CODE123')
Expand Down
2 changes: 1 addition & 1 deletion l10n_ch_base_bank/tests/test_create_invoice.py
Expand Up @@ -15,7 +15,7 @@ def setUpClass(cls):
cls.partner = cls.env.ref('base.res_partner_12')
bank = cls.env['res.bank'].create({
'name': 'BCV',
'bic': 'BIC23423',
'bic': 'BBRUBEBB',
'clearing': '234234',
})
# define company bank account
Expand Down
4 changes: 3 additions & 1 deletion l10n_ch_base_bank/tests/test_search_invoice.py
Expand Up @@ -3,8 +3,10 @@

from odoo.tests import common
from odoo.tests.common import Form
from odoo.tests import tagged


@tagged('post_install', '-at_install')
class TestSearchInvoice(common.SavepointCase):

@classmethod
Expand All @@ -14,7 +16,7 @@ def setUpClass(cls):
cls.company = cls.env.ref('base.main_company')
bank = cls.env['res.bank'].create({
'name': 'BCV',
'bic': 'BIC23423',
'bic': 'BBRUBEBB',
'clearing': '234234',
'ccp': '01-1234-1',
})
Expand Down
72 changes: 49 additions & 23 deletions l10n_ch_pain_base/README.rst
@@ -1,53 +1,79 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3

===================================
Switzerland - ISO 20022 base module
===================================
=======================
Switzerland - ISO 20022
=======================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--switzerland-lightgray.png?logo=github
:target: https://github.com/OCA/l10n-switzerland/tree/12.0/l10n_ch_pain_base
:alt: OCA/l10n-switzerland
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/l10n-switzerland-12-0/l10n-switzerland-12-0-l10n_ch_pain_base
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/125/12.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

This module doesn't do anything by himself. It is the base module for 2 other modules:

* the module *l10n_ch_pain_credit_transfer* which adds support for the file format *pain.001.001.03.ch.02* which is used for ISO 20022 credit transfers (SEPA or not SEPA),

* the module *l10n_ch_pain_direct_debit* which adds support for the file format *pain.008.001.02.ch.01* which is used for ISO 20022 direct debits.

Usage
=====
**Table of contents**

.. 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/11.0
.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/OCA/l10n-switzerland/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smashing it by providing a detailed and welcomed feedback.
Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-switzerland/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/l10n-switzerland/issues/new?body=module:%20l10n_ch_pain_base%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Akretion
* Camptocamp

Contributors
------------
~~~~~~~~~~~~

* Alexis de Lattre <alexis.delattre@akretion.com>
* Denis Leemann <denis.leemann@camptocamp.com>
* Mykhailo Panarin <m.panarin@mobilunity.com>

Maintainer
----------
Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

This module is maintained by the OCA.

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

To contribute to this module, please visit https://odoo-community.org.
This module is part of the `OCA/l10n-switzerland <https://github.com/OCA/l10n-switzerland/tree/12.0/l10n_ch_pain_base>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 2 additions & 2 deletions l10n_ch_pain_base/__manifest__.py
Expand Up @@ -5,7 +5,7 @@
{
"name": "Switzerland - ISO 20022",
"summary": "ISO 20022 base module for Switzerland",
"version": "11.0.1.0.0",
"version": "12.0.1.0.0",
"category": "Finance",
"author": "Akretion,Camptocamp,Odoo Community Association (OCA)",
"license": "AGPL-3",
Expand All @@ -17,5 +17,5 @@
'views/account_payment_line.xml',
'views/bank_payment_line.xml',
],
'installable': False,
'installable': True,
}
17 changes: 10 additions & 7 deletions l10n_ch_pain_base/i18n/de.po
Expand Up @@ -9,14 +9,15 @@ msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-19 00:40+0000\n"
"PO-Revision-Date: 2017-04-19 00:40+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"PO-Revision-Date: 2018-11-23 22:11+0000\n"
"Last-Translator: chrispi-ch <chris@okc.ch>\n"
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.2.2\n"

#. module: l10n_ch_pain_base
#: code:addons/l10n_ch_pain_base/models/account_payment_order.py:72
Expand All @@ -25,24 +26,26 @@ msgid ""
"For pain.001.001.03.ch.02, for non-ISR payments, the BIC is required on the "
"bank '%s' related to the bank account '%s'"
msgstr ""
"Bei pain.001.001.03.ch.02 ist für Nicht-ESR-Zahlungen der BIC zur Bank '%s' "
"des Bankkontos '%s' erforderlich"

#. module: l10n_ch_pain_base
#: model:ir.model,name:l10n_ch_pain_base.model_account_move_line
msgid "Journal Item"
msgstr "Journalbuchung"
msgstr "Journaleintrag"

#. module: l10n_ch_pain_base
#: model:ir.model,name:l10n_ch_pain_base.model_account_payment_line
msgid "Payment Lines"
msgstr ""
msgstr "Zahlungszeilen"

#. module: l10n_ch_pain_base
#: model:ir.model,name:l10n_ch_pain_base.model_account_payment_order
msgid "Payment Order"
msgstr ""
msgstr "Zahlungsauftrag"

#. module: l10n_ch_pain_base
#: code:addons/l10n_ch_pain_base/models/account_payment_order.py:90
#, python-format
msgid "The field 'CCP/CP-Konto' is not set on the bank account '%s'."
msgstr ""
msgstr "Das Feld 'Postkonto' ist beim Bankkonto '%s' nicht gesetzt."
16 changes: 0 additions & 16 deletions l10n_ch_pain_base/migrations/11.0.1.0.0/post-migration.py

This file was deleted.

3 changes: 1 addition & 2 deletions l10n_ch_pain_base/models/account_move_line.py
Expand Up @@ -9,8 +9,7 @@ class AccountMoveLine(models.Model):

@api.multi
def _prepare_payment_line_vals(self, payment_order):
vals = super(AccountMoveLine, self)._prepare_payment_line_vals(
payment_order)
vals = super()._prepare_payment_line_vals(payment_order)
if self.invoice_id and self.invoice_id.reference_type == 'isr':
vals['local_instrument'] = 'CH01'
if vals['communication']:
Expand Down
3 changes: 1 addition & 2 deletions l10n_ch_pain_base/models/account_payment_line.py
Expand Up @@ -12,7 +12,6 @@ class AccountPaymentLine(models.Model):
communication_type = fields.Selection(selection_add=[('isr', 'ISR')])

def invoice_reference_type2communication_type(self):
res = super(AccountPaymentLine, self).\
invoice_reference_type2communication_type()
res = super().invoice_reference_type2communication_type()
res['isr'] = 'isr'
return res
3 changes: 3 additions & 0 deletions l10n_ch_pain_base/readme/CONTRIBUTORS.rst
@@ -0,0 +1,3 @@
* Alexis de Lattre <alexis.delattre@akretion.com>
* Denis Leemann <denis.leemann@camptocamp.com>
* Mykhailo Panarin <m.panarin@mobilunity.com>

0 comments on commit e46557c

Please sign in to comment.