diff --git a/account_invoice_partner_bank_usability/__init__.py b/account_invoice_partner_bank_usability/__init__.py deleted file mode 100644 index ab922af..0000000 --- a/account_invoice_partner_bank_usability/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# -*- coding: utf-8 -*- - -from . import account_invoice diff --git a/account_invoice_partner_bank_usability/__manifest__.py b/account_invoice_partner_bank_usability/__manifest__.py deleted file mode 100644 index f6aa773..0000000 --- a/account_invoice_partner_bank_usability/__manifest__.py +++ /dev/null @@ -1,43 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Account Invoice Partner Bank Usability module for Odoo -# Copyright (C) 2013-2016 Akretion (http://www.akretion.com) -# @author Alexis de Lattre -# -# 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 . -# -############################################################################## - - -{ - 'name': 'Account Invoice Partner Bank Usability', - 'version': '0.1', - 'category': 'Accounting & Finance', - 'license': 'AGPL-3', - 'summary': 'Configure a bank account by default for customer invoices', - 'description': """ -Account Invoice Partner Bank Usability -====================================== - -This module adds a configuration parameter on the company that allows you to choose which bank account of your company will be selected by default on customer invoices. - -This module has been written by Alexis de Lattre from Akretion . - """, - 'author': 'Akretion', - 'website': 'http://www.akretion.com', - 'depends': ['account'], - 'data': ['company_view.xml'], - 'installable': False, -} diff --git a/account_invoice_partner_bank_usability/account_invoice.py b/account_invoice_partner_bank_usability/account_invoice.py deleted file mode 100644 index 4bab333..0000000 --- a/account_invoice_partner_bank_usability/account_invoice.py +++ /dev/null @@ -1,48 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Account Invoice Partner Bank Usability module for Odoo -# Copyright (C) 2013-2016 Akretion (http://www.akretion.com) -# @author Alexis de Lattre -# -# 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 ResCompany(models.Model): - _inherit = 'res.company' - - default_out_invoice_partner_bank_id = fields.Many2one( - 'res.partner.bank', - string='Default Bank Account for Customer Invoices', - copy=False, ondelete='restrict', - help="This is the bank account of your company that will be selected " - "by default when you create a customer invoice.") - - -class AccountInvoice(models.Model): - _inherit = "account.invoice" - - def invoice_out_default_bank_account(self): - partner_bank_id = False - if self._context.get('type') == 'out_invoice' or \ - self._context.get('inv_type') == 'out_invoice': - partner_bank_id = self.env.user.company_id.\ - default_out_invoice_partner_bank_id.id or False - return partner_bank_id - - partner_bank_id = fields.Many2one(default=invoice_out_default_bank_account) diff --git a/account_invoice_partner_bank_usability/company_view.xml b/account_invoice_partner_bank_usability/company_view.xml deleted file mode 100644 index 914f9d6..0000000 --- a/account_invoice_partner_bank_usability/company_view.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - account_invoice_partner_bank_usability.company.form - res.company - - - - - - - - - - -