forked from OCA/bank-payment
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Port almost all modules to v10 (OCA#305)
Port almost all modules to v10 * Update to EPC Rulebook v9.2 that start to apply on 2016-11-20 (bug OCA#300)
- Loading branch information
1 parent
36f5ee1
commit 3985c5b
Showing
18 changed files
with
98 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2013-2016 Akretion - Alexis de Lattre <[email protected]> | ||
# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza | ||
# © 2016 Antiun Ingenieria S.L. - Antonio Espinosa | ||
# © 2014 Tecnativa - Pedro M. Baeza | ||
# © 2016 Tecnativa - Antonio Espinosa | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
{ | ||
'name': 'Account Banking PAIN Base Module', | ||
'summary': 'Base module for PAIN file generation', | ||
'version': '9.0.1.0.0', | ||
'version': '10.0.1.0.0', | ||
'license': 'AGPL-3', | ||
'author': "Akretion, " | ||
"Noviat, " | ||
"Serv. Tecnol. Avanzados - Pedro M. Baeza, " | ||
"Antiun Ingeniería S.L., " | ||
"Tecnativa, " | ||
"Odoo Community Association (OCA)", | ||
'website': 'https://github.com/OCA/bank-payment', | ||
'contributors': ['Pedro M. Baeza <[email protected]>'], | ||
|
@@ -26,7 +25,7 @@ | |
'views/account_payment_order.xml', | ||
'views/bank_payment_line_view.xml', | ||
'views/account_payment_mode.xml', | ||
'views/res_company_view.xml', | ||
'views/account_config_settings.xml', | ||
'views/account_payment_method.xml', | ||
], | ||
'post_init_hook': 'set_default_initiating_party', | ||
|
15 changes: 0 additions & 15 deletions
15
account_banking_pain_base/migrations/8.0.0.2/post-migration.py
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2013-2016 Akretion - Alexis de Lattre <[email protected]> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from . import account_payment_line | ||
from . import account_payment_order | ||
from . import bank_payment_line | ||
from . import account_payment_mode | ||
from . import res_company | ||
from . import account_config_settings | ||
from . import account_payment_method |
14 changes: 14 additions & 0 deletions
14
account_banking_pain_base/models/account_config_settings.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2016 Akretion - Alexis de Lattre <[email protected]> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from odoo import models, fields | ||
|
||
|
||
class AccountConfigSettings(models.TransientModel): | ||
_inherit = 'account.config.settings' | ||
|
||
initiating_party_issuer = fields.Char( | ||
related='company_id.initiating_party_issuer') | ||
initiating_party_identifier = fields.Char( | ||
related='company_id.initiating_party_identifier') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,8 @@ | |
# © 2016 Akretion (Alexis de Lattre <[email protected]>) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from openerp import models, fields, api, _ | ||
from openerp.exceptions import UserError | ||
from odoo import models, fields, api, _ | ||
from odoo.exceptions import UserError | ||
|
||
|
||
class AccountPaymentMethod(models.Model): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2013-2015 Akretion - Alexis de Lattre <[email protected]> | ||
# © 2013-2016 Akretion - Alexis de Lattre <[email protected]> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from openerp import models, fields, api | ||
from odoo import models, fields, api | ||
|
||
|
||
class BankPaymentLine(models.Model): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2013-2015 Akretion - Alexis de Lattre <[email protected]> | ||
# © 2013-2016 Akretion - Alexis de Lattre <[email protected]> | ||
# © 2013 Noviat (http://www.noviat.com) - Luc de Meyer | ||
# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from openerp import models, fields, api | ||
from odoo import models, fields, api | ||
import logging | ||
|
||
logger = logging.getLogger(__name__) | ||
|
@@ -22,32 +22,31 @@ class ResCompany(models.Model): | |
help="This will be used as the 'Initiating Party Identifier' in " | ||
"the PAIN files generated by Odoo.") | ||
|
||
@api.model | ||
def _default_initiating_party(self, company): | ||
'''This method is called from post_install.py, which itself is also | ||
called from migrations/8.0.0.2/post-migration.py''' | ||
@api.one | ||
def _default_initiating_party(self): | ||
'''This method is called from post_install.py''' | ||
party_issuer_per_country = { | ||
'BE': 'KBO-BCE', # KBO-BCE = the registry of companies in Belgium | ||
} | ||
logger.debug( | ||
'Calling _default_initiating_party on company %s', company.name) | ||
country_code = company.country_id.code | ||
if not company.initiating_party_issuer: | ||
'Calling _default_initiating_party on company %s', self.name) | ||
country_code = self.country_id.code | ||
if not self.initiating_party_issuer: | ||
if country_code and country_code in party_issuer_per_country: | ||
company.write({ | ||
self.write({ | ||
'initiating_party_issuer': | ||
party_issuer_per_country[country_code]}) | ||
logger.info( | ||
'Updated initiating_party_issuer on company %s', | ||
company.name) | ||
self.name) | ||
party_identifier = False | ||
if not company.initiating_party_identifier: | ||
if company.vat and country_code: | ||
if not self.initiating_party_identifier: | ||
if self.vat and country_code: | ||
if country_code == 'BE': | ||
party_identifier = company.vat[2:].replace(' ', '') | ||
party_identifier = self.vat[2:].replace(' ', '') | ||
if party_identifier: | ||
company.write({ | ||
self.write({ | ||
'initiating_party_identifier': party_identifier}) | ||
logger.info( | ||
'Updated initiating_party_identifier on company %s', | ||
company.name) | ||
self.name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
account_banking_pain_base/views/account_config_settings.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
© 2016 Akretion (Alexis de Lattre <[email protected]>) | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
--> | ||
<odoo> | ||
|
||
|
||
<record id="view_account_config_settings" model="ir.ui.view"> | ||
<field name="name">pain.group.on.account.config.settings</field> | ||
<field name="model">account.config.settings</field> | ||
<field name="inherit_id" ref="account.view_account_config_settings"/> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//separator[@name='analytic_account']" position="before"> | ||
<group name="pain"> | ||
<field name="initiating_party_identifier"/> | ||
<field name="initiating_party_issuer"/> | ||
</group> | ||
</xpath> | ||
</field> | ||
</record> | ||
|
||
|
||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
Copyright (C) 2013-2016 Akretion (http://www.akretion.com) | ||
@author: Alexis de Lattre <[email protected]> | ||
The licence is in the file __openerp__.py | ||
© 2013-2016 Akretion (Alexis de Lattre <[email protected]>) | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
--> | ||
<openerp> | ||
<data> | ||
<odoo> | ||
|
||
|
||
<record id="account_payment_line_form" model="ir.ui.view"> | ||
<field name="name">pain.base.account.payment.line</field> | ||
|
@@ -19,5 +18,5 @@ | |
</field> | ||
</record> | ||
|
||
</data> | ||
</openerp> | ||
|
||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
Copyright (C) 2013-2016 Akretion (http://www.akretion.com) | ||
@author: Alexis de Lattre <[email protected]> | ||
Copyright (C) 2013-2016 Akretion (Alexis de Lattre <[email protected]>) | ||
© 2015 Antiun Ingenieria S.L. - Antonio Espinosa | ||
The licence is in the file __openerp__.py | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
--> | ||
<openerp> | ||
<data> | ||
<odoo> | ||
|
||
|
||
<record id="account_payment_mode_form" model="ir.ui.view"> | ||
|
@@ -23,5 +21,4 @@ | |
</record> | ||
|
||
|
||
</data> | ||
</openerp> | ||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
Copyright (C) 2016 Akretion (http://www.akretion.com) | ||
@author: Alexis de Lattre <[email protected]> | ||
The licence is in the file __openerp__.py | ||
© 2016 Akretion (Alexis de Lattre <[email protected]>) | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
--> | ||
<openerp> | ||
<data> | ||
<odoo> | ||
|
||
|
||
<record id="account_payment_order_form" model="ir.ui.view"> | ||
<field name="name">pain.base.account.payment.order.form</field> | ||
|
@@ -20,5 +19,5 @@ | |
</field> | ||
</record> | ||
|
||
</data> | ||
</openerp> | ||
|
||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
Copyright (C) 2015-2016 Akretion (http://www.akretion.com) | ||
@author: Alexis de Lattre <[email protected]> | ||
The licence is in the file __openerp__.py | ||
© 2015-2016 Akretion (Alexis de Lattre <[email protected]>) | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
--> | ||
<openerp> | ||
<data> | ||
<odoo> | ||
|
||
|
||
<record id="bank_payment_line_form" model="ir.ui.view"> | ||
<field name="name">pain.base.bank.payment.line.form</field> | ||
|
@@ -19,5 +18,5 @@ | |
</field> | ||
</record> | ||
|
||
</data> | ||
</openerp> | ||
|
||
</odoo> |
This file was deleted.
Oops, something went wrong.