From 7e5f91af19f360fee96ad0e946e6ee6fd1bd7c07 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Fri, 9 Dec 2011 10:07:06 +0100 Subject: [PATCH] [REM] account: removal of account_tax_generate wizard, as it will not work out of the box with the current implementation (we don't have the tax_cde_template_ref. We could build it but this feature doesn't seem to worth this effort) bzr revid: qdp-launchpad@openerp.com-20111209090706-b36ulav0j4m3i9f1 --- addons/account/__openerp__.py | 1 - addons/account/wizard/__init__.py | 2 - addons/account/wizard/account_tax_generate.py | 52 ------------------- .../wizard/account_tax_generate_view.xml | 37 ------------- 4 files changed, 92 deletions(-) delete mode 100644 addons/account/wizard/account_tax_generate.py delete mode 100644 addons/account/wizard/account_tax_generate_view.xml diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py index f6d188dd69e..7045f5c069c 100644 --- a/addons/account/__openerp__.py +++ b/addons/account/__openerp__.py @@ -98,7 +98,6 @@ module named account_voucher. 'wizard/account_reconcile_view.xml', 'wizard/account_reconcile_partner_process_view.xml', 'wizard/account_automatic_reconcile_view.xml', - 'wizard/account_tax_generate_view.xml', 'wizard/account_financial_report_view.xml', 'project/wizard/project_account_analytic_line_view.xml', 'account_end_fy.xml', diff --git a/addons/account/wizard/__init__.py b/addons/account/wizard/__init__.py index 5b7302da00a..d82eff62142 100644 --- a/addons/account/wizard/__init__.py +++ b/addons/account/wizard/__init__.py @@ -66,8 +66,6 @@ import account_change_currency import account_report_balance_sheet import account_report_profit_loss -import account_tax_generate - # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/wizard/account_tax_generate.py b/addons/account/wizard/account_tax_generate.py deleted file mode 100644 index 0c3cc0b6857..00000000000 --- a/addons/account/wizard/account_tax_generate.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# 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 osv import osv, fields - -class account_tax_generate(osv.osv_memory): - _name = 'account.tax.generate' - _description = 'Tax Generate' - - def _get_templates(self, cr, uid, context=None): - company_id = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.id - cr.execute("SELECT description from account_tax where company_id=%s" % (company_id)) - taxes = cr.fetchall() - tax_names = [x[0] for x in taxes] - return self.pool.get('account.tax.template').search(cr, uid, [('installable', '=', False), ('description', 'not in', tax_names)], context=context) - - _columns = { - 'template_ids': fields.many2many('account.tax.template', 'tax_template_rel', 'wizard_id', 'template_id', 'Taxes Template', domain = [('installable','=',False)]), - } - - _defaults = { - 'template_ids': _get_templates, - } - - def tax_generate(self, cr, uid, ids, context=None): - company_id = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.id - obj_tax_temp = self.pool.get('account.tax.template') - tax_templates = [x for x in self.browse(cr, uid, ids, context=context)[0].template_ids] - taxes_ids = obj_tax_temp.generate_tax(cr, uid, tax_templates, {}, company_id, context=context) - return {} - -account_tax_generate() - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/wizard/account_tax_generate_view.xml b/addons/account/wizard/account_tax_generate_view.xml deleted file mode 100644 index 180dd79a941..00000000000 --- a/addons/account/wizard/account_tax_generate_view.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - account.tax.generate.form - account.tax.generate - form - -
- - - - - -