From 93539e6632f39dfd6e77c852f138c54c1b753a67 Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Thu, 30 Jul 2015 10:14:59 +0200 Subject: [PATCH] [ADD] configuration section on accounting page [REN] move files around to conform directory convention --- account_bank_statement_import/__init__.py | 5 +--- account_bank_statement_import/__openerp__.py | 3 ++- .../models/__init__.py | 5 ++++ .../account_bank_statement_import.py | 0 .../models/account_config_settings.py | 27 +++++++++++++++++++ .../{ => models}/res_partner_bank.py | 0 .../account_bank_statement_import_view.xml | 0 .../views/account_config_settings.xml | 17 ++++++++++++ 8 files changed, 52 insertions(+), 5 deletions(-) create mode 100644 account_bank_statement_import/models/__init__.py rename account_bank_statement_import/{ => models}/account_bank_statement_import.py (100%) create mode 100644 account_bank_statement_import/models/account_config_settings.py rename account_bank_statement_import/{ => models}/res_partner_bank.py (100%) rename account_bank_statement_import/{ => views}/account_bank_statement_import_view.xml (100%) create mode 100644 account_bank_statement_import/views/account_config_settings.xml diff --git a/account_bank_statement_import/__init__.py b/account_bank_statement_import/__init__.py index 28dc065..0650744 100644 --- a/account_bank_statement_import/__init__.py +++ b/account_bank_statement_import/__init__.py @@ -1,4 +1 @@ -# -*- encoding: utf-8 -*- - -from . import res_partner_bank -from . import account_bank_statement_import +from . import models diff --git a/account_bank_statement_import/__openerp__.py b/account_bank_statement_import/__openerp__.py index faf1367..46c9466 100644 --- a/account_bank_statement_import/__openerp__.py +++ b/account_bank_statement_import/__openerp__.py @@ -8,7 +8,8 @@ 'website': 'https://github.com/OCA/bank-statement-import', 'depends': ['account'], 'data': [ - 'account_bank_statement_import_view.xml', + "views/account_config_settings.xml", + 'views/account_bank_statement_import_view.xml', ], 'demo': [ 'demo/fiscalyear_period.xml', diff --git a/account_bank_statement_import/models/__init__.py b/account_bank_statement_import/models/__init__.py new file mode 100644 index 0000000..3a3c51a --- /dev/null +++ b/account_bank_statement_import/models/__init__.py @@ -0,0 +1,5 @@ +# -*- encoding: utf-8 -*- + +from . import res_partner_bank +from . import account_bank_statement_import +from . import account_config_settings diff --git a/account_bank_statement_import/account_bank_statement_import.py b/account_bank_statement_import/models/account_bank_statement_import.py similarity index 100% rename from account_bank_statement_import/account_bank_statement_import.py rename to account_bank_statement_import/models/account_bank_statement_import.py diff --git a/account_bank_statement_import/models/account_config_settings.py b/account_bank_statement_import/models/account_config_settings.py new file mode 100644 index 0000000..45864df --- /dev/null +++ b/account_bank_statement_import/models/account_config_settings.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# This module copyright (C) 2015 Therp BV (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## +from openerp import models, fields + + +class AccountConfigSettings(models.Model): + _inherit = 'account.config.settings' + + module_base_bank_account_number_unique = fields.Boolean( + 'Enforce unique account numbers on bank accounts') diff --git a/account_bank_statement_import/res_partner_bank.py b/account_bank_statement_import/models/res_partner_bank.py similarity index 100% rename from account_bank_statement_import/res_partner_bank.py rename to account_bank_statement_import/models/res_partner_bank.py diff --git a/account_bank_statement_import/account_bank_statement_import_view.xml b/account_bank_statement_import/views/account_bank_statement_import_view.xml similarity index 100% rename from account_bank_statement_import/account_bank_statement_import_view.xml rename to account_bank_statement_import/views/account_bank_statement_import_view.xml diff --git a/account_bank_statement_import/views/account_config_settings.xml b/account_bank_statement_import/views/account_config_settings.xml new file mode 100644 index 0000000..78d7805 --- /dev/null +++ b/account_bank_statement_import/views/account_config_settings.xml @@ -0,0 +1,17 @@ + + + + + account.config.settings + + + + + + + + + + + +