From fb3f7aa747d4d196abd3963ef1cbdfae910551a5 Mon Sep 17 00:00:00 2001 From: Numerigraphe - Lionel Sausin Date: Tue, 10 Jan 2012 13:35:59 +0100 Subject: [PATCH 001/282] [IMP] delivery: move picking's net weight to extended view bzr revid: ls@numerigraphe.fr-20120110123559-1llywc42k606hryj --- addons/delivery/delivery_view.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/delivery/delivery_view.xml b/addons/delivery/delivery_view.xml index c46253777d2..47ed9d6d274 100644 --- a/addons/delivery/delivery_view.xml +++ b/addons/delivery/delivery_view.xml @@ -194,7 +194,7 @@ - + - + - + @@ -245,7 +245,7 @@ - + @@ -258,7 +258,7 @@ - + @@ -271,7 +271,7 @@ - + From 32781b0268a8b3583869cd14809e466568ee2a7f Mon Sep 17 00:00:00 2001 From: Numerigraphe - Lionel Sausin Date: Mon, 16 Jan 2012 11:34:06 +0100 Subject: [PATCH 002/282] [FIX] typo in XML file bzr revid: ls@numerigraphe.fr-20120116103406-gwx3w8zlnrnvlyyr --- addons/delivery/delivery_view.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/delivery/delivery_view.xml b/addons/delivery/delivery_view.xml index 47ed9d6d274..6c9e8c85cdb 100644 --- a/addons/delivery/delivery_view.xml +++ b/addons/delivery/delivery_view.xml @@ -194,7 +194,7 @@ - @@ -207,7 +207,7 @@ - From 438cde1f2f9b6204a0cb71338eacc7dfa1fab4e9 Mon Sep 17 00:00:00 2001 From: "nicolas.bessi@camptocamp.com" <> Date: Wed, 8 Feb 2012 11:37:15 +0100 Subject: [PATCH 003/282] [FIX] l10n_ch bvr report to follow last patches of report_webkit addons bzr revid: nicolas.bessi@camptocamp.com-20120208103715-gk6upkf3b47av9h1 --- addons/l10n_ch/report/report_webkit_html.py | 154 +++++++------------- 1 file changed, 51 insertions(+), 103 deletions(-) diff --git a/addons/l10n_ch/report/report_webkit_html.py b/addons/l10n_ch/report/report_webkit_html.py index e6f7239c4e4..72158361da7 100644 --- a/addons/l10n_ch/report/report_webkit_html.py +++ b/addons/l10n_ch/report/report_webkit_html.py @@ -20,22 +20,31 @@ ############################################################################## import time -from report import report_sxw -from report_webkit import webkit_report -from report_webkit import report_helper -from osv import osv -from tools import mod10r import sys import os import re + +from mako.template import Template +from mako.lookup import TemplateLookup +from mako import exceptions + + +from report import report_sxw +from report_webkit import webkit_report +from report_webkit import report_helper + +from osv import osv +from osv.osv import except_osv + +from tools import mod10r +from tools.translate import _ +from tools.config import config + import wizard import addons import pooler -from tools.config import config -from mako.template import Template -from mako import exceptions -from tools.translate import _ -from osv.osv import except_osv + + class l10n_ch_report_webkit_html(report_sxw.rml_parse): @@ -143,53 +152,26 @@ class l10n_ch_report_webkit_html(report_sxw.rml_parse): 'digits!\nPlease check your company ' 'information for the invoice:\n%s') %(invoice_name))) return '' + +def mako_template(text): + """Build a Mako template. + + This template uses UTF-8 encoding + """ + tmp_lookup = TemplateLookup() #we need it in order to allow inclusion and inheritance + return Template(text, input_encoding='utf-8', output_encoding='utf-8', lookup=tmp_lookup) class BVRWebKitParser(webkit_report.WebKitParser): - def setLang(self, lang): - if not lang: - lang = 'en_US' - self.localcontext['lang'] = lang - - def formatLang(self, value, digits=None, date=False, date_time=False, grouping=True, monetary=False): - """format using the know cursor, language from localcontext""" - if digits is None: - digits = self.parser_instance.get_digits(value) - if isinstance(value, (str, unicode)) and not value: - return '' - pool_lang = self.pool.get('res.lang') - lang = self.localcontext['lang'] - - lang_ids = pool_lang.search(self.parser_instance.cr, self.parser_instance.uid, [('code','=',lang)])[0] - lang_obj = pool_lang.browse(self.parser_instance.cr, self.parser_instance.uid, lang_ids) - - if date or date_time: - if not str(value): - return '' - - date_format = lang_obj.date_format - parse_format = '%Y-%m-%d' - if date_time: - value=value.split('.')[0] - date_format = date_format + " " + lang_obj.time_format - parse_format = '%Y-%m-%d %H:%M:%S' - if not isinstance(value, time.struct_time): - return time.strftime(date_format, time.strptime(value, parse_format)) - - else: - date = datetime(*value.timetuple()[:6]) - return date.strftime(date_format) - - return lang_obj.format('%.' + str(digits) + 'f', value, grouping=grouping, monetary=monetary) - def create_single_pdf(self, cursor, uid, ids, data, report_xml, context=None): """generate the PDF""" - self.parser_instance = self.parser( - cursor, + context = context or {} + if report_xml.report_type != 'webkit': + return super(WebKitParser,self).create_single_pdf(cursor, uid, ids, data, report_xml, context=context) + self.parser_instance = self.parser(cursor, uid, self.name2, - context=context - ) + context=context) self.pool = pooler.get_pool(cursor.dbname) objs = self.getObjects(cursor, uid, ids, context) self.parser_instance.set_context(objs, data, ids, report_xml.report_type) @@ -201,7 +183,7 @@ class BVRWebKitParser(webkit_report.WebKitParser): if not template and report_xml.report_webkit_data : template = report_xml.report_webkit_data if not template : - raise except_osv(_('Webkit Report template not found !'), _('')) + raise except_osv(_('Error'),_('Webkit Report template not found !')) header = report_xml.webkit_header.html footer = report_xml.webkit_header.footer_html if not header and report_xml.header: @@ -210,43 +192,19 @@ class BVRWebKitParser(webkit_report.WebKitParser): _('Please set a header in company settings') ) if not report_xml.header : - #I know it could be cleaner ... - header = u""" - - - - - - - -""" - self.parser_instance.localcontext.update({'setLang':self.setLang}) - self.parser_instance.localcontext.update({'formatLang':self.formatLang}) + header = '' + default_head = addons.get_module_resource('report_webkit', 'default_header.html') + with open(default_head,'r') as f: + header = f.read() css = report_xml.webkit_header.css if not css : css = '' user = self.pool.get('res.users').browse(cursor, uid, uid) company = user.company_id - parse_template = template - #default_filters=['unicode', 'entity'] can be used to set global filter - body_mako_tpl = Template(parse_template ,input_encoding='utf-8', output_encoding='utf-8') + body_mako_tpl = mako_template(template) #BVR specific bvr_path = addons.get_module_resource(os.path.join('l10n_ch','report','bvr.mako')) - body_bvr_tpl = Template(file(bvr_path).read(), input_encoding='utf-8', output_encoding='utf-8') - + body_bvr_tpl = mako_template(file(bvr_path).read()) helper = report_helper.WebKitHelper(cursor, uid, report_xml.id, context) ##BVR Specific htmls = [] @@ -254,58 +212,48 @@ class BVRWebKitParser(webkit_report.WebKitParser): self.parser_instance.localcontext['objects'] = [obj] if not company.bvr_only: try: - html = body_mako_tpl.render( - helper=helper, + html = body_mako_tpl.render(helper=helper, css=css, _=self.translate_call, - **self.parser_instance.localcontext - ) + **self.parser_instance.localcontext) except Exception, e: raise Exception(exceptions.text_error_template().render()) htmls.append(html) if not company.invoice_only: try: - bvr = body_bvr_tpl.render( - helper=helper, - css=css, - _=self.translate_call, - **self.parser_instance.localcontext - ) + bvr = body_bvr_tpl.render(helper=helper, + css=css, + _=self.translate_call, + **self.parser_instance.localcontext) except Exception, e: raise Exception(exceptions.text_error_template().render()) htmls.append(bvr) head_mako_tpl = Template(header, input_encoding='utf-8', output_encoding='utf-8') try: - head = head_mako_tpl.render( - helper=helper, + head = head_mako_tpl.render(helper=helper, css=css, _debug=False, _=self.translate_call, - **self.parser_instance.localcontext - ) + **self.parser_instance.localcontext) except Exception, e: raise Exception(exceptions.text_error_template().render()) foot = False if footer and company.invoice_only : foot_mako_tpl = Template(footer, input_encoding='utf-8', output_encoding='utf-8') try: - foot = foot_mako_tpl.render( - helper=helper, + foot = foot_mako_tpl.render(helper=helper, css=css, _=self.translate_call, - **self.parser_instance.localcontext - ) + **self.parser_instance.localcontext) except Exception, e: raise Exception(exceptions.text_error_template().render()) if report_xml.webkit_debug : try: - deb = head_mako_tpl.render( - helper=helper, + deb = head_mako_tpl.render(helper=helper, css=css, _debug=html, _=self.translate_call, - **self.parser_instance.localcontext - ) + **self.parser_instance.localcontext) except Exception, e: raise Exception(exceptions.text_error_template().render()) return (deb, 'html') From 02b41a75ceb5df2ca4227de5839ebd46da0e5462 Mon Sep 17 00:00:00 2001 From: Yury Tello Date: Sun, 19 Feb 2012 14:10:02 -0500 Subject: [PATCH 004/282] [ADD] l10n_cl bzr revid: ytello@cubicerp.com-20120219191002-6yid2f812r4ypg05 --- addons/l10n_cl/__init__.py | 32 ++++ addons/l10n_cl/__openerp__.py | 51 ++++++ addons/l10n_cl/account_tax.xml | 34 ++++ addons/l10n_cl/account_tax_code.xml | 94 ++++++++++ addons/l10n_cl/i18n/es.po | 72 ++++++++ addons/l10n_cl/i18n/es_CL.po | 53 ++++++ addons/l10n_cl/i18n/l10n_cl.pot | 35 ++++ addons/l10n_cl/l10n_cl_chart.xml | 256 ++++++++++++++++++++++++++++ addons/l10n_cl/l10n_cl_wizard.xml | 15 ++ 9 files changed, 642 insertions(+) create mode 100644 addons/l10n_cl/__init__.py create mode 100644 addons/l10n_cl/__openerp__.py create mode 100644 addons/l10n_cl/account_tax.xml create mode 100644 addons/l10n_cl/account_tax_code.xml create mode 100644 addons/l10n_cl/i18n/es.po create mode 100644 addons/l10n_cl/i18n/es_CL.po create mode 100644 addons/l10n_cl/i18n/l10n_cl.pot create mode 100644 addons/l10n_cl/l10n_cl_chart.xml create mode 100644 addons/l10n_cl/l10n_cl_wizard.xml diff --git a/addons/l10n_cl/__init__.py b/addons/l10n_cl/__init__.py new file mode 100644 index 00000000000..92da5dbf966 --- /dev/null +++ b/addons/l10n_cl/__init__.py @@ -0,0 +1,32 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (c) 2011 Cubic ERP - Teradata SAC. (http://cubicerp.com). +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsability of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# garantees and support are strongly adviced to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################## + + + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_cl/__openerp__.py b/addons/l10n_cl/__openerp__.py new file mode 100644 index 00000000000..249bdb3ae48 --- /dev/null +++ b/addons/l10n_cl/__openerp__.py @@ -0,0 +1,51 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2011 Cubic ERP - Teradata SAC (). +# +# 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": "Argentina Localization Chart Account", + "version": "1.0", + "description": """ +Chilean accounting chart and tax localization. + +Plan contable chileno e impuestos de acuerdo a disposiciones vigentes + + """, + "author": "Cubic ERP", + "website": "http://cubicERP.com", + "category": "Localization/Account Charts", + "depends": [ + "account_chart", + ], + "data":[ + "account_tax_code.xml", + "l10n_cl_chart.xml", + "account_tax.xml", + "l10n_cl_wizard.xml", + ], + "demo_xml": [ + ], + "update_xml": [ + ], + "active": False, + "installable": True, + "certificate" : "", + 'images': ['images/config_chart_l10n_cl.jpeg','images/l10n_cl_chart.jpeg'], +} +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_cl/account_tax.xml b/addons/l10n_cl/account_tax.xml new file mode 100644 index 00000000000..1db0d2637f4 --- /dev/null +++ b/addons/l10n_cl/account_tax.xml @@ -0,0 +1,34 @@ + + + + + + + IVA 19% Venta + 0.190000 + percent + sale + + + + + + + + + + + IVA 19% Compra + 0.190000 + percent + purchase + + + + + + + + + + diff --git a/addons/l10n_cl/account_tax_code.xml b/addons/l10n_cl/account_tax_code.xml new file mode 100644 index 00000000000..95c91b60d78 --- /dev/null +++ b/addons/l10n_cl/account_tax_code.xml @@ -0,0 +1,94 @@ + + + + + + Chile Impuestos + + + Base Imponible + + + + Base Imponible - Ventas + + + + Ventas Gravadas con IVA + + + + Ventas NO Gravadas (Exoneradas) + + + + Ventas Gravadas Fuera de Ámbito + + + + Base Imponible - Compras + + + + Compras Gravadas con IVA + + + + Compras NO Gravadas (Exoneradas) + + + + Compras Gravadas Fuera de Ámbito + + + + + Impuesto General a las Ventas (IVA) Total a Pagar + + + + Impuesto Pagado + + + + Impuesto Pagado IVA + + -1 + + + Impuesto Pagado de Exonerados al IVA + + -1 + + + Impuesto Pagado Fuera de Ámbito + + -1 + + + Impuesto Cobrado + + + + Impuesto Cobrado IVA + + + + Impuesto Cobrado de Exonerados al IVA + + + + Impuesto Cobrado Fuera de Ámbito + + + + + Impuestos Directos a Pagar + + + + Impuesto a la Renta Primera Categoría a Pagar + + + + diff --git a/addons/l10n_cl/i18n/es.po b/addons/l10n_cl/i18n/es.po new file mode 100644 index 00000000000..f8b17197008 --- /dev/null +++ b/addons/l10n_cl/i18n/es.po @@ -0,0 +1,72 @@ +# Spanish translation for openobject-addons +# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2011-01-11 11:15+0000\n" +"PO-Revision-Date: 2011-01-10 13:46+0000\n" +"Last-Translator: Yury Tello \n" +"Language-Team: Spanish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2011-01-15 05:56+0000\n" +"X-Generator: Launchpad (build 12177)\n" + +#. module: l10n_cl +#: model:ir.module.module,description:l10n_cl.module_meta_information +msgid "" +"\n" +" Chilean Accounting : chart of Account\n" +" " +msgstr "" +"\n" +" Contabilidad Peruana : Plan de cuentas\n" +" " + +#. module: l10n_cl +#: model:ir.module.module,shortdesc:l10n_cl.module_meta_information +msgid "Chilean Chart of Account" +msgstr "Plan de cuentas de Chile" + +#. module: l10n_cl +#: model:ir.actions.todo,note:l10n_cl.config_call_account_template_in_minimal +msgid "" +"Generate Chart of Accounts from a Chart Template. You will be asked to pass " +"the name of the company, the chart template to follow, the no. of digits to " +"generate the code for your accounts and Bank account, currency to create " +"Journals. Thus,the pure copy of chart Template is generated.\n" +"\tThis is the same wizard that runs from Financial " +"Management/Configuration/Financial Accounting/Financial Accounts/Generate " +"Chart of Accounts from a Chart Template." +msgstr "" +"Generar el plan contable a partir de una plantilla de plan contable. Se le " +"pedirá el nombre de la compañia, la plantilla de plan contable a utilizar, " +"el número de dígitos para generar el código de las cuentas y de la cuenta " +"bancaria, la moneda para crear los diarios. Así pues, se genere una copia " +"exacta de la plantilla de plan contable.\n" +"\tEste es el mismo asistente que se ejecuta desde Contabilidad y finanzas / " +"Configuración / Contabilidad financiera / Cuentas financieras / Generar el " +"plan contable a partir de una plantilla de plan contable." + +#~ msgid "Liability" +#~ msgstr "Pasivo" + +#~ msgid "Asset" +#~ msgstr "Activo" + +#~ msgid "Closed" +#~ msgstr "Cerrado" + +#~ msgid "Income" +#~ msgstr "Ingreso" + +#~ msgid "Expense" +#~ msgstr "Gasto" + +#~ msgid "View" +#~ msgstr "Vista" diff --git a/addons/l10n_cl/i18n/es_CL.po b/addons/l10n_cl/i18n/es_CL.po new file mode 100644 index 00000000000..cd0a9f9c43e --- /dev/null +++ b/addons/l10n_cl/i18n/es_CL.po @@ -0,0 +1,53 @@ +# Spanish (Paraguay) translation for openobject-addons +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2011-01-11 11:15+0000\n" +"PO-Revision-Date: 2011-03-21 16:23+0000\n" +"Last-Translator: FULL NAME \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2011-03-22 04:36+0000\n" +"X-Generator: Launchpad (build 12559)\n" + +#. module: l10n_cl +#: model:ir.module.module,description:l10n_cl.module_meta_information +msgid "" +"\n" +" Chilean Accounting : chart of Account\n" +" " +msgstr "" +"\n" +" Contabilidad Chile : Plan de cuentas\n" +" " + +#. module: l10n_cl +#: model:ir.module.module,shortdesc:l10n_cl.module_meta_information +msgid "Chilean Chart of Account" +msgstr "Plan de cuentas de la Chile" + +#. module: l10n_cl +#: model:ir.actions.todo,note:l10n_cl.config_call_account_template_in_minimal +msgid "" +"Generate Chart of Accounts from a Chart Template. You will be asked to pass " +"the name of the company, the chart template to follow, the no. of digits to " +"generate the code for your accounts and Bank account, currency to create " +"Journals. Thus,the pure copy of chart Template is generated.\n" +"\tThis is the same wizard that runs from Financial " +"Management/Configuration/Financial Accounting/Financial Accounts/Generate " +"Chart of Accounts from a Chart Template." +msgstr "" +"Generar el plan contable a partir de una plantilla de plan contable. Se le " +"pedirá el nombre de la compañía, la plantilla de plan contable a utilizar, " +"el número de dígitos para generar el código de las cuentas y de la cuenta " +"bancaria, la moneda para crear los diarios. Así pues, se genere una copia " +"exacta de la plantilla de plan contable.\n" +"\tEste es el mismo asistente que se ejecuta desde Contabilidad y finanzas / " +"Configuración / Contabilidad financiera / Cuentas financieras / Generar el " +"plan contable a partir de una plantilla de plan contable." diff --git a/addons/l10n_cl/i18n/l10n_cl.pot b/addons/l10n_cl/i18n/l10n_cl.pot new file mode 100644 index 00000000000..9b3704b75e1 --- /dev/null +++ b/addons/l10n_cl/i18n/l10n_cl.pot @@ -0,0 +1,35 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * l10n_cl +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 6.1.0-rc1\n" +"Report-Msgid-Bugs-To: soporte@cubicerp.com\n" +"POT-Creation-Date: 2011-01-11 11:15:31+0000\n" +"PO-Revision-Date: 2011-01-11 11:15:31+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: l10n_cl +#: model:ir.module.module,description:l10n_cl.module_meta_information +msgid "\n" +" Chilean Accounting : chart of Account\n" +" " +msgstr "" + +#. module: l10n_cl +#: model:ir.module.module,shortdesc:l10n_cl.module_meta_information +msgid "Chilean Chart of Account" +msgstr "" + +#. module: l10n_cl +#: model:ir.actions.todo,note:l10n_cl.config_call_account_template_in_minimal +msgid "Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated.\n" +" This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template." +msgstr "" + diff --git a/addons/l10n_cl/l10n_cl_chart.xml b/addons/l10n_cl/l10n_cl_chart.xml new file mode 100644 index 00000000000..5b146eb067d --- /dev/null +++ b/addons/l10n_cl/l10n_cl_chart.xml @@ -0,0 +1,256 @@ + + + + + + + noneviewVistanone + + balanceBG_ACC_10Efectivo y Equivalentes al Efectivoasset + detailBG_ACC_20Otros Activos Financieros Corrientesasset + unreconciledBG_ACC_30Deudores Comercialesasset + unreconciledBG_ACC_50Otras Cuentas por Cobrarasset + balanceBG_ACC_60Inventariosasset + + detailBG_ACN_10Derechos por Cobrar No Corrienteasset + detailBG_ACN_40Otros Activos No Financierosasset + balanceBG_ACN_50Propiedades, Planta y Equipoasset + + unreconciledBG_PAC_10Otros Pasivos Financierosliability + unreconciledBG_PAC_20Cuentas por Pagar Comercialesliability + unreconciledBG_PAC_35Otras Cuentas por Pagarliability + unreconciledBG_PAC_40Otras Provisiones Corrientesliability + unreconciledBG_PAC_45Pasivos por Impuestos Corrientesliability + + unreconciledBG_PAN_10Otros Pasivos Financieros No Corrientesliability + unreconciledBG_PAN_20Otros Cuentas por Pagar No Corrientesliability + unreconciledBG_PAN_40Otras Provisiones No Corrientesliability + + balanceBG_PTN_10Patrimonio Netoliability + + noneEGP_FU_010Ingresos por Actividades Ordinariasincome + noneEGP_FU_030Costo de Ventasexpense + noneEGP_FU_040Gastos de Administraciónexpense + noneEGP_FU_050Costos por Distribuciónexpense + unreconciledEGP_FU_060Ingresos Financierosincome + noneEGP_FU_070Costos Financierosexpense + noneEGP_FU_080Otros Ingresosincome + noneEGP_FU_090Otros Gastosexpense + noneEGP_FU_120Gasto Impuesto a las Rentaexpense + noneEGP_FU_160Ganancia (Pérdida)income + + noneEGP_NA_010Compras de Activo Fijonone + + noneORDCuentas de Ordennone + + noneNCLASIFICADOCuentas No Clasificadasnone + + + + + Argentina + pcge + + view + + + inventario del Balance General + .1.BG + + + view + + + ACTIVOS1view + Activo Circulante11view + Activo Circulante - Caja111view + Activo Circulante - Caja / efectivo CLP111.001liquidity + Activo Circulante - Moneda Extranjera112view + Activo Circulante - Caja / efectivo USD112.001liquidity + Activo Circulante - Fondos fijos113view + Activo Circulante - Fondos fijos / caja chica 01 CLP113.001liquidity + Activo Circulante - Bancos114view + Activo Circulante.../ BCO. CTA CTE CLP114.001liquidity + Activo Circulante - Valores a Depositar 115other + Activo Circulante - Recaudaciones a Depositar 116other + Documentos por Cobrar12view + Documentos por Cobrar / Deudores por Ventas121receivable1 + Documentos por Cobrar / Deudores Morosos122receivable1 + Documentos por Cobrar / Deudores en Gestión Judicial123receivable + Documentos por Cobrar / Deudores Varios124receivable + Documentos por Cobrar / (-) Previsión para Incobrables125receivable1 + Cuentas por Cobrar13view + Cuentas por Cobrar / Préstamos otorgados131receivable + Cuentas por Cobrar / Anticipos a Proveedores132receivable + Cuentas por Cobrar / Anticipo de Impuestos133receivable + Cuentas por Cobrar / Anticipo al Personal134receivable + Cuentas por Cobrar / Alquileres Pagados por Adelantado135receivable + Cuentas por Cobrar / Intereses Pagados por Adelantado136receivable + Cuentas por Cobrar / Accionistas137receivable + Cuentas por Cobrar / (-) Previsión para Descuentos138receivable + Cuentas por Cobrar / (-) Intereses (+) a Devengar139receivable + Inversiones Financieras14view + Inversiones / Acciones Transitorias141other + Inversiones / Acciones Permanentes142other + Inversiones / Títulos Públicos143other + Inversiones / (-) Previsión para Devalorización de Acciones144other + Existencias15view + Existencias - Mercaderías151view + Existencias - Mercaderías / Categoria de productos 01151.01other + Existencias - Mercaderías en Tránsito152other + Materias primas153other + Productos en Curso de Elaboración154other + Productos Elaborados155other + Materiales Varios 156other + (-) Previsión para Desvalorización de Existencias157other + Activo Fijo16view + Activo Fijo / Inmuebles161other + Activo Fijo / Maquinaria162other + Activo Fijo / Equipos163other + Activo Fijo / Material Rodante Motorizado164other + Activo Fijo / (-) Depreciación Acumulada165other + Activo Intangible17view + Activo Intangible / Derecho de Llaves171other + Activo Intangible / Concesiones y Franquicias172other + Activo Intangible / Marcas y Patentes de Invención173other + Activo Intangible / (-) Amortización Acumulada174other + PASIVOS2view + Cuentas por Pagar21view + Cuentas por Pagar / Proveedores211payable1 + Cuentas por Pagar / Anticipos de Clientes212payable1 + Cuentas por Pagar / (-) Intereses a Devengar por Compras al Crédito213payable1 + Pasivo Circulante22view + Pasivo Circulante / Adelantos en Cuenta Corriente221payable + Pasivo Circulante / Prestamos222payable + Pasivo Circulante / Obligaciones a Pagar223payable + Pasivo Circulante / Intereses a Pagar224payable + Pasivo Circulante / Debentures Emitidos225payable + Impuestos por Pagar23view + Impuestos por Pagar / IVA a Pagar231other + Impuestos por Pagar / Impuesto a la Renta a Pagar232other + Remuneraciones por Pagar24view + Remuneraciones por Pagar / Sueldos a Pagar241payable + Remuneraciones por Pagar / Cargas Sociales a Pagar242payable + Remuneraciones por Pagar / Provisión para Sueldo Anual Complementario243payable + Remuneraciones por Pagar / Retenciones a Depositar244payable + Otras Cuentas por Pagar25view + Otras Cuentas por Pagar / Acreedores Varios251payable + Otras Cuentas por Pagar / Dividendos a Pagar252payable + Otras Cuentas por Pagar / Cobros por Adelantado253payable + Otras Cuentas por Pagar / Honorarios Directores y Síndicos a Pagar254payable + Provisiones26view + Provisiones / Previsión Indemnización por Despidos261payable + Provisiones / Previsión para juicios Pendientes262payable + Provisiones / Previsión para Garantías por Service263payable + PATRIMONIO3view + Capital31view + Capital / Capital Propio311other + Capital / Acciones en Circulación312other + Capital / Dividendos a Distribuir en Acciones313other + Capital / (-) Descuento de Emisión de Acciones314other + Aportes No Capitalizados32view + Aportes No Capitalizados / Primas de Emsión321other + Aportes No Capitalizados / Aportes Irrevocables Futura Suscripción de Acciones322other + Ajustes al Patrimonio33view + Ajustes al Patrimonio / Revaluo Técnico de Activo Fijo331other + Futuras Eventualidades34view + Reserva Legal341other + Reserva Estatutaria342other + Reserva Facultativa343other + Reserva para Renovación de Activo Fijo344other + Resultados No Asignados35view + Resultados Acumulados351other + Resultados Acumulados del Ejercicio Anterior352other + Utilidades y Pérdidas del Ejercicio353other + Resultado del Ejercicio354other + + + Cuentas de Resultado + .2.GP + + + view + + + RESULTADO GANANCIA4view + Ingresos de Explotación41view + Ventas411view + Ventas - Categoria de productos 01411.01other + Intereses gananados, obtenidos, percibidos412other + Alquileres gananados, obtenidos, percibidos413other + Comisiones gananados, obtenidos, percibidos414other + Descuentos gananados, obtenidos, percibidos415other + Interese sobre Inversiones416other + Honorarios gananados, obtenidos, percibidos417other + Ganancia Venta de Acciones418other + Ingresos Fuera de Explotación42view + Recupero de Rezagos421other + Recupero de Deudores Incobrables422other + Ganancia Venta de Activo Fijo423other + Donaciones obtenidas, ganandas, percibidas424other + Ganancia Venta Inversiones Permanentes425other + RESULTADO PÉRDIDA5view + Egresos de Explotación51view + Costo de Mercaderías Vendidas511view + Costo de Mercaderías Vendidas - Categoria de productos 01511.01other + Gastos en Depreciación de Activo Fijo512other + Gastos en Amortización513other + Gastos en Sueldos y Jornales514other + Gastos en Cargas Sociales515other + Gastos en Impuestos516other + Gastos Bancarios517other + Gastos en Servicios Públicos518other + Gastos de Publicidad y Propaganda519other + Egresos Fuera de Explotación52view + Gastos en Siniestros521other + Donaciones Cedidas, Otorgadas522other + Pérdida Venta Activo Fijo523other + + + Cuentas de Movimiento + .3.CC + + + view + + + Compras61view + Compras - Categoria de productos 0161.01other + Costos de Producción62other + Gastos de Administración63other + Gastos de Comercialización64other + + + Cuentas de Orden + .4.CO + + + view + + + CUENTAS DE ORDEN DEUDORAS71view + Mercaderias Recibidas en Consignación711other + Depósito de Valores Recibos en Garantía712other + Garantias Otorgadas713other + Documentos Descontados714other + Documentos Endosados715other + CUENTAS DE ORDEN ACREEDORAS72view + Comitente por Mercaderias Recibidas en Consignación721other + Acreedor por Garantías Otorgadas722other + Acreedor por Documentos Descontados723other + + + Chile - Plan de Cuentas + + + + + + + + + + + + + diff --git a/addons/l10n_cl/l10n_cl_wizard.xml b/addons/l10n_cl/l10n_cl_wizard.xml new file mode 100644 index 00000000000..191230c5010 --- /dev/null +++ b/addons/l10n_cl/l10n_cl_wizard.xml @@ -0,0 +1,15 @@ + + + + + + Generate Chart of Accounts from a Chart Template + Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated. + This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template. + + + automatic + + + + From 44fec74adfbf53e4e9a02461b45b8e1b0525441d Mon Sep 17 00:00:00 2001 From: Yury Tello Date: Tue, 21 Feb 2012 15:53:28 -0500 Subject: [PATCH 005/282] [MOD] Ajust title bzr revid: ytello@cubicerp.com-20120221205328-s5y8iz1hjnlkj4hp --- addons/l10n_cl/__openerp__.py | 2 +- addons/l10n_cl/l10n_cl_chart.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/l10n_cl/__openerp__.py b/addons/l10n_cl/__openerp__.py index 249bdb3ae48..8c1e1e45b50 100644 --- a/addons/l10n_cl/__openerp__.py +++ b/addons/l10n_cl/__openerp__.py @@ -19,7 +19,7 @@ # ############################################################################## { - "name": "Argentina Localization Chart Account", + "name": "Chile Localization Chart Account", "version": "1.0", "description": """ Chilean accounting chart and tax localization. diff --git a/addons/l10n_cl/l10n_cl_chart.xml b/addons/l10n_cl/l10n_cl_chart.xml index 5b146eb067d..8bc4272c2eb 100644 --- a/addons/l10n_cl/l10n_cl_chart.xml +++ b/addons/l10n_cl/l10n_cl_chart.xml @@ -48,7 +48,7 @@ - Argentina + Chile pcge view From 1bf3b3b515737f6fd929250cf7f7c0d1e03a1ddf Mon Sep 17 00:00:00 2001 From: Date: Thu, 1 Mar 2012 13:21:24 +0100 Subject: [PATCH 006/282] [FIX] use a local variable row instead of res bzr revid: guewen.baconnier@camptocamp.com-20120301122124-0izdqntr76ruqtde --- addons/account/account.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index c1a30967aea..49ecf61ee51 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -315,8 +315,8 @@ class account_account(osv.osv): self.logger.notifyChannel('addons.'+self._name, netsvc.LOG_DEBUG, 'Status: %s'%cr.statusmessage) - for res in cr.dictfetchall(): - accounts[res['id']] = res + for row in cr.dictfetchall(): + accounts[row['id']] = row # consolidate accounts with direct children children_and_consolidated.reverse() From 79aa02650c22d951e7245cbf7a9c77574deeb895 Mon Sep 17 00:00:00 2001 From: "Amit (OpenERP)" Date: Sat, 28 Apr 2012 18:21:25 +0530 Subject: [PATCH 007/282] [FIX] product : Set the missing dependecy of mail module to product module lp bug: https://launchpad.net/bugs/990474 fixed bzr revid: amp@tinyerp.com-20120428125125-1unkvn70pz1wys6i --- addons/product/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/product/__openerp__.py b/addons/product/__openerp__.py index 9b4d2cadee1..918545aa783 100644 --- a/addons/product/__openerp__.py +++ b/addons/product/__openerp__.py @@ -25,7 +25,7 @@ "version" : "1.1", "author" : "OpenERP SA", 'category': 'Sales Management', - "depends" : ["base", "process", "decimal_precision"], + "depends" : ["base", "process", "decimal_precision", "mail"], "init_xml" : [], "demo_xml" : ["product_demo.xml"], "description": """ From 119cb3e9b51226951e42fce05297c3fbb06c521a Mon Sep 17 00:00:00 2001 From: "Ravish Murari (OpenERP)" Date: Mon, 30 Apr 2012 14:50:06 +0530 Subject: [PATCH 008/282] [FIX]change in category of account_anglo_saxon--fixes=lp:985823 bzr revid: rmu@tinyerp.com-20120430092006-nejh5d8mt5eiyhn1 --- addons/account_anglo_saxon/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_anglo_saxon/__openerp__.py b/addons/account_anglo_saxon/__openerp__.py index 2c10fcc7a19..34fdba75567 100644 --- a/addons/account_anglo_saxon/__openerp__.py +++ b/addons/account_anglo_saxon/__openerp__.py @@ -36,7 +36,7 @@ when the invoice is created to transfer this amount to the debtor or creditor ac Secondly, price differences between actual purchase price and fixed product standard price are booked on a separate account""", "images": ["images/account_anglo_saxon.jpeg"], "depends": ["product", "purchase"], - "category": "Hidden/Dependency", + "category": "Accounting & Finance", "init_xml": [], "demo_xml": [], "update_xml": ["product_view.xml",], From 8a377a190d30176b04eeaaae5d275cb197a17626 Mon Sep 17 00:00:00 2001 From: paulius <> Date: Tue, 1 May 2012 11:44:12 +0530 Subject: [PATCH 009/282] [FIX] improve rounding at invoice subtotal field--fixes=lp:977300 bzr revid: rmu@tinyerp.com-20120501061412-on9rz3lkbm7oqad3 --- addons/account/account.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/account/account.py b/addons/account/account.py index 75bfc891980..63f0e0ec1a7 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -29,6 +29,7 @@ import pooler from osv import fields, osv import decimal_precision as dp from tools.translate import _ +from tools import float_round def check_cycle(self, cr, uid, ids, context=None): """ climbs the ``self._table.parent_id`` chains for 100 levels or @@ -2069,7 +2070,7 @@ class account_tax(osv.osv): } """ precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account') - totalin = totalex = round(price_unit * quantity, precision) + totalin = totalex = float_round(price_unit * quantity, precision) tin = [] tex = [] for tax in taxes: From cef801058f56c81b68c25d443524105faa69c25b Mon Sep 17 00:00:00 2001 From: "Jagdish Panchal (Open ERP)" Date: Mon, 14 May 2012 14:59:12 +0530 Subject: [PATCH 010/282] [IMP] l10n_in: improve code for the Indian chart of account add new file installer.py, installer_view.xml, l10n_in_partnership_private_chart.xml, l10n_in/l10n_in_public_firm_chart.xmlxml bzr revid: jap@tinyerp.com-20120514092912-lwbg1r8jy904o7u2 --- addons/l10n_in/__init__.py | 1 + addons/l10n_in/__openerp__.py | 7 +- addons/l10n_in/installer.py | 71 +++ addons/l10n_in/installer_view.xml | 16 + .../l10n_in_partnership_private_chart.xml | 413 +++++++++++++ addons/l10n_in/l10n_in_public_firm_chart.xml | 543 ++++++++++++++++++ 6 files changed, 1050 insertions(+), 1 deletion(-) create mode 100644 addons/l10n_in/installer.py create mode 100644 addons/l10n_in/installer_view.xml create mode 100644 addons/l10n_in/l10n_in_partnership_private_chart.xml create mode 100644 addons/l10n_in/l10n_in_public_firm_chart.xml diff --git a/addons/l10n_in/__init__.py b/addons/l10n_in/__init__.py index 19de03b504c..f97bda7fb89 100644 --- a/addons/l10n_in/__init__.py +++ b/addons/l10n_in/__init__.py @@ -27,5 +27,6 @@ # ############################################################################## +import 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 c13139f6736..9be4d35705e 100644 --- a/addons/l10n_in/__openerp__.py +++ b/addons/l10n_in/__openerp__.py @@ -36,8 +36,13 @@ Indian accounting chart and localization. ], "demo_xml": [], "update_xml": [ - "l10n_in_chart.xml", +# "l10n_in_chart.xml", + "l10n_in_partnership_private_chart.xml", + "installer_view.xml", + "l10n_in_public_firm_chart.xml", "l10n_in_wizard.xml", + + ], "auto_install": False, "installable": True, diff --git a/addons/l10n_in/installer.py b/addons/l10n_in/installer.py new file mode 100644 index 00000000000..e4242ad5e91 --- /dev/null +++ b/addons/l10n_in/installer.py @@ -0,0 +1,71 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2009 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 fields, osv +import netsvc +import tools +from os.path import join as opj + +class l10n_installer(osv.osv_memory): + _inherit = 'account.installer' + _columns = { + 'company_type':fields.selection([('partnership_private_company', 'Partnership/Private Firm'), + ('public_company', 'Public Company')], 'Company Type'), + } + + _defaults = { + 'company_type': 'public_company', + } + + def execute_simple(self, cr, uid, ids, context=None): + if context is None: + context = {} + fy_obj = self.pool.get('account.fiscalyear') + for res in self.read(cr, uid, ids, context=context): + if res['charts'] =='l10n_in' and res['company_type']=='public_company': + fp = tools.file_open(opj('l10n_in', 'l10n_in_public_firm_chart.xml')) + tools.convert_xml_import(cr, 'l10n_in', fp, {}, 'init', True, None) + fp.close() + if res['charts'] =='l10n_in' and res['company_type']=='partnership_private_company': + fp = tools.file_open(opj('l10n_in', 'l10n_in_partnership_private_chart.xml')) + tools.convert_xml_import(cr, 'l10n_in', fp, {}, 'init', True, None) + fp.close() + if 'date_start' in res and 'date_stop' in res: + f_ids = fy_obj.search(cr, uid, [('date_start', '<=', res['date_start']), ('date_stop', '>=', res['date_stop']), ('company_id', '=', res['company_id'][0])], context=context) + if not f_ids: + name = code = res['date_start'][:4] + if int(name) != int(res['date_stop'][:4]): + name = res['date_start'][:4] +'-'+ res['date_stop'][:4] + code = res['date_start'][2:4] +'-'+ res['date_stop'][2:4] + vals = { + 'name': name, + 'code': code, + 'date_start': res['date_start'], + 'date_stop': res['date_stop'], + 'company_id': res['company_id'][0] + } + fiscal_id = fy_obj.create(cr, uid, vals, context=context) + if res['period'] == 'month': + fy_obj.create_period(cr, uid, [fiscal_id]) + elif res['period'] == '3months': + fy_obj.create_period3(cr, uid, [fiscal_id]) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_in/installer_view.xml b/addons/l10n_in/installer_view.xml new file mode 100644 index 00000000000..cfac5ed8513 --- /dev/null +++ b/addons/l10n_in/installer_view.xml @@ -0,0 +1,16 @@ + + + + account.installer.form + account.installer + form + + + + + + + + + + diff --git a/addons/l10n_in/l10n_in_partnership_private_chart.xml b/addons/l10n_in/l10n_in_partnership_private_chart.xml new file mode 100644 index 00000000000..ca009cf0c6e --- /dev/null +++ b/addons/l10n_in/l10n_in_partnership_private_chart.xml @@ -0,0 +1,413 @@ + + + + + + + + Indian Chart of Account Partnership/Private firm + 0 + view + + + + + + + Balance Sheet + 1 + view + + + + + + + + + Assets + 10 + view + + + + + + + Cash + 101 + liquidity + + + + Checking account balance (as shown in company records), currency, coins, checks received from customers but not yet deposited. + + + + Accounts Receivable + 120 + receivable + + + + + + + Merchandise Inventory + 140 + other + + + + + + + Supplies + 150 + other + + + + + + + Prepaid Insurance + 160 + other + + + + + + + Land + 170 + other + + + + + + + Accumulated Depreciation - Buildings + 178 + other + + + + + + + Equipment + 180 + other + + + + + + + Accumulated Depreciation - Equipment + 188 + other + + + + + + + + + Liabilities + 20 + view + + + + + + + Notes Payable + 210 + other + + + + + + + Accounts Payable + 215 + payable + + + + + + + Wages Payable + 220 + other + + + + + + + Interest Payable + 230 + other + + + + + + + Unearned Revenues + 240 + other + + + + + + + Mortgage Loan Payable + 250 + other + + + + + + + + + Owner's Equity Accounts + 29 + view + + + + + + + Mary Smith, Capital + 290 + other + + + + + + + Mary Smith, Drawing + 295 + other + + + + + + + + + Profit And Loss Account + 3 + view + + + + + + + + + Income + 30 + view + + + + + + + + + + Operating Revenue Accounts + 31 + view + + + + + + + Service Revenues + 310 + other + + + + + + + + Non-Operating Revenue and Gains + 80 + view + + + + + + + Interest Revenues + 810 + other + + + + + + + Gain on Sale of Assets + 910 + other + + + + + + + + + Expense + 50 + view + + + + + + + Operating Expense Accounts + 51 + view + + + + + + + Salaries Expense + 500 + other + + + + + + + Wages Expense + 510 + other + + + + + + + Supplies Expense + 540 + other + + + + + + + Rent Expense + 560 + other + + + + + + + Utilities Expense + 570 + other + + + + + + + Telephone Expense + 576 + other + + + + + + + Advertising Expense + 610 + other + + + + + + + + Depreciation Expense + 750 + other + + + + + + + + + Non-Operating Expenses and Losses + 90 + view + + + + + + + Loss on Sale of Assets + 960 + other + + + + + + + + + Indian Chart of Account Partnership/Private firm + + + + + + + + + + + + + + diff --git a/addons/l10n_in/l10n_in_public_firm_chart.xml b/addons/l10n_in/l10n_in_public_firm_chart.xml new file mode 100644 index 00000000000..2bd8a67f346 --- /dev/null +++ b/addons/l10n_in/l10n_in_public_firm_chart.xml @@ -0,0 +1,543 @@ + + + + + + + + + Indian Chart of Account Public firm + 0 + view + + + + + + + Balance Sheet + 1 + view + + + + + + + + Assets + 10 + view + + + + + + + Current Assets + 10000 + view + + + + + + + Cash - Regular Checking + 10100 + liquidity + + + + + + + Cash - Payroll Checking + 10200 + liquidity + + + + + + + Petty Cash Fund + 10600 + liquidity + + + + + + + Accounts Receivable + 12100 + receivable + + + + + + + Allowance for Doubtful Accounts + 12500 + other + + + + + + + Inventory + 13100 + other + + + + + + + Supplies + 14100 + other + + + + + + + Prepaid Insurance + 15300 + other + + + + + + + + + Liabilities + 20 + view + + + + + + + Current Liabilities + 20000 + view + + + + + + + Notes Payable - Credit Line #1 + 20100 + other + + + + + + + Notes Payable - Credit Line #2 + 20200 + other + + + + + + + Accounts Payable + 21000 + payable + + + + + + + Wages Payable + 22100 + other + + + + + + + Interest Payable + 23100 + other + + + + + + + Unearned Revenues + 24500 + other + + + + + + + + Long-term Liabilities + 25000 + view + + + + + + + Mortgage Loan Payable + 25100 + other + + + + + + + Bonds Payable + 25600 + other + + + + + + + Discount on Bonds Payable + 25650 + other + + + + + + + Stockholders' Equity + 27000 + view + + + + + + + Common Stock, No Par + 27100 + other + + + + + + + Retained Earnings + 27500 + other + + + + + + + Treasury Stock + 29500 + other + + + + + + + + + + + Profit And Loss Account + 3 + view + + + + + + + + + Income + 30 + view + + + + + + + + + Operating Revenues + 30000 + view + + + + + + + Sales - Division #1, Product Line 010 + 31010 + other + + + + + + + Sales - Division #1, Product Line 022 + 31022 + other + + + + + + + Sales - Division #2, Product Line 015 + 32015 + other + + + + + + + Sales - Division #3, Product Line 110 + 33110 + other + + + + + + + + Non-Operating Revenue and Gains + 90000 + view + + + + + + + Gain on Sale of Assets + 91800 + other + + + + + + + + + Expense + 40 + view + + + + + + + + + + Cost of Goods Sold + 40000 + view + + + + + + + + COGS - Division #1, Product Line 010 + 41010 + other + + + + + + + COGS - Division #1, Product Line 022 + 41022 + other + + + + + + + COGS - Division #2, Product Line 015 + 42015 + other + + + + + + + COGS - Division #3, Product Line 110 + 43110 + other + + + + + + + + + Marketing Expenses + 50000 + view + + + + + + + Marketing Dept. Salaries + 50100 + other + + + + + + + Marketing Dept. Payroll Taxes + 50150 + other + + + + + + + Marketing Dept. Supplies + 50200 + other + + + + + + + Marketing Dept. Telephone + 50600 + other + + + + + + + + + Payroll Dept. Expenses + 59000 + view + + + + + + + Payroll Dept. Salaries + 59100 + other + + + + + + + Payroll Dept. Payroll Taxes + 59150 + other + + + + + + + Payroll Dept. Supplies + 59200 + other + + + + + + + Payroll Dept. Telephone + 59600 + other + + + + + + + + + Non-Operating Expenses and Losses + 96000 + view + + + + + + + Loss on Sale of Assets + 96100 + other + + + + + + + + + India - Chart of Accounts Public firm + + + + + + + + + + + + From 9ce89b8af3ca6d479e74f8fb909f62b2b718389f Mon Sep 17 00:00:00 2001 From: "Jagdish Panchal (Open ERP)" Date: Tue, 15 May 2012 10:26:41 +0530 Subject: [PATCH 011/282] [IMP] l10n_in: improve code and add new file account_tax_code_template.xml,account_wizard.py, account_wizard_view.xml bzr revid: jap@tinyerp.com-20120515045641-f509ihbt1gwnwpfx --- addons/l10n_in/__init__.py | 1 + addons/l10n_in/__openerp__.py | 6 ++- addons/l10n_in/account_tax.xml | 24 +++++----- addons/l10n_in/account_tax_code_template.xml | 36 +++++++++++++++ addons/l10n_in/account_wizard.py | 35 ++++++++++++++ addons/l10n_in/account_wizard_view.xml | 21 +++++++++ .../l10n_in_partnership_private_chart.xml | 46 +++++++++++++++++-- addons/l10n_in/l10n_in_public_firm_chart.xml | 5 +- 8 files changed, 155 insertions(+), 19 deletions(-) create mode 100644 addons/l10n_in/account_tax_code_template.xml create mode 100644 addons/l10n_in/account_wizard.py create mode 100644 addons/l10n_in/account_wizard_view.xml diff --git a/addons/l10n_in/__init__.py b/addons/l10n_in/__init__.py index f97bda7fb89..9eb002375e0 100644 --- a/addons/l10n_in/__init__.py +++ b/addons/l10n_in/__init__.py @@ -28,5 +28,6 @@ ############################################################################## import installer +import account_wizard # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_in/__openerp__.py b/addons/l10n_in/__openerp__.py index 9be4d35705e..a0b8f990531 100644 --- a/addons/l10n_in/__openerp__.py +++ b/addons/l10n_in/__openerp__.py @@ -39,10 +39,12 @@ Indian accounting chart and localization. # "l10n_in_chart.xml", "l10n_in_partnership_private_chart.xml", "installer_view.xml", + "account_tax_code_template.xml", +# "account_tax_code.xml", "l10n_in_public_firm_chart.xml", + "account_tax.xml", "l10n_in_wizard.xml", - - + "account_wizard_view.xml", ], "auto_install": False, "installable": True, diff --git a/addons/l10n_in/account_tax.xml b/addons/l10n_in/account_tax.xml index 80f1233f498..f4a62e4435e 100644 --- a/addons/l10n_in/account_tax.xml +++ b/addons/l10n_in/account_tax.xml @@ -3,17 +3,19 @@ - - PPn (10%)(10.0%) - 0.100000 + + Sale Central + + 0.12 percent - - - - - - - - + + + + + + + + + diff --git a/addons/l10n_in/account_tax_code_template.xml b/addons/l10n_in/account_tax_code_template.xml new file mode 100644 index 00000000000..466d3f147b4 --- /dev/null +++ b/addons/l10n_in/account_tax_code_template.xml @@ -0,0 +1,36 @@ + + + + + + + Tax balance to pay + + + + Tax Due (Tax to pay) + + + + + Tax payable + + + + + Tax bases + + + + Base of taxed sales + + + + + + Base of taxed purchases + + + + + diff --git a/addons/l10n_in/account_wizard.py b/addons/l10n_in/account_wizard.py new file mode 100644 index 00000000000..eb6f0dd1491 --- /dev/null +++ b/addons/l10n_in/account_wizard.py @@ -0,0 +1,35 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Author: Nicolas Bessi. Copyright Camptocamp SA +# Donors: Hasa Sàrl, Open Net Sàrl and Prisme Solutions Informatique SA +# +# 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 . +# +############################################################################## +import tools +from osv import osv +from osv import fields, osv + +class account_wizard(osv.osv_memory): + _inherit ='wizard.multi.charts.accounts' + _columns = { + 'sales_tax_central': fields.boolean('Sales tax central'), + 'vat_resellers': fields.boolean('VAT resellers'), + 'service_tax': fields.boolean('Service tax'), + 'excise_duty': fields.boolean('Excise duty'), + } + + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_in/account_wizard_view.xml b/addons/l10n_in/account_wizard_view.xml new file mode 100644 index 00000000000..7af266c7a81 --- /dev/null +++ b/addons/l10n_in/account_wizard_view.xml @@ -0,0 +1,21 @@ + + + + + + Generate Chart of Accounts from a Chart Template + wizard.multi.charts.accounts + form + + + + + + + + + + + + + diff --git a/addons/l10n_in/l10n_in_partnership_private_chart.xml b/addons/l10n_in/l10n_in_partnership_private_chart.xml index ca009cf0c6e..63853401468 100644 --- a/addons/l10n_in/l10n_in_partnership_private_chart.xml +++ b/addons/l10n_in/l10n_in_partnership_private_chart.xml @@ -5,7 +5,7 @@ - Indian Chart of Account Partnership/Private firm + Partnership/Private Firm Chart of Account 0 view @@ -40,7 +40,7 @@ - Checking account balance (as shown in company records), currency, coins, checks received from customers but not yet deposited. + Checking account balance (as shown in company records), currency, coins, checks received from customers but not yet deposited. @@ -50,6 +50,7 @@ + Amounts owed to the company for services performed or products sold but not yet paid for. @@ -59,6 +60,7 @@ + Cost of merchandise purchased but has not yet been sold. @@ -68,6 +70,7 @@ + Cost of supplies that have not yet been used. Supplies that have been used are recorded in Supplies Expense. @@ -77,6 +80,7 @@ + Cost of insurance that is paid in advance and includes a future accounting period. @@ -86,7 +90,18 @@ - + Cost to acquire and prepare land for use by the company. + + + + Buildings + 175 + other + + + + Cost to purchase or construct buildings for use by the company. + Accumulated Depreciation - Buildings @@ -95,6 +110,7 @@ + Amount of the buildings' cost that has been allocated to Depreciation Expense since the time the building was acquired. @@ -104,6 +120,7 @@ + Cost to acquire and prepare equipment for use by the company. @@ -113,6 +130,7 @@ + Amount of equipment's cost that has been allocated to Depreciation Expense since the time the equipment was acquired. @@ -133,6 +151,7 @@ + The amount of principal due on a formal written promise to pay. Loans from banks are included in this account. @@ -142,6 +161,7 @@ + Amount owed to suppliers who provided goods and services to the company but did not require immediate payment in cash. @@ -151,6 +171,7 @@ + Amount owed to employees for hours worked but not yet paid. @@ -160,6 +181,7 @@ + Amount owed for interest on Notes Payable up until the date of the balance sheet. This is computed by multiplying the amount of the note times the effective interest rate times the time period. @@ -169,6 +191,7 @@ + Amounts received in advance of delivering goods or providing services. When the goods are delivered or services are provided, this liability amount decreases. @@ -178,6 +201,7 @@ + A formal loan that involves a lien on real estate until the loan is repaid. @@ -198,6 +222,7 @@ + Amount the owner invested in the company (through cash or other assets) plus earnings of the company not withdrawn by the owner. @@ -207,6 +232,7 @@ + Amount that the owner of the sole proprietorship has withdrawn for personal use during the current accounting year. At the end of the year, the amount in this account will be transferred into Mary Smith, Capital (account 290). @@ -250,6 +276,7 @@ + Amounts earned from providing services to clients, either for cash or on credit. When a service is provided on credit, both this account and Accounts Receivable will increase. When a service is provided for immediate cash, both this account and Cash will increase. @@ -269,6 +296,7 @@ + Interest and dividends earned on bank accounts, investments or notes receivable. This account is increased when the interest is earned and either Cash or Interest Receivable is also increased. @@ -278,6 +306,7 @@ + Occurs when the company sells one of its assets (other than inventory) for more than the asset's book value. @@ -307,6 +336,7 @@ + Expenses incurred for the work performed by salaried employees during the accounting period. These employees normally receive a fixed amount on a weekly, monthly, or annual basis. @@ -316,6 +346,7 @@ + Expenses incurred for the work performed by non-salaried employees during the accounting period. These employees receive an hourly rate of pay. @@ -325,6 +356,7 @@ + Cost of supplies used up during the accounting period. @@ -334,6 +366,7 @@ + Cost of occupying rented facilities during the accounting period. @@ -343,6 +376,7 @@ + Costs for electricity, heat, water, and sewer that were used during the accounting period. @@ -352,6 +386,7 @@ + Cost of telephone used during the current accounting period. @@ -361,6 +396,7 @@ + Costs incurred by the company during the accounting period for ads, promotions, and other selling and expenses (other than salaries). @@ -371,6 +407,7 @@ + Cost of long-term assets allocated to expense during the current accounting period. @@ -391,12 +428,13 @@ + Occurs when the company sells one of its assets (other than inventory) for less than the asset's book value. - Indian Chart of Account Partnership/Private firm + Partnership/Private Firm Chart of Account diff --git a/addons/l10n_in/l10n_in_public_firm_chart.xml b/addons/l10n_in/l10n_in_public_firm_chart.xml index 2bd8a67f346..297e2947352 100644 --- a/addons/l10n_in/l10n_in_public_firm_chart.xml +++ b/addons/l10n_in/l10n_in_public_firm_chart.xml @@ -6,7 +6,7 @@ - Indian Chart of Account Public firm + Public Firm Chart of Account 0 view @@ -528,8 +528,9 @@ - India - Chart of Accounts Public firm + Public Firm Chart of Account + From 9e4dadab42723953b82638f0b748f0af50345695 Mon Sep 17 00:00:00 2001 From: "Jagdish Panchal (Open ERP)" Date: Wed, 16 May 2012 11:55:29 +0530 Subject: [PATCH 012/282] [IMP] l10n_in: improve code bzr revid: jap@tinyerp.com-20120516062529-o1lip88uk38bmy33 --- addons/l10n_in/__init__.py | 2 +- addons/l10n_in/__openerp__.py | 7 ++---- ...izard.py => account_multi_chart_wizard.py} | 20 +++++++++++++---- ...ml => account_multi_chart_wizard_view.xml} | 4 ++-- addons/l10n_in/account_tax_code_template.xml | 22 ++++++++++++------- addons/l10n_in/installer.py | 12 +++++----- .../l10n_in_partnership_private_chart.xml | 2 +- addons/l10n_in/l10n_in_public_firm_chart.xml | 8 +++---- 8 files changed, 46 insertions(+), 31 deletions(-) rename addons/l10n_in/{account_wizard.py => account_multi_chart_wizard.py} (58%) rename addons/l10n_in/{account_wizard_view.xml => account_multi_chart_wizard_view.xml} (87%) diff --git a/addons/l10n_in/__init__.py b/addons/l10n_in/__init__.py index 9eb002375e0..db0c795ae73 100644 --- a/addons/l10n_in/__init__.py +++ b/addons/l10n_in/__init__.py @@ -28,6 +28,6 @@ ############################################################################## import installer -import account_wizard +import account_multi_chart_wizard # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_in/__openerp__.py b/addons/l10n_in/__openerp__.py index a0b8f990531..ba901562a0b 100644 --- a/addons/l10n_in/__openerp__.py +++ b/addons/l10n_in/__openerp__.py @@ -36,15 +36,12 @@ Indian accounting chart and localization. ], "demo_xml": [], "update_xml": [ -# "l10n_in_chart.xml", "l10n_in_partnership_private_chart.xml", - "installer_view.xml", "account_tax_code_template.xml", -# "account_tax_code.xml", "l10n_in_public_firm_chart.xml", - "account_tax.xml", "l10n_in_wizard.xml", - "account_wizard_view.xml", + "installer_view.xml", + "account_multi_chart_wizard_view.xml", ], "auto_install": False, "installable": True, diff --git a/addons/l10n_in/account_wizard.py b/addons/l10n_in/account_multi_chart_wizard.py similarity index 58% rename from addons/l10n_in/account_wizard.py rename to addons/l10n_in/account_multi_chart_wizard.py index eb6f0dd1491..ea7974dd430 100644 --- a/addons/l10n_in/account_wizard.py +++ b/addons/l10n_in/account_multi_chart_wizard.py @@ -19,17 +19,29 @@ # ############################################################################## import tools -from osv import osv from osv import fields, osv +from os.path import join as opj -class account_wizard(osv.osv_memory): +class account_multi_charts_wizard(osv.osv_memory): _inherit ='wizard.multi.charts.accounts' _columns = { - 'sales_tax_central': fields.boolean('Sales tax central'), - 'vat_resellers': fields.boolean('VAT resellers'), + 'sales_tax': fields.boolean('Sales tax central'), + 'vat': fields.boolean('VAT resellers'), 'service_tax': fields.boolean('Service tax'), 'excise_duty': fields.boolean('Excise duty'), } + def execute(self, cr, uid, ids, context=None): + super(account_multi_charts_wizard, self).execute(cr, uid, ids, context) + obj_multi = self.browse(cr, uid, ids[0]) + if obj_multi.chart_template_id.name == 'Public Firm Chart of Account': + path = tools.file_open(opj('l10n_in', 'account_sale_tax.xml')) + tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) + path.close() + elif obj_multi.chart_template_id.name == 'Partnership/Private Firm Chart of Account': + path = tools.file_open(opj('l10n_in', 'account_vat.xml')) + tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) + path.close() + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_in/account_wizard_view.xml b/addons/l10n_in/account_multi_chart_wizard_view.xml similarity index 87% rename from addons/l10n_in/account_wizard_view.xml rename to addons/l10n_in/account_multi_chart_wizard_view.xml index 7af266c7a81..449b3af70b9 100644 --- a/addons/l10n_in/account_wizard_view.xml +++ b/addons/l10n_in/account_multi_chart_wizard_view.xml @@ -10,9 +10,9 @@ - - + + diff --git a/addons/l10n_in/account_tax_code_template.xml b/addons/l10n_in/account_tax_code_template.xml index 466d3f147b4..55dbf427e86 100644 --- a/addons/l10n_in/account_tax_code_template.xml +++ b/addons/l10n_in/account_tax_code_template.xml @@ -3,8 +3,13 @@ + + Tax + + - Tax balance to pay + Tax Balance to Pay + @@ -13,23 +18,24 @@ - Tax payable + Tax Payable - Tax bases + Tax Bases + + - Base of taxed sales - + Base of Taxed Sales + - - Base of taxed purchases - + Base of Taxed Purchases + diff --git a/addons/l10n_in/installer.py b/addons/l10n_in/installer.py index e4242ad5e91..1b57127d35c 100644 --- a/addons/l10n_in/installer.py +++ b/addons/l10n_in/installer.py @@ -41,13 +41,13 @@ class l10n_installer(osv.osv_memory): fy_obj = self.pool.get('account.fiscalyear') for res in self.read(cr, uid, ids, context=context): if res['charts'] =='l10n_in' and res['company_type']=='public_company': - fp = tools.file_open(opj('l10n_in', 'l10n_in_public_firm_chart.xml')) - tools.convert_xml_import(cr, 'l10n_in', fp, {}, 'init', True, None) - fp.close() + path = tools.file_open(opj('l10n_in', 'l10n_in_public_firm_chart.xml')) + tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) + path.close() if res['charts'] =='l10n_in' and res['company_type']=='partnership_private_company': - fp = tools.file_open(opj('l10n_in', 'l10n_in_partnership_private_chart.xml')) - tools.convert_xml_import(cr, 'l10n_in', fp, {}, 'init', True, None) - fp.close() + path = tools.file_open(opj('l10n_in', 'l10n_in_partnership_private_chart.xml')) + tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) + path.close() if 'date_start' in res and 'date_stop' in res: f_ids = fy_obj.search(cr, uid, [('date_start', '<=', res['date_start']), ('date_stop', '>=', res['date_stop']), ('company_id', '=', res['company_id'][0])], context=context) if not f_ids: diff --git a/addons/l10n_in/l10n_in_partnership_private_chart.xml b/addons/l10n_in/l10n_in_partnership_private_chart.xml index 63853401468..f59aaeb407b 100644 --- a/addons/l10n_in/l10n_in_partnership_private_chart.xml +++ b/addons/l10n_in/l10n_in_partnership_private_chart.xml @@ -436,7 +436,7 @@ Partnership/Private Firm Chart of Account - + diff --git a/addons/l10n_in/l10n_in_public_firm_chart.xml b/addons/l10n_in/l10n_in_public_firm_chart.xml index 297e2947352..bcc9a3918a4 100644 --- a/addons/l10n_in/l10n_in_public_firm_chart.xml +++ b/addons/l10n_in/l10n_in_public_firm_chart.xml @@ -296,7 +296,7 @@ - + Sales - Division #1, Product Line 010 31010 other @@ -524,18 +524,18 @@ - + Public Firm Chart of Account - + - + From 15938009e3d5b8bbaf61bc4f24b99806f8b67006 Mon Sep 17 00:00:00 2001 From: "Jagdish Panchal (Open ERP)" Date: Thu, 17 May 2012 12:40:59 +0530 Subject: [PATCH 013/282] [IMP] l10n_in: improve code and add new xml file for different taxes bzr revid: jap@tinyerp.com-20120517071059-0s96fem90ke2i5sw --- addons/l10n_in/__openerp__.py | 4 +- addons/l10n_in/account_multi_chart_wizard.py | 49 ++++++++++++++----- addons/l10n_in/account_tax.xml | 17 +++---- addons/l10n_in/account_tax_code_template.xml | 26 +++++----- .../l10n_in_partnership_private_chart.xml | 2 +- addons/l10n_in/l10n_in_public_firm_chart.xml | 2 +- addons/l10n_in/tax/private_exice_duty.xml | 47 ++++++++++++++++++ addons/l10n_in/tax/private_service.xml | 46 +++++++++++++++++ addons/l10n_in/tax/private_vat.xml | 27 ++++++++++ addons/l10n_in/tax/privete_sale_tax.xml | 27 ++++++++++ .../l10n_in/tax/public_firm_excise_duty.xml | 48 ++++++++++++++++++ addons/l10n_in/tax/public_firm_sales_tax.xml | 23 +++++++++ addons/l10n_in/tax/public_firm_service.xml | 49 +++++++++++++++++++ addons/l10n_in/tax/public_firm_vat.xml | 28 +++++++++++ 14 files changed, 357 insertions(+), 38 deletions(-) create mode 100644 addons/l10n_in/tax/private_exice_duty.xml create mode 100644 addons/l10n_in/tax/private_service.xml create mode 100644 addons/l10n_in/tax/private_vat.xml create mode 100644 addons/l10n_in/tax/privete_sale_tax.xml create mode 100644 addons/l10n_in/tax/public_firm_excise_duty.xml create mode 100644 addons/l10n_in/tax/public_firm_sales_tax.xml create mode 100644 addons/l10n_in/tax/public_firm_service.xml create mode 100644 addons/l10n_in/tax/public_firm_vat.xml diff --git a/addons/l10n_in/__openerp__.py b/addons/l10n_in/__openerp__.py index ba901562a0b..cbacb5e5ac3 100644 --- a/addons/l10n_in/__openerp__.py +++ b/addons/l10n_in/__openerp__.py @@ -36,12 +36,10 @@ Indian accounting chart and localization. ], "demo_xml": [], "update_xml": [ - "l10n_in_partnership_private_chart.xml", "account_tax_code_template.xml", - "l10n_in_public_firm_chart.xml", + "account_multi_chart_wizard_view.xml", "l10n_in_wizard.xml", "installer_view.xml", - "account_multi_chart_wizard_view.xml", ], "auto_install": False, "installable": True, diff --git a/addons/l10n_in/account_multi_chart_wizard.py b/addons/l10n_in/account_multi_chart_wizard.py index ea7974dd430..c19997e3f98 100644 --- a/addons/l10n_in/account_multi_chart_wizard.py +++ b/addons/l10n_in/account_multi_chart_wizard.py @@ -21,6 +21,7 @@ import tools from osv import fields, osv from os.path import join as opj +from lxml import etree class account_multi_charts_wizard(osv.osv_memory): _inherit ='wizard.multi.charts.accounts' @@ -32,16 +33,42 @@ class account_multi_charts_wizard(osv.osv_memory): } def execute(self, cr, uid, ids, context=None): - super(account_multi_charts_wizard, self).execute(cr, uid, ids, context) obj_multi = self.browse(cr, uid, ids[0]) - if obj_multi.chart_template_id.name == 'Public Firm Chart of Account': - path = tools.file_open(opj('l10n_in', 'account_sale_tax.xml')) - tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) - path.close() - elif obj_multi.chart_template_id.name == 'Partnership/Private Firm Chart of Account': - path = tools.file_open(opj('l10n_in', 'account_vat.xml')) - tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) - path.close() - - + acc_template_id= self.pool.get('account.chart.template').search(cr, uid, [('name','=',obj_multi.chart_template_id.name)], context=context) + for chart_name in self.pool.get('account.chart.template').browse(cr, uid, acc_template_id,context=context): + if obj_multi.chart_template_id.name == chart_name.name: + if obj_multi.sales_tax == True: + path = tools.file_open(opj('l10n_in', 'tax', 'public_firm_sales_tax.xml')) + tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) + path.close() + if obj_multi.vat == True: + path = tools.file_open(opj('l10n_in', 'tax', 'public_firm_vat.xml')) + tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) + path.close() + if obj_multi.service_tax == True: + path = tools.file_open(opj('l10n_in', 'tax', 'public_firm_service.xml')) + tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) + path.close() + if obj_multi.excise_duty == True: + path = tools.file_open(opj('l10n_in', 'tax', 'public_firm_excise_duty.xml')) + tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) + path.close() + elif obj_multi.chart_template_id.name == chart_name.name: + if obj_multi.sales_tax == True: + path = tools.file_open(opj('l10n_in', 'tax', 'privete_sale_tax.xml')) + tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) + path.close() + if obj_multi.vat == True: + path = tools.file_open(opj('l10n_in', 'tax', 'private_vat.xml')) + tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) + path.close() + if obj_multi.service_tax == True: + path = tools.file_open(opj('l10n_in', 'tax', 'private_service.xml')) + tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) + path.close() + if obj_multi.excise_duty == True: + path = tools.file_open(opj('l10n_in', 'tax', 'private_exice_duty.xml')) + tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) + path.close() + return super(account_multi_charts_wizard, self).execute(cr, uid, ids, context) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_in/account_tax.xml b/addons/l10n_in/account_tax.xml index 5077ec64e6e..90e6264398f 100644 --- a/addons/l10n_in/account_tax.xml +++ b/addons/l10n_in/account_tax.xml @@ -4,16 +4,15 @@ - Sale Central - - 0.12 + PPn (10%)(10.0%) + 0.100000 percent - - - - - - + + + + + + diff --git a/addons/l10n_in/account_tax_code_template.xml b/addons/l10n_in/account_tax_code_template.xml index 55dbf427e86..0677ab6dfa6 100644 --- a/addons/l10n_in/account_tax_code_template.xml +++ b/addons/l10n_in/account_tax_code_template.xml @@ -3,39 +3,39 @@ - + Tax - + Tax Balance to Pay - + - + Tax Due (Tax to pay) - + - + Tax Payable - + - + Tax Bases - + - + Base of Taxed Sales - + - + Base of Taxed Purchases - + diff --git a/addons/l10n_in/l10n_in_partnership_private_chart.xml b/addons/l10n_in/l10n_in_partnership_private_chart.xml index f59aaeb407b..2bda406dbee 100644 --- a/addons/l10n_in/l10n_in_partnership_private_chart.xml +++ b/addons/l10n_in/l10n_in_partnership_private_chart.xml @@ -436,7 +436,7 @@ Partnership/Private Firm Chart of Account - + diff --git a/addons/l10n_in/l10n_in_public_firm_chart.xml b/addons/l10n_in/l10n_in_public_firm_chart.xml index bcc9a3918a4..92cad026926 100644 --- a/addons/l10n_in/l10n_in_public_firm_chart.xml +++ b/addons/l10n_in/l10n_in_public_firm_chart.xml @@ -530,7 +530,7 @@ Public Firm Chart of Account - + diff --git a/addons/l10n_in/tax/private_exice_duty.xml b/addons/l10n_in/tax/private_exice_duty.xml new file mode 100644 index 00000000000..5e8f531c0e1 --- /dev/null +++ b/addons/l10n_in/tax/private_exice_duty.xml @@ -0,0 +1,47 @@ + + + + + + + 10 + Exice Duty(10.30%) + Exice Duty + + 0.10 + percent + sale + + 1 + + 1 + + 1 + + 1 + + + + + + Excise duty(10%)(%2) + Excise duty (%2) + 0.02 + percent + sale + + + + + + Excise duty(10%)(%1) + Excise duty (%1) + 0.01 + percent + sale + + + + + + \ No newline at end of file diff --git a/addons/l10n_in/tax/private_service.xml b/addons/l10n_in/tax/private_service.xml new file mode 100644 index 00000000000..49d5bc3542e --- /dev/null +++ b/addons/l10n_in/tax/private_service.xml @@ -0,0 +1,46 @@ + + + + + + + Service(12%) + Service + + 0.12 + percent + sale + + 1 + + 1 + + 1 + + 1 + + + + + + Service(12%)(%2) + Service (%2) + 0.02 + percent + sale + + + + + + Service(12%)(%1) + Service (%1) + 0.01 + percent + sale + + + + + + \ No newline at end of file diff --git a/addons/l10n_in/tax/private_vat.xml b/addons/l10n_in/tax/private_vat.xml new file mode 100644 index 00000000000..860a499ccde --- /dev/null +++ b/addons/l10n_in/tax/private_vat.xml @@ -0,0 +1,27 @@ + + + + + + + 10 + VAT(12%) + VAT resellers + + 0.15 + percent + sale + + 1 + + 1 + + 1 + + 1 + + + + + + \ No newline at end of file diff --git a/addons/l10n_in/tax/privete_sale_tax.xml b/addons/l10n_in/tax/privete_sale_tax.xml new file mode 100644 index 00000000000..6421180506d --- /dev/null +++ b/addons/l10n_in/tax/privete_sale_tax.xml @@ -0,0 +1,27 @@ + + + + + + + 10 + Sale Central (12%) + Sale Central + + 0.12 + percent + sale + + 1 + + 1 + + 1 + + 1 + + + + + + \ No newline at end of file diff --git a/addons/l10n_in/tax/public_firm_excise_duty.xml b/addons/l10n_in/tax/public_firm_excise_duty.xml new file mode 100644 index 00000000000..6c5185ed560 --- /dev/null +++ b/addons/l10n_in/tax/public_firm_excise_duty.xml @@ -0,0 +1,48 @@ + + + + + + + Excise duty(10%) + Excise duty + + + + 0.10 + percent + sale + + 1 + + 1 + + 1 + + 1 + + + + + + Excise duty(10%)(%2) + Excise duty (%2) + 0.02 + percent + sale + + + + + + Excise duty(10%)(%1) + Excise duty (%1) + 0.01 + percent + sale + + + + + + \ No newline at end of file diff --git a/addons/l10n_in/tax/public_firm_sales_tax.xml b/addons/l10n_in/tax/public_firm_sales_tax.xml new file mode 100644 index 00000000000..05fbd4db5b9 --- /dev/null +++ b/addons/l10n_in/tax/public_firm_sales_tax.xml @@ -0,0 +1,23 @@ + + + + + + + Sale Central (12%) + Sale Central + + + + 0.12 + percent + sale + + + + + + + + + \ No newline at end of file diff --git a/addons/l10n_in/tax/public_firm_service.xml b/addons/l10n_in/tax/public_firm_service.xml new file mode 100644 index 00000000000..58c85cb3f74 --- /dev/null +++ b/addons/l10n_in/tax/public_firm_service.xml @@ -0,0 +1,49 @@ + + + + + + + Service(12%) + Service + + + + 0.12 + percent + sale + + 1 + + 1 + + 1 + + 1 + + + + + + Service(12%)(%2) + Service (%2) + 0.02 + percent + sale + + + + + + Service(12%)(%1) + Service (%1) + 0.01 + percent + sale + + + + + + + \ No newline at end of file diff --git a/addons/l10n_in/tax/public_firm_vat.xml b/addons/l10n_in/tax/public_firm_vat.xml new file mode 100644 index 00000000000..02fe9cf56f4 --- /dev/null +++ b/addons/l10n_in/tax/public_firm_vat.xml @@ -0,0 +1,28 @@ + + + + + + + VAT(12%) + VAT + + + + 0.15 + percent + sale + + 1 + + 1 + + 1 + + 1 + + + + + + \ No newline at end of file From 9ee1727eb7c65267726a82337be81cc10b73d0a9 Mon Sep 17 00:00:00 2001 From: "Jagdish Panchal (Open ERP)" Date: Fri, 18 May 2012 10:29:17 +0530 Subject: [PATCH 014/282] [IMP] l10n_in: improve code for tax account bzr revid: jap@tinyerp.com-20120518045917-rv2mgpo2tlel5fm2 --- addons/l10n_in/account_multi_chart_wizard.py | 79 +++++++++---------- addons/l10n_in/tax/private_exice_duty.xml | 28 ++++++- addons/l10n_in/tax/private_service.xml | 21 ++++- addons/l10n_in/tax/private_vat.xml | 20 +++++ addons/l10n_in/tax/privete_sale_tax.xml | 20 +++++ .../l10n_in/tax/public_firm_excise_duty.xml | 22 +++++- addons/l10n_in/tax/public_firm_sales_tax.xml | 22 +++++- addons/l10n_in/tax/public_firm_service.xml | 22 +++++- addons/l10n_in/tax/public_firm_vat.xml | 22 +++++- 9 files changed, 203 insertions(+), 53 deletions(-) diff --git a/addons/l10n_in/account_multi_chart_wizard.py b/addons/l10n_in/account_multi_chart_wizard.py index c19997e3f98..ae2b48055d2 100644 --- a/addons/l10n_in/account_multi_chart_wizard.py +++ b/addons/l10n_in/account_multi_chart_wizard.py @@ -26,49 +26,48 @@ from lxml import etree class account_multi_charts_wizard(osv.osv_memory): _inherit ='wizard.multi.charts.accounts' _columns = { - 'sales_tax': fields.boolean('Sales tax central'), - 'vat': fields.boolean('VAT resellers'), - 'service_tax': fields.boolean('Service tax'), - 'excise_duty': fields.boolean('Excise duty'), + 'sales_tax': fields.boolean('Sales tax central', help='If this field is true it allows you use Sales Tax'), + 'vat': fields.boolean('VAT resellers',help='If this field is true it allows you use VAT'), + 'service_tax': fields.boolean('Service tax', help='If this field is true it allows you use Service tax'), + 'excise_duty': fields.boolean('Excise duty', help='If this field is true it allows you use Excise duty'), } def execute(self, cr, uid, ids, context=None): obj_multi = self.browse(cr, uid, ids[0]) - acc_template_id= self.pool.get('account.chart.template').search(cr, uid, [('name','=',obj_multi.chart_template_id.name)], context=context) - for chart_name in self.pool.get('account.chart.template').browse(cr, uid, acc_template_id,context=context): - if obj_multi.chart_template_id.name == chart_name.name: - if obj_multi.sales_tax == True: - path = tools.file_open(opj('l10n_in', 'tax', 'public_firm_sales_tax.xml')) - tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) - path.close() - if obj_multi.vat == True: - path = tools.file_open(opj('l10n_in', 'tax', 'public_firm_vat.xml')) - tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) - path.close() - if obj_multi.service_tax == True: - path = tools.file_open(opj('l10n_in', 'tax', 'public_firm_service.xml')) - tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) - path.close() - if obj_multi.excise_duty == True: - path = tools.file_open(opj('l10n_in', 'tax', 'public_firm_excise_duty.xml')) - tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) - path.close() - elif obj_multi.chart_template_id.name == chart_name.name: - if obj_multi.sales_tax == True: - path = tools.file_open(opj('l10n_in', 'tax', 'privete_sale_tax.xml')) - tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) - path.close() - if obj_multi.vat == True: - path = tools.file_open(opj('l10n_in', 'tax', 'private_vat.xml')) - tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) - path.close() - if obj_multi.service_tax == True: - path = tools.file_open(opj('l10n_in', 'tax', 'private_service.xml')) - tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) - path.close() - if obj_multi.excise_duty == True: - path = tools.file_open(opj('l10n_in', 'tax', 'private_exice_duty.xml')) - tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) - path.close() + if obj_multi.chart_template_id.name == 'Public Firm Chart of Account': + if obj_multi.sales_tax == True: + path = tools.file_open(opj('l10n_in', 'tax', 'public_firm_sales_tax.xml')) + tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) + path.close() + if obj_multi.vat == True: + path = tools.file_open(opj('l10n_in', 'tax', 'public_firm_vat.xml')) + tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) + path.close() + if obj_multi.service_tax == True: + path = tools.file_open(opj('l10n_in', 'tax', 'public_firm_service.xml')) + tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) + path.close() + if obj_multi.excise_duty == True: + path = tools.file_open(opj('l10n_in', 'tax', 'public_firm_excise_duty.xml')) + tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) + path.close() + elif obj_multi.chart_template_id.name == 'Partnership/Private Firm Chart of Account': + if obj_multi.sales_tax == True: + path = tools.file_open(opj('l10n_in', 'tax', 'privete_sale_tax.xml')) + tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) + path.close() + if obj_multi.vat == True: + path = tools.file_open(opj('l10n_in', 'tax', 'private_vat.xml')) + tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) + path.close() + if obj_multi.service_tax == True: + path = tools.file_open(opj('l10n_in', 'tax', 'private_service.xml')) + tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) + path.close() + if obj_multi.excise_duty == True: + path = tools.file_open(opj('l10n_in', 'tax', 'private_exice_duty.xml')) + tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) + path.close() return super(account_multi_charts_wizard, self).execute(cr, uid, ids, context) + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_in/tax/private_exice_duty.xml b/addons/l10n_in/tax/private_exice_duty.xml index 5e8f531c0e1..8ea3a972fdf 100644 --- a/addons/l10n_in/tax/private_exice_duty.xml +++ b/addons/l10n_in/tax/private_exice_duty.xml @@ -3,14 +3,34 @@ - + + Exice Duty Receivable + 128 + receivable + + + + + + + Exice Duty Payable + 219 + payable + + + + + + 10 Exice Duty(10.30%) Exice Duty 0.10 percent - sale + all + + 1 @@ -29,7 +49,7 @@ 0.02 percent sale - + @@ -39,7 +59,7 @@ 0.01 percent sale - + diff --git a/addons/l10n_in/tax/private_service.xml b/addons/l10n_in/tax/private_service.xml index 49d5bc3542e..0bb8352096d 100644 --- a/addons/l10n_in/tax/private_service.xml +++ b/addons/l10n_in/tax/private_service.xml @@ -3,13 +3,32 @@ + + Service Tax Receivable + 126 + receivable + + + + + + + Service Tax Payable + 218 + payable + + + + + Service(12%) Service 0.12 percent - sale + + 1 diff --git a/addons/l10n_in/tax/private_vat.xml b/addons/l10n_in/tax/private_vat.xml index 860a499ccde..559115ccc78 100644 --- a/addons/l10n_in/tax/private_vat.xml +++ b/addons/l10n_in/tax/private_vat.xml @@ -3,6 +3,24 @@ + + VAT Receivable + 124 + receivable + + + + + + + VAT Payable + 217 + payable + + + + + 10 VAT(12%) @@ -11,6 +29,8 @@ 0.15 percent sale + + 1 diff --git a/addons/l10n_in/tax/privete_sale_tax.xml b/addons/l10n_in/tax/privete_sale_tax.xml index 6421180506d..2565f2a9e83 100644 --- a/addons/l10n_in/tax/privete_sale_tax.xml +++ b/addons/l10n_in/tax/privete_sale_tax.xml @@ -3,6 +3,24 @@ + + Sales Tax Receivable + 122 + receivable + + + + + + + Sales Tax Payable + 216 + payable + + + + + 10 Sale Central (12%) @@ -11,6 +29,8 @@ 0.12 percent sale + + 1 diff --git a/addons/l10n_in/tax/public_firm_excise_duty.xml b/addons/l10n_in/tax/public_firm_excise_duty.xml index 6c5185ed560..7a78037bcaa 100644 --- a/addons/l10n_in/tax/public_firm_excise_duty.xml +++ b/addons/l10n_in/tax/public_firm_excise_duty.xml @@ -3,11 +3,29 @@ + + Exice Duty Receivable + 158000 + receivable + + + + + + + Exice Duty Payable + 24900 + payable + + + + + Excise duty(10%) Excise duty - - + + 0.10 percent diff --git a/addons/l10n_in/tax/public_firm_sales_tax.xml b/addons/l10n_in/tax/public_firm_sales_tax.xml index 05fbd4db5b9..f0240de33fe 100644 --- a/addons/l10n_in/tax/public_firm_sales_tax.xml +++ b/addons/l10n_in/tax/public_firm_sales_tax.xml @@ -3,11 +3,29 @@ + + Sales Tax Receivable + 154000 + receivable + + + + + + + Sales Tax Payable + 24600 + payable + + + + + Sale Central (12%) Sale Central - - + + 0.12 percent diff --git a/addons/l10n_in/tax/public_firm_service.xml b/addons/l10n_in/tax/public_firm_service.xml index 58c85cb3f74..f4ef12defa2 100644 --- a/addons/l10n_in/tax/public_firm_service.xml +++ b/addons/l10n_in/tax/public_firm_service.xml @@ -3,11 +3,29 @@ + + Service Tax Receivable + 156000 + receivable + + + + + + + Service Tax Payable + 24700 + payable + + + + + Service(12%) Service - - + + 0.12 percent diff --git a/addons/l10n_in/tax/public_firm_vat.xml b/addons/l10n_in/tax/public_firm_vat.xml index 02fe9cf56f4..29fd2f3f9ca 100644 --- a/addons/l10n_in/tax/public_firm_vat.xml +++ b/addons/l10n_in/tax/public_firm_vat.xml @@ -3,11 +3,29 @@ + + VAT Receivable + 157000 + receivable + + + + + + + VAT Payable + 24800 + payable + + + + + VAT(12%) VAT - - + + 0.15 percent From 87f1f877c341752f11196157ebef30f5225d370b Mon Sep 17 00:00:00 2001 From: "Jagdish Panchal (Open ERP)" Date: Fri, 18 May 2012 17:24:21 +0530 Subject: [PATCH 015/282] [IMP] l10n_in: improve code in xml bzr revid: jap@tinyerp.com-20120518115421-z8uejo5jfbtjc03g --- .../l10n_in_partnership_private_chart.xml | 4 +- addons/l10n_in/tax/private_exice_duty.xml | 2 +- addons/l10n_in/tax/private_service.xml | 5 +- addons/l10n_in/tax/private_vat.xml | 70 +++++++++++++++++-- addons/l10n_in/tax/privete_sale_tax.xml | 22 +++++- addons/l10n_in/tax/public_firm_sales_tax.xml | 18 ++++- addons/l10n_in/tax/public_firm_service.xml | 6 +- addons/l10n_in/tax/public_firm_vat.xml | 70 +++++++++++++++++-- 8 files changed, 179 insertions(+), 18 deletions(-) diff --git a/addons/l10n_in/l10n_in_partnership_private_chart.xml b/addons/l10n_in/l10n_in_partnership_private_chart.xml index 2bda406dbee..06d046d320c 100644 --- a/addons/l10n_in/l10n_in_partnership_private_chart.xml +++ b/addons/l10n_in/l10n_in_partnership_private_chart.xml @@ -215,7 +215,7 @@ - + diff --git a/addons/l10n_in/tax/private_exice_duty.xml b/addons/l10n_in/tax/private_exice_duty.xml index 8ea3a972fdf..0127d2bd444 100644 --- a/addons/l10n_in/tax/private_exice_duty.xml +++ b/addons/l10n_in/tax/private_exice_duty.xml @@ -28,7 +28,7 @@ 0.10 percent - all + sale diff --git a/addons/l10n_in/tax/private_service.xml b/addons/l10n_in/tax/private_service.xml index 0bb8352096d..ff049c31f21 100644 --- a/addons/l10n_in/tax/private_service.xml +++ b/addons/l10n_in/tax/private_service.xml @@ -22,6 +22,7 @@ + all Service(12%) Service @@ -46,7 +47,7 @@ Service (%2) 0.02 percent - sale + all @@ -56,7 +57,7 @@ Service (%1) 0.01 percent - sale + all diff --git a/addons/l10n_in/tax/private_vat.xml b/addons/l10n_in/tax/private_vat.xml index 559115ccc78..c91a9fe657a 100644 --- a/addons/l10n_in/tax/private_vat.xml +++ b/addons/l10n_in/tax/private_vat.xml @@ -22,13 +22,12 @@ - 10 - VAT(12%) + VAT(%4) VAT resellers - 0.15 + 0.04 percent - sale + all @@ -43,5 +42,68 @@ + + VAT(4%)(%1) + VAT (%1) + 0.01 + percent + all + + + + + + VAT(12.5%) + VAT (12.5%) + + 0.125 + percent + all + + + + 1 + + 1 + + 1 + + 1 + + + + + + VAT(12.5%)(%2.5) + VAT (%2.5) + 0.025 + percent + sale + + + + + + VAT(8%) + VAT (8%) + + 0.8 + percent + all + + + + 1 + + 1 + + 1 + + 1 + + + + + \ No newline at end of file diff --git a/addons/l10n_in/tax/privete_sale_tax.xml b/addons/l10n_in/tax/privete_sale_tax.xml index 2565f2a9e83..424126aec29 100644 --- a/addons/l10n_in/tax/privete_sale_tax.xml +++ b/addons/l10n_in/tax/privete_sale_tax.xml @@ -21,8 +21,28 @@ + + Sale Central (15%) + Sale Central + + 0.15 + percent + sale + + + + 1 + + 1 + + 1 + + 1 + + + + - 10 Sale Central (12%) Sale Central diff --git a/addons/l10n_in/tax/public_firm_sales_tax.xml b/addons/l10n_in/tax/public_firm_sales_tax.xml index f0240de33fe..fbc92ca9049 100644 --- a/addons/l10n_in/tax/public_firm_sales_tax.xml +++ b/addons/l10n_in/tax/public_firm_sales_tax.xml @@ -22,6 +22,22 @@ + Sale Central (15%) + Sale Central + + + + 0.15 + percent + sale + + + + + + + + Sale Central (12%) Sale Central @@ -35,7 +51,7 @@ - + \ No newline at end of file diff --git a/addons/l10n_in/tax/public_firm_service.xml b/addons/l10n_in/tax/public_firm_service.xml index f4ef12defa2..d78000ca5d5 100644 --- a/addons/l10n_in/tax/public_firm_service.xml +++ b/addons/l10n_in/tax/public_firm_service.xml @@ -29,7 +29,7 @@ 0.12 percent - sale + all 1 @@ -47,7 +47,7 @@ Service (%2) 0.02 percent - sale + all @@ -57,7 +57,7 @@ Service (%1) 0.01 percent - sale + all diff --git a/addons/l10n_in/tax/public_firm_vat.xml b/addons/l10n_in/tax/public_firm_vat.xml index 29fd2f3f9ca..53d3f1efc5a 100644 --- a/addons/l10n_in/tax/public_firm_vat.xml +++ b/addons/l10n_in/tax/public_firm_vat.xml @@ -22,14 +22,45 @@ - VAT(12%) - VAT + VAT(%4) + VAT(%4) - 0.15 + 0.04 percent - sale + all + + 1 + + 1 + + 1 + + 1 + + + + + + VAT(4%)(%1) + VAT (%1) + 0.01 + percent + all + + + + + + VAT(12.5%) + VAT (12.5%) + + + + 0.125 + percent + all 1 @@ -41,6 +72,37 @@ + + + VAT(12.5%)(%2.5) + VAT(12.5%)(%2.5) + 0.025 + percent + all + + + + + + VAT(8%) + VAT(8%) + + + + 0.08 + percent + all + + 1 + + 1 + + 1 + + 1 + + + \ No newline at end of file From b4676557b420d113490d704741e6550ea5ace2f0 Mon Sep 17 00:00:00 2001 From: "Jagdish Panchal (Open ERP)" Date: Mon, 21 May 2012 15:41:04 +0530 Subject: [PATCH 016/282] [IMP] l10n_in: improve code for different tax name bzr revid: jap@tinyerp.com-20120521101104-vdbovr1c37f1fye1 --- addons/l10n_in/account_multi_chart_wizard.py | 2 ++ .../l10n_in_partnership_private_chart.xml | 3 +-- addons/l10n_in/l10n_in_public_firm_chart.xml | 1 - addons/l10n_in/tax/private_exice_duty.xml | 16 +++++++------ addons/l10n_in/tax/private_service.xml | 10 ++++---- addons/l10n_in/tax/private_vat.xml | 23 ++++++++++--------- addons/l10n_in/tax/privete_sale_tax.xml | 14 +++++------ .../l10n_in/tax/public_firm_excise_duty.xml | 10 ++++---- addons/l10n_in/tax/public_firm_sales_tax.xml | 10 ++++---- addons/l10n_in/tax/public_firm_service.xml | 6 ++--- addons/l10n_in/tax/public_firm_vat.xml | 22 +++++++++--------- 11 files changed, 60 insertions(+), 57 deletions(-) diff --git a/addons/l10n_in/account_multi_chart_wizard.py b/addons/l10n_in/account_multi_chart_wizard.py index ae2b48055d2..f530cd44b62 100644 --- a/addons/l10n_in/account_multi_chart_wizard.py +++ b/addons/l10n_in/account_multi_chart_wizard.py @@ -69,5 +69,7 @@ class account_multi_charts_wizard(osv.osv_memory): tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) path.close() return super(account_multi_charts_wizard, self).execute(cr, uid, ids, context) + +account_multi_charts_wizard() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_in/l10n_in_partnership_private_chart.xml b/addons/l10n_in/l10n_in_partnership_private_chart.xml index 06d046d320c..d77ed6424fd 100644 --- a/addons/l10n_in/l10n_in_partnership_private_chart.xml +++ b/addons/l10n_in/l10n_in_partnership_private_chart.xml @@ -442,8 +442,7 @@ - - + diff --git a/addons/l10n_in/l10n_in_public_firm_chart.xml b/addons/l10n_in/l10n_in_public_firm_chart.xml index 92cad026926..f3a9c4d7c6e 100644 --- a/addons/l10n_in/l10n_in_public_firm_chart.xml +++ b/addons/l10n_in/l10n_in_public_firm_chart.xml @@ -537,7 +537,6 @@ - diff --git a/addons/l10n_in/tax/private_exice_duty.xml b/addons/l10n_in/tax/private_exice_duty.xml index 0127d2bd444..825bb4afab0 100644 --- a/addons/l10n_in/tax/private_exice_duty.xml +++ b/addons/l10n_in/tax/private_exice_duty.xml @@ -22,10 +22,10 @@ - 10 - Exice Duty(10.30%) + Exice Duty - 10.30% + 10 Exice Duty - + 0.10 percent sale @@ -44,8 +44,9 @@ - Excise duty(10%)(%2) - Excise duty (%2) + 11 + Excise duty -10% -%2 + Excise duty - 2% 0.02 percent sale @@ -54,8 +55,9 @@ - Excise duty(10%)(%1) - Excise duty (%1) + 11 + Excise duty - 10% - %1 + Excise duty - 1% 0.01 percent sale diff --git a/addons/l10n_in/tax/private_service.xml b/addons/l10n_in/tax/private_service.xml index ff049c31f21..f5566a5dce1 100644 --- a/addons/l10n_in/tax/private_service.xml +++ b/addons/l10n_in/tax/private_service.xml @@ -23,7 +23,7 @@ all - Service(12%) + Service - 12% Service 0.12 @@ -43,8 +43,8 @@ - Service(12%)(%2) - Service (%2) + Service - 12% - %2 + Service - 2% 0.02 percent all @@ -53,8 +53,8 @@ - Service(12%)(%1) - Service (%1) + Service - 12% - 1% + Service - 1% 0.01 percent all diff --git a/addons/l10n_in/tax/private_vat.xml b/addons/l10n_in/tax/private_vat.xml index c91a9fe657a..a025e72310c 100644 --- a/addons/l10n_in/tax/private_vat.xml +++ b/addons/l10n_in/tax/private_vat.xml @@ -22,9 +22,10 @@ - VAT(%4) + 30 + VAT - 4% VAT resellers - + 0.04 percent all @@ -43,8 +44,8 @@ - VAT(4%)(%1) - VAT (%1) + VAT - 4% - %1 + VAT - %1 0.01 percent all @@ -53,9 +54,9 @@ - VAT(12.5%) - VAT (12.5%) - + VAT - 12.5% + VAT - 12.5% + 0.125 percent all @@ -74,7 +75,7 @@ - VAT(12.5%)(%2.5) + VAT - 12.5%- %2.5 VAT (%2.5) 0.025 percent @@ -84,8 +85,8 @@ - VAT(8%) - VAT (8%) + VAT - 8% + VAT - 8% 0.8 percent @@ -100,7 +101,7 @@ 1 1 - + diff --git a/addons/l10n_in/tax/privete_sale_tax.xml b/addons/l10n_in/tax/privete_sale_tax.xml index 424126aec29..5d741879798 100644 --- a/addons/l10n_in/tax/privete_sale_tax.xml +++ b/addons/l10n_in/tax/privete_sale_tax.xml @@ -20,10 +20,10 @@ - + - Sale Central (15%) - Sale Central + Sale Tax - 15% + Sale Tax - 15% 0.15 percent @@ -38,13 +38,13 @@ 1 1 - + - Sale Central (12%) - Sale Central + Sale Tax -12% + Sale Tax - 12% 0.12 percent @@ -59,7 +59,7 @@ 1 1 - + diff --git a/addons/l10n_in/tax/public_firm_excise_duty.xml b/addons/l10n_in/tax/public_firm_excise_duty.xml index 7a78037bcaa..e8f010da3ac 100644 --- a/addons/l10n_in/tax/public_firm_excise_duty.xml +++ b/addons/l10n_in/tax/public_firm_excise_duty.xml @@ -22,7 +22,7 @@ - Excise duty(10%) + Excise duty - 10% Excise duty @@ -43,8 +43,8 @@ - Excise duty(10%)(%2) - Excise duty (%2) + Excise duty - 10% - 2% + Excise duty - %2 0.02 percent sale @@ -53,8 +53,8 @@ - Excise duty(10%)(%1) - Excise duty (%1) + Excise duty - 10% - 1% + Excise duty - 1% 0.01 percent sale diff --git a/addons/l10n_in/tax/public_firm_sales_tax.xml b/addons/l10n_in/tax/public_firm_sales_tax.xml index fbc92ca9049..3d805a4a049 100644 --- a/addons/l10n_in/tax/public_firm_sales_tax.xml +++ b/addons/l10n_in/tax/public_firm_sales_tax.xml @@ -22,8 +22,8 @@ - Sale Central (15%) - Sale Central + Sale Tax - 15% + Sale Tax - 15% @@ -38,8 +38,8 @@ - Sale Central (12%) - Sale Central + Sale Tax - 12% + Sale Tax - 12% @@ -51,7 +51,7 @@ - + \ No newline at end of file diff --git a/addons/l10n_in/tax/public_firm_service.xml b/addons/l10n_in/tax/public_firm_service.xml index d78000ca5d5..dcfc7cd343e 100644 --- a/addons/l10n_in/tax/public_firm_service.xml +++ b/addons/l10n_in/tax/public_firm_service.xml @@ -22,7 +22,7 @@ - Service(12%) + Service - 12% Service @@ -43,7 +43,7 @@ - Service(12%)(%2) + Service - 12% - 2% Service (%2) 0.02 percent @@ -53,7 +53,7 @@ - Service(12%)(%1) + Service - 12% - 1% Service (%1) 0.01 percent diff --git a/addons/l10n_in/tax/public_firm_vat.xml b/addons/l10n_in/tax/public_firm_vat.xml index 53d3f1efc5a..3fb5eea8dcc 100644 --- a/addons/l10n_in/tax/public_firm_vat.xml +++ b/addons/l10n_in/tax/public_firm_vat.xml @@ -22,11 +22,11 @@ - VAT(%4) - VAT(%4) + VAT - 4% + VAT - 4% - + 0.04 percent all @@ -43,8 +43,8 @@ - VAT(4%)(%1) - VAT (%1) + VAT - 4% -1% + VAT - 1% 0.01 percent all @@ -53,8 +53,8 @@ - VAT(12.5%) - VAT (12.5%) + VAT - 12.5% + VAT - 12.5% @@ -74,8 +74,8 @@ - VAT(12.5%)(%2.5) - VAT(12.5%)(%2.5) + VAT - 12.5% - %2.5 + VAT - 12.5% - %2.5 0.025 percent all @@ -84,8 +84,8 @@ - VAT(8%) - VAT(8%) + VAT - 8% + VAT - 8% From 2808efa6fd74890e15f1bdbafb1443b3be871d8c Mon Sep 17 00:00:00 2001 From: "Jagdish Panchal (Open ERP)" Date: Tue, 22 May 2012 18:51:19 +0530 Subject: [PATCH 017/282] [IMP] l10n_in: improve code in account_multi_chart_wizard_view.py add new onchange method bzr revid: jap@tinyerp.com-20120522132119-0mwnk1ue8r2ct7q0 --- addons/l10n_in/account_multi_chart_wizard.py | 24 ++++++++++++++++--- .../account_multi_chart_wizard_view.xml | 9 +++---- addons/l10n_in/tax/public_firm_sales_tax.xml | 2 +- 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/addons/l10n_in/account_multi_chart_wizard.py b/addons/l10n_in/account_multi_chart_wizard.py index f530cd44b62..784a7b748ca 100644 --- a/addons/l10n_in/account_multi_chart_wizard.py +++ b/addons/l10n_in/account_multi_chart_wizard.py @@ -30,19 +30,37 @@ class account_multi_charts_wizard(osv.osv_memory): 'vat': fields.boolean('VAT resellers',help='If this field is true it allows you use VAT'), 'service_tax': fields.boolean('Service tax', help='If this field is true it allows you use Service tax'), 'excise_duty': fields.boolean('Excise duty', help='If this field is true it allows you use Excise duty'), + 'is_indian_chart': fields.boolean('Flag') } + def onchange_chart_template_id(self, cr, uid, ids, chart_template_id=False, context=None): + res = super(account_multi_charts_wizard, self).onchange_chart_template_id(cr, uid, ids, chart_template_id, context) + tax_templ_obj = self.pool.get('account.tax.template') + res['value'] = {'complete_tax_set': False, 'sale_tax': False, 'purchase_tax': False} + data = self.pool.get('account.chart.template').browse(cr, uid, chart_template_id, context=context) + if data.name in ('Public Firm Chart of Account','Partnership/Private Firm Chart of Account'): + res.update({'value': {'is_indian_chart': True}}) + else: + res.update({'value': {'is_indian_chart': False}}) + if data.complete_tax_set: + sale_tax_ids = tax_templ_obj.search(cr, uid, [("chart_template_id" + , "=", chart_template_id), ('type_tax_use', 'in', ('sale','all'))], order="sequence, id desc") + purchase_tax_ids = tax_templ_obj.search(cr, uid, [("chart_template_id" + , "=", chart_template_id), ('type_tax_use', 'in', ('purchase','all'))], order="sequence, id desc") + res['value'].update({'sale_tax': sale_tax_ids and sale_tax_ids[0] or False, 'purchase_tax': purchase_tax_ids and purchase_tax_ids[0] or False}) + return res + def execute(self, cr, uid, ids, context=None): obj_multi = self.browse(cr, uid, ids[0]) if obj_multi.chart_template_id.name == 'Public Firm Chart of Account': if obj_multi.sales_tax == True: path = tools.file_open(opj('l10n_in', 'tax', 'public_firm_sales_tax.xml')) tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) - path.close() + path.close() if obj_multi.vat == True: path = tools.file_open(opj('l10n_in', 'tax', 'public_firm_vat.xml')) tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) - path.close() + path.close() if obj_multi.service_tax == True: path = tools.file_open(opj('l10n_in', 'tax', 'public_firm_service.xml')) tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) @@ -67,7 +85,7 @@ class account_multi_charts_wizard(osv.osv_memory): if obj_multi.excise_duty == True: path = tools.file_open(opj('l10n_in', 'tax', 'private_exice_duty.xml')) tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) - path.close() + path.close() return super(account_multi_charts_wizard, self).execute(cr, uid, ids, context) account_multi_charts_wizard() diff --git a/addons/l10n_in/account_multi_chart_wizard_view.xml b/addons/l10n_in/account_multi_chart_wizard_view.xml index 449b3af70b9..63ef1ccc94c 100644 --- a/addons/l10n_in/account_multi_chart_wizard_view.xml +++ b/addons/l10n_in/account_multi_chart_wizard_view.xml @@ -10,10 +10,11 @@ - - - - + + + + + diff --git a/addons/l10n_in/tax/public_firm_sales_tax.xml b/addons/l10n_in/tax/public_firm_sales_tax.xml index 3d805a4a049..d88c1370368 100644 --- a/addons/l10n_in/tax/public_firm_sales_tax.xml +++ b/addons/l10n_in/tax/public_firm_sales_tax.xml @@ -20,7 +20,7 @@ - + Sale Tax - 15% Sale Tax - 15% From 2ae3cb623e2a5d9c061f3ee2397f1d68eb1db442 Mon Sep 17 00:00:00 2001 From: "Jagdish Panchal (Open ERP)" Date: Wed, 23 May 2012 17:34:55 +0530 Subject: [PATCH 018/282] [IMP] l10n_in: Remove the receivable accounts from tax, change template name, add new account product sale and improve code bzr revid: jap@tinyerp.com-20120523120455-197vc5xqni5atdcp --- addons/l10n_in/account_multi_chart_wizard.py | 51 +++++++++---------- .../account_multi_chart_wizard_view.xml | 2 +- addons/l10n_in/installer.py | 5 +- .../l10n_in_partnership_private_chart.xml | 17 +++++-- addons/l10n_in/l10n_in_public_firm_chart.xml | 4 +- addons/l10n_in/tax/private_exice_duty.xml | 11 +--- addons/l10n_in/tax/private_service.xml | 11 +--- addons/l10n_in/tax/private_vat.xml | 17 ++----- addons/l10n_in/tax/privete_sale_tax.xml | 13 +---- .../l10n_in/tax/public_firm_excise_duty.xml | 11 +--- addons/l10n_in/tax/public_firm_sales_tax.xml | 13 +---- addons/l10n_in/tax/public_firm_service.xml | 11 +--- addons/l10n_in/tax/public_firm_vat.xml | 15 ++---- 13 files changed, 58 insertions(+), 123 deletions(-) diff --git a/addons/l10n_in/account_multi_chart_wizard.py b/addons/l10n_in/account_multi_chart_wizard.py index 784a7b748ca..4fbe1fa2cc5 100644 --- a/addons/l10n_in/account_multi_chart_wizard.py +++ b/addons/l10n_in/account_multi_chart_wizard.py @@ -18,18 +18,19 @@ # along with this program. If not, see . # ############################################################################## -import tools +from lxml import etree from osv import fields, osv from os.path import join as opj -from lxml import etree +import tools + class account_multi_charts_wizard(osv.osv_memory): _inherit ='wizard.multi.charts.accounts' _columns = { - 'sales_tax': fields.boolean('Sales tax central', help='If this field is true it allows you use Sales Tax'), - 'vat': fields.boolean('VAT resellers',help='If this field is true it allows you use VAT'), - 'service_tax': fields.boolean('Service tax', help='If this field is true it allows you use Service tax'), - 'excise_duty': fields.boolean('Excise duty', help='If this field is true it allows you use Excise duty'), + 'sales_tax': fields.boolean('Sales Tax', help='If this field is true it allows you use Sales Tax'), + 'vat': fields.boolean('VAT',help='If this field is true it allows you use VAT'), + 'service_tax': fields.boolean('Service Tax', help='If this field is true it allows you use Service tax'), + 'excise_duty': fields.boolean('Excise Duty', help='If this field is true it allows you use Excise duty'), 'is_indian_chart': fields.boolean('Flag') } @@ -38,51 +39,49 @@ class account_multi_charts_wizard(osv.osv_memory): tax_templ_obj = self.pool.get('account.tax.template') res['value'] = {'complete_tax_set': False, 'sale_tax': False, 'purchase_tax': False} data = self.pool.get('account.chart.template').browse(cr, uid, chart_template_id, context=context) - if data.name in ('Public Firm Chart of Account','Partnership/Private Firm Chart of Account'): - res.update({'value': {'is_indian_chart': True}}) - else: - res.update({'value': {'is_indian_chart': False}}) - if data.complete_tax_set: - sale_tax_ids = tax_templ_obj.search(cr, uid, [("chart_template_id" - , "=", chart_template_id), ('type_tax_use', 'in', ('sale','all'))], order="sequence, id desc") - purchase_tax_ids = tax_templ_obj.search(cr, uid, [("chart_template_id" - , "=", chart_template_id), ('type_tax_use', 'in', ('purchase','all'))], order="sequence, id desc") - res['value'].update({'sale_tax': sale_tax_ids and sale_tax_ids[0] or False, 'purchase_tax': purchase_tax_ids and purchase_tax_ids[0] or False}) + if data.name in ('India - Chart of Accounts for Public Firm','India - Chart of Accounts for Partnership/Private Firm'): + res['value'].update({'is_indian_chart': True}) + else: + res['value'].update({'is_indian_chart': False}) + if data.name == 'India - Chart of Accounts for Public Firm': + res['value'].update({'sales_tax': True,'vat':True, 'service_tax':True, 'excise_duty': True}) + elif data.name == 'India - Chart of Accounts for Partnership/Private Firm': + res['value'].update({'sales_tax': True,'vat':True}) return res def execute(self, cr, uid, ids, context=None): obj_multi = self.browse(cr, uid, ids[0]) - if obj_multi.chart_template_id.name == 'Public Firm Chart of Account': - if obj_multi.sales_tax == True: + if obj_multi.chart_template_id.name == 'India - Chart of Accounts for Public Firm': + if obj_multi.sales_tax: path = tools.file_open(opj('l10n_in', 'tax', 'public_firm_sales_tax.xml')) tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) path.close() - if obj_multi.vat == True: + if obj_multi.vat: path = tools.file_open(opj('l10n_in', 'tax', 'public_firm_vat.xml')) tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) path.close() - if obj_multi.service_tax == True: + if obj_multi.service_tax: path = tools.file_open(opj('l10n_in', 'tax', 'public_firm_service.xml')) tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) path.close() - if obj_multi.excise_duty == True: + if obj_multi.excise_duty: path = tools.file_open(opj('l10n_in', 'tax', 'public_firm_excise_duty.xml')) tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) path.close() - elif obj_multi.chart_template_id.name == 'Partnership/Private Firm Chart of Account': - if obj_multi.sales_tax == True: + elif obj_multi.chart_template_id.name == 'India - Chart of Accounts for Partnership/Private Firm': + if obj_multi.sales_tax: path = tools.file_open(opj('l10n_in', 'tax', 'privete_sale_tax.xml')) tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) path.close() - if obj_multi.vat == True: + if obj_multi.vat: path = tools.file_open(opj('l10n_in', 'tax', 'private_vat.xml')) tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) path.close() - if obj_multi.service_tax == True: + if obj_multi.service_tax: path = tools.file_open(opj('l10n_in', 'tax', 'private_service.xml')) tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) path.close() - if obj_multi.excise_duty == True: + if obj_multi.excise_duty: path = tools.file_open(opj('l10n_in', 'tax', 'private_exice_duty.xml')) tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) path.close() diff --git a/addons/l10n_in/account_multi_chart_wizard_view.xml b/addons/l10n_in/account_multi_chart_wizard_view.xml index 63ef1ccc94c..4851392748f 100644 --- a/addons/l10n_in/account_multi_chart_wizard_view.xml +++ b/addons/l10n_in/account_multi_chart_wizard_view.xml @@ -8,7 +8,7 @@ form - + diff --git a/addons/l10n_in/installer.py b/addons/l10n_in/installer.py index 1b57127d35c..b189a061da4 100644 --- a/addons/l10n_in/installer.py +++ b/addons/l10n_in/installer.py @@ -18,17 +18,16 @@ # along with this program. If not, see . # ############################################################################## - from osv import fields, osv +from os.path import join as opj import netsvc import tools -from os.path import join as opj class l10n_installer(osv.osv_memory): _inherit = 'account.installer' _columns = { 'company_type':fields.selection([('partnership_private_company', 'Partnership/Private Firm'), - ('public_company', 'Public Company')], 'Company Type'), + ('public_company', 'Public Firm')], 'Company Type', required=True), } _defaults = { diff --git a/addons/l10n_in/l10n_in_partnership_private_chart.xml b/addons/l10n_in/l10n_in_partnership_private_chart.xml index d77ed6424fd..f5185d85426 100644 --- a/addons/l10n_in/l10n_in_partnership_private_chart.xml +++ b/addons/l10n_in/l10n_in_partnership_private_chart.xml @@ -238,7 +238,7 @@ - Profit And Loss Account + Profit And Loss 3 view @@ -277,8 +277,17 @@ Amounts earned from providing services to clients, either for cash or on credit. When a service is provided on credit, both this account and Accounts Receivable will increase. When a service is provided for immediate cash, both this account and Cash will increase. - + + + Product Sales + 311 + other + + + + Sales of product account + Non-Operating Revenue and Gains @@ -301,7 +310,7 @@ Gain on Sale of Assets - 910 + 811 other @@ -434,7 +443,7 @@ - Partnership/Private Firm Chart of Account + India - Chart of Accounts for Partnership/Private Firm diff --git a/addons/l10n_in/l10n_in_public_firm_chart.xml b/addons/l10n_in/l10n_in_public_firm_chart.xml index f3a9c4d7c6e..8e84d9b8d79 100644 --- a/addons/l10n_in/l10n_in_public_firm_chart.xml +++ b/addons/l10n_in/l10n_in_public_firm_chart.xml @@ -266,7 +266,7 @@ - Profit And Loss Account + Profit And Loss 3 view @@ -528,7 +528,7 @@ - Public Firm Chart of Account + India - Chart of Accounts for Public Firm diff --git a/addons/l10n_in/tax/private_exice_duty.xml b/addons/l10n_in/tax/private_exice_duty.xml index 825bb4afab0..568d480eb86 100644 --- a/addons/l10n_in/tax/private_exice_duty.xml +++ b/addons/l10n_in/tax/private_exice_duty.xml @@ -3,15 +3,6 @@ - - Exice Duty Receivable - 128 - receivable - - - - - Exice Duty Payable 219 @@ -29,7 +20,7 @@ 0.10 percent sale - + 1 diff --git a/addons/l10n_in/tax/private_service.xml b/addons/l10n_in/tax/private_service.xml index f5566a5dce1..1ce8cbfe74c 100644 --- a/addons/l10n_in/tax/private_service.xml +++ b/addons/l10n_in/tax/private_service.xml @@ -3,15 +3,6 @@ - - Service Tax Receivable - 126 - receivable - - - - - Service Tax Payable 218 @@ -28,7 +19,7 @@ 0.12 percent - + 1 diff --git a/addons/l10n_in/tax/private_vat.xml b/addons/l10n_in/tax/private_vat.xml index a025e72310c..d717201b577 100644 --- a/addons/l10n_in/tax/private_vat.xml +++ b/addons/l10n_in/tax/private_vat.xml @@ -3,15 +3,6 @@ - - VAT Receivable - 124 - receivable - - - - - VAT Payable 217 @@ -24,12 +15,12 @@ 30 VAT - 4% - VAT resellers + VAT 0.04 percent all - + 1 @@ -60,7 +51,7 @@ 0.125 percent all - + 1 @@ -91,7 +82,7 @@ 0.8 percent all - + 1 diff --git a/addons/l10n_in/tax/privete_sale_tax.xml b/addons/l10n_in/tax/privete_sale_tax.xml index 5d741879798..dc89d3d3fee 100644 --- a/addons/l10n_in/tax/privete_sale_tax.xml +++ b/addons/l10n_in/tax/privete_sale_tax.xml @@ -3,15 +3,6 @@ - - Sales Tax Receivable - 122 - receivable - - - - - Sales Tax Payable 216 @@ -28,7 +19,7 @@ 0.15 percent sale - + 1 @@ -49,7 +40,7 @@ 0.12 percent sale - + 1 diff --git a/addons/l10n_in/tax/public_firm_excise_duty.xml b/addons/l10n_in/tax/public_firm_excise_duty.xml index e8f010da3ac..031c92307fd 100644 --- a/addons/l10n_in/tax/public_firm_excise_duty.xml +++ b/addons/l10n_in/tax/public_firm_excise_duty.xml @@ -3,15 +3,6 @@ - - Exice Duty Receivable - 158000 - receivable - - - - - Exice Duty Payable 24900 @@ -24,7 +15,7 @@ Excise duty - 10% Excise duty - + 0.10 diff --git a/addons/l10n_in/tax/public_firm_sales_tax.xml b/addons/l10n_in/tax/public_firm_sales_tax.xml index d88c1370368..27d768aba7a 100644 --- a/addons/l10n_in/tax/public_firm_sales_tax.xml +++ b/addons/l10n_in/tax/public_firm_sales_tax.xml @@ -3,15 +3,6 @@ - - Sales Tax Receivable - 154000 - receivable - - - - - Sales Tax Payable 24600 @@ -24,7 +15,7 @@ Sale Tax - 15% Sale Tax - 15% - + 0.15 @@ -40,7 +31,7 @@ Sale Tax - 12% Sale Tax - 12% - + 0.12 diff --git a/addons/l10n_in/tax/public_firm_service.xml b/addons/l10n_in/tax/public_firm_service.xml index dcfc7cd343e..f57eee6796b 100644 --- a/addons/l10n_in/tax/public_firm_service.xml +++ b/addons/l10n_in/tax/public_firm_service.xml @@ -3,15 +3,6 @@ - - Service Tax Receivable - 156000 - receivable - - - - - Service Tax Payable 24700 @@ -24,7 +15,7 @@ Service - 12% Service - + 0.12 diff --git a/addons/l10n_in/tax/public_firm_vat.xml b/addons/l10n_in/tax/public_firm_vat.xml index 3fb5eea8dcc..9ffe2b9d9ca 100644 --- a/addons/l10n_in/tax/public_firm_vat.xml +++ b/addons/l10n_in/tax/public_firm_vat.xml @@ -3,15 +3,6 @@ - - VAT Receivable - 157000 - receivable - - - - - VAT Payable 24800 @@ -24,7 +15,7 @@ VAT - 4% VAT - 4% - + 0.04 @@ -55,7 +46,7 @@ VAT - 12.5% VAT - 12.5% - + 0.125 @@ -86,7 +77,7 @@ VAT - 8% VAT - 8% - + 0.08 From f86c011e90cb81208d6f4739134ce7e3e37c45be Mon Sep 17 00:00:00 2001 From: "Jagdish Panchal (Open ERP)" Date: Mon, 28 May 2012 17:31:17 +0530 Subject: [PATCH 019/282] [IMP] l10n_in: Improve code and use proper id name in l10n_in_partnership_private_chart.xml bzr revid: jap@tinyerp.com-20120528120117-iinpi1vuh2v71dvt --- addons/l10n_in/account_multi_chart_wizard.py | 46 +- .../account_multi_chart_wizard_view.xml | 14 +- addons/l10n_in/account_tax_code_template.xml | 2 +- addons/l10n_in/installer.py | 26 +- addons/l10n_in/installer_view.xml | 1 + addons/l10n_in/l10n_in_chart.xml | 447 ------------------ .../l10n_in_partnership_private_chart.xml | 166 +++---- addons/l10n_in/l10n_in_public_firm_chart.xml | 2 +- addons/l10n_in/l10n_in_wizard.xml | 1 + addons/l10n_in/tax/private_exice_duty.xml | 2 +- addons/l10n_in/tax/private_service.xml | 2 +- addons/l10n_in/tax/private_vat.xml | 2 +- addons/l10n_in/tax/privete_sale_tax.xml | 2 +- 13 files changed, 124 insertions(+), 589 deletions(-) delete mode 100644 addons/l10n_in/l10n_in_chart.xml diff --git a/addons/l10n_in/account_multi_chart_wizard.py b/addons/l10n_in/account_multi_chart_wizard.py index 4fbe1fa2cc5..058c2a41617 100644 --- a/addons/l10n_in/account_multi_chart_wizard.py +++ b/addons/l10n_in/account_multi_chart_wizard.py @@ -18,28 +18,25 @@ # along with this program. If not, see . # ############################################################################## -from lxml import etree + from osv import fields, osv from os.path import join as opj import tools - class account_multi_charts_wizard(osv.osv_memory): _inherit ='wizard.multi.charts.accounts' _columns = { - 'sales_tax': fields.boolean('Sales Tax', help='If this field is true it allows you use Sales Tax'), - 'vat': fields.boolean('VAT',help='If this field is true it allows you use VAT'), - 'service_tax': fields.boolean('Service Tax', help='If this field is true it allows you use Service tax'), - 'excise_duty': fields.boolean('Excise Duty', help='If this field is true it allows you use Excise duty'), - 'is_indian_chart': fields.boolean('Flag') + 'sales_tax': fields.boolean('Sales Tax', help='If this field is true it allows you install Sales Tax'), + 'vat': fields.boolean('VAT', help='If this field is true it allows install use VAT'), + 'service_tax': fields.boolean('Service Tax', help='If this field is true it allows you install Service tax'), + 'excise_duty': fields.boolean('Excise Duty', help='If this field is true it allows you install Excise duty'), + 'is_indian_chart': fields.boolean('Indian Chart?') } def onchange_chart_template_id(self, cr, uid, ids, chart_template_id=False, context=None): - res = super(account_multi_charts_wizard, self).onchange_chart_template_id(cr, uid, ids, chart_template_id, context) - tax_templ_obj = self.pool.get('account.tax.template') - res['value'] = {'complete_tax_set': False, 'sale_tax': False, 'purchase_tax': False} + res = super(account_multi_charts_wizard, self).onchange_chart_template_id(cr, uid, ids, chart_template_id, context=context) data = self.pool.get('account.chart.template').browse(cr, uid, chart_template_id, context=context) - if data.name in ('India - Chart of Accounts for Public Firm','India - Chart of Accounts for Partnership/Private Firm'): + if data.name in ('India - Chart of Accounts for Public Firm', 'India - Chart of Accounts for Partnership/Private Firm'): res['value'].update({'is_indian_chart': True}) else: res['value'].update({'is_indian_chart': False}) @@ -50,42 +47,43 @@ class account_multi_charts_wizard(osv.osv_memory): return res def execute(self, cr, uid, ids, context=None): - obj_multi = self.browse(cr, uid, ids[0]) - if obj_multi.chart_template_id.name == 'India - Chart of Accounts for Public Firm': - if obj_multi.sales_tax: + multichart_data = self.browse(cr, uid, ids[0], context=context) + if multichart_data.chart_template_id.name == 'India - Chart of Accounts for Public Firm': + if multichart_data.sales_tax: path = tools.file_open(opj('l10n_in', 'tax', 'public_firm_sales_tax.xml')) tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) path.close() - if obj_multi.vat: + if multichart_data.vat: path = tools.file_open(opj('l10n_in', 'tax', 'public_firm_vat.xml')) tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) path.close() - if obj_multi.service_tax: + if multichart_data.service_tax: path = tools.file_open(opj('l10n_in', 'tax', 'public_firm_service.xml')) tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) path.close() - if obj_multi.excise_duty: + if multichart_data.excise_duty: path = tools.file_open(opj('l10n_in', 'tax', 'public_firm_excise_duty.xml')) tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) path.close() - elif obj_multi.chart_template_id.name == 'India - Chart of Accounts for Partnership/Private Firm': - if obj_multi.sales_tax: + elif multichart_data.chart_template_id.name == 'India - Chart of Accounts for Partnership/Private Firm': + if multichart_data.sales_tax: path = tools.file_open(opj('l10n_in', 'tax', 'privete_sale_tax.xml')) tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) path.close() - if obj_multi.vat: + if multichart_data.vat: path = tools.file_open(opj('l10n_in', 'tax', 'private_vat.xml')) tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) path.close() - if obj_multi.service_tax: + if multichart_data.service_tax: path = tools.file_open(opj('l10n_in', 'tax', 'private_service.xml')) tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) path.close() - if obj_multi.excise_duty: + if multichart_data.excise_duty: path = tools.file_open(opj('l10n_in', 'tax', 'private_exice_duty.xml')) tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) - path.close() - return super(account_multi_charts_wizard, self).execute(cr, uid, ids, context) + path.close() + res = super(account_multi_charts_wizard, self).execute(cr, uid, ids, context=context) + return res account_multi_charts_wizard() diff --git a/addons/l10n_in/account_multi_chart_wizard_view.xml b/addons/l10n_in/account_multi_chart_wizard_view.xml index 4851392748f..899d81fc65b 100644 --- a/addons/l10n_in/account_multi_chart_wizard_view.xml +++ b/addons/l10n_in/account_multi_chart_wizard_view.xml @@ -1,7 +1,6 @@ + - - Generate Chart of Accounts from a Chart Template wizard.multi.charts.accounts @@ -9,12 +8,13 @@ - - - - - + + + + + + diff --git a/addons/l10n_in/account_tax_code_template.xml b/addons/l10n_in/account_tax_code_template.xml index 0677ab6dfa6..1d8e5ed3b70 100644 --- a/addons/l10n_in/account_tax_code_template.xml +++ b/addons/l10n_in/account_tax_code_template.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/l10n_in/installer.py b/addons/l10n_in/installer.py index b189a061da4..e9e4157a23f 100644 --- a/addons/l10n_in/installer.py +++ b/addons/l10n_in/installer.py @@ -18,9 +18,9 @@ # along with this program. If not, see . # ############################################################################## + from osv import fields, osv from os.path import join as opj -import netsvc import tools class l10n_installer(osv.osv_memory): @@ -35,9 +35,9 @@ class l10n_installer(osv.osv_memory): } def execute_simple(self, cr, uid, ids, context=None): + res = super(l10n_installer, self).execute_simple(cr, uid, ids, context=context) if context is None: context = {} - fy_obj = self.pool.get('account.fiscalyear') for res in self.read(cr, uid, ids, context=context): if res['charts'] =='l10n_in' and res['company_type']=='public_company': path = tools.file_open(opj('l10n_in', 'l10n_in_public_firm_chart.xml')) @@ -46,25 +46,7 @@ class l10n_installer(osv.osv_memory): if res['charts'] =='l10n_in' and res['company_type']=='partnership_private_company': path = tools.file_open(opj('l10n_in', 'l10n_in_partnership_private_chart.xml')) tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) - path.close() - if 'date_start' in res and 'date_stop' in res: - f_ids = fy_obj.search(cr, uid, [('date_start', '<=', res['date_start']), ('date_stop', '>=', res['date_stop']), ('company_id', '=', res['company_id'][0])], context=context) - if not f_ids: - name = code = res['date_start'][:4] - if int(name) != int(res['date_stop'][:4]): - name = res['date_start'][:4] +'-'+ res['date_stop'][:4] - code = res['date_start'][2:4] +'-'+ res['date_stop'][2:4] - vals = { - 'name': name, - 'code': code, - 'date_start': res['date_start'], - 'date_stop': res['date_stop'], - 'company_id': res['company_id'][0] - } - fiscal_id = fy_obj.create(cr, uid, vals, context=context) - if res['period'] == 'month': - fy_obj.create_period(cr, uid, [fiscal_id]) - elif res['period'] == '3months': - fy_obj.create_period3(cr, uid, [fiscal_id]) + path.close() + return res # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_in/installer_view.xml b/addons/l10n_in/installer_view.xml index cfac5ed8513..63dbe44eabd 100644 --- a/addons/l10n_in/installer_view.xml +++ b/addons/l10n_in/installer_view.xml @@ -1,3 +1,4 @@ + diff --git a/addons/l10n_in/l10n_in_chart.xml b/addons/l10n_in/l10n_in_chart.xml deleted file mode 100644 index d18d2b801e0..00000000000 --- a/addons/l10n_in/l10n_in_chart.xml +++ /dev/null @@ -1,447 +0,0 @@ - - - - - - - - Indian Chart of Account - 0 - view - - - - - - Balance Sheet - IA_AC0 - view - - - - - - - Assets - IA_AC01 - view - - - - - - - Current Assets - IA_AC011 - view - - - - - - - Bank Account - IA_AC0111 - liquidity - - - - - - - Cash In Hand Account - IA_AC0112 - view - - - - - - - Cash Account - IA_AC01121 - view - - - - - - - Deposit Account - IA_AC0113 - other - - - - - - - Loan & Advance(Assets) Account - IA_AC0114 - other - - - - - - - Total Sundry Debtors Account - IA_AC0116 - view - - - - - - - Sundry Debtors Account - IA_AC01161 - receivable - - - - - - - Fixed Assets - IA_AC012 - other - - - - - - - Investment - IA_AC013 - other - - - - - - - Misc. Expenses(Asset) - IA_AC014 - other - - - - - - - Liabilities - IA_AC02 - view - - - - - - - Current Liabilities - IA_AC021 - view - - - - - - - Duties & Taxes - IA_AC0211 - other - - - - - - - Provision - IA_AC0212 - other - - - - - - - Total Sundry Creditors - IA_AC0213 - view - - - - - - - Sundry Creditors Account - IA_AC02131 - payable - - - - - - - Branch/Division - IA_AC022 - other - - - - - - - Share Holder/Owner Fund - IA_AC023 - view - - - - - - - Capital Account - IA_AC0231 - other - - - - - - - Reserve and Profit/Loss Account - IA_AC0232 - other - - - - - - - Loan(Liability) Account - IA_AC024 - view - - - - - - - Bank OD Account - IA_AC0241 - other - - - - - - - Secured Loan Account - IA_AC0242 - other - - - - - - - Unsecured Loan Account - IA_AC0243 - other - - - - - - - Suspense Account - IA_AC025 - other - - - - - - - - Profit And Loss Account - IA_AC1 - view - - - - - - - Expense - IA_AC11 - view - - - - - - - Direct Expenses - IA_AC111 - other - - - - - - - Indirect Expenses - IA_AC112 - other - - - - - - - Purchase - IA_AC113 - other - - - - - - - Opening Stock - IA_AC114 - other - - - - - - Salary Expenses - IA_AC115 - other - - - - - - - - Income - IA_AC12 - view - - - - - - - Direct Incomes - IA_AC121 - other - - - - - - - Indirect Incomes - IA_AC122 - other - - - - - - - Sales Account - IA_AC123 - other - - - - - - Goods Given Account - IA_AC124 - other - - - - - - - - - Tax - - - - Tax Balance to Pay - - - - - Tax Due (Tax to pay) - - - - - Tax Payable - - - - - Tax Bases - - - - - - Base of Taxed Sales - - - - - - Base of Taxed Purchases - - - - - OPJ - Opening Journal - situation - - - - - India - Chart of Accounts - - - - - - - - - - - - - diff --git a/addons/l10n_in/l10n_in_partnership_private_chart.xml b/addons/l10n_in/l10n_in_partnership_private_chart.xml index f5185d85426..6e2a764d64f 100644 --- a/addons/l10n_in/l10n_in_partnership_private_chart.xml +++ b/addons/l10n_in/l10n_in_partnership_private_chart.xml @@ -1,4 +1,4 @@ - + @@ -13,7 +13,7 @@ - + Balance Sheet 1 view @@ -24,183 +24,183 @@ - + Assets 10 view - + - + Cash 101 liquidity - + Checking account balance (as shown in company records), currency, coins, checks received from customers but not yet deposited. - + Accounts Receivable 120 receivable - + Amounts owed to the company for services performed or products sold but not yet paid for. - + Merchandise Inventory 140 other - + Cost of merchandise purchased but has not yet been sold. - + Supplies 150 other - + Cost of supplies that have not yet been used. Supplies that have been used are recorded in Supplies Expense. - + Prepaid Insurance 160 other - + Cost of insurance that is paid in advance and includes a future accounting period. - + Land 170 other - + Cost to acquire and prepare land for use by the company. - + Buildings 175 other - + Cost to purchase or construct buildings for use by the company. - + Accumulated Depreciation - Buildings 178 other - + Amount of the buildings' cost that has been allocated to Depreciation Expense since the time the building was acquired. - + Equipment 180 other - + Cost to acquire and prepare equipment for use by the company. - + Accumulated Depreciation - Equipment 188 other - + Amount of equipment's cost that has been allocated to Depreciation Expense since the time the equipment was acquired. - + Liabilities 20 view - + - + Notes Payable 210 other - + The amount of principal due on a formal written promise to pay. Loans from banks are included in this account. - + Accounts Payable 215 payable - + Amount owed to suppliers who provided goods and services to the company but did not require immediate payment in cash. - + Wages Payable 220 other - + Amount owed to employees for hours worked but not yet paid. - + Interest Payable 230 other - + Amount owed for interest on Notes Payable up until the date of the balance sheet. This is computed by multiplying the amount of the note times the effective interest rate times the time period. - + Unearned Revenues 240 other - + Amounts received in advance of delivering goods or providing services. When the goods are delivered or services are provided, this liability amount decreases. - + Mortgage Loan Payable 250 other - + A formal loan that involves a lien on real estate until the loan is repaid. @@ -212,7 +212,7 @@ view - + - + Profit And Loss 3 view @@ -248,186 +248,186 @@ - + Income 30 view - + - + Operating Revenue Accounts 31 view - + - + Service Revenues 310 other - + Amounts earned from providing services to clients, either for cash or on credit. When a service is provided on credit, both this account and Accounts Receivable will increase. When a service is provided for immediate cash, both this account and Cash will increase. - + Product Sales 311 other - + Sales of product account - + Non-Operating Revenue and Gains 80 view - + - + Interest Revenues 810 other - + Interest and dividends earned on bank accounts, investments or notes receivable. This account is increased when the interest is earned and either Cash or Interest Receivable is also increased. - + Gain on Sale of Assets 811 other - + Occurs when the company sells one of its assets (other than inventory) for more than the asset's book value. - + Expense 50 view - + - + Operating Expense Accounts 51 view - + - + Salaries Expense 500 other - + Expenses incurred for the work performed by salaried employees during the accounting period. These employees normally receive a fixed amount on a weekly, monthly, or annual basis. - + Wages Expense 510 other - + Expenses incurred for the work performed by non-salaried employees during the accounting period. These employees receive an hourly rate of pay. - + Supplies Expense 540 other - + Cost of supplies used up during the accounting period. - + Rent Expense 560 other - + Cost of occupying rented facilities during the accounting period. - + Utilities Expense 570 other - + Costs for electricity, heat, water, and sewer that were used during the accounting period. - + Telephone Expense 576 other - + Cost of telephone used during the current accounting period. - + Advertising Expense 610 other - + Costs incurred by the company during the accounting period for ads, promotions, and other selling and expenses (other than salaries). - + Depreciation Expense 750 other - + Cost of long-term assets allocated to expense during the current accounting period. - + Non-Operating Expenses and Losses 90 view - + @@ -436,7 +436,7 @@ other - + Occurs when the company sells one of its assets (other than inventory) for less than the asset's book value. @@ -446,12 +446,12 @@ India - Chart of Accounts for Partnership/Private Firm - - - - - - + + + + + + diff --git a/addons/l10n_in/l10n_in_public_firm_chart.xml b/addons/l10n_in/l10n_in_public_firm_chart.xml index 8e84d9b8d79..9e72ec9569c 100644 --- a/addons/l10n_in/l10n_in_public_firm_chart.xml +++ b/addons/l10n_in/l10n_in_public_firm_chart.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/l10n_in/l10n_in_wizard.xml b/addons/l10n_in/l10n_in_wizard.xml index 17bd975d140..19d7df181f7 100644 --- a/addons/l10n_in/l10n_in_wizard.xml +++ b/addons/l10n_in/l10n_in_wizard.xml @@ -1,3 +1,4 @@ + diff --git a/addons/l10n_in/tax/private_exice_duty.xml b/addons/l10n_in/tax/private_exice_duty.xml index 568d480eb86..14f4636cf32 100644 --- a/addons/l10n_in/tax/private_exice_duty.xml +++ b/addons/l10n_in/tax/private_exice_duty.xml @@ -9,7 +9,7 @@ payable - + diff --git a/addons/l10n_in/tax/private_service.xml b/addons/l10n_in/tax/private_service.xml index 1ce8cbfe74c..1a36cf4cc0f 100644 --- a/addons/l10n_in/tax/private_service.xml +++ b/addons/l10n_in/tax/private_service.xml @@ -9,7 +9,7 @@ payable - + diff --git a/addons/l10n_in/tax/private_vat.xml b/addons/l10n_in/tax/private_vat.xml index d717201b577..9f917a329f0 100644 --- a/addons/l10n_in/tax/private_vat.xml +++ b/addons/l10n_in/tax/private_vat.xml @@ -9,7 +9,7 @@ payable - + diff --git a/addons/l10n_in/tax/privete_sale_tax.xml b/addons/l10n_in/tax/privete_sale_tax.xml index dc89d3d3fee..a221ff1317b 100644 --- a/addons/l10n_in/tax/privete_sale_tax.xml +++ b/addons/l10n_in/tax/privete_sale_tax.xml @@ -9,7 +9,7 @@ payable - + From 29b1abbe04b5e98d891d08a76c093dd6778fc871 Mon Sep 17 00:00:00 2001 From: "Jagdish Panchal (Open ERP)" Date: Sat, 2 Jun 2012 17:36:56 +0530 Subject: [PATCH 020/282] [IMP] l10n_in: Improve code for Create template tax from Install chart of account wizard added new tax template xml file bzr revid: jap@tinyerp.com-20120602120656-4a2itir1joo10x3d --- addons/l10n_in/account_multi_chart_wizard.py | 91 ++++--- addons/l10n_in/installer.py | 25 +- .../l10n_in_private_firm_tax_template.xml | 224 +++++++++++++++++ .../l10n_in_public_firm_tax_template.xml | 231 ++++++++++++++++++ addons/l10n_in/tax/private_exice_duty.xml | 60 ----- addons/l10n_in/tax/private_service.xml | 57 ----- addons/l10n_in/tax/private_vat.xml | 101 -------- addons/l10n_in/tax/privete_sale_tax.xml | 58 ----- .../l10n_in/tax/public_firm_excise_duty.xml | 57 ----- addons/l10n_in/tax/public_firm_sales_tax.xml | 48 ---- addons/l10n_in/tax/public_firm_service.xml | 58 ----- addons/l10n_in/tax/public_firm_vat.xml | 99 -------- 12 files changed, 523 insertions(+), 586 deletions(-) create mode 100644 addons/l10n_in/l10n_in_private_firm_tax_template.xml create mode 100644 addons/l10n_in/l10n_in_public_firm_tax_template.xml delete mode 100644 addons/l10n_in/tax/private_exice_duty.xml delete mode 100644 addons/l10n_in/tax/private_service.xml delete mode 100644 addons/l10n_in/tax/private_vat.xml delete mode 100644 addons/l10n_in/tax/privete_sale_tax.xml delete mode 100644 addons/l10n_in/tax/public_firm_excise_duty.xml delete mode 100644 addons/l10n_in/tax/public_firm_sales_tax.xml delete mode 100644 addons/l10n_in/tax/public_firm_service.xml delete mode 100644 addons/l10n_in/tax/public_firm_vat.xml diff --git a/addons/l10n_in/account_multi_chart_wizard.py b/addons/l10n_in/account_multi_chart_wizard.py index 058c2a41617..b9c242312a6 100644 --- a/addons/l10n_in/account_multi_chart_wizard.py +++ b/addons/l10n_in/account_multi_chart_wizard.py @@ -18,7 +18,7 @@ # along with this program. If not, see . # ############################################################################## - +from tools.translate import _ from osv import fields, osv from os.path import join as opj import tools @@ -45,45 +45,56 @@ class account_multi_charts_wizard(osv.osv_memory): elif data.name == 'India - Chart of Accounts for Partnership/Private Firm': res['value'].update({'sales_tax': True,'vat':True}) return res - - def execute(self, cr, uid, ids, context=None): - multichart_data = self.browse(cr, uid, ids[0], context=context) - if multichart_data.chart_template_id.name == 'India - Chart of Accounts for Public Firm': - if multichart_data.sales_tax: - path = tools.file_open(opj('l10n_in', 'tax', 'public_firm_sales_tax.xml')) - tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) - path.close() - if multichart_data.vat: - path = tools.file_open(opj('l10n_in', 'tax', 'public_firm_vat.xml')) - tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) - path.close() - if multichart_data.service_tax: - path = tools.file_open(opj('l10n_in', 'tax', 'public_firm_service.xml')) - tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) - path.close() - if multichart_data.excise_duty: - path = tools.file_open(opj('l10n_in', 'tax', 'public_firm_excise_duty.xml')) - tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) - path.close() - elif multichart_data.chart_template_id.name == 'India - Chart of Accounts for Partnership/Private Firm': - if multichart_data.sales_tax: - path = tools.file_open(opj('l10n_in', 'tax', 'privete_sale_tax.xml')) - tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) - path.close() - if multichart_data.vat: - path = tools.file_open(opj('l10n_in', 'tax', 'private_vat.xml')) - tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) - path.close() - if multichart_data.service_tax: - path = tools.file_open(opj('l10n_in', 'tax', 'private_service.xml')) - tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) - path.close() - if multichart_data.excise_duty: - path = tools.file_open(opj('l10n_in', 'tax', 'private_exice_duty.xml')) - tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) - path.close() - res = super(account_multi_charts_wizard, self).execute(cr, uid, ids, context=context) - return res + + def _load_template(self, cr, uid, template_id, company_id, code_digits=None, obj_wizard=None, account_ref={}, taxes_ref={}, tax_code_ref={}, context=None): + res = super(account_multi_charts_wizard, self)._load_template(cr, uid, template_id, company_id, code_digits, obj_wizard, account_ref, taxes_ref, tax_code_ref, context=context) + template = self.pool.get('account.chart.template').browse(cr, uid, template_id, context=context) + obj_tax_code_template = self.pool.get('account.tax.code.template') + obj_tax_temp = self.pool.get('account.tax.template') + obj_tax = self.pool.get('account.tax') + tax_code_ref.update(obj_tax_code_template.generate_tax_code(cr, uid, template.tax_code_root_id.id, company_id, context=context)) + if obj_wizard.sales_tax == False and obj_wizard.excise_duty == False and obj_wizard.vat == False and obj_wizard.service_tax == False: + raise osv.except_osv(_('Error !'), _('Select Tax to Install')) + # Unlink the Tax for current company + tax_ids = obj_tax.search(cr, uid, [('company_id','=',company_id)], context=context) + obj_tax.unlink(cr, uid, tax_ids, context=context) + #Create new Tax as per selected from wizard + if obj_wizard.chart_template_id.name == 'India - Chart of Accounts for Public Firm': + if obj_wizard.sales_tax: + tax_temp_ids = obj_tax_temp.search(cr, uid, [('name','in',['Sale Tax - 15%','Sale Tax - 12%']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context) + tax_temp_data = obj_tax_temp.browse(cr, uid, tax_temp_ids, context=context) + taxes_ref = obj_tax_temp._generate_tax(cr, uid, tax_temp_data, tax_code_ref, company_id, context=context) + if obj_wizard.vat: + tax_temp_ids = obj_tax_temp.search(cr, uid, [('name','in',['VAT - 5%','VAT - 15%','VAT - 8%']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context) + tax_temp_data = obj_tax_temp.browse(cr, uid, tax_temp_ids, context=context) + taxes_ref = obj_tax_temp._generate_tax(cr, uid, tax_temp_data, tax_code_ref, company_id, context=context) + if obj_wizard.service_tax: + tax_temp_ids = obj_tax_temp.search(cr, uid, [('name','in',['Service Tax','Service Tax - %2','Service Tax - %1']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context) + tax_temp_data = obj_tax_temp.browse(cr, uid, tax_temp_ids, context=context) + taxes_ref = obj_tax_temp._generate_tax(cr, uid, tax_temp_data, tax_code_ref, company_id, context=context) + if obj_wizard.excise_duty: + tax_temp_ids = obj_tax_temp.search(cr, uid, [('name','in',['Excise Duty','Excise Duty - %2','Excise Duty - 1%']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context) + tax_temp_data = obj_tax_temp.browse(cr, uid, tax_temp_ids, context=context) + taxes_ref = obj_tax_temp._generate_tax(cr, uid, tax_temp_data, tax_code_ref, company_id, context=context) + + elif obj_wizard.chart_template_id.name == 'India - Chart of Accounts for Partnership/Private Firm': + if obj_wizard.sales_tax: + tax_temp_ids = obj_tax_temp.search(cr, uid, [('name','in',['Sale Tax - 15%','Sale Tax - 12%']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context) + tax_temp_data = obj_tax_temp.browse(cr, uid, tax_temp_ids, context=context) + taxes_ref = obj_tax_temp._generate_tax(cr, uid, tax_temp_data, tax_code_ref, company_id, context=context) + if obj_wizard.vat: + tax_temp_ids = obj_tax_temp.search(cr, uid, [('name','in',['VAT - 5%','VAT - 15%','VAT - 8%']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context) + tax_temp_data = obj_tax_temp.browse(cr, uid, tax_temp_ids, context=context) + taxes_ref = obj_tax_temp._generate_tax(cr, uid, tax_temp_data, tax_code_ref, company_id, context=context) + if obj_wizard.service_tax: + tax_temp_ids = obj_tax_temp.search(cr, uid, [('name','in',['Service Tax', 'Service Tax - %2', 'Service Tax - %1']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context) + tax_temp_data = obj_tax_temp.browse(cr, uid, tax_temp_ids, context=context) + taxes_ref = obj_tax_temp._generate_tax(cr, uid, tax_temp_data, tax_code_ref, company_id, context=context) + if obj_wizard.excise_duty: + tax_temp_ids = obj_tax_temp.search(cr, uid, [('name','in',['Excise Duty', 'Excise Duty - %2', 'Excise Duty - 1%']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context) + tax_temp_data = obj_tax_temp.browse(cr, uid, tax_temp_ids, context=context) + taxes_ref = obj_tax_temp._generate_tax(cr, uid, tax_temp_data, tax_code_ref, company_id, context=context) + return account_ref, taxes_ref, tax_code_ref account_multi_charts_wizard() diff --git a/addons/l10n_in/installer.py b/addons/l10n_in/installer.py index e9e4157a23f..2d9a2a3d39b 100644 --- a/addons/l10n_in/installer.py +++ b/addons/l10n_in/installer.py @@ -27,9 +27,9 @@ class l10n_installer(osv.osv_memory): _inherit = 'account.installer' _columns = { 'company_type':fields.selection([('partnership_private_company', 'Partnership/Private Firm'), - ('public_company', 'Public Firm')], 'Company Type', required=True), + ('public_company', 'Public Firm')], 'Company Type', required=True, + help='Select your company Type according to your need to install account chart'), } - _defaults = { 'company_type': 'public_company', } @@ -40,13 +40,22 @@ class l10n_installer(osv.osv_memory): context = {} for res in self.read(cr, uid, ids, context=context): if res['charts'] =='l10n_in' and res['company_type']=='public_company': - path = tools.file_open(opj('l10n_in', 'l10n_in_public_firm_chart.xml')) - tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) - path.close() + acc_file_path = tools.file_open(opj('l10n_in', 'l10n_in_public_firm_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_firm_tax_template.xml')) + tools.convert_xml_import(cr, 'l10n_in', tax_file_path, {}, 'init', True, None) + tax_file_path.close() + if res['charts'] =='l10n_in' and res['company_type']=='partnership_private_company': - path = tools.file_open(opj('l10n_in', 'l10n_in_partnership_private_chart.xml')) - tools.convert_xml_import(cr, 'l10n_in', path, {}, 'init', True, None) - path.close() + acc_file_path = tools.file_open(opj('l10n_in', 'l10n_in_partnership_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_firm_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: diff --git a/addons/l10n_in/l10n_in_private_firm_tax_template.xml b/addons/l10n_in/l10n_in_private_firm_tax_template.xml new file mode 100644 index 00000000000..564eb41fdfd --- /dev/null +++ b/addons/l10n_in/l10n_in_private_firm_tax_template.xml @@ -0,0 +1,224 @@ + + + + + + + + Sales Tax Payable + 216 + payable + + + + + + + VAT Payable + 217 + payable + + + + + + + Service Tax Payable + 218 + payable + + + + + + + Exice Duty Payable + 219 + payable + + + + + + + + + Sale Tax - 15% + Sale Tax - 15% + + 0.15 + percent + sale + + + + + + + + + + + + Sale Tax -12% + Sale Tax - 12% + + 0.12 + percent + sale + + + + + + + + + + + + + + VAT - 5% + VAT - 5% + + 0.05 + percent + all + + + + 1 + + 1 + + 1 + + 1 + + + + + + VAT - 15% + VAT - 15% + + 0.15 + percent + all + + + + 1 + + 1 + + 1 + + 1 + + + + + + VAT - 8% + VAT - 8% + + 0.8 + percent + all + + + + + + + + + + + + + + Exice Duty - 10.30% + Excise Duty + + 0.10 + percent + sale + + + + 1 + + 1 + + 1 + + 1 + + + + + + Excise duty -10% -%2 + Excise Duty - %2 + 0.02 + percent + sale + + + + + + Excise duty - 10% - %1 + Excise Duty - 1% + 0.01 + percent + sale + + + + + + + + all + Service - 12% + Service Tax + + 0.12 + percent + + + + + + + + + + + + Service - 12% - %2 + Service Tax - %2 + 0.02 + percent + all + + + + + + Service - 12% - 1% + Service Tax - %1 + 0.01 + percent + all + + + + + + \ No newline at end of file diff --git a/addons/l10n_in/l10n_in_public_firm_tax_template.xml b/addons/l10n_in/l10n_in_public_firm_tax_template.xml new file mode 100644 index 00000000000..6dd08be944b --- /dev/null +++ b/addons/l10n_in/l10n_in_public_firm_tax_template.xml @@ -0,0 +1,231 @@ + + + + + + + + + Sales Tax Payable + 24600 + payable + + + + + + + VAT Payable + 24800 + payable + + + + + + + Exice Duty Payable + 24900 + payable + + + + + + + Service Tax Payable + 24700 + payable + + + + + + + + + + Sale Tax - 15% + Sale Tax - 15% + + + + 0.15 + percent + sale + + + + + + + + + Sale Tax - 12% + Sale Tax - 12% + + + + 0.12 + percent + sale + + + + + + + + + + + VAT - 5% + VAT - 5% + + + + 0.05 + percent + all + + 1 + + 1 + + 1 + + 1 + + + + + + VAT - 15% + VAT - 15% + + + + 0.15 + percent + all + + 1 + + 1 + + 1 + + 1 + + + + + + VAT - 8% + VAT - 8% + + + + 0.08 + percent + all + + 1 + + 1 + + 1 + + 1 + + + + + + + + Service - 12% + Service Tax + + + + 0.12 + percent + all + + 1 + + 1 + + 1 + + 1 + + + + + + Service - 12% - 2% + Service Tax - %2 + 0.02 + percent + all + + + + + + Service - 12% - 1% + Service Tax - %1 + 0.01 + percent + all + + + + + + + + Excise duty - 10% + Excise Duty + + + + 0.10 + percent + sale + + 1 + + 1 + + 1 + + 1 + + + + + + Excise duty - 10% - 2% + Excise Duty - %2 + 0.02 + percent + sale + + + + + + Excise duty - 10% - 1% + Excise Duty - 1% + 0.01 + percent + sale + + + + + + \ No newline at end of file diff --git a/addons/l10n_in/tax/private_exice_duty.xml b/addons/l10n_in/tax/private_exice_duty.xml deleted file mode 100644 index 14f4636cf32..00000000000 --- a/addons/l10n_in/tax/private_exice_duty.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - Exice Duty Payable - 219 - payable - - - - - - - Exice Duty - 10.30% - 10 - Exice Duty - - 0.10 - percent - sale - - - - 1 - - 1 - - 1 - - 1 - - - - - - 11 - Excise duty -10% -%2 - Excise duty - 2% - 0.02 - percent - sale - - - - - - 11 - Excise duty - 10% - %1 - Excise duty - 1% - 0.01 - percent - sale - - - - - - \ No newline at end of file diff --git a/addons/l10n_in/tax/private_service.xml b/addons/l10n_in/tax/private_service.xml deleted file mode 100644 index 1a36cf4cc0f..00000000000 --- a/addons/l10n_in/tax/private_service.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - Service Tax Payable - 218 - payable - - - - - - - all - Service - 12% - Service - - 0.12 - percent - - - - 1 - - 1 - - 1 - - 1 - - - - - - Service - 12% - %2 - Service - 2% - 0.02 - percent - all - - - - - - Service - 12% - 1% - Service - 1% - 0.01 - percent - all - - - - - - \ No newline at end of file diff --git a/addons/l10n_in/tax/private_vat.xml b/addons/l10n_in/tax/private_vat.xml deleted file mode 100644 index 9f917a329f0..00000000000 --- a/addons/l10n_in/tax/private_vat.xml +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - VAT Payable - 217 - payable - - - - - - - 30 - VAT - 4% - VAT - - 0.04 - percent - all - - - - 1 - - 1 - - 1 - - 1 - - - - - - VAT - 4% - %1 - VAT - %1 - 0.01 - percent - all - - - - - - VAT - 12.5% - VAT - 12.5% - - 0.125 - percent - all - - - - 1 - - 1 - - 1 - - 1 - - - - - - VAT - 12.5%- %2.5 - VAT (%2.5) - 0.025 - percent - sale - - - - - - VAT - 8% - VAT - 8% - - 0.8 - percent - all - - - - 1 - - 1 - - 1 - - 1 - - - - - - - \ No newline at end of file diff --git a/addons/l10n_in/tax/privete_sale_tax.xml b/addons/l10n_in/tax/privete_sale_tax.xml deleted file mode 100644 index a221ff1317b..00000000000 --- a/addons/l10n_in/tax/privete_sale_tax.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - Sales Tax Payable - 216 - payable - - - - - - - Sale Tax - 15% - Sale Tax - 15% - - 0.15 - percent - sale - - - - 1 - - 1 - - 1 - - 1 - - - - - - Sale Tax -12% - Sale Tax - 12% - - 0.12 - percent - sale - - - - 1 - - 1 - - 1 - - 1 - - - - - - \ No newline at end of file diff --git a/addons/l10n_in/tax/public_firm_excise_duty.xml b/addons/l10n_in/tax/public_firm_excise_duty.xml deleted file mode 100644 index 031c92307fd..00000000000 --- a/addons/l10n_in/tax/public_firm_excise_duty.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - Exice Duty Payable - 24900 - payable - - - - - - - Excise duty - 10% - Excise duty - - - - 0.10 - percent - sale - - 1 - - 1 - - 1 - - 1 - - - - - - Excise duty - 10% - 2% - Excise duty - %2 - 0.02 - percent - sale - - - - - - Excise duty - 10% - 1% - Excise duty - 1% - 0.01 - percent - sale - - - - - - \ No newline at end of file diff --git a/addons/l10n_in/tax/public_firm_sales_tax.xml b/addons/l10n_in/tax/public_firm_sales_tax.xml deleted file mode 100644 index 27d768aba7a..00000000000 --- a/addons/l10n_in/tax/public_firm_sales_tax.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - Sales Tax Payable - 24600 - payable - - - - - - - Sale Tax - 15% - Sale Tax - 15% - - - - 0.15 - percent - sale - - - - - - - - - Sale Tax - 12% - Sale Tax - 12% - - - - 0.12 - percent - sale - - - - - - - - - \ No newline at end of file diff --git a/addons/l10n_in/tax/public_firm_service.xml b/addons/l10n_in/tax/public_firm_service.xml deleted file mode 100644 index f57eee6796b..00000000000 --- a/addons/l10n_in/tax/public_firm_service.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - Service Tax Payable - 24700 - payable - - - - - - - Service - 12% - Service - - - - 0.12 - percent - all - - 1 - - 1 - - 1 - - 1 - - - - - - Service - 12% - 2% - Service (%2) - 0.02 - percent - all - - - - - - Service - 12% - 1% - Service (%1) - 0.01 - percent - all - - - - - - - \ No newline at end of file diff --git a/addons/l10n_in/tax/public_firm_vat.xml b/addons/l10n_in/tax/public_firm_vat.xml deleted file mode 100644 index 9ffe2b9d9ca..00000000000 --- a/addons/l10n_in/tax/public_firm_vat.xml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - VAT Payable - 24800 - payable - - - - - - - VAT - 4% - VAT - 4% - - - - 0.04 - percent - all - - 1 - - 1 - - 1 - - 1 - - - - - - VAT - 4% -1% - VAT - 1% - 0.01 - percent - all - - - - - - VAT - 12.5% - VAT - 12.5% - - - - 0.125 - percent - all - - 1 - - 1 - - 1 - - 1 - - - - - - VAT - 12.5% - %2.5 - VAT - 12.5% - %2.5 - 0.025 - percent - all - - - - - - VAT - 8% - VAT - 8% - - - - 0.08 - percent - all - - 1 - - 1 - - 1 - - 1 - - - - - - \ No newline at end of file From a7bfa42417a3047600b8357e53c4f8fdc1e0b92e Mon Sep 17 00:00:00 2001 From: "Jagdish Panchal (Open ERP)" Date: Mon, 4 Jun 2012 10:34:39 +0530 Subject: [PATCH 021/282] [IMP] l10n_in: Improve code in installer.py bzr revid: jap@tinyerp.com-20120604050439-sja8sl3j92co825d --- addons/l10n_in/installer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/l10n_in/installer.py b/addons/l10n_in/installer.py index 2d9a2a3d39b..23d03bfc87d 100644 --- a/addons/l10n_in/installer.py +++ b/addons/l10n_in/installer.py @@ -28,7 +28,7 @@ class l10n_installer(osv.osv_memory): _columns = { 'company_type':fields.selection([('partnership_private_company', 'Partnership/Private Firm'), ('public_company', 'Public Firm')], 'Company Type', required=True, - help='Select your company Type according to your need to install account chart'), + help='Select your company Type according to your need to install Chart Of Account'), } _defaults = { 'company_type': 'public_company', @@ -48,7 +48,7 @@ class l10n_installer(osv.osv_memory): tools.convert_xml_import(cr, 'l10n_in', tax_file_path, {}, 'init', True, None) tax_file_path.close() - if res['charts'] =='l10n_in' and res['company_type']=='partnership_private_company': + elif res['charts'] =='l10n_in' and res['company_type']=='partnership_private_company': acc_file_path = tools.file_open(opj('l10n_in', 'l10n_in_partnership_private_chart.xml')) tools.convert_xml_import(cr, 'l10n_in', acc_file_path, {}, 'init', True, None) acc_file_path.close() From 088e65bd0b044dc9fb148e8e80927f56d938dd84 Mon Sep 17 00:00:00 2001 From: "Jagdish Panchal (Open ERP)" Date: Tue, 5 Jun 2012 11:34:41 +0530 Subject: [PATCH 022/282] [IMP] l10n_in: Improve Usability and link account with tax bzr revid: jap@tinyerp.com-20120605060441-52p0hoksc2hr3ey6 --- addons/l10n_in/account_multi_chart_wizard.py | 46 +++++++++++++------ .../account_multi_chart_wizard_view.xml | 11 ++--- addons/l10n_in/installer.py | 2 +- .../l10n_in_private_firm_tax_template.xml | 36 +++++++-------- 4 files changed, 55 insertions(+), 40 deletions(-) diff --git a/addons/l10n_in/account_multi_chart_wizard.py b/addons/l10n_in/account_multi_chart_wizard.py index b9c242312a6..a7e018b2cdb 100644 --- a/addons/l10n_in/account_multi_chart_wizard.py +++ b/addons/l10n_in/account_multi_chart_wizard.py @@ -1,8 +1,8 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- ############################################################################## # -# Author: Nicolas Bessi. Copyright Camptocamp SA -# Donors: Hasa Sàrl, Open Net Sàrl and Prisme Solutions Informatique SA +# OpenERP, Open Source Business Applications +# Copyright (C) 2004-2012 OpenERP S.A. (). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -24,7 +24,8 @@ from os.path import join as opj import tools class account_multi_charts_wizard(osv.osv_memory): - _inherit ='wizard.multi.charts.accounts' + _name = 'wizard.multi.charts.accounts' + _inherit = 'wizard.multi.charts.accounts' _columns = { 'sales_tax': fields.boolean('Sales Tax', help='If this field is true it allows you install Sales Tax'), 'vat': fields.boolean('VAT', help='If this field is true it allows install use VAT'), @@ -45,57 +46,72 @@ class account_multi_charts_wizard(osv.osv_memory): elif data.name == 'India - Chart of Accounts for Partnership/Private Firm': res['value'].update({'sales_tax': True,'vat':True}) return res - + def _load_template(self, cr, uid, template_id, company_id, code_digits=None, obj_wizard=None, account_ref={}, taxes_ref={}, tax_code_ref={}, context=None): res = super(account_multi_charts_wizard, self)._load_template(cr, uid, template_id, company_id, code_digits, obj_wizard, account_ref, taxes_ref, tax_code_ref, context=context) template = self.pool.get('account.chart.template').browse(cr, uid, template_id, context=context) - obj_tax_code_template = self.pool.get('account.tax.code.template') obj_tax_temp = self.pool.get('account.tax.template') obj_tax = self.pool.get('account.tax') - tax_code_ref.update(obj_tax_code_template.generate_tax_code(cr, uid, template.tax_code_root_id.id, company_id, context=context)) if obj_wizard.sales_tax == False and obj_wizard.excise_duty == False and obj_wizard.vat == False and obj_wizard.service_tax == False: raise osv.except_osv(_('Error !'), _('Select Tax to Install')) - # Unlink the Tax for current company - tax_ids = obj_tax.search(cr, uid, [('company_id','=',company_id)], context=context) - obj_tax.unlink(cr, uid, tax_ids, context=context) - #Create new Tax as per selected from wizard if obj_wizard.chart_template_id.name == 'India - Chart of Accounts for Public Firm': + # Unlink the Tax for current company + tax_ids = obj_tax.search(cr, uid, [('company_id','=',company_id)], context=context) + obj_tax.unlink(cr, uid, tax_ids, context=context) + #Create new Tax as per selected from wizard if obj_wizard.sales_tax: tax_temp_ids = obj_tax_temp.search(cr, uid, [('name','in',['Sale Tax - 15%','Sale Tax - 12%']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context) tax_temp_data = obj_tax_temp.browse(cr, uid, tax_temp_ids, context=context) taxes_ref = obj_tax_temp._generate_tax(cr, uid, tax_temp_data, tax_code_ref, company_id, context=context) + self._tax_account(cr, uid, account_ref, taxes_ref, context=context) if obj_wizard.vat: tax_temp_ids = obj_tax_temp.search(cr, uid, [('name','in',['VAT - 5%','VAT - 15%','VAT - 8%']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context) tax_temp_data = obj_tax_temp.browse(cr, uid, tax_temp_ids, context=context) taxes_ref = obj_tax_temp._generate_tax(cr, uid, tax_temp_data, tax_code_ref, company_id, context=context) + self._tax_account(cr, uid, account_ref, taxes_ref, context=context) if obj_wizard.service_tax: tax_temp_ids = obj_tax_temp.search(cr, uid, [('name','in',['Service Tax','Service Tax - %2','Service Tax - %1']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context) tax_temp_data = obj_tax_temp.browse(cr, uid, tax_temp_ids, context=context) taxes_ref = obj_tax_temp._generate_tax(cr, uid, tax_temp_data, tax_code_ref, company_id, context=context) + self._tax_account(cr, uid, account_ref, taxes_ref, context=context) if obj_wizard.excise_duty: tax_temp_ids = obj_tax_temp.search(cr, uid, [('name','in',['Excise Duty','Excise Duty - %2','Excise Duty - 1%']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context) tax_temp_data = obj_tax_temp.browse(cr, uid, tax_temp_ids, context=context) - taxes_ref = obj_tax_temp._generate_tax(cr, uid, tax_temp_data, tax_code_ref, company_id, context=context) - + taxes_ref = obj_tax_temp._generate_tax(cr, uid, tax_temp_data, tax_code_ref, company_id, context=context) + self._tax_account(cr, uid, account_ref, taxes_ref, context=context) elif obj_wizard.chart_template_id.name == 'India - Chart of Accounts for Partnership/Private Firm': + # Unlink the Tax for current company + tax_ids = obj_tax.search(cr, uid, [('company_id','=',company_id)], context=context) + obj_tax.unlink(cr, uid, tax_ids, context=context) + #Create new Tax as per selected from wizard if obj_wizard.sales_tax: tax_temp_ids = obj_tax_temp.search(cr, uid, [('name','in',['Sale Tax - 15%','Sale Tax - 12%']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context) tax_temp_data = obj_tax_temp.browse(cr, uid, tax_temp_ids, context=context) taxes_ref = obj_tax_temp._generate_tax(cr, uid, tax_temp_data, tax_code_ref, company_id, context=context) + self._tax_account(cr, uid, account_ref, taxes_ref, context=context) if obj_wizard.vat: tax_temp_ids = obj_tax_temp.search(cr, uid, [('name','in',['VAT - 5%','VAT - 15%','VAT - 8%']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context) tax_temp_data = obj_tax_temp.browse(cr, uid, tax_temp_ids, context=context) taxes_ref = obj_tax_temp._generate_tax(cr, uid, tax_temp_data, tax_code_ref, company_id, context=context) + self._tax_account(cr, uid, account_ref, taxes_ref, context=context) if obj_wizard.service_tax: tax_temp_ids = obj_tax_temp.search(cr, uid, [('name','in',['Service Tax', 'Service Tax - %2', 'Service Tax - %1']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context) tax_temp_data = obj_tax_temp.browse(cr, uid, tax_temp_ids, context=context) taxes_ref = obj_tax_temp._generate_tax(cr, uid, tax_temp_data, tax_code_ref, company_id, context=context) + self._tax_account(cr, uid, account_ref, taxes_ref, context=context) if obj_wizard.excise_duty: tax_temp_ids = obj_tax_temp.search(cr, uid, [('name','in',['Excise Duty', 'Excise Duty - %2', 'Excise Duty - 1%']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context) tax_temp_data = obj_tax_temp.browse(cr, uid, tax_temp_ids, context=context) - taxes_ref = obj_tax_temp._generate_tax(cr, uid, tax_temp_data, tax_code_ref, company_id, context=context) + taxes_ref = obj_tax_temp._generate_tax(cr, uid, tax_temp_data, tax_code_ref, company_id, context=context) + self._tax_account(cr, uid, account_ref, taxes_ref, context=context) return account_ref, taxes_ref, tax_code_ref - + + def _tax_account(self, cr, uid, account_ref, taxes_ref, context=None): + obj_tax = self.pool.get('account.tax') + for key,value in taxes_ref['account_dict'].items(): + obj_tax.write(cr, uid, [key], { 'account_collected_id': account_ref.get(value['account_collected_id'], False), 'account_paid_id': account_ref.get(value['account_paid_id'], False),}) + return True + account_multi_charts_wizard() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_in/account_multi_chart_wizard_view.xml b/addons/l10n_in/account_multi_chart_wizard_view.xml index 899d81fc65b..dde9e5981ca 100644 --- a/addons/l10n_in/account_multi_chart_wizard_view.xml +++ b/addons/l10n_in/account_multi_chart_wizard_view.xml @@ -9,12 +9,11 @@ - - - - - - + + + + + diff --git a/addons/l10n_in/installer.py b/addons/l10n_in/installer.py index 23d03bfc87d..7d4cb04b803 100644 --- a/addons/l10n_in/installer.py +++ b/addons/l10n_in/installer.py @@ -28,7 +28,7 @@ class l10n_installer(osv.osv_memory): _columns = { 'company_type':fields.selection([('partnership_private_company', 'Partnership/Private Firm'), ('public_company', 'Public Firm')], 'Company Type', required=True, - help='Select your company Type according to your need to install Chart Of Account'), + help='Company Type is used to install Indian chart of accounts as per your type of business.'), } _defaults = { 'company_type': 'public_company', diff --git a/addons/l10n_in/l10n_in_private_firm_tax_template.xml b/addons/l10n_in/l10n_in_private_firm_tax_template.xml index 564eb41fdfd..d3d627b54da 100644 --- a/addons/l10n_in/l10n_in_private_firm_tax_template.xml +++ b/addons/l10n_in/l10n_in_private_firm_tax_template.xml @@ -4,7 +4,7 @@ - + Sales Tax Payable 216 payable @@ -13,7 +13,7 @@ - + VAT Payable 217 payable @@ -22,7 +22,7 @@ - + Service Tax Payable 218 payable @@ -31,7 +31,7 @@ - + Exice Duty Payable 219 payable @@ -50,8 +50,8 @@ 0.15 percent sale - - + + @@ -67,8 +67,8 @@ 0.12 percent sale - - + + @@ -86,8 +86,8 @@ 0.05 percent all - - + + 1 @@ -107,8 +107,8 @@ 0.15 percent all - - + + 1 @@ -128,8 +128,8 @@ 0.8 percent all - - + + @@ -147,8 +147,8 @@ 0.10 percent sale - - + + 1 @@ -190,8 +190,8 @@ 0.12 percent - - + + From a5db806929c6265eb891b6017746ae04bcedb194 Mon Sep 17 00:00:00 2001 From: "Jagdish Panchal (Open ERP)" Date: Fri, 8 Jun 2012 18:36:38 +0530 Subject: [PATCH 023/282] [IMP] l10n_in: Improve code bzr revid: jap@tinyerp.com-20120608130638-0zii119hfa340wgv --- addons/l10n_in/account_multi_chart_wizard.py | 49 ++++++------------- .../account_multi_chart_wizard_view.xml | 11 +++-- 2 files changed, 20 insertions(+), 40 deletions(-) diff --git a/addons/l10n_in/account_multi_chart_wizard.py b/addons/l10n_in/account_multi_chart_wizard.py index a7e018b2cdb..78fa5fe23da 100644 --- a/addons/l10n_in/account_multi_chart_wizard.py +++ b/addons/l10n_in/account_multi_chart_wizard.py @@ -44,7 +44,7 @@ class account_multi_charts_wizard(osv.osv_memory): if data.name == 'India - Chart of Accounts for Public Firm': res['value'].update({'sales_tax': True,'vat':True, 'service_tax':True, 'excise_duty': True}) elif data.name == 'India - Chart of Accounts for Partnership/Private Firm': - res['value'].update({'sales_tax': True,'vat':True}) + res['value'].update({'sales_tax': True,'vat':True, 'service_tax':False, 'excise_duty': False}) return res def _load_template(self, cr, uid, template_id, company_id, code_digits=None, obj_wizard=None, account_ref={}, taxes_ref={}, tax_code_ref={}, context=None): @@ -52,58 +52,37 @@ class account_multi_charts_wizard(osv.osv_memory): template = self.pool.get('account.chart.template').browse(cr, uid, template_id, context=context) obj_tax_temp = self.pool.get('account.tax.template') obj_tax = self.pool.get('account.tax') - if obj_wizard.sales_tax == False and obj_wizard.excise_duty == False and obj_wizard.vat == False and obj_wizard.service_tax == False: - raise osv.except_osv(_('Error !'), _('Select Tax to Install')) + tax_temp_ids = [] if obj_wizard.chart_template_id.name == 'India - Chart of Accounts for Public Firm': # Unlink the Tax for current company tax_ids = obj_tax.search(cr, uid, [('company_id','=',company_id)], context=context) obj_tax.unlink(cr, uid, tax_ids, context=context) #Create new Tax as per selected from wizard if obj_wizard.sales_tax: - tax_temp_ids = obj_tax_temp.search(cr, uid, [('name','in',['Sale Tax - 15%','Sale Tax - 12%']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context) - tax_temp_data = obj_tax_temp.browse(cr, uid, tax_temp_ids, context=context) - taxes_ref = obj_tax_temp._generate_tax(cr, uid, tax_temp_data, tax_code_ref, company_id, context=context) - self._tax_account(cr, uid, account_ref, taxes_ref, context=context) + tax_temp_ids.append(obj_tax_temp.search(cr, uid, [('name','in',['Sale Tax - 15%','Sale Tax - 12%']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context)) if obj_wizard.vat: - tax_temp_ids = obj_tax_temp.search(cr, uid, [('name','in',['VAT - 5%','VAT - 15%','VAT - 8%']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context) - tax_temp_data = obj_tax_temp.browse(cr, uid, tax_temp_ids, context=context) - taxes_ref = obj_tax_temp._generate_tax(cr, uid, tax_temp_data, tax_code_ref, company_id, context=context) - self._tax_account(cr, uid, account_ref, taxes_ref, context=context) + tax_temp_ids.append(obj_tax_temp.search(cr, uid, [('name','in',['VAT - 5%','VAT - 15%','VAT - 8%']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context)) if obj_wizard.service_tax: - tax_temp_ids = obj_tax_temp.search(cr, uid, [('name','in',['Service Tax','Service Tax - %2','Service Tax - %1']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context) - tax_temp_data = obj_tax_temp.browse(cr, uid, tax_temp_ids, context=context) - taxes_ref = obj_tax_temp._generate_tax(cr, uid, tax_temp_data, tax_code_ref, company_id, context=context) - self._tax_account(cr, uid, account_ref, taxes_ref, context=context) + tax_temp_ids.append(obj_tax_temp.search(cr, uid, [('name','in',['Service Tax', 'Service Tax - %2', 'Service Tax - %1']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context)) if obj_wizard.excise_duty: - tax_temp_ids = obj_tax_temp.search(cr, uid, [('name','in',['Excise Duty','Excise Duty - %2','Excise Duty - 1%']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context) - tax_temp_data = obj_tax_temp.browse(cr, uid, tax_temp_ids, context=context) - taxes_ref = obj_tax_temp._generate_tax(cr, uid, tax_temp_data, tax_code_ref, company_id, context=context) - self._tax_account(cr, uid, account_ref, taxes_ref, context=context) + tax_temp_ids.append(obj_tax_temp.search(cr, uid, [('name','in',['Excise Duty', 'Excise Duty - %2', 'Excise Duty - 1%']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context)) elif obj_wizard.chart_template_id.name == 'India - Chart of Accounts for Partnership/Private Firm': # Unlink the Tax for current company tax_ids = obj_tax.search(cr, uid, [('company_id','=',company_id)], context=context) obj_tax.unlink(cr, uid, tax_ids, context=context) #Create new Tax as per selected from wizard if obj_wizard.sales_tax: - tax_temp_ids = obj_tax_temp.search(cr, uid, [('name','in',['Sale Tax - 15%','Sale Tax - 12%']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context) - tax_temp_data = obj_tax_temp.browse(cr, uid, tax_temp_ids, context=context) - taxes_ref = obj_tax_temp._generate_tax(cr, uid, tax_temp_data, tax_code_ref, company_id, context=context) - self._tax_account(cr, uid, account_ref, taxes_ref, context=context) + tax_temp_ids.append(obj_tax_temp.search(cr, uid, [('name','in',['Sale Tax - 15%','Sale Tax - 12%']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context)) if obj_wizard.vat: - tax_temp_ids = obj_tax_temp.search(cr, uid, [('name','in',['VAT - 5%','VAT - 15%','VAT - 8%']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context) - tax_temp_data = obj_tax_temp.browse(cr, uid, tax_temp_ids, context=context) - taxes_ref = obj_tax_temp._generate_tax(cr, uid, tax_temp_data, tax_code_ref, company_id, context=context) - self._tax_account(cr, uid, account_ref, taxes_ref, context=context) + tax_temp_ids.append(obj_tax_temp.search(cr, uid, [('name','in',['VAT - 5%','VAT - 15%','VAT - 8%']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context)) if obj_wizard.service_tax: - tax_temp_ids = obj_tax_temp.search(cr, uid, [('name','in',['Service Tax', 'Service Tax - %2', 'Service Tax - %1']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context) - tax_temp_data = obj_tax_temp.browse(cr, uid, tax_temp_ids, context=context) - taxes_ref = obj_tax_temp._generate_tax(cr, uid, tax_temp_data, tax_code_ref, company_id, context=context) - self._tax_account(cr, uid, account_ref, taxes_ref, context=context) + tax_temp_ids.append(obj_tax_temp.search(cr, uid, [('name','in',['Service Tax', 'Service Tax - %2', 'Service Tax - %1']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context)) if obj_wizard.excise_duty: - tax_temp_ids = obj_tax_temp.search(cr, uid, [('name','in',['Excise Duty', 'Excise Duty - %2', 'Excise Duty - 1%']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context) - tax_temp_data = obj_tax_temp.browse(cr, uid, tax_temp_ids, context=context) - taxes_ref = obj_tax_temp._generate_tax(cr, uid, tax_temp_data, tax_code_ref, company_id, context=context) - self._tax_account(cr, uid, account_ref, taxes_ref, context=context) + tax_temp_ids.append(obj_tax_temp.search(cr, uid, [('name','in',['Excise Duty', 'Excise Duty - %2', 'Excise Duty - 1%']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context)) + for temp in tax_temp_ids: + tax_temp_data = obj_tax_temp.browse(cr, uid, temp, context=context) + taxes_ref = obj_tax_temp._generate_tax(cr, uid, tax_temp_data, tax_code_ref, company_id, context=context) + self._tax_account(cr, uid, account_ref, taxes_ref, context=context) return account_ref, taxes_ref, tax_code_ref def _tax_account(self, cr, uid, account_ref, taxes_ref, context=None): diff --git a/addons/l10n_in/account_multi_chart_wizard_view.xml b/addons/l10n_in/account_multi_chart_wizard_view.xml index dde9e5981ca..d864a01a3a8 100644 --- a/addons/l10n_in/account_multi_chart_wizard_view.xml +++ b/addons/l10n_in/account_multi_chart_wizard_view.xml @@ -9,11 +9,12 @@ - - - - - + + + + + + From 96333130201c0db03f284fe85cf29d9d6d55defb Mon Sep 17 00:00:00 2001 From: "Jagdish Panchal (Open ERP)" Date: Tue, 12 Jun 2012 12:17:12 +0530 Subject: [PATCH 024/282] [IMP] l10n_in: Remove file l10n_in/account_multi_chart_wizard.py and l10n_in/account_multi_chart_wizard_view.xml bzr revid: jap@tinyerp.com-20120612064712-tviq139uo8yyd1zs --- addons/l10n_in/__init__.py | 1 - addons/l10n_in/__openerp__.py | 1 - addons/l10n_in/account_multi_chart_wizard.py | 96 ------------------- .../account_multi_chart_wizard_view.xml | 22 ----- 4 files changed, 120 deletions(-) delete mode 100644 addons/l10n_in/account_multi_chart_wizard.py delete mode 100644 addons/l10n_in/account_multi_chart_wizard_view.xml diff --git a/addons/l10n_in/__init__.py b/addons/l10n_in/__init__.py index db0c795ae73..f97bda7fb89 100644 --- a/addons/l10n_in/__init__.py +++ b/addons/l10n_in/__init__.py @@ -28,6 +28,5 @@ ############################################################################## import installer -import account_multi_chart_wizard # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_in/__openerp__.py b/addons/l10n_in/__openerp__.py index cbacb5e5ac3..630d99ca8db 100644 --- a/addons/l10n_in/__openerp__.py +++ b/addons/l10n_in/__openerp__.py @@ -37,7 +37,6 @@ Indian accounting chart and localization. "demo_xml": [], "update_xml": [ "account_tax_code_template.xml", - "account_multi_chart_wizard_view.xml", "l10n_in_wizard.xml", "installer_view.xml", ], diff --git a/addons/l10n_in/account_multi_chart_wizard.py b/addons/l10n_in/account_multi_chart_wizard.py deleted file mode 100644 index 78fa5fe23da..00000000000 --- a/addons/l10n_in/account_multi_chart_wizard.py +++ /dev/null @@ -1,96 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Business Applications -# Copyright (C) 2004-2012 OpenERP S.A. (). -# -# 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 tools.translate import _ -from osv import fields, osv -from os.path import join as opj -import tools - -class account_multi_charts_wizard(osv.osv_memory): - _name = 'wizard.multi.charts.accounts' - _inherit = 'wizard.multi.charts.accounts' - _columns = { - 'sales_tax': fields.boolean('Sales Tax', help='If this field is true it allows you install Sales Tax'), - 'vat': fields.boolean('VAT', help='If this field is true it allows install use VAT'), - 'service_tax': fields.boolean('Service Tax', help='If this field is true it allows you install Service tax'), - 'excise_duty': fields.boolean('Excise Duty', help='If this field is true it allows you install Excise duty'), - 'is_indian_chart': fields.boolean('Indian Chart?') - } - - def onchange_chart_template_id(self, cr, uid, ids, chart_template_id=False, context=None): - res = super(account_multi_charts_wizard, self).onchange_chart_template_id(cr, uid, ids, chart_template_id, context=context) - data = self.pool.get('account.chart.template').browse(cr, uid, chart_template_id, context=context) - if data.name in ('India - Chart of Accounts for Public Firm', 'India - Chart of Accounts for Partnership/Private Firm'): - res['value'].update({'is_indian_chart': True}) - else: - res['value'].update({'is_indian_chart': False}) - if data.name == 'India - Chart of Accounts for Public Firm': - res['value'].update({'sales_tax': True,'vat':True, 'service_tax':True, 'excise_duty': True}) - elif data.name == 'India - Chart of Accounts for Partnership/Private Firm': - res['value'].update({'sales_tax': True,'vat':True, 'service_tax':False, 'excise_duty': False}) - return res - - def _load_template(self, cr, uid, template_id, company_id, code_digits=None, obj_wizard=None, account_ref={}, taxes_ref={}, tax_code_ref={}, context=None): - res = super(account_multi_charts_wizard, self)._load_template(cr, uid, template_id, company_id, code_digits, obj_wizard, account_ref, taxes_ref, tax_code_ref, context=context) - template = self.pool.get('account.chart.template').browse(cr, uid, template_id, context=context) - obj_tax_temp = self.pool.get('account.tax.template') - obj_tax = self.pool.get('account.tax') - tax_temp_ids = [] - if obj_wizard.chart_template_id.name == 'India - Chart of Accounts for Public Firm': - # Unlink the Tax for current company - tax_ids = obj_tax.search(cr, uid, [('company_id','=',company_id)], context=context) - obj_tax.unlink(cr, uid, tax_ids, context=context) - #Create new Tax as per selected from wizard - if obj_wizard.sales_tax: - tax_temp_ids.append(obj_tax_temp.search(cr, uid, [('name','in',['Sale Tax - 15%','Sale Tax - 12%']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context)) - if obj_wizard.vat: - tax_temp_ids.append(obj_tax_temp.search(cr, uid, [('name','in',['VAT - 5%','VAT - 15%','VAT - 8%']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context)) - if obj_wizard.service_tax: - tax_temp_ids.append(obj_tax_temp.search(cr, uid, [('name','in',['Service Tax', 'Service Tax - %2', 'Service Tax - %1']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context)) - if obj_wizard.excise_duty: - tax_temp_ids.append(obj_tax_temp.search(cr, uid, [('name','in',['Excise Duty', 'Excise Duty - %2', 'Excise Duty - 1%']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context)) - elif obj_wizard.chart_template_id.name == 'India - Chart of Accounts for Partnership/Private Firm': - # Unlink the Tax for current company - tax_ids = obj_tax.search(cr, uid, [('company_id','=',company_id)], context=context) - obj_tax.unlink(cr, uid, tax_ids, context=context) - #Create new Tax as per selected from wizard - if obj_wizard.sales_tax: - tax_temp_ids.append(obj_tax_temp.search(cr, uid, [('name','in',['Sale Tax - 15%','Sale Tax - 12%']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context)) - if obj_wizard.vat: - tax_temp_ids.append(obj_tax_temp.search(cr, uid, [('name','in',['VAT - 5%','VAT - 15%','VAT - 8%']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context)) - if obj_wizard.service_tax: - tax_temp_ids.append(obj_tax_temp.search(cr, uid, [('name','in',['Service Tax', 'Service Tax - %2', 'Service Tax - %1']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context)) - if obj_wizard.excise_duty: - tax_temp_ids.append(obj_tax_temp.search(cr, uid, [('name','in',['Excise Duty', 'Excise Duty - %2', 'Excise Duty - 1%']),('chart_template_id','=',obj_wizard.chart_template_id.id)], context=context)) - for temp in tax_temp_ids: - tax_temp_data = obj_tax_temp.browse(cr, uid, temp, context=context) - taxes_ref = obj_tax_temp._generate_tax(cr, uid, tax_temp_data, tax_code_ref, company_id, context=context) - self._tax_account(cr, uid, account_ref, taxes_ref, context=context) - return account_ref, taxes_ref, tax_code_ref - - def _tax_account(self, cr, uid, account_ref, taxes_ref, context=None): - obj_tax = self.pool.get('account.tax') - for key,value in taxes_ref['account_dict'].items(): - obj_tax.write(cr, uid, [key], { 'account_collected_id': account_ref.get(value['account_collected_id'], False), 'account_paid_id': account_ref.get(value['account_paid_id'], False),}) - return True - -account_multi_charts_wizard() - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_in/account_multi_chart_wizard_view.xml b/addons/l10n_in/account_multi_chart_wizard_view.xml deleted file mode 100644 index d864a01a3a8..00000000000 --- a/addons/l10n_in/account_multi_chart_wizard_view.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - Generate Chart of Accounts from a Chart Template - wizard.multi.charts.accounts - form - - - - - - - - - - - - - - - From 2911d6a8c5532310e07b3b593d78c43653190137 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Grand-Guillaume?= Date: Thu, 21 Jun 2012 12:40:18 +0200 Subject: [PATCH 025/282] [IMP] Provide _prepare* hooks in bank statement object for the entries creations of account.move.line from a statement line bzr revid: joel.grandguillaume@camptocamp.com-20120621104018-ryylbaxh6696e0rc --- addons/account/account_bank_statement.py | 247 +++++++++++++++++------ 1 file changed, 184 insertions(+), 63 deletions(-) diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index 1f47a6be9bd..97d10bfc022 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -205,7 +205,182 @@ class account_bank_statement(osv.osv): def button_dummy(self, cr, uid, ids, context=None): return self.write(cr, uid, ids, {}, context=context) + def _prepare_move(self, cr, uid, st_line, st_line_number, context=None): + """Prepare the dict of values to create the move from a + statement line. This method may be overridden to implement custom + move generation (making sure to call super() to establish + a clean extension chain). + + :param browse_record st_line: account.bank.statement.line record to + create the move from. + :param char st_line_number: will be used as the name of the generated account move + :return: dict of value to create() the account.move + """ + move_vals = { + 'journal_id': st_line.statement_id.journal_id.id, + 'period_id': st_line.statement_id.period_id.id, + 'date': st_line.date, + 'name': st_line_number, + 'ref': st_line.ref, + } + return move_vals + + def _prepare_bank_move_line(self, cr, uid, st_line, move_id, amount, company_currency_id, + context=None): + """Compute the args to build the dict of values to create the bank move line from a + statement line by calling the _prepare_move_line_vals. This method may be + overridden to implement custom move generation (making sure to call super() to + establish a clean extension chain). + + :param browse_record st_line: account.bank.statement.line record to + create the move from. + :param int/long move_id: ID of the account.move to link the move line + :param float amount: amount of the move line + :param int/long company_currency_id: ID of currency of the concerned company + :return: dict of value to create() the bank account.move.line + """ + anl_id = st_line.analytic_account_id and st_line.analytic_account_id.id or False + debit = ((amount<0) and -amount) or 0.0 + credit = ((amount>0) and amount) or 0.0 + cur_id = False + amt_cur = False + if st_line.statement_id.currency.id <> company_currency_id: + amount_cur = res_currency_obj.compute(cr, uid, company_currency_id, + st.currency.id, amount, context=context) + amt_cur = -amount_cur + if st_line.account_id and st_line.account_id.currency_id and st_line.account_id.currency_id.id <> company_currency_id: + cur_id = st_line.account_id.currency_id.id + amount_cur = res_currency_obj.compute(cr, uid, company_currency_id, + st_line.account_id.currency_id.id, amount, context=context) + amt_cur = -amount_cur + + res = self._prepare_move_line_vals(cr, uid, st_line, move_id, debit, credit, + amount_currency=amt_cur, currency_id=cur_id, analytic_id = anl_id, context=context) + return res + + def _get_counter_part_account(sefl, cr, uid, st_line, context=None): + """Retrieve the account to use in the counterpart move. + This method may be overridden to implement custom move generation (making sure to + call super() to establish a clean extension chain). + + :param browse_record st_line: account.bank.statement.line record to + create the move from. + :return: int/long of the account.account to use as counterpart + """ + account_id = False + if st_line.amount >= 0: + account_id = st_line.statement_id.journal_id.default_credit_account_id.id + else: + account_id = st_line.statement_id.journal_id.default_debit_account_id.id + return account_id + + def _get_counter_part_partner(sefl, cr, uid, st_line, context=None): + """Retrieve the partner to use in the counterpart move. + This method may be overridden to implement custom move generation (making sure to + call super() to establish a clean extension chain). + + :param browse_record st_line: account.bank.statement.line record to + create the move from. + :return: int/long of the res.partner to use as counterpart + """ + import pdb;pdb.set_trace() + partner_id = ((st_line.partner_id) and st_line.partner_id.id) or False + return partner_id + + + def _prepare_counterpart_move_line(self, cr, uid, st_line, move_id, amount, company_currency_id, + context=None): + """Compute the args to build the dict of values to create the counter part move line from a + statement line by calling the _prepare_move_line_vals. This method may be + overridden to implement custom move generation (making sure to call super() to + establish a clean extension chain). + + :param browse_record st_line: account.bank.statement.line record to + create the move from. + :param int/long move_id: ID of the account.move to link the move line + :param float amount: amount of the move line + :param int/long account_id: ID of account to use as counter part + :param int/long company_currency_id: ID of currency of the concerned company + :return: dict of value to create() the bank account.move.line + """ + account_id = self._get_counter_part_account(cr, uid, st_line, context=context) + partner_id = self._get_counter_part_partner(cr, uid, st_line, context=context) + debit = ((amount > 0) and amount) or 0.0 + credit = ((amount < 0) and -amount) or 0.0 + cur_id = False + amt_cur = False + if st_line.statement_id.currency.id <> company_currency_id: + amt_cur = st_line.amount + cur_id = st_line.statement_id.currency.id + res = self._prepare_move_line_vals(cr, uid, st_line, move_id, debit, credit, + amount_currency = amt_cur, currency_id = cur_id, account_id = account_id, + partner_id = partner_id, context=context) + return res + + def _prepare_move_line_vals(self, cr, uid, st_line, move_id, debit, credit, currency_id = False, + amount_currency= False, account_id = False, analytic_id = False, + partner_id = False, context=None): + """Prepare the dict of values to create the move line from a + statement line. All non-mandatory args will replace the default computed one. + This method may be overridden to implement custom move generation (making sure to + call super() to establish a clean extension chain). + + :param browse_record st_line: account.bank.statement.line record to + create the move from. + :param int/long move_id: ID of the account.move to link the move line + :param float debit: debit amount of the move line + :param float credit: credit amount of the move line + :param int/long currency_id: ID of currency of the move line to create + :param float amount_currency: amount of the debit/credit expressed in the currency_id + :param int/long account_id: ID of the account to use in the move line if different + from the statement line account ID + :param int/long analytic_id: ID of analytic account to put on the move line + :param int/long partner_id: ID of the partner to put on the move line + :return: dict of value to create() the account.move.line + """ + acc_id = (st_line.account_id) and st_line.account_id.id + cur_id = st_line.statement_id.currency.id + par_id = ((st_line.partner_id) and st_line.partner_id.id) or False + anl_acc_id = False + am_curr = False + amount_currency = False + if account_id: + acc_id = account_id + if currency_id: + cur_id = currency_id + if amount_currency: + am_curr = amount_currency + if analytic_id: + anl_acc_id = analytic_id + if partner_id: + par_id = partner_id + ml_val = { + 'name': st_line.name, + 'date': st_line.date, + 'ref': st_line.ref, + 'move_id': move_id, + 'partner_id': partner_id, + 'account_id': acc_id, + 'credit': credit, + 'debit': debit, + 'statement_id': st_line.statement_id.id, + 'journal_id': st_line.statement_id.journal_id.id, + 'period_id': st_line.statement_id.period_id.id, + 'currency_id': cur_id, + 'amount_currency': am_curr, + 'analytic_account_id': anl_acc_id, + } + return ml_val + def create_move_from_st_line(self, cr, uid, st_line_id, company_currency_id, st_line_number, context=None): + """Create the account move from the statement line using the _prepare_bank_move_line and + _prepare_counterpart_move_line hook methods. + :param int/long st_line: ID of the account.bank.statement.line to create the move from. + :param int/long company_currency_id: ID of the res.currency of the company + :param char st_line_number: will be used as the name of the generated account move + :return: ID of the account.move created + """ + if context is None: context = {} res_currency_obj = self.pool.get('res.currency') @@ -217,82 +392,28 @@ class account_bank_statement(osv.osv): context.update({'date': st_line.date}) - move_id = account_move_obj.create(cr, uid, { - 'journal_id': st.journal_id.id, - 'period_id': st.period_id.id, - 'date': st_line.date, - 'name': st_line_number, - 'ref': st_line.ref, - }, context=context) + move_vals = self._prepare_move(cr, uid, st_line, st_line_number, context=context) + move_id = account_move_obj.create(cr, uid, move_vals, context=context) account_bank_statement_line_obj.write(cr, uid, [st_line.id], { 'move_ids': [(4, move_id, False)] }) - torec = [] - if st_line.amount >= 0: - account_id = st.journal_id.default_credit_account_id.id - else: - account_id = st.journal_id.default_debit_account_id.id - acc_cur = ((st_line.amount<=0) and st.journal_id.default_debit_account_id) or st_line.account_id + context.update({ 'res.currency.compute.account': acc_cur, }) amount = res_currency_obj.compute(cr, uid, st.currency.id, company_currency_id, st_line.amount, context=context) - val = { - 'name': st_line.name, - 'date': st_line.date, - 'ref': st_line.ref, - 'move_id': move_id, - 'partner_id': ((st_line.partner_id) and st_line.partner_id.id) or False, - 'account_id': (st_line.account_id) and st_line.account_id.id, - 'credit': ((amount>0) and amount) or 0.0, - 'debit': ((amount<0) and -amount) or 0.0, - 'statement_id': st.id, - 'journal_id': st.journal_id.id, - 'period_id': st.period_id.id, - 'currency_id': st.currency.id, - 'analytic_account_id': st_line.analytic_account_id and st_line.analytic_account_id.id or False - } - - if st.currency.id <> company_currency_id: - amount_cur = res_currency_obj.compute(cr, uid, company_currency_id, - st.currency.id, amount, context=context) - val['amount_currency'] = -amount_cur - - if st_line.account_id and st_line.account_id.currency_id and st_line.account_id.currency_id.id <> company_currency_id: - val['currency_id'] = st_line.account_id.currency_id.id - amount_cur = res_currency_obj.compute(cr, uid, company_currency_id, - st_line.account_id.currency_id.id, amount, context=context) - val['amount_currency'] = -amount_cur - - move_line_id = account_move_line_obj.create(cr, uid, val, context=context) + bank_move_val = self._prepare_bank_move_line(cr, uid, st_line, move_id, amount, + company_currency_id, context=context) + move_line_id = account_move_line_obj.create(cr, uid, bank_move_val, context=context) torec.append(move_line_id) - # Fill the secondary amount/currency - # if currency is not the same than the company - amount_currency = False - currency_id = False - if st.currency.id <> company_currency_id: - amount_currency = st_line.amount - currency_id = st.currency.id - account_move_line_obj.create(cr, uid, { - 'name': st_line.name, - 'date': st_line.date, - 'ref': st_line.ref, - 'move_id': move_id, - 'partner_id': ((st_line.partner_id) and st_line.partner_id.id) or False, - 'account_id': account_id, - 'credit': ((amount < 0) and -amount) or 0.0, - 'debit': ((amount > 0) and amount) or 0.0, - 'statement_id': st.id, - 'journal_id': st.journal_id.id, - 'period_id': st.period_id.id, - 'amount_currency': amount_currency, - 'currency_id': currency_id, - }, context=context) + counterpart_move_val = self._prepare_counterpart_move_line(cr, uid, st_line, move_id, + amount, company_currency_id, context=context) + account_move_line_obj.create(cr, uid, counterpart_move_val, context=context) for line in account_move_line_obj.browse(cr, uid, [x.id for x in account_move_obj.browse(cr, uid, move_id, From 28908bea003e11e2df7ccedc58f9a0fbee159bc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Grand-Guillaume?= Date: Thu, 21 Jun 2012 13:49:16 +0200 Subject: [PATCH 026/282] [FIX] Remove pdb... no comment... bzr revid: joel.grandguillaume@camptocamp.com-20120621114916-a0uy3ipru8usgzo0 --- addons/account/account_bank_statement.py | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index 97d10bfc022..ece18a016fe 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -283,7 +283,6 @@ class account_bank_statement(osv.osv): create the move from. :return: int/long of the res.partner to use as counterpart """ - import pdb;pdb.set_trace() partner_id = ((st_line.partner_id) and st_line.partner_id.id) or False return partner_id From 2c115e6856f5c6eb7f3d730b0ccfa028b386b009 Mon Sep 17 00:00:00 2001 From: Ronald Portier Date: Fri, 22 Jun 2012 16:19:32 +0200 Subject: [PATCH 027/282] [FIX] Problem with runaway cpu and/or postgres crash on analytic account analysis. lp bug: https://launchpad.net/bugs/1015995 fixed bzr revid: ronald@therp.nl-20120622141932-f6rywvd1nawn186w --- .../account_analytic_analysis.py | 54 +++++++------------ 1 file changed, 19 insertions(+), 35 deletions(-) diff --git a/addons/account_analytic_analysis/account_analytic_analysis.py b/addons/account_analytic_analysis/account_analytic_analysis.py index 20c170cb5c0..cedcc9fa533 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis.py +++ b/addons/account_analytic_analysis/account_analytic_analysis.py @@ -418,41 +418,25 @@ class account_analytic_account_summary_user(osv.osv): } def init(self, cr): - tools.sql.drop_view_if_exists(cr, 'account_analytic_analysis_summary_user') - cr.execute('CREATE OR REPLACE VIEW account_analytic_analysis_summary_user AS (' \ - 'SELECT ' \ - '(u.account_id * u.max_user) + u."user" AS id, ' \ - 'u.account_id AS account_id, ' \ - 'u."user" AS "user", ' \ - 'COALESCE(SUM(l.unit_amount), 0.0) AS unit_amount ' \ - 'FROM ' \ - '(SELECT ' \ - 'a.id AS account_id, ' \ - 'u1.id AS "user", ' \ - 'MAX(u2.id) AS max_user ' \ - 'FROM ' \ - 'res_users AS u1, ' \ - 'res_users AS u2, ' \ - 'account_analytic_account AS a ' \ - 'GROUP BY u1.id, a.id ' \ - ') AS u ' \ - 'LEFT JOIN ' \ - '(SELECT ' \ - 'l.account_id AS account_id, ' \ - 'l.user_id AS "user", ' \ - 'SUM(l.unit_amount) AS unit_amount ' \ - 'FROM account_analytic_line AS l, ' \ - 'account_analytic_journal AS j ' \ - 'WHERE (j.type = \'general\') and (j.id=l.journal_id) ' \ - 'GROUP BY l.account_id, l.user_id ' \ - ') AS l ' - 'ON (' \ - 'u.account_id = l.account_id ' \ - 'AND u."user" = l."user"' \ - ') ' \ - 'GROUP BY u."user", u.account_id, u.max_user' \ - ')') - + cr.execute('''CREATE OR REPLACE VIEW account_analytic_analysis_summary_user AS ( + with mu as + (select max(id) as max_user from res_users) + , lu AS + (SELECT + l.account_id AS account_id, + coalesce(l.user_id, 0) AS user_id, + SUM(l.unit_amount) AS unit_amount + FROM account_analytic_line AS l, + account_analytic_journal AS j + WHERE (j.type = 'general' ) and (j.id=l.journal_id) + GROUP BY l.account_id, l.user_id + ) + select (lu.account_id * mu.max_user) + lu.user_id as id, + lu.account_id as account_id, + lu.user_id as "user", + unit_amount + from lu, mu)''') + account_analytic_account_summary_user() class account_analytic_account_summary_month(osv.osv): From ff4342dc4f08adf10343ae700d8c9ebf89fdd2a2 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Mon, 25 Jun 2012 14:26:30 +0200 Subject: [PATCH 028/282] [ADD] signup addon bzr revid: chs@openerp.com-20120625122630-ce6hywabt512xbh6 --- addons/anonymous/static/src/xml/anonymous.xml | 2 + addons/signup/__init__.py | 2 + addons/signup/__openerp__.py | 23 +++++++ addons/signup/res_config.py | 19 ++++++ addons/signup/res_config.xml | 16 +++++ addons/signup/signup_wizard.py | 65 +++++++++++++++++++ addons/signup/signup_wizard.xml | 41 ++++++++++++ addons/signup/static/src/js/signup.js | 21 ++++++ addons/signup/static/src/xml/signup.xml | 14 ++++ 9 files changed, 203 insertions(+) create mode 100644 addons/signup/__init__.py create mode 100644 addons/signup/__openerp__.py create mode 100644 addons/signup/res_config.py create mode 100644 addons/signup/res_config.xml create mode 100644 addons/signup/signup_wizard.py create mode 100644 addons/signup/signup_wizard.xml create mode 100644 addons/signup/static/src/js/signup.js create mode 100644 addons/signup/static/src/xml/signup.xml diff --git a/addons/anonymous/static/src/xml/anonymous.xml b/addons/anonymous/static/src/xml/anonymous.xml index 4c6d2fcbf54..7429efff458 100644 --- a/addons/anonymous/static/src/xml/anonymous.xml +++ b/addons/anonymous/static/src/xml/anonymous.xml @@ -4,10 +4,12 @@ + diff --git a/addons/signup/__init__.py b/addons/signup/__init__.py new file mode 100644 index 00000000000..f15ba34bf0a --- /dev/null +++ b/addons/signup/__init__.py @@ -0,0 +1,2 @@ +import signup_wizard +import res_config diff --git a/addons/signup/__openerp__.py b/addons/signup/__openerp__.py new file mode 100644 index 00000000000..b927b9526b7 --- /dev/null +++ b/addons/signup/__openerp__.py @@ -0,0 +1,23 @@ +{ + 'name': 'Signup', + 'description': 'Allow users to register', + 'author': 'OpenERP SA', + 'version': '1.0', + 'category': 'Tools', + 'website': 'http://www.openerp.com', + 'installable': True, + 'depends': ['anonymous', 'base_setup'], + 'data': [ + 'signup_wizard.xml', + 'res_config.xml', + ], + 'js': [ + 'static/src/js/signup.js', + ], + #'css': [ + # 'static/src/css/reset_password.css', + #], + 'qweb': [ + 'static/src/xml/signup.xml', + ], +} diff --git a/addons/signup/res_config.py b/addons/signup/res_config.py new file mode 100644 index 00000000000..0c8ab8023d8 --- /dev/null +++ b/addons/signup/res_config.py @@ -0,0 +1,19 @@ +from openerp.osv import osv, fields + +class ResConfig(osv.TransientModel): + _inherit = 'base.config.settings' + + _columns = { + 'signup_user_template_id': fields.many2one('res.users', 'Template user for account creation') + } + + def get_default_user_tpl(self, cr, uid, fields, context=None): + icp = self.pool.get('ir.config_parameter') + return { + 'signup_user_template_id': icp.get_param(cr, uid, 'signup.user_template_id', 0) or False + } + + def set_user_template(self, cr, uid, ids, context=None): + config = self.browse(cr, uid, ids[0], context=context) + icp = self.pool.get('ir.config_parameter') + icp.set_param(cr, uid, 'signup.user_template_id', config.signup_user_template_id.id) diff --git a/addons/signup/res_config.xml b/addons/signup/res_config.xml new file mode 100644 index 00000000000..d2c85a33fd5 --- /dev/null +++ b/addons/signup/res_config.xml @@ -0,0 +1,16 @@ + + + + Inherit General Settings + base.config.settings + + form + + + + + + + + + diff --git a/addons/signup/signup_wizard.py b/addons/signup/signup_wizard.py new file mode 100644 index 00000000000..939e90aa21d --- /dev/null +++ b/addons/signup/signup_wizard.py @@ -0,0 +1,65 @@ +from functools import partial +from openerp.osv import osv, fields + +class res_users(osv.Model): + _inherit = 'res.users' + + _sql_constraints = [ + ('email_uniq', 'UNIQUE (user_email)', 'You can not have two users with the same email!') + ] + + +class signup_wizard(osv.TransientModel): + _name = 'signup.wizard' + _columns = { + 'name': fields.char('Name', size=64), + 'email': fields.char('Email', size=64), + 'pw': fields.char('Password', size=64), + 'cpw': fields.char('Confirm Password', size=64), + 'state': fields.selection([(x, x) for x in 'draft done missmatch'.split()], required=True), + } + _defaults = { + 'state': 'draft', + } + + def create(self, cr, uid, values, context=None): + # NOTE here, invalid values raises exceptions to avoid storing + # sensitive data into the database (which then are available to anyone) + + name = values.get('name') + email = values.get('email') + pw = values.get('pw') + cpw = values.get('cpw') + + if pw != cpw: + raise osv.except_osv('Error', 'Passwords missmatch') + + Users = self.pool.get('res.users') + + user_template_id = self.pool.get('ir.config_parameter').get_param(cr, uid, 'signup.user_template_id', 0) + if user_template_id: + func = partial(Users.copy, cr, 1, user_template_id, context=context) + else: + func = partial(Users.create, cr, 1, context=context) + + func({ + 'name': name, + 'login': email, + 'user_email': email, + 'password': pw, + 'active': True, + }) + + values = {'state': 'done'} + return super(signup_wizard, self).create(cr, uid, values, context) + + def signup(self, cr, uid, ids, context=None): + return { + 'type': 'ir.actions.client', + 'tag': 'login', + } + + def onchange_pw(self, cr, uid, ids, pw, cpw, context=None): + if pw != cpw: + return {'value': {'state': 'missmatch'}} + return {'value': {'state': 'draft'}} diff --git a/addons/signup/signup_wizard.xml b/addons/signup/signup_wizard.xml new file mode 100644 index 00000000000..ec5095ff474 --- /dev/null +++ b/addons/signup/signup_wizard.xml @@ -0,0 +1,41 @@ + + + + + signup.wizard.form + signup.wizard + form + +
+ + + + + + + +
Passwords missmatch
+
+ + +
From 13458db46f61545b63c11a60137ab2e9d8f27d9c Mon Sep 17 00:00:00 2001 From: "Anand Patel (OpenERP)" Date: Thu, 28 Jun 2012 17:18:44 +0530 Subject: [PATCH 043/282] added a bounce effect when On non editable page view, if click on the content of a field, bounce the Edit button bzr revid: pan@tinyerp.com-20120628114844-3c1rv4ckk888yhzo --- addons/web/static/src/js/view_form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 2dc954c414d..09c8ac67dfc 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -584,7 +584,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM }, on_invalidclick: function() { this.$element.find(".oe_form_field").click(function () { - $(".oe_form_button_edit").effect("bounce", { times:3,distance:100 }, 500); + $(".oe_form_button_edit").effect("bounce", { times:3}, 500); }); }, on_button_cancel: function(event) { From 4abbbe1e6a0775f0b54aa4975c70b7940eb7d408 Mon Sep 17 00:00:00 2001 From: "Mustufa Rangwala (OpenERP)" Date: Fri, 29 Jun 2012 12:38:29 +0530 Subject: [PATCH 044/282] [IMP] Clean code bzr revid: mra@tinyerp.com-20120629070829-whk2yy9ilhojf7vf --- addons/l10n_in/installer.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/l10n_in/installer.py b/addons/l10n_in/installer.py index 83a63fba122..5342e6c50bc 100644 --- a/addons/l10n_in/installer.py +++ b/addons/l10n_in/installer.py @@ -26,10 +26,10 @@ import tools class l10n_installer(osv.osv_memory): _inherit = 'account.installer' _columns = { - 'company_type': fields.selection([('public_company', 'Public Firm'), + 'company_type': fields.selection([('public_company', 'Public Firm'), ('partnership_private_company', 'Partnership/Private Firm') - ], 'Company Type', required=True, - help='Company Type is used to install Indian chart of accounts as per need of business.'), + ], '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', @@ -42,7 +42,7 @@ class l10n_installer(osv.osv_memory): 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': + if chart['charts'] == 'l10n_in' and chart['company_type'] == 'public_company': acc_file_path = tools.file_open(opj('l10n_in', 'l10n_in_public_firm_chart.xml')) tools.convert_xml_import(cr, 'l10n_in', acc_file_path, {}, 'init', True, None) acc_file_path.close() @@ -51,7 +51,7 @@ class l10n_installer(osv.osv_memory): 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': + elif chart['charts'] == 'l10n_in' and chart['company_type'] == 'partnership_private_company': acc_file_path = tools.file_open(opj('l10n_in', 'l10n_in_partnership_private_chart.xml')) tools.convert_xml_import(cr, 'l10n_in', acc_file_path, {}, 'init', True, None) acc_file_path.close() @@ -62,4 +62,4 @@ class l10n_installer(osv.osv_memory): return res -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From e748c3d4cf18eb3e8defde43f46ee3eeeff0404c Mon Sep 17 00:00:00 2001 From: "Anand Patel (OpenERP)" Date: Fri, 29 Jun 2012 12:52:48 +0530 Subject: [PATCH 045/282] improoved code for [added a bounce effect when On non editable page view, if click on the content of a field, bounce the Edit button] bzr revid: pan@tinyerp.com-20120629072248-kb0vfjjo707l8vaj --- addons/web/static/src/css/base.css | 5 +---- addons/web/static/src/js/view_form.js | 7 +++++-- addons/web/static/src/xml/base.xml | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 2f4111882c4..f738fe757ac 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -2215,7 +2215,4 @@ } .kitten-mode-activated > * { opacity: 0.7; -} -.openerp .bounce { - float:left; -} +} \ No newline at end of file diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 09c8ac67dfc..65f825c6cf5 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -582,8 +582,11 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM self.set({mode: "view"}); }); }, - on_invalidclick: function() { - this.$element.find(".oe_form_field").click(function () { + on_invalidclick: function() { + var div = $("
", {id:"bounce"}); + this.$element.find(".oe_form_field").click(function () { + $(".oe_form_button_edit").wrap(div); + $("#bounce").css({"float":"left","margin-right":"4px"}); $(".oe_form_button_edit").effect("bounce", { times:3}, 500); }); }, diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 641d37a818a..02ff528b993 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -679,8 +679,8 @@
- -
+ + From 58d7c74c1dfba66a1e56f1524d0a54bc59744b43 Mon Sep 17 00:00:00 2001 From: ggh-openerp Date: Fri, 29 Jun 2012 13:11:24 +0530 Subject: [PATCH 046/282] [IMP]If the user clicks on an empty row of a list, bounce the Create button bzr revid: ggh@tinyerp.com-20120629074124-vxh7ngcyvqvb9zok --- addons/web/static/src/js/view_list.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index b5634c3443f..848c2934b17 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -285,6 +285,8 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi this.$element.find('.oe_list_buttons').replaceWith(this.$buttons); } this.$buttons.find('.oe_list_add') + .wrap("
") + .css({"float":"left","margin-right":"4px"}) .click(this.proxy('do_add_record')) .prop('disabled', grouped && this.options.editable); this.$buttons.on('click', '.oe_list_button_import', function() { @@ -978,6 +980,11 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web. } self.row_clicked(e); } + else{ + if (opts.options.$buttons){ + $(opts.options.$buttons.find('.oe_list_add')).effect("bounce", { times:5 }, 300); + } + } }); }, row_clicked: function (e, view) { From 64e33e43e17e79a3dfc6106927a60adf05ad8b28 Mon Sep 17 00:00:00 2001 From: "Mustufa Rangwala (OpenERP)" Date: Fri, 29 Jun 2012 14:14:29 +0530 Subject: [PATCH 047/282] [IMP] licence changed bzr revid: mra@tinyerp.com-20120629084429-0lsk4mvbdlanhvdj --- addons/l10n_in/__init__.py | 35 ++++++++++++++--------------------- addons/l10n_in/__openerp__.py | 4 ++-- addons/l10n_in/installer.py | 2 +- 3 files changed, 17 insertions(+), 24 deletions(-) diff --git a/addons/l10n_in/__init__.py b/addons/l10n_in/__init__.py index f97bda7fb89..975dcf5aa59 100644 --- a/addons/l10n_in/__init__.py +++ b/addons/l10n_in/__init__.py @@ -1,32 +1,25 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- ############################################################################## # -# Copyright (c) 2004 TINY SPRL. (http://tiny.be) All Rights Reserved. -# Fabien Pinckaers +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). # -# WARNING: This program as such is intended to be used by professional -# programmers who take the whole responsability of assessing all potential -# consequences resulting from its eventual inadequacies and bugs -# End users who are looking for a ready-to-use solution with commercial -# garantees and support are strongly adviced to contract a Free Software -# Service Company +# 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 Free Software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# 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. # -# 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . # ############################################################################## + import 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 630d99ca8db..06b254605a7 100644 --- a/addons/l10n_in/__openerp__.py +++ b/addons/l10n_in/__openerp__.py @@ -1,8 +1,8 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution -# Copyright (C) 2004-2009 Tiny SPRL (). +# 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 diff --git a/addons/l10n_in/installer.py b/addons/l10n_in/installer.py index 5342e6c50bc..3568f04d2dd 100644 --- a/addons/l10n_in/installer.py +++ b/addons/l10n_in/installer.py @@ -2,7 +2,7 @@ ############################################################################## # # OpenERP, Open Source Management Solution -# Copyright (C) 2004-2009 Tiny SPRL (). +# 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 From 1a61a20dbbc0ea716aed59b3d71374a8a2b2e4fc Mon Sep 17 00:00:00 2001 From: "Divyesh Makwana (Open ERP)" Date: Fri, 29 Jun 2012 17:53:47 +0530 Subject: [PATCH 048/282] [IMP] stock : Destination address should be the company by default. bzr revid: mdi@tinyerp.com-20120629122347-iswqb89471fas9gg --- addons/stock/stock.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index a279b8bea6c..1407f96f05b 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1726,10 +1726,16 @@ class stock_move(osv.osv): if location_xml_id: location_model, location_id = mod_obj.get_object_reference(cr, uid, 'stock', location_xml_id) return location_id + + def _default_destination_address(self, cr, uid, context=None): + partner_obj = self.pool.get('res.partner') + partner_ids = partner_obj.search(cr, uid, [('name', '=', 'Your Company')], context=context) + return partner_ids and partner_ids[0] or False _defaults = { 'location_id': _default_location_source, 'location_dest_id': _default_location_destination, + 'partner_id': _default_destination_address, 'state': 'draft', 'priority': '1', 'product_qty': 1.0, From 798f519842c2bce0eedf36aab1d983285fc13525 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Fri, 29 Jun 2012 19:00:41 +0530 Subject: [PATCH 049/282] [FIX]ids changed,tax added bzr revid: kbh@tinyerp.com-20120629133041-2tf9c0wkxm3waf2u --- addons/l10n_in/__init__.py | 2 +- addons/l10n_in/__openerp__.py | 4 +- addons/l10n_in/account_tax.xml | 19 -- addons/l10n_in/account_tax_code.xml | 36 --- .../{installer.py => l10n_in_installer.py} | 8 +- ...er_view.xml => l10n_in_installer_view.xml} | 0 ...te_chart.xml => l10n_in_private_chart.xml} | 213 ++++++++------ ...e.xml => l10n_in_private_tax_template.xml} | 195 ++++++------- ...irm_chart.xml => l10n_in_public_chart.xml} | 274 ++++++++++-------- ...te.xml => l10n_in_public_tax_template.xml} | 198 ++++++------- ...late.xml => l10n_in_tax_code_template.xml} | 10 +- 11 files changed, 489 insertions(+), 470 deletions(-) delete mode 100644 addons/l10n_in/account_tax.xml delete mode 100644 addons/l10n_in/account_tax_code.xml rename addons/l10n_in/{installer.py => l10n_in_installer.py} (95%) rename addons/l10n_in/{installer_view.xml => l10n_in_installer_view.xml} (100%) rename addons/l10n_in/{l10n_in_partnership_private_chart.xml => l10n_in_private_chart.xml} (74%) rename addons/l10n_in/{l10n_in_private_firm_tax_template.xml => l10n_in_private_tax_template.xml} (53%) rename addons/l10n_in/{l10n_in_public_firm_chart.xml => l10n_in_public_chart.xml} (68%) rename addons/l10n_in/{l10n_in_public_firm_tax_template.xml => l10n_in_public_tax_template.xml} (53%) rename addons/l10n_in/{account_tax_code_template.xml => l10n_in_tax_code_template.xml} (81%) diff --git a/addons/l10n_in/__init__.py b/addons/l10n_in/__init__.py index f97bda7fb89..a7105d9d278 100644 --- a/addons/l10n_in/__init__.py +++ b/addons/l10n_in/__init__.py @@ -27,6 +27,6 @@ # ############################################################################## -import installer +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 630d99ca8db..3c635082f7f 100644 --- a/addons/l10n_in/__openerp__.py +++ b/addons/l10n_in/__openerp__.py @@ -36,9 +36,9 @@ Indian accounting chart and localization. ], "demo_xml": [], "update_xml": [ - "account_tax_code_template.xml", + "l10n_in_tax_code_template.xml", "l10n_in_wizard.xml", - "installer_view.xml", + "l10n_in_installer_view.xml", ], "auto_install": False, "installable": True, diff --git a/addons/l10n_in/account_tax.xml b/addons/l10n_in/account_tax.xml deleted file mode 100644 index 90e6264398f..00000000000 --- a/addons/l10n_in/account_tax.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - PPn (10%)(10.0%) - 0.100000 - percent - - - - - - - - - - diff --git a/addons/l10n_in/account_tax_code.xml b/addons/l10n_in/account_tax_code.xml deleted file mode 100644 index bec870dd426..00000000000 --- a/addons/l10n_in/account_tax_code.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - Tax balance to pay - - - - Tax Due (Tax to pay) - - - - - Tax payable - - - - - Tax bases - - - - Base of taxed sales - - - - - - Base of taxed purchases - - - - - diff --git a/addons/l10n_in/installer.py b/addons/l10n_in/l10n_in_installer.py similarity index 95% rename from addons/l10n_in/installer.py rename to addons/l10n_in/l10n_in_installer.py index 83a63fba122..01c9395eb58 100644 --- a/addons/l10n_in/installer.py +++ b/addons/l10n_in/l10n_in_installer.py @@ -43,20 +43,20 @@ class l10n_installer(osv.osv_memory): 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_firm_chart.xml')) + 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_firm_tax_template.xml')) + 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_partnership_private_chart.xml')) + 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_firm_tax_template.xml')) + 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() diff --git a/addons/l10n_in/installer_view.xml b/addons/l10n_in/l10n_in_installer_view.xml similarity index 100% rename from addons/l10n_in/installer_view.xml rename to addons/l10n_in/l10n_in_installer_view.xml diff --git a/addons/l10n_in/l10n_in_partnership_private_chart.xml b/addons/l10n_in/l10n_in_private_chart.xml similarity index 74% rename from addons/l10n_in/l10n_in_partnership_private_chart.xml rename to addons/l10n_in/l10n_in_private_chart.xml index 6e2a764d64f..dcb705c113e 100644 --- a/addons/l10n_in/l10n_in_partnership_private_chart.xml +++ b/addons/l10n_in/l10n_in_private_chart.xml @@ -4,7 +4,7 @@ - + Partnership/Private Firm Chart of Account 0 view @@ -13,197 +13,234 @@ - + Balance Sheet 1 view - + - + Assets 10 view - + - + Cash 101 liquidity - + Checking account balance (as shown in company records), currency, coins, checks received from customers but not yet deposited. - + Accounts Receivable 120 receivable - + Amounts owed to the company for services performed or products sold but not yet paid for. - + Merchandise Inventory 140 other - + Cost of merchandise purchased but has not yet been sold. - + Supplies 150 other - + Cost of supplies that have not yet been used. Supplies that have been used are recorded in Supplies Expense. - + Prepaid Insurance 160 other - + Cost of insurance that is paid in advance and includes a future accounting period. - + Land 170 other - + Cost to acquire and prepare land for use by the company. - + Buildings 175 other - + Cost to purchase or construct buildings for use by the company. - + Accumulated Depreciation - Buildings 178 other - + Amount of the buildings' cost that has been allocated to Depreciation Expense since the time the building was acquired. - + Equipment 180 other - + Cost to acquire and prepare equipment for use by the company. - + Accumulated Depreciation - Equipment 188 other - + Amount of equipment's cost that has been allocated to Depreciation Expense since the time the equipment was acquired. - + Liabilities 20 view - + - + Notes Payable 210 other - + The amount of principal due on a formal written promise to pay. Loans from banks are included in this account. - + Accounts Payable 215 payable - + Amount owed to suppliers who provided goods and services to the company but did not require immediate payment in cash. - + Wages Payable 220 other - + Amount owed to employees for hours worked but not yet paid. - + Interest Payable 230 other - + Amount owed for interest on Notes Payable up until the date of the balance sheet. This is computed by multiplying the amount of the note times the effective interest rate times the time period. - + Unearned Revenues 240 other - + Amounts received in advance of delivering goods or providing services. When the goods are delivered or services are provided, this liability amount decreases. - + Mortgage Loan Payable 250 other - + A formal loan that involves a lien on real estate until the loan is repaid. - - + + + + + Sales Tax Payable + 216 + payable + + + + + + + VAT Payable + 217 + payable + + + + + + + Service Tax Payable + 218 + payable + + + + + + + Exice Duty Payable + 219 + payable + + + + + @@ -212,7 +249,7 @@ view - + - + Profit And Loss 3 view - + - + Income 30 view - + - + Operating Revenue Accounts 31 view - + - + Service Revenues 310 other - + Amounts earned from providing services to clients, either for cash or on credit. When a service is provided on credit, both this account and Accounts Receivable will increase. When a service is provided for immediate cash, both this account and Cash will increase. - + Product Sales 311 other - + Sales of product account - + Non-Operating Revenue and Gains 80 view - + - + Interest Revenues 810 other - + Interest and dividends earned on bank accounts, investments or notes receivable. This account is increased when the interest is earned and either Cash or Interest Receivable is also increased. - + Gain on Sale of Assets 811 other - + Occurs when the company sells one of its assets (other than inventory) for more than the asset's book value. - + Expense 50 view - + - + Operating Expense Accounts 51 view - + - + Salaries Expense 500 other - + Expenses incurred for the work performed by salaried employees during the accounting period. These employees normally receive a fixed amount on a weekly, monthly, or annual basis. - + Wages Expense 510 other - + Expenses incurred for the work performed by non-salaried employees during the accounting period. These employees receive an hourly rate of pay. - + Supplies Expense 540 other - + Cost of supplies used up during the accounting period. - + Rent Expense 560 other - + Cost of occupying rented facilities during the accounting period. - + Utilities Expense 570 other - + Costs for electricity, heat, water, and sewer that were used during the accounting period. - + Telephone Expense 576 other - + Cost of telephone used during the current accounting period. - + Advertising Expense 610 other - + Costs incurred by the company during the accounting period for ads, promotions, and other selling and expenses (other than salaries). - + Depreciation Expense 750 other - + Cost of long-term assets allocated to expense during the current accounting period. - + Non-Operating Expenses and Losses 90 view @@ -430,13 +467,13 @@ - + Loss on Sale of Assets 960 other - + Occurs when the company sells one of its assets (other than inventory) for less than the asset's book value. @@ -444,14 +481,14 @@ India - Chart of Accounts for Partnership/Private Firm - + - - - - - - + + + + + + diff --git a/addons/l10n_in/l10n_in_private_firm_tax_template.xml b/addons/l10n_in/l10n_in_private_tax_template.xml similarity index 53% rename from addons/l10n_in/l10n_in_private_firm_tax_template.xml rename to addons/l10n_in/l10n_in_private_tax_template.xml index 5bff8157884..e95a9bc48e1 100644 --- a/addons/l10n_in/l10n_in_private_firm_tax_template.xml +++ b/addons/l10n_in/l10n_in_private_tax_template.xml @@ -2,117 +2,90 @@ - - - - Sales Tax Payable - 216 - payable - - - - - - - VAT Payable - 217 - payable - - - - - - - Service Tax Payable - 218 - payable - - - - - - - Exice Duty Payable - 219 - payable - - - - - + - Sale Tax - 15% Sale Tax - 15% 0.15 percent sale - - - - - - + + + + + + - Sale Tax -12% Sale Tax - 12% 0.12 percent sale - - - - - - + + + + + + + + Sale Tax - 4% + + 0.04 + percent + sale + + + + + + + + + + - Purchase Tax - 15% Purchase Tax - 15% - - + + 0.15 percent purchase - + - + - - - VAT - 5% - VAT - 5% + VAT - 5% (4% VAT + 1% Add. Tax.) 0.05 percent all - - - + + + 1 1 - + 1 1 @@ -121,19 +94,18 @@ - VAT - 15% - VAT - 15% + VAT - 15% (12.5% VAT + 2.5% Add. Tax.) 0.15 percent all - - - + + + 1 1 - + 1 1 @@ -142,17 +114,48 @@ - VAT - 8% VAT - 8% - 0.8 + 0.08 percent all - - - + + + - + + + + + + + + VAT - 10% + + 0.10 + percent + all + + + + + + + + + + + + VAT - 12.5% + + 12.5 + percent + all + + + + + @@ -161,29 +164,27 @@ - Exice Duty - 10.30% - Excise Duty + Excise Duty - 10% 0.10 percent sale - - - + + + 1 - + 1 - + 1 - + 1 - + - Excise duty -10% -%2 - Excise Duty - %2 + Excise Duty - 2% 0.02 percent sale @@ -192,7 +193,6 @@ - Excise duty - 10% - %1 Excise Duty - 1% 0.01 percent @@ -205,23 +205,21 @@ all - Service - 12% - Service Tax + Service Tax - 12% 0.12 percent - - - - - - + + + + + + - Service - 12% - %2 Service Tax - %2 0.02 percent @@ -231,7 +229,6 @@ - Service - 12% - 1% Service Tax - %1 0.01 percent diff --git a/addons/l10n_in/l10n_in_public_firm_chart.xml b/addons/l10n_in/l10n_in_public_chart.xml similarity index 68% rename from addons/l10n_in/l10n_in_public_firm_chart.xml rename to addons/l10n_in/l10n_in_public_chart.xml index 9e72ec9569c..1b9bf1fc298 100644 --- a/addons/l10n_in/l10n_in_public_firm_chart.xml +++ b/addons/l10n_in/l10n_in_public_chart.xml @@ -5,7 +5,7 @@ - + Public Firm Chart of Account 0 view @@ -14,529 +14,565 @@ - + Balance Sheet 1 view - + - + Assets 10 view - + - + Current Assets 10000 view - + - + Cash - Regular Checking 10100 liquidity - + - + Cash - Payroll Checking 10200 liquidity - + - + Petty Cash Fund 10600 liquidity - + - + Accounts Receivable 12100 receivable - + - + Allowance for Doubtful Accounts 12500 other - + - + Inventory 13100 other - + - + Supplies 14100 other - + - + Prepaid Insurance 15300 other - + - + Liabilities 20 view - + - + Current Liabilities 20000 view - + - + Notes Payable - Credit Line #1 20100 other - + - + Notes Payable - Credit Line #2 20200 other - + - + Accounts Payable 21000 payable - + - + Wages Payable 22100 other - + - + Interest Payable 23100 other - + - + Unearned Revenues 24500 other - + - + Long-term Liabilities 25000 view - + - + Mortgage Loan Payable 25100 other - + - + Bonds Payable 25600 other - + - + Discount on Bonds Payable 25650 other - + - + Stockholders' Equity 27000 view - + - + Common Stock, No Par 27100 other - + - + Retained Earnings 27500 other - + - + Treasury Stock 29500 other - + - - - + + + + + Sales Tax Payable + 24600 + payable + + + + + + + VAT Payable + 24800 + payable + + + + + + + Exice Duty Payable + 24900 + payable + + + + + + + Service Tax Payable + 24700 + payable + + + + + - + Profit And Loss 3 view - + - + Income 30 view - + - + Operating Revenues 30000 view - + - + Sales - Division #1, Product Line 010 31010 other - + - + Sales - Division #1, Product Line 022 31022 other - + - + Sales - Division #2, Product Line 015 32015 other - + - + Sales - Division #3, Product Line 110 33110 other - + - + Non-Operating Revenue and Gains 90000 view - + - + Gain on Sale of Assets 91800 other - + - + Expense 40 view - + - + Cost of Goods Sold 40000 view - + - + COGS - Division #1, Product Line 010 41010 other - + - + COGS - Division #1, Product Line 022 41022 other - + - + COGS - Division #2, Product Line 015 42015 other - + - + COGS - Division #3, Product Line 110 43110 other - + - + Marketing Expenses 50000 view - + - + Marketing Dept. Salaries 50100 other - + - + Marketing Dept. Payroll Taxes 50150 other - + - + Marketing Dept. Supplies 50200 other - + - + Marketing Dept. Telephone 50600 other - + - + Payroll Dept. Expenses 59000 view - + - + Payroll Dept. Salaries 59100 other - + - + Payroll Dept. Payroll Taxes 59150 other - + - + Payroll Dept. Supplies 59200 other - + - + Payroll Dept. Telephone 59600 other - + - + Non-Operating Expenses and Losses 96000 view - + - + Loss on Sale of Assets 96100 other - + India - Chart of Accounts for Public Firm - + - - - - - - + + + + + + diff --git a/addons/l10n_in/l10n_in_public_firm_tax_template.xml b/addons/l10n_in/l10n_in_public_tax_template.xml similarity index 53% rename from addons/l10n_in/l10n_in_public_firm_tax_template.xml rename to addons/l10n_in/l10n_in_public_tax_template.xml index c597fe260f4..0d2427af93a 100644 --- a/addons/l10n_in/l10n_in_public_firm_tax_template.xml +++ b/addons/l10n_in/l10n_in_public_tax_template.xml @@ -3,93 +3,66 @@ - - - - Sales Tax Payable - 24600 - payable - - - - - - - VAT Payable - 24800 - payable - - - - - - - Exice Duty Payable - 24900 - payable - - - - - - - Service Tax Payable - 24700 - payable - - - - - - - Sale Tax - 15% Sale Tax - 15% - - + + 0.15 percent sale - - - - + + + + - Sale Tax - 12% Sale Tax - 12% - - + + 0.12 percent sale - - - - + + + + + + + + + Sale Tax - 4% + + + + 0.04 + percent + sale + + + + - Purchase Tax - 15% Purchase Tax - 15% - - + + 0.15 percent purchase - + - + @@ -99,19 +72,18 @@ - VAT - 5% - VAT - 5% - - + VAT - 5% (4% VAT + 1% Add. Tax.) + + 0.05 percent all - + 1 1 - + 1 1 @@ -120,19 +92,18 @@ - VAT - 15% - VAT - 15% - - + VAT - 15% (12.5% VAT + 2.5% Add. Tax.) + + 0.15 percent all - + 1 1 - + 1 1 @@ -141,51 +112,88 @@ - VAT - 8% VAT - 8% - - + + 0.08 percent all - + 1 1 - + 1 1 - + + + VAT - 10% + + + + 0.10 + percent + all + + 1 + + 1 + + 1 + + 1 + + + + + + VAT - 12.5% + + + + 12.5 + percent + all + + 1 + + 1 + + 1 + + 1 + + + + - Service - 12% - Service Tax - - + Service Tax - 12% + + 0.12 percent all - + 1 - + 1 - + 1 - + 1 - Service - 12% - 2% Service Tax - %2 0.02 percent @@ -195,7 +203,6 @@ - Service - 12% - 1% Service Tax - %1 0.01 percent @@ -207,28 +214,26 @@ - Excise duty - 10% - Excise Duty - - + Excise Duty - 10% + + 0.10 percent sale - + 1 - + 1 - + 1 - + 1 - + - Excise duty - 10% - 2% Excise Duty - %2 0.02 percent @@ -238,7 +243,6 @@ - Excise duty - 10% - 1% Excise Duty - 1% 0.01 percent diff --git a/addons/l10n_in/account_tax_code_template.xml b/addons/l10n_in/l10n_in_tax_code_template.xml similarity index 81% rename from addons/l10n_in/account_tax_code_template.xml rename to addons/l10n_in/l10n_in_tax_code_template.xml index 1d8e5ed3b70..94217d79c3c 100644 --- a/addons/l10n_in/account_tax_code_template.xml +++ b/addons/l10n_in/l10n_in_tax_code_template.xml @@ -12,13 +12,13 @@ - - Tax Due (Tax to pay) + + Tax Received - Tax Payable + Tax Paid @@ -28,12 +28,12 @@ - + Base of Taxed Sales - + Base of Taxed Purchases From 879c8bb5a233d307a374c29c2b97c7fa9f34c72a Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Mon, 2 Jul 2012 10:32:25 +0530 Subject: [PATCH 050/282] [FIX]Id changed bzr revid: kbh@tinyerp.com-20120702050225-r95sr06v9adxnqp3 --- addons/l10n_in/l10n_in_private_chart.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/l10n_in/l10n_in_private_chart.xml b/addons/l10n_in/l10n_in_private_chart.xml index dcb705c113e..999c6e8c219 100644 --- a/addons/l10n_in/l10n_in_private_chart.xml +++ b/addons/l10n_in/l10n_in_private_chart.xml @@ -13,7 +13,7 @@ - + Balance Sheet 1 view From eb2d0483ce746fbbbba2a12333f027bc3299ba3a Mon Sep 17 00:00:00 2001 From: "Divyesh Makwana (Open ERP)" Date: Mon, 2 Jul 2012 10:58:16 +0530 Subject: [PATCH 051/282] [IMP] procurement, stock : Added groups to restrict the fields. bzr revid: mdi@tinyerp.com-20120702052816-ct29279dygwg1mgl --- addons/procurement/procurement_view.xml | 8 ++++---- addons/stock/stock_view.xml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/procurement/procurement_view.xml b/addons/procurement/procurement_view.xml index fde8b4ea2fe..f9d9f3533e1 100644 --- a/addons/procurement/procurement_view.xml +++ b/addons/procurement/procurement_view.xml @@ -170,10 +170,10 @@ - + - + @@ -216,8 +216,8 @@ - - + + diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index 3107f0c9f14..5ab99bf789a 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -139,7 +139,7 @@ - + @@ -1258,7 +1258,7 @@ -