[REM] account: removal of account_tax_generate wizard, as it will not work out of...
authorQuentin (OpenERP) <qdp-launchpad@openerp.com>
Fri, 9 Dec 2011 09:07:06 +0000 (10:07 +0100)
committerQuentin (OpenERP) <qdp-launchpad@openerp.com>
Fri, 9 Dec 2011 09:07:06 +0000 (10:07 +0100)
bzr revid: qdp-launchpad@openerp.com-20111209090706-b36ulav0j4m3i9f1

addons/account/__openerp__.py
addons/account/wizard/__init__.py
addons/account/wizard/account_tax_generate.py [deleted file]
addons/account/wizard/account_tax_generate_view.xml [deleted file]

index f6d188d..7045f5c 100644 (file)
@@ -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',
index 5b7302d..d82eff6 100644 (file)
@@ -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 (file)
index 0c3cc0b..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-#    OpenERP, Open Source Management Solution
-#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
-#
-#    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 <http://www.gnu.org/licenses/>.
-#
-##############################################################################
-
-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 (file)
index 180dd79..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<openerp>
-    <data>
-
-        <record id="view_account_tax_generate" model="ir.ui.view">
-            <field name="name">account.tax.generate.form</field>
-            <field name="model">account.tax.generate</field>
-            <field name="type">form</field>
-            <field name="arch" type="xml">
-                <form string="Tax Generate">
-                    <separator string="Taxes Generate from Templates..." colspan="4"/>
-                    <newline/>
-                    <field name="template_ids" nolabel="1"/>
-                    <separator colspan="4" />
-                    <group colspan="4" col="6">
-                        <label string ="" colspan="2"/>
-                        <button icon="gtk-cancel" special="cancel" string="Cancel" />
-                        <button icon="gtk-execute" string="Generate Taxes"
-                        name="tax_generate" type="object" />
-                    </group>
-               </form>
-            </field>
-        </record>
-
-        <record id="action_account_tax_generate" model="ir.actions.act_window">
-            <field name="name">Generate Taxes</field>
-            <field name="res_model">account.tax.generate</field>
-            <field name="view_type">form</field>
-            <field name="view_mode">tree,form</field>
-            <field name="view_id" ref="view_account_tax_generate"/>
-            <field name="target">new</field>
-        </record>
-
-        <menuitem sequence="30" action="action_account_tax_generate" id="menu_generate_taxes" parent="next_id_27" />
-
-    </data>
-</openerp>