summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
Diffstat (limited to 'addons')
-rw-r--r--addons/l10n_in/__init__.py2
-rw-r--r--addons/l10n_in/__openerp__.py5
-rw-r--r--addons/l10n_in/l10n_in_installer.py68
-rw-r--r--addons/l10n_in/l10n_in_installer_view.xml17
4 files changed, 4 insertions, 88 deletions
diff --git a/addons/l10n_in/__init__.py b/addons/l10n_in/__init__.py
index 4217c02d152..49a09e5570e 100644
--- a/addons/l10n_in/__init__.py
+++ b/addons/l10n_in/__init__.py
@@ -19,7 +19,5 @@
#
##############################################################################
-
-import l10n_in_installer
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/l10n_in/__openerp__.py b/addons/l10n_in/__openerp__.py
index 18bc42a80cc..a6786b79b8f 100644
--- a/addons/l10n_in/__openerp__.py
+++ b/addons/l10n_in/__openerp__.py
@@ -37,8 +37,11 @@ Indian accounting chart and localization.
"demo_xml": [],
"update_xml": [
"l10n_in_tax_code_template.xml",
+ "l10n_in_public_chart.xml",
+ "l10n_in_public_tax_template.xml",
+ "l10n_in_private_chart.xml",
+ "l10n_in_private_tax_template.xml",
"l10n_in_wizard.xml",
- "l10n_in_installer_view.xml",
],
"auto_install": False,
"installable": True,
diff --git a/addons/l10n_in/l10n_in_installer.py b/addons/l10n_in/l10n_in_installer.py
deleted file mode 100644
index 0a15d034605..00000000000
--- a/addons/l10n_in/l10n_in_installer.py
+++ /dev/null
@@ -1,68 +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 fields, osv
-from os.path import join as opj
-import tools
-
-class l10n_installer(osv.osv_memory):
- _inherit = 'account.installer'
- _columns = {
- 'company_type': fields.selection([('public_company', 'Public Ltd'),
- ('partnership_private_company', 'Private Ltd/Partnership')
- ], 'Company Type', required=True,
- help='Company Type is used to install Indian chart of accounts as per need of business.'),
- }
- _defaults = {
- 'company_type': 'public_company',
- }
-
- def execute_simple(self, cr, uid, ids, context=None):
- if context is None:
- context = {}
-
- res = super(l10n_installer, self).execute_simple(cr, uid, ids, context=context)
-
- for chart in self.read(cr, uid, ids, context=context):
-
- if chart['charts'] =='l10n_in' and chart['company_type']=='public_company':
- acc_file_path = tools.file_open(opj('l10n_in', 'l10n_in_public_chart.xml'))
-
- tools.convert_xml_import(cr, 'l10n_in', acc_file_path, {}, 'init', True, None)
- acc_file_path.close()
-
- tax_file_path = tools.file_open(opj('l10n_in', 'l10n_in_public_tax_template.xml'))
- tools.convert_xml_import(cr, 'l10n_in', tax_file_path, {}, 'init', True, None)
- tax_file_path.close()
-
- elif chart['charts'] =='l10n_in' and chart['company_type']=='partnership_private_company':
- acc_file_path = tools.file_open(opj('l10n_in', 'l10n_in_private_chart.xml'))
-
- tools.convert_xml_import(cr, 'l10n_in', acc_file_path, {}, 'init', True, None)
- acc_file_path.close()
-
- tax_file_path = tools.file_open(opj('l10n_in', 'l10n_in_private_tax_template.xml'))
- tools.convert_xml_import(cr, 'l10n_in', tax_file_path, {}, 'init', True, None)
- tax_file_path.close()
-
- return res
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file
diff --git a/addons/l10n_in/l10n_in_installer_view.xml b/addons/l10n_in/l10n_in_installer_view.xml
deleted file mode 100644
index 63dbe44eabd..00000000000
--- a/addons/l10n_in/l10n_in_installer_view.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<openerp>
- <data>
- <record id="view_l10n_indian_chart_account_installer" model="ir.ui.view">
- <field name="name">account.installer.form</field>
- <field name="model">account.installer</field>
- <field name="type">form</field>
- <field name="inherit_id" ref="account.view_account_configuration_installer"/>
- <field name="arch" type="xml">
- <field name="charts" position="after">
- <newline/>
- <field name="company_type" attrs="{'invisible' : [('charts', '!=', 'l10n_in')]}"/>
- </field>
- </field>
- </record>
- </data>
-</openerp>