diff --git a/__unported__/account_bank_statement_tax/__init__.py b/__unported__/account_bank_statement_tax/__init__.py deleted file mode 100644 index 16e8b082f..000000000 --- a/__unported__/account_bank_statement_tax/__init__.py +++ /dev/null @@ -1 +0,0 @@ -import model diff --git a/__unported__/account_bank_statement_tax/__openerp__.py b/__unported__/account_bank_statement_tax/__openerp__.py deleted file mode 100644 index d7a18ecf4..000000000 --- a/__unported__/account_bank_statement_tax/__openerp__.py +++ /dev/null @@ -1,43 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Copyright (C) 2012 - 2013 Therp BV (). -# All Rights Reserved -# -# 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': 'Apply a tax on bank statement lines', - 'version': '0.1', - 'license': 'AGPL-3', - 'author': 'Therp BV', - 'website': 'https://launchpad.net/banking-addons', - 'category': 'Banking addons', - 'depends': [ - 'account', - ], - 'data': [ - 'view/account_bank_statement.xml', - ], - 'description': ''' -Allow an (inclusive) tax to be set on a bank statement line. When the -statement is confirmed, the tax will be processed like a tax set on a -move line. - -This module is co-funded by BAS Solutions. - ''', - 'installable': False, -} diff --git a/__unported__/account_bank_statement_tax/i18n/account_bank_statement_tax.pot b/__unported__/account_bank_statement_tax/i18n/account_bank_statement_tax.pot deleted file mode 100644 index dc5ca6f8d..000000000 --- a/__unported__/account_bank_statement_tax/i18n/account_bank_statement_tax.pot +++ /dev/null @@ -1,37 +0,0 @@ -# Translation of OpenERP Server. -# This file contains the translation of the following modules: -# * account_bank_statement_tax -# -msgid "" -msgstr "" -"Project-Id-Version: OpenERP Server 7.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-10-25 16:00+0000\n" -"PO-Revision-Date: 2013-10-25 16:00+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: account_bank_statement_tax -#: model:ir.model,name:account_bank_statement_tax.model_account_bank_statement_line -msgid "Bank Statement Line" -msgstr "" - -#. module: account_bank_statement_tax -#: field:account.bank.statement.line,tax_id:0 -msgid "Tax" -msgstr "" - -#. module: account_bank_statement_tax -#: help:account.bank.statement.line,tax_id:0 -msgid "Apply an (inclusive) tax from the bank statement line" -msgstr "" - -#. module: account_bank_statement_tax -#: model:ir.model,name:account_bank_statement_tax.model_account_bank_statement -msgid "Bank Statement" -msgstr "" - diff --git a/__unported__/account_bank_statement_tax/i18n/hu.po b/__unported__/account_bank_statement_tax/i18n/hu.po deleted file mode 100644 index 4a55763cc..000000000 --- a/__unported__/account_bank_statement_tax/i18n/hu.po +++ /dev/null @@ -1,38 +0,0 @@ -# Hungarian translation for banking-addons -# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 -# This file is distributed under the same license as the banking-addons package. -# FIRST AUTHOR , 2014. -# -msgid "" -msgstr "" -"Project-Id-Version: banking-addons\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2013-10-25 16:00+0000\n" -"PO-Revision-Date: 2014-01-13 18:20+0000\n" -"Last-Translator: krnkris \n" -"Language-Team: Hungarian \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-05-31 06:01+0000\n" -"X-Generator: Launchpad (build 17031)\n" - -#. module: account_bank_statement_tax -#: model:ir.model,name:account_bank_statement_tax.model_account_bank_statement_line -msgid "Bank Statement Line" -msgstr "Bankkivonat tételsor" - -#. module: account_bank_statement_tax -#: field:account.bank.statement.line,tax_id:0 -msgid "Tax" -msgstr "Adó" - -#. module: account_bank_statement_tax -#: help:account.bank.statement.line,tax_id:0 -msgid "Apply an (inclusive) tax from the bank statement line" -msgstr "Egy bankivonat adó (beleértve) sorára alkalmazza" - -#. module: account_bank_statement_tax -#: model:ir.model,name:account_bank_statement_tax.model_account_bank_statement -msgid "Bank Statement" -msgstr "Bankszámlakivonat" diff --git a/__unported__/account_bank_statement_tax/i18n/nl.po b/__unported__/account_bank_statement_tax/i18n/nl.po deleted file mode 100644 index 63dbb956a..000000000 --- a/__unported__/account_bank_statement_tax/i18n/nl.po +++ /dev/null @@ -1,37 +0,0 @@ -# Translation of OpenERP Server. -# This file contains the translation of the following modules: -# * account_bank_statement_tax -# -msgid "" -msgstr "" -"Project-Id-Version: OpenERP Server 7.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-10-25 16:00+0000\n" -"PO-Revision-Date: 2013-11-11 17:46+0000\n" -"Last-Translator: Erwin van der Ploeg | Endian Solutions \n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-05-31 06:01+0000\n" -"X-Generator: Launchpad (build 17031)\n" - -#. module: account_bank_statement_tax -#: model:ir.model,name:account_bank_statement_tax.model_account_bank_statement_line -msgid "Bank Statement Line" -msgstr "Bankafschriftregel" - -#. module: account_bank_statement_tax -#: field:account.bank.statement.line,tax_id:0 -msgid "Tax" -msgstr "Belasting" - -#. module: account_bank_statement_tax -#: help:account.bank.statement.line,tax_id:0 -msgid "Apply an (inclusive) tax from the bank statement line" -msgstr "Voeg een inclusief belasting tarief toe aan de afschriftregel." - -#. module: account_bank_statement_tax -#: model:ir.model,name:account_bank_statement_tax.model_account_bank_statement -msgid "Bank Statement" -msgstr "Bankafschrift" diff --git a/__unported__/account_bank_statement_tax/i18n/pt_BR.po b/__unported__/account_bank_statement_tax/i18n/pt_BR.po deleted file mode 100644 index 50e01e1f5..000000000 --- a/__unported__/account_bank_statement_tax/i18n/pt_BR.po +++ /dev/null @@ -1,38 +0,0 @@ -# Brazilian Portuguese translation for banking-addons -# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 -# This file is distributed under the same license as the banking-addons package. -# FIRST AUTHOR , 2013. -# -msgid "" -msgstr "" -"Project-Id-Version: banking-addons\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2013-10-25 16:00+0000\n" -"PO-Revision-Date: 2013-12-25 12:18+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Brazilian Portuguese \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-05-31 06:01+0000\n" -"X-Generator: Launchpad (build 17031)\n" - -#. module: account_bank_statement_tax -#: model:ir.model,name:account_bank_statement_tax.model_account_bank_statement_line -msgid "Bank Statement Line" -msgstr "" - -#. module: account_bank_statement_tax -#: field:account.bank.statement.line,tax_id:0 -msgid "Tax" -msgstr "" - -#. module: account_bank_statement_tax -#: help:account.bank.statement.line,tax_id:0 -msgid "Apply an (inclusive) tax from the bank statement line" -msgstr "" - -#. module: account_bank_statement_tax -#: model:ir.model,name:account_bank_statement_tax.model_account_bank_statement -msgid "Bank Statement" -msgstr "" diff --git a/__unported__/account_bank_statement_tax/model/__init__.py b/__unported__/account_bank_statement_tax/model/__init__.py deleted file mode 100644 index 0a522c87a..000000000 --- a/__unported__/account_bank_statement_tax/model/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -import account_bank_statement_line -import account_bank_statement diff --git a/__unported__/account_bank_statement_tax/model/account_bank_statement.py b/__unported__/account_bank_statement_tax/model/account_bank_statement.py deleted file mode 100644 index 59900d07c..000000000 --- a/__unported__/account_bank_statement_tax/model/account_bank_statement.py +++ /dev/null @@ -1,117 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Copyright (C) 2012 - 2013 Therp BV (). -# All Rights Reserved -# -# 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.osv import orm -from openerp.tools import ustr - - -class AccountBankStatement(orm.Model): - _inherit = 'account.bank.statement' - - def get_tax_move_lines( - self, cr, uid, st_line, defaults, - company_currency_id, context=None): - """ - Process inclusive taxes on bank statement lines. - - @param st_line: browse record of the statement line - @param defaults: dictionary of default move line values. Usually - the same as the originating move line. - - return one or more serialized tax move lines and a set of values to - update the originating move line with, containing the new amount. - """ - - if not st_line.tax_id: - return False, False - tax_obj = self.pool.get('account.tax') - move_lines = [] - update_move_line = {} - base_amount = -defaults['credit'] or defaults['debit'] - tax_obj = self.pool.get('account.tax') - - fiscal_position = ( - st_line.partner_id.property_account_position - if st_line.partner_id - and st_line.partner_id.property_account_position - else False) - tax_ids = self.pool.get('account.fiscal.position').map_tax( - cr, uid, fiscal_position, [st_line.tax_id]) - taxes = tax_obj.browse(cr, uid, tax_ids, context=context) - - computed_taxes = tax_obj.compute_all( - cr, uid, taxes, base_amount, 1.00) - - for tax in computed_taxes['taxes']: - if tax['tax_code_id']: - if not update_move_line.get('tax_code_id'): - update_move_line['tax_code_id'] = tax['base_code_id'] - update_move_line['tax_amount'] = tax['base_sign'] * ( - computed_taxes.get('total', 0.0)) - # As the tax is inclusive, we need to correct the amount - # on the original move line - amount = computed_taxes.get('total', 0.0) - update_move_line['credit'] = ( - (amount < 0) and -amount) or 0.0 - update_move_line['debit'] = ( - (amount > 0) and amount) or 0.0 - - move_lines.append({ - 'move_id': defaults['move_id'], - 'name': ( - defaults.get('name', '') - + ' ' + ustr(tax['name'] or '')), - 'date': defaults.get('date', False), - 'partner_id': defaults.get('partner_id', False), - 'ref': defaults.get('ref', False), - 'statement_id': defaults.get('statement_id'), - 'tax_code_id': tax['tax_code_id'], - 'tax_amount': tax['tax_sign'] * tax.get('amount', 0.0), - 'account_id': ( - tax.get('account_collected_id', - defaults['account_id'])), - 'credit': tax['amount'] < 0 and - tax['amount'] or 0.0, - 'debit': tax['amount'] > 0 and tax['amount'] or 0.0, - 'account_id': ( - tax.get('account_collected_id', - defaults['account_id'])), - }) - - return move_lines, update_move_line - - def _prepare_bank_move_line( - self, cr, uid, st_line, move_id, amount, company_currency_id, - context=None): - """ - Overload of the original method from the account module. Create - the tax move lines. - """ - res = super(AccountBankStatement, self)._prepare_bank_move_line( - cr, uid, st_line, move_id, amount, company_currency_id, - context=context) - if st_line.tax_id: - tax_move_lines, counterpart_update_vals = self.get_tax_move_lines( - cr, uid, st_line, res, company_currency_id, context=context) - res.update(counterpart_update_vals) - for tax_move_line in tax_move_lines: - self.pool.get('account.move.line').create( - cr, uid, tax_move_line, context=context) - return res diff --git a/__unported__/account_bank_statement_tax/model/account_bank_statement_line.py b/__unported__/account_bank_statement_tax/model/account_bank_statement_line.py deleted file mode 100644 index f70f27b38..000000000 --- a/__unported__/account_bank_statement_tax/model/account_bank_statement_line.py +++ /dev/null @@ -1,34 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Copyright (C) 2012 - 2013 Therp BV (). -# All Rights Reserved -# -# 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.osv import orm, fields - - -class AccountBankStatementLine(orm.Model): - _inherit = 'account.bank.statement.line' - - _columns = { - 'tax_id': fields.many2one( - 'account.tax', 'Tax', - domain=[('price_include', '=', True)], - help="Apply an (inclusive) tax from the bank statement line", - ), - } diff --git a/__unported__/account_bank_statement_tax/view/account_bank_statement.xml b/__unported__/account_bank_statement_tax/view/account_bank_statement.xml deleted file mode 100644 index 63d2e6e08..000000000 --- a/__unported__/account_bank_statement_tax/view/account_bank_statement.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - Add tax to the embedded bank statement line form - - account.bank.statement - - - - - - - -