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/209] [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/209] [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/209] [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/209] [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 4c54457489044ad7c7e4f8c54241e32dba6d4a10 Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Mon, 20 Feb 2012 15:00:37 +0530 Subject: [PATCH 005/209] [FIX]purchase: added domain of supplier in the partner_id field lp bug: https://launchpad.net/bugs/936385 fixed bzr revid: mma@tinyerp.com-20120220093037-uh5ubja5jtnqy8om --- addons/purchase/purchase_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml index 1c936055aff..e358bfc2ced 100644 --- a/addons/purchase/purchase_view.xml +++ b/addons/purchase/purchase_view.xml @@ -172,7 +172,7 @@ - + From 44fec74adfbf53e4e9a02461b45b8e1b0525441d Mon Sep 17 00:00:00 2001 From: Yury Tello Date: Tue, 21 Feb 2012 15:53:28 -0500 Subject: [PATCH 006/209] [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 007/209] [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 119cb3e9b51226951e42fce05297c3fbb06c521a Mon Sep 17 00:00:00 2001 From: "Ravish Murari (OpenERP)" Date: Mon, 30 Apr 2012 14:50:06 +0530 Subject: [PATCH 008/209] [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/209] [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 156da2b3503a4449106fa78a2883431e1f6663aa Mon Sep 17 00:00:00 2001 From: Maxime Chambreuil Date: Sat, 9 Jun 2012 11:45:22 -0400 Subject: [PATCH 010/209] [IMP] Use account.data_account_type. Remove notax. Improve chart of taxes. bzr revid: maxime.chambreuil@savoirfairelinux.com-20120609154522-htduc8596i18pj93 --- addons/l10n_ca/__openerp__.py | 2 - addons/l10n_ca/account_chart_en.xml | 166 +++--- addons/l10n_ca/account_chart_fr.xml | 174 +++--- addons/l10n_ca/account_tax_code_en.xml | 18 +- addons/l10n_ca/account_tax_code_fr.xml | 16 +- addons/l10n_ca/account_tax_en.xml | 481 +++++++++++++---- addons/l10n_ca/account_tax_fr.xml | 477 +++++++++++++---- addons/l10n_ca/account_types_en.xml | 64 --- addons/l10n_ca/account_types_fr.xml | 79 --- addons/l10n_ca/fiscal_templates_en.xml | 712 +++++++++++++++++-------- addons/l10n_ca/fiscal_templates_fr.xml | 522 +++++++++++++----- 11 files changed, 1828 insertions(+), 883 deletions(-) delete mode 100644 addons/l10n_ca/account_types_en.xml delete mode 100644 addons/l10n_ca/account_types_fr.xml diff --git a/addons/l10n_ca/__openerp__.py b/addons/l10n_ca/__openerp__.py index 800ca7937eb..bd5fe4e6ea0 100644 --- a/addons/l10n_ca/__openerp__.py +++ b/addons/l10n_ca/__openerp__.py @@ -33,13 +33,11 @@ Canadian accounting charts and localizations. "depends" : ['base', 'account', 'base_iban', 'base_vat', 'account_chart'], "init_xml" : [], "update_xml" : [ - 'account_types_en.xml', 'account_chart_en.xml', 'account_tax_code_en.xml', 'account_chart_template_en.xml', 'account_tax_en.xml', 'fiscal_templates_en.xml', - 'account_types_fr.xml', 'account_chart_fr.xml', 'account_tax_code_fr.xml', 'account_chart_template_fr.xml', diff --git a/addons/l10n_ca/account_chart_en.xml b/addons/l10n_ca/account_chart_en.xml index 26db0bcef95..14cbc993b2b 100644 --- a/addons/l10n_ca/account_chart_en.xml +++ b/addons/l10n_ca/account_chart_en.xml @@ -8,7 +8,7 @@ Account Chart CA EN view - + @@ -17,7 +17,7 @@ 1 view - + ASSETS @@ -25,7 +25,7 @@ 11 view - + CURRENT ASSETS @@ -33,7 +33,7 @@ 111 view - + CASH @@ -41,7 +41,7 @@ 1111 liquidity - + Checking Account @@ -49,7 +49,7 @@ 112 view - + TREASURY OR TREASURY EQUIVALENTS @@ -57,7 +57,7 @@ 113 view - + CERTIFICATES OF DEPOSITS @@ -65,7 +65,7 @@ 114 view - + STOCKS @@ -73,7 +73,7 @@ 115 view - + ACCOUNTS RECEIVABLES @@ -81,7 +81,7 @@ 1151 receivable - + Customers Account @@ -90,7 +90,7 @@ 1152 view - + ALLOWANCE FOR DOUBTFUL ACCOUNTS @@ -98,7 +98,7 @@ 116 view - + PREPAID EXPENSES @@ -106,7 +106,7 @@ 117 view - + INVESTMENTS HELD FOR TRADING @@ -114,15 +114,15 @@ 118 view - + TAXES RECEIVABLES 1181 - receivable - + other + GST receivable @@ -130,8 +130,8 @@ 1182 - receivable - + other + PST/QST receivable @@ -139,8 +139,8 @@ 1183 - receivable - + other + HST receivable @@ -149,7 +149,7 @@ 15 view - + NON-CURRENT ASSETS @@ -157,7 +157,7 @@ 151 view - + INVESTMENTS AVAILABLE FOR SALE @@ -165,7 +165,7 @@ 152 view - + TANGIBLE ASSETS @@ -173,7 +173,7 @@ 1527 view - + ACCUMULATED DEPRECIATIONS @@ -181,7 +181,7 @@ 153 view - + INTANGIBLE ASSETS @@ -189,7 +189,7 @@ 1531 view - + PATENTS, TRADEMARKS AND COPYRIGHTS @@ -199,7 +199,7 @@ 2 view - + LIABILITIES @@ -207,7 +207,7 @@ 21 view - + CURRENT LIABILITIES @@ -215,7 +215,7 @@ 211 view - + ACCOUNTS PAYABLES @@ -223,7 +223,7 @@ 2111 payable - + Suppliers Account @@ -232,15 +232,15 @@ 212 view - + TAXES PAYABLES 2121 - payable - + other + GST to pay @@ -248,8 +248,8 @@ 2122 - payable - + other + PST/QST to pay @@ -257,8 +257,8 @@ 2123 - payable - + other + HST to pay @@ -267,7 +267,7 @@ 213 view - + CURRENT FINANCIAL DEBTS @@ -275,7 +275,7 @@ 25 view - + NON-CURRENT LIABILITIES @@ -283,7 +283,7 @@ 251 view - + NON-CURRENT FINANCIAL DEBTS @@ -291,7 +291,7 @@ 252 view - + PROVISIONS FOR PENSIONS AND OTHER POST-EMPLOYMENT ADVANTAGES @@ -299,7 +299,7 @@ 253 view - + DEFERRED TAXES @@ -307,7 +307,7 @@ 259 view - + OTHER NON-CURRENT LIABILITIES @@ -317,7 +317,7 @@ 3 view - + EQUITY @@ -325,7 +325,7 @@ 31 view - + SHARE CAPITAL @@ -333,7 +333,7 @@ 32 view - + PREMIUMS @@ -341,7 +341,7 @@ 33 view - + RETAINED EARNINGS @@ -349,7 +349,7 @@ 34 view - + DIVIDENDS @@ -357,7 +357,7 @@ 35 view - + TRANSLATION ADJUSTMENTS @@ -365,7 +365,7 @@ 36 view - + CONTRIBUTED SURPLUS @@ -375,7 +375,7 @@ 4 view - + INCOMES @@ -383,7 +383,7 @@ 41 view - + OPERATING INCOMES @@ -391,7 +391,7 @@ 411 other - + Inside Sales @@ -399,7 +399,7 @@ 412 other - + Harmonized Provinces Sales @@ -407,7 +407,7 @@ 413 other - + Non-Harmonized Provinces Sales @@ -415,7 +415,7 @@ 414 other - + International Sales @@ -423,7 +423,7 @@ 419 view - + OTHER OPERATING INCOMES @@ -431,7 +431,7 @@ 42 view - + NON-OPERATING INCOMES @@ -439,7 +439,7 @@ 421 view - + INTERESTS @@ -447,7 +447,7 @@ 429 view - + OTHER NON-OPERATING INCOMES @@ -457,7 +457,7 @@ 5 view - + EXPENSES @@ -465,7 +465,7 @@ 51 view - + OPERATING EXPENSES @@ -473,7 +473,7 @@ 511 view - + COST OF GOODS SOLD @@ -481,7 +481,7 @@ 5111 other - + Inside Purchases @@ -489,7 +489,7 @@ 5112 other - + Purchases in harmonized provinces @@ -497,7 +497,7 @@ 5113 other - + Purchases in non-harmonized provinces @@ -505,7 +505,7 @@ 5114 other - + International Purchases @@ -513,7 +513,7 @@ 512 view - + LABOUR EXPENSES @@ -521,7 +521,7 @@ 5121 other - + Salaries, wages and commissions @@ -529,7 +529,7 @@ 5122 other - + Holidays @@ -537,7 +537,7 @@ 5123 other - + Employment Insurance @@ -545,7 +545,7 @@ 5124 other - + Health Services Fund @@ -553,7 +553,7 @@ 5125 other - + Annuities @@ -561,7 +561,7 @@ 5126 other - + Parental Insurance @@ -569,7 +569,7 @@ 5127 other - + Labour Health and Safety @@ -577,7 +577,7 @@ 5128 other - + Labour Standards @@ -585,7 +585,7 @@ 513 view - + SALES EXPENSES @@ -593,7 +593,7 @@ 514 view - + GENERAL EXPENSES @@ -601,7 +601,7 @@ 515 view - + RESEARCH AND DEVELOPMENT EXPENSES @@ -609,7 +609,7 @@ 519 view - + OTHER OPERATING EXPENSES @@ -617,7 +617,7 @@ 55 view - + NON-OPERATING EXPENSES @@ -625,7 +625,7 @@ 551 view - + INTEREST EXPENSES @@ -633,7 +633,7 @@ 559 view - + OTHER NON-OPERATING EXPENSES diff --git a/addons/l10n_ca/account_chart_fr.xml b/addons/l10n_ca/account_chart_fr.xml index b66dd5f02ba..e50ac7ff4dc 100644 --- a/addons/l10n_ca/account_chart_fr.xml +++ b/addons/l10n_ca/account_chart_fr.xml @@ -6,7 +6,7 @@ 0 view - + Account Chart CA FR @@ -16,7 +16,7 @@ 1 view - + ACTIF @@ -24,7 +24,7 @@ 11 view - + ACTIFS COURANTS @@ -32,7 +32,7 @@ 111 view - + ENCAISSE @@ -40,7 +40,7 @@ 1111 liquidity - + Compte chèque @@ -48,7 +48,7 @@ 1112 liquidity - + Petite caisse @@ -56,7 +56,7 @@ 112 view - + TRÉSORERIE OU ÉQUIVALENTS DE TRÉSORERIE @@ -64,7 +64,7 @@ 113 view - + CERTIFICATS DE DÉPÔTS @@ -72,7 +72,7 @@ 114 view - + STOCKS @@ -80,7 +80,7 @@ 115 view - + COMPTES CLIENTS @@ -88,7 +88,7 @@ 1151 receivable - + Comptes clients @@ -97,7 +97,7 @@ 1152 view - + PROVISION POUR CRÉANCES DOUTEUSES @@ -105,7 +105,7 @@ 116 view - + FRAIS PAYÉS D'AVANCE @@ -113,7 +113,7 @@ 117 view - + PLACEMENTS DÉTENUS À DES FINS DE TRANSACTION @@ -121,15 +121,15 @@ 118 view - + IMPÔTS À RECEVOIR 1181 - receivable - + other + TPS à recevoir @@ -137,8 +137,8 @@ 1182 - receivable - + other + TVP/TVQ à recevoir @@ -146,8 +146,8 @@ 1183 - receivable - + other + TVH à recevoir @@ -156,7 +156,7 @@ 15 view - + ACTIFS NON-COURANTS @@ -164,7 +164,7 @@ 151 view - + PLACEMENTS DISPONIBLES À LA VENTE @@ -172,7 +172,7 @@ 152 view - + IMMOBILISATIONS CORPORELLES @@ -180,7 +180,7 @@ 1527 view - + AMORTISSEMENTS CUMULÉS @@ -188,7 +188,7 @@ 153 view - + IMMOBILISATIONS INCORPORELLES @@ -196,7 +196,7 @@ 1531 view - + BREVETS, MARQUES DE COMMERCE ET DROITS D'AUTEURS @@ -206,7 +206,7 @@ 2 view - + PASSIF @@ -214,7 +214,7 @@ 21 view - + PASSIFS COURANTS @@ -222,7 +222,7 @@ 211 view - + FOURNISSEURS ET COMPTES RATTACHÉS @@ -230,7 +230,7 @@ 2111 payable - + Comptes fournisseurs @@ -239,7 +239,7 @@ 212 view - + AUTRES COMPTES CRÉDITEURS @@ -247,15 +247,15 @@ 213 view - + IMPÔTS À PAYER 2131 - payable - + other + TPS à payer @@ -263,8 +263,8 @@ 2132 - payable - + other + TVP/TVQ à payer @@ -272,8 +272,8 @@ 2133 - payable - + other + TVH à payer @@ -282,7 +282,7 @@ 214 view - + DETTES FINANCIÈRES COURANTES @@ -290,7 +290,7 @@ 215 view - + PASSIFS LIÉS AUX ACTIFS DÉTENUS EN VUE DE LEUR CESSION @@ -298,7 +298,7 @@ 25 view - + PASSIFS NON-COURANTS @@ -306,7 +306,7 @@ 251 view - + DETTES FINANCIÈRES NON-COURANTES @@ -314,7 +314,7 @@ 252 view - + PROVISIONS POUR RETRAITES ET AUTRES AVANTAGES POSTÉRIEURS À L'EMPLOI @@ -322,7 +322,7 @@ 253 view - + IMPÔTS DIFFÉRÉS @@ -330,7 +330,7 @@ 254 view - + AUTRES PASSIFS NON-COURANTS @@ -340,7 +340,7 @@ 3 view - + CAPITAUX PROPRES @@ -348,7 +348,7 @@ 31 view - + CAPITAL-ACTIONS @@ -356,7 +356,7 @@ 32 view - + PRIMES @@ -364,7 +364,7 @@ 33 view - + BÉNÉFICES NON RÉPARTIS @@ -372,7 +372,7 @@ 34 view - + DIVIDENDES @@ -380,7 +380,7 @@ 35 view - + ÉCARTS DE CONVERSION @@ -388,7 +388,7 @@ 36 view - + SURPLUS D'APPORT @@ -396,7 +396,7 @@ 39 view - + AUTRES ÉLÉMENTS DU RÉSULTAT GLOBAL @@ -406,7 +406,7 @@ 4 view - + PRODUITS @@ -414,7 +414,7 @@ 41 view - + PRODUITS D'EXPLOITATION @@ -422,7 +422,7 @@ 411 other - + Ventes @@ -430,7 +430,7 @@ 412 other - + Ventes avec des provinces harmonisées @@ -438,7 +438,7 @@ 413 other - + Ventes avec des provinces non-harmonisées @@ -446,7 +446,7 @@ 414 other - + Ventes à l'étranger @@ -454,7 +454,7 @@ 419 view - + AUTRES PRODUITS D'EXPLOITATION @@ -462,7 +462,7 @@ 42 view - + PRODUITS NON LIÉS À L'EXPLOITATION @@ -470,7 +470,7 @@ 425 view - + INTÉRÊTS @@ -478,7 +478,7 @@ 429 view - + AUTRES PRODUITS NON LIÉS À L'EXPLOITATION @@ -488,7 +488,7 @@ 5 view - + CHARGES @@ -496,7 +496,7 @@ 51 view - + CHARGES D'EXPLOITATION @@ -504,7 +504,7 @@ 511 view - + COÛT DES PRODUITS VENDUS @@ -512,7 +512,7 @@ 5111 other - + Achats @@ -520,7 +520,7 @@ 5112 other - + Achats dans des provinces harmonisées @@ -528,7 +528,7 @@ 5113 other - + Achats dans des provinces non-harmonisées @@ -536,7 +536,7 @@ 5114 other - + Achats à l'étranger @@ -544,7 +544,7 @@ 512 view - + SALAIRES ET CHARGES SOCIALES @@ -552,7 +552,7 @@ 51201 other - + Salaires @@ -560,7 +560,7 @@ 51202 other - + Vacances @@ -568,7 +568,7 @@ 51203 other - + Assurance Emploi @@ -576,7 +576,7 @@ 51204 other - + Fonds des services de santé @@ -584,7 +584,7 @@ 51205 other - + Rentes @@ -592,7 +592,7 @@ 51206 other - + Assurance parental @@ -600,7 +600,7 @@ 51207 other - + Santé et sécurité au travail @@ -608,7 +608,7 @@ 51208 other - + Normes du travail @@ -616,7 +616,7 @@ 513 view - + FRAIS SUR VENTE @@ -624,7 +624,7 @@ 514 view - + FRAIS GÉNÉRAUX @@ -632,7 +632,7 @@ 515 view - + FRAIS DE RECHERCHE ET DÉVELOPPEMENT @@ -640,7 +640,7 @@ 519 view - + AUTRES FRAIS D'EXPLOITATION @@ -648,7 +648,7 @@ 52 view - + FRAIS NON LIÉS À L'EXPLOITATION @@ -656,7 +656,7 @@ 521 view - + INTÉRÊTS DÉBITEURS @@ -664,7 +664,7 @@ 529 view - + AUTRES FRAIS NON LIÉS À L'EXPLOITATION diff --git a/addons/l10n_ca/account_tax_code_en.xml b/addons/l10n_ca/account_tax_code_en.xml index 2fe144d6086..bb628a39f15 100644 --- a/addons/l10n_ca/account_tax_code_en.xml +++ b/addons/l10n_ca/account_tax_code_en.xml @@ -7,47 +7,47 @@ - Tax Balance to Pay + Tax Balance - Receivable Taxes + Taxes paid - GST to Receive + GST paid - PST to Receive + PST paid - HST to Receive + HST paid - Payable Taxes + Taxes received - GST to Pay + GST received - PST to Pay + PST received - HST to Pay + HST received diff --git a/addons/l10n_ca/account_tax_code_fr.xml b/addons/l10n_ca/account_tax_code_fr.xml index 849842b2453..d8abf73dd93 100644 --- a/addons/l10n_ca/account_tax_code_fr.xml +++ b/addons/l10n_ca/account_tax_code_fr.xml @@ -12,42 +12,42 @@ - Taxes à recevoir + Taxes payées - TPS à recevoir + TPS payée - TVP/TVQ à recevoir + TVP/TVQ payée - TVH à recevoir + TVH payée - Taxes à payer + Taxes reçues - TPS à payer + TPS reçue - TVP/TVQ à payer + TVP/TVQ reçue - TVH à payer + TVH reçue diff --git a/addons/l10n_ca/account_tax_en.xml b/addons/l10n_ca/account_tax_en.xml index 662ac4b52fc..f185f7f9198 100644 --- a/addons/l10n_ca/account_tax_en.xml +++ b/addons/l10n_ca/account_tax_en.xml @@ -2,263 +2,544 @@ + + - + - GST + PST (MB) - GSTPST_MB + GST + PST for sales (MB) + GSTPST_MB_SALE + sale 1 1 percent - + - GST - 5% (MB) + GST for sales - 5% (MB) GST + sale 0.050000 percent 1 - + - - + + - + - + - PST - 7% + PST for sales - 7% PST - 0.070000 + sale + 0.700000 percent - 1 - + 2 + - - + + - + - + - GST + PST (PE) - GSTPST_PE + GST + PST for sales (PE) + GSTPST_PE_SALE + sale 1 1 percent - + - GST - 5% (PE) + GST for sales - 5% (PE) GST + sale 0.050000 percent 1 - + - - + + - + - + - PST - 10% + PST for sale - 10% PST + sale 0.100000 percent - 1 - + 2 + - - + + - + - + - GST + PST (QC) - GSTPST_QC + GST + TVQ for sales + GSTTVQ_SALE + sale 1 1 percent - + - GST - 5% (QC) + GST for sales - 5% (QC) GST + sale 0.050000 percent 1 - + - - + + - + - + - PST - 9.5% - PST + TVQ for sales - 9.5% + TVQ + sale 0.095000 percent - 1 - + 2 + - - + + - + - + - GST + PST (SK) - GSTPST_SK + GST + PST for sales (SK) + GSTPST_SK_SALE + sale 1 1 percent - + - GST - 5% (SK) + GST for sales - 5% (SK) GST + sale 0.050000 percent 1 - + - - + + - + - + - PST - 5% + PST for sales - 5% (SK) PST + sale 0.050000 percent - 1 - + 2 + - - + + - + - + - HST - 12% - HST12 + TVH for sales - 12% + TVH12_SALE + sale 0.120000 percent - + - - + + - + - HST - 13% - HST13 + TVH for sales - 13% + TVH13_SALE + sale 0.130000 percent - + - - + + - + - HST - 13.5% - HST135 + TVH for sales - 13.5% + TVH135_SALE + sale 0.135000 percent - + - - + + - + - HST - 15% - HST15 + TVH for sales - 15% + TVH15_SALE + sale 0.150000 percent - + - - + + - + - GST - 5% - GST + GST for sales - 5% + GST_SALE + sale 0.050000 percent - + - - + + - + + + + + + - No tax - No tax - 0.00 + GST + PST for purchases (MB) + GSTPST_MB_PURC + purchase + 1 + 1 percent + + + GST for purchases - 5% (MB) + GST + purchase + 0.050000 + percent + 1 + + + + + + + + + + + + + PST for purchases - 7% + PST + purchase + 0.700000 + percent + 2 + + + + + + + + + + + + + + GST + PST for purchases (PE) + GSTPST_PE_PURC + purchase + 1 + 1 + percent + + + + + GST for purchases - 5% (PE) + GST + purchase + 0.050000 + percent + 1 + + + + + + + + + + + + + PST for purchases - 10% + PST + purchase + 0.100000 + percent + 2 + + + + + + + + + + + + + + GST + TVQ for purchases + GSTTVQ_PURC + purchase + 1 + 1 + percent + + + + + GST for purchases - 5% (QC) + GST + purchase + 0.050000 + percent + 1 + + + + + + + + + + + + + TVQ for purchases - 9.5% + TVQ + purchase + 0.095000 + percent + 2 + + + + + + + + + + + + + + GST + PST for purchases (SK) + GSTPST_SK_PURC + purchase + 1 + 1 + percent + + + + + GST for purchases - 5% (SK) + GST + purchase + 0.050000 + percent + 1 + + + + + + + + + + + + + PST for purchases - 5% (SK) + PST + purchase + 0.050000 + percent + 2 + + + + + + + + + + + + + + TVH for purchases - 12% + TVH12_PURC + purchase + 0.120000 + percent + + + + + + + + + + + TVH for purchases - 13% + TVH13_PURC + purchase + 0.130000 + percent + + + + + + + + + + + TVH for purchases - 13.5% + TVH135_PURC + purchase + 0.135000 + percent + + + + + + + + + + + TVH for purchases - 15% + TVH15_PURC + purchase + 0.150000 + percent + + + + + + + + + + + + + GST for purchases - 5% + GST_PURC + purchase + 0.050000 + percent + + + + + + + + diff --git a/addons/l10n_ca/account_tax_fr.xml b/addons/l10n_ca/account_tax_fr.xml index 5df4446c611..169bfe4f20b 100644 --- a/addons/l10n_ca/account_tax_fr.xml +++ b/addons/l10n_ca/account_tax_fr.xml @@ -2,263 +2,544 @@ + + - + - TPS + TVP (MB) - TPSTVP_MB + TPS + TVP sur les ventes (MB) + TPSTVP_MB_SALE + sale 1 1 percent - + - TPS - 5% (MB) + TPS sur les ventes - 5% (MB) TPS + sale 0.050000 percent 1 - + - - + + - + - + - TVP - 7% + TVP sur les ventes - 7% TVP + sale 0.700000 percent - 1 - + 2 + - - + + - + - + - TPS + TVP (PE) - TPSTVP_PE + TPS + TVP sur les ventes (PE) + TPSTVP_PE_SALE + sale 1 1 percent - + - TPS - 5% (PE) + TPS sur les ventes - 5% (PE) TPS + sale 0.050000 percent 1 - + - - + + - + - + - TVP - 10% + TVP for sale - 10% TVP + sale 0.100000 percent - 1 - + 2 + - - + + - + - + - TPS + TVQ - TPSTVQ + TPS + TVQ sur les ventes + TPSTVQ_SALE + sale 1 1 percent - + - TPS - 5% (QC) + TPS sur les ventes - 5% (QC) TPS + sale 0.050000 percent 1 - + - - + + - + - + - TVQ - 9.5% + TVQ sur les ventes - 9.5% TVQ + sale 0.095000 percent - 1 - + 2 + - - + + - + - + - TPS + TVP (SK) - TPSTVP_SK + TPS + TVP sur les ventes (SK) + TPSTVP_SK_SALE + sale 1 1 percent - + - TPS - 5% (SK) + TPS sur les ventes - 5% (SK) TPS + sale 0.050000 percent 1 - + - - + + - + - + - TVP - 5% (SK) + TVP sur les ventes - 5% (SK) TVP + sale 0.050000 percent - 1 - + 2 + - - + + - + - + - TVH - 12% - TVH12 + TVH sur les ventes - 12% + TVH12_SALE + sale 0.120000 percent - + - - + + - + - TVH - 13% - TVH13 + TVH sur les ventes - 13% + TVH13_SALE + sale 0.130000 percent - + - - + + - + - TVH - 13.5% - TVH135 + TVH sur les ventes - 13.5% + TVH135_SALE + sale 0.135000 percent - + - - + + - + - TVH - 15% - TVH15 + TVH sur les ventes - 15% + TVH15_SALE + sale 0.150000 percent - + - - + + - + - TPS - 5% - TPS + TPS sur les ventes - 5% + TPS_SALE + sale 0.050000 percent - + - - + + - + + + + + + - Pas de taxes - Pas de taxes - 0.00 + TPS + TVP sur les achats (MB) + TPSTVP_MB_PURC + purchase + 1 + 1 percent + + + TPS sur les achats - 5% (MB) + TPS + purchase + 0.050000 + percent + 1 + + + + + + + + + + + + + TVP sur les achats - 7% + TVP + purchase + 0.700000 + percent + 2 + + + + + + + + + + + + + + TPS + TVP sur les achats (PE) + TPSTVP_PE_PURC + purchase + 1 + 1 + percent + + + + + TPS sur les achats - 5% (PE) + TPS + purchase + 0.050000 + percent + 1 + + + + + + + + + + + + + TVP sur les achats - 10% + TVP + purchase + 0.100000 + percent + 2 + + + + + + + + + + + + + + TPS + TVQ sur les achats + TPSTVQ_PURC + purchase + 1 + 1 + percent + + + + + TPS sur les achats - 5% (QC) + TPS + purchase + 0.050000 + percent + 1 + + + + + + + + + + + + + TVQ sur les achats - 9.5% + TVQ + purchase + 0.095000 + percent + 2 + + + + + + + + + + + + + + TPS + TVP sur les achats (SK) + TPSTVP_SK_PURC + purchase + 1 + 1 + percent + + + + + TPS sur les achats - 5% (SK) + TPS + purchase + 0.050000 + percent + 1 + + + + + + + + + + + + + TVP sur les achats - 5% (SK) + TVP + purchase + 0.050000 + percent + 2 + + + + + + + + + + + + + + TVH sur les achats - 12% + TVH12_PURC + purchase + 0.120000 + percent + + + + + + + + + + + TVH sur les achats - 13% + TVH13_PURC + purchase + 0.130000 + percent + + + + + + + + + + + TVH sur les achats - 13.5% + TVH135_PURC + purchase + 0.135000 + percent + + + + + + + + + + + TVH sur les achats - 15% + TVH15_PURC + purchase + 0.150000 + percent + + + + + + + + + + + + + TPS sur les achats - 5% + TPS_PURC + purchase + 0.050000 + percent + + + + + + + + diff --git a/addons/l10n_ca/account_types_en.xml b/addons/l10n_ca/account_types_en.xml deleted file mode 100644 index 1af3fd92205..00000000000 --- a/addons/l10n_ca/account_types_en.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - Receivable - receivable - unreconciled - - - - Payable - payable - unreconciled - - - - View - view - none - - - - Income - income - none - income - - - - Expense - expense - none - expense - - - - Tax - tax - unreconciled - - - - Cash - cash - balance - - - - Asset - asset - balance - asset - - - - Equity - equity - liability - balance - - - - diff --git a/addons/l10n_ca/account_types_fr.xml b/addons/l10n_ca/account_types_fr.xml deleted file mode 100644 index cff6c01e6f2..00000000000 --- a/addons/l10n_ca/account_types_fr.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - Vue - view - none - - - - Capital - capital - asset - balance - - - - Immobilisation - immo - asset - balance - - - - Stock et Encours - stock - asset - balance - - - - Tiers - tiers - balance - - - - Tiers - Recevable - tiers -rec - asset - unreconciled - - - - Tiers - Payable - tiers - pay - liability - unreconciled - - - - Tax - tax - unreconciled - - - - Financier - financier - balance - - - - Charge - charge - expense - none - - - - Produit - produit - income - none - - - - diff --git a/addons/l10n_ca/fiscal_templates_en.xml b/addons/l10n_ca/fiscal_templates_en.xml index d7b6a3ee7da..54f9c21b5e1 100644 --- a/addons/l10n_ca/fiscal_templates_en.xml +++ b/addons/l10n_ca/fiscal_templates_en.xml @@ -39,354 +39,618 @@ + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + - + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + - - - - - + + + + + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + - - - - + + + + + + - - - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + - - - - + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/addons/l10n_ca/fiscal_templates_fr.xml b/addons/l10n_ca/fiscal_templates_fr.xml index 2ce50e5d6e1..0acd7388a52 100644 --- a/addons/l10n_ca/fiscal_templates_fr.xml +++ b/addons/l10n_ca/fiscal_templates_fr.xml @@ -39,278 +39,542 @@ + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 2c115e6856f5c6eb7f3d730b0ccfa028b386b009 Mon Sep 17 00:00:00 2001 From: Ronald Portier Date: Fri, 22 Jun 2012 16:19:32 +0200 Subject: [PATCH 011/209] [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 012/209] [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 026/209] 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 e748c3d4cf18eb3e8defde43f46ee3eeeff0404c Mon Sep 17 00:00:00 2001 From: "Anand Patel (OpenERP)" Date: Fri, 29 Jun 2012 12:52:48 +0530 Subject: [PATCH 027/209] 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 028/209] [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 1a61a20dbbc0ea716aed59b3d71374a8a2b2e4fc Mon Sep 17 00:00:00 2001 From: "Divyesh Makwana (Open ERP)" Date: Fri, 29 Jun 2012 17:53:47 +0530 Subject: [PATCH 029/209] [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 eb2d0483ce746fbbbba2a12333f027bc3299ba3a Mon Sep 17 00:00:00 2001 From: "Divyesh Makwana (Open ERP)" Date: Mon, 2 Jul 2012 10:58:16 +0530 Subject: [PATCH 030/209] [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 @@ - - - - - From a2ad095f6140d9a42bd59c98d0fc4672529b228a Mon Sep 17 00:00:00 2001 From: sebastien beau Date: Wed, 11 Jul 2012 02:23:33 +0200 Subject: [PATCH 064/209] [REF] product: refactor move function field on variant in order to allow to move the seller_ids from the template to the variant easily bzr revid: sebastien.beau@akretion.com.br-20120711002333-frtn37s96ovjahkp --- addons/product/product.py | 68 ++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/addons/product/product.py b/addons/product/product.py index a81074aa56e..091c76db44b 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -258,32 +258,6 @@ class product_template(osv.osv): _name = "product.template" _description = "Product Template" - def _get_main_product_supplier(self, cr, uid, product, context=None): - """Determines the main (best) product supplier for ``product``, - returning the corresponding ``supplierinfo`` record, or False - if none were found. The default strategy is to select the - supplier with the highest priority (i.e. smallest sequence). - - :param browse_record product: product to supply - :rtype: product.supplierinfo browse_record or False - """ - sellers = [(seller_info.sequence, seller_info) - for seller_info in product.seller_ids or [] - if seller_info and isinstance(seller_info.sequence, (int, long))] - return sellers and sellers[0][1] or False - - def _calc_seller(self, cr, uid, ids, fields, arg, context=None): - result = {} - for product in self.browse(cr, uid, ids, context=context): - main_supplier = self._get_main_product_supplier(cr, uid, product, context=context) - result[product.id] = { - 'seller_info_id': main_supplier and main_supplier.id or False, - 'seller_delay': main_supplier and main_supplier.delay or 1, - 'seller_qty': main_supplier and main_supplier.qty or 0.0, - 'seller_id': main_supplier and main_supplier.name.id or False - } - return result - _columns = { 'name': fields.char('Name', size=128, required=True, translate=True, select=True), 'product_manager': fields.many2one('res.users','Product Manager',help="This is use as task responsible"), @@ -320,11 +294,7 @@ class product_template(osv.osv): help='Coefficient to convert Unit of Measure to UOS\n' ' uos = uom * coeff'), 'mes_type': fields.selection((('fixed', 'Fixed'), ('variable', 'Variable')), 'Measure Type', required=True), - 'seller_info_id': fields.function(_calc_seller, type='many2one', relation="product.supplierinfo", multi="seller_info"), - 'seller_delay': fields.function(_calc_seller, type='integer', string='Supplier Lead Time', multi="seller_info", help="This is the average delay in days between the purchase order confirmation and the reception of goods for this product and for the default supplier. It is used by the scheduler to order requests based on reordering delays."), - 'seller_qty': fields.function(_calc_seller, type='float', string='Supplier Quantity', multi="seller_info", help="This is minimum quantity to purchase from Main Supplier."), - 'seller_id': fields.function(_calc_seller, type='many2one', relation="res.partner", string='Main Supplier', help="Main Supplier who has highest priority in Supplier List.", multi="seller_info"), - 'seller_ids': fields.one2many('product.supplierinfo', 'product_id', 'Partners'), + 'seller_ids': fields.one2many('product.supplierinfo', 'product_template_id', 'Partners'), 'loc_rack': fields.char('Rack', size=16), 'loc_row': fields.char('Row', size=16), 'loc_case': fields.char('Case', size=16), @@ -491,6 +461,34 @@ class product_product(osv.osv): res[p.id] = (data['code'] and ('['+data['code']+'] ') or '') + \ (data['name'] or '') + (data['variants'] and (' - '+data['variants']) or '') return res + + + def _get_main_product_supplier(self, cr, uid, product, context=None): + """Determines the main (best) product supplier for ``product``, + returning the corresponding ``supplierinfo`` record, or False + if none were found. The default strategy is to select the + supplier with the highest priority (i.e. smallest sequence). + + :param browse_record product: product to supply + :rtype: product.supplierinfo browse_record or False + """ + sellers = [(seller_info.sequence, seller_info) + for seller_info in product.seller_ids or [] + if seller_info and isinstance(seller_info.sequence, (int, long))] + return sellers and sellers[0][1] or False + + def _calc_seller(self, cr, uid, ids, fields, arg, context=None): + result = {} + for product in self.browse(cr, uid, ids, context=context): + main_supplier = self._get_main_product_supplier(cr, uid, product, context=context) + result[product.id] = { + 'seller_info_id': main_supplier and main_supplier.id or False, + 'seller_delay': main_supplier and main_supplier.delay or 1, + 'seller_qty': main_supplier and main_supplier.qty or 0.0, + 'seller_id': main_supplier and main_supplier.name.id or False + } + return result + _defaults = { 'active': lambda *a: 1, @@ -526,6 +524,10 @@ class product_product(osv.osv): 'name_template': fields.related('product_tmpl_id', 'name', string="Name", type='char', size=128, store=True, select=True), 'color': fields.integer('Color Index'), 'product_image': fields.binary('Image'), + 'seller_info_id': fields.function(_calc_seller, type='many2one', relation="product.supplierinfo", multi="seller_info"), + 'seller_delay': fields.function(_calc_seller, type='integer', string='Supplier Lead Time', multi="seller_info", help="This is the average delay in days between the purchase order confirmation and the reception of goods for this product and for the default supplier. It is used by the scheduler to order requests based on reordering delays."), + 'seller_qty': fields.function(_calc_seller, type='float', string='Supplier Quantity', multi="seller_info", help="This is minimum quantity to purchase from Main Supplier."), + 'seller_id': fields.function(_calc_seller, type='many2one', relation="res.partner", string='Main Supplier', help="Main Supplier who has highest priority in Supplier List.", multi="seller_info"), } def create(self, cr, uid, vals, context=None): @@ -783,10 +785,10 @@ class product_supplierinfo(osv.osv): 'product_name': fields.char('Supplier Product Name', size=128, help="This supplier's product name will be used when printing a request for quotation. Keep empty to use the internal one."), 'product_code': fields.char('Supplier Product Code', size=64, help="This supplier's product code will be used when printing a request for quotation. Keep empty to use the internal one."), 'sequence' : fields.integer('Sequence', help="Assigns the priority to the list of product supplier."), - 'product_uom': fields.related('product_id', 'uom_po_id', type='many2one', relation='product.uom', string="Supplier Unit of Measure", readonly="1", help="This comes from the product form."), + 'product_uom': fields.related('product_template_id', 'uom_po_id', type='many2one', relation='product.uom', string="Supplier Unit of Measure", readonly="1", help="This comes from the product form."), 'min_qty': fields.float('Minimal Quantity', required=True, help="The minimal quantity to purchase to this supplier, expressed in the supplier Product Unit of Measure if not empty, in the default unit of measure of the product otherwise."), 'qty': fields.function(_calc_qty, store=True, type='float', string='Quantity', multi="qty", help="This is a quantity which is converted into Default Unit of Measure."), - 'product_id' : fields.many2one('product.template', 'Product', required=True, ondelete='cascade', select=True), + 'product_template_id' : fields.many2one('product.template', 'Product Template', required=True, ondelete='cascade', select=True), 'delay' : fields.integer('Delivery Lead Time', required=True, help="Lead time in days between the confirmation of the purchase order and the reception of the products in your warehouse. Used by the scheduler for automatic computation of the purchase order planning."), 'pricelist_ids': fields.one2many('pricelist.partnerinfo', 'suppinfo_id', 'Supplier Pricelist'), 'company_id':fields.many2one('res.company','Company',select=1), From ef50bf061bbd0df7c70259d9736dce5b11c6f612 Mon Sep 17 00:00:00 2001 From: sebastien beau Date: Wed, 11 Jul 2012 01:49:48 +0200 Subject: [PATCH 065/209] [FIX] purchase : fix due to refactor done on product module bzr revid: sebastien.beau@akretion.com.br-20120710234948-p87xrwwfbk4r6lc4 --- addons/purchase/purchase.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index e74ca83a92b..9f4c57babf9 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -917,15 +917,15 @@ class purchase_order_line(osv.osv): qty = qty or 1.0 supplierinfo = False - supplierinfo_ids = product_supplierinfo.search(cr, uid, [('name','=',partner_id),('product_id','=',product.id)]) - if supplierinfo_ids: - supplierinfo = product_supplierinfo.browse(cr, uid, supplierinfo_ids[0], context=context) - if supplierinfo.product_uom.id != uom_id: - res['warning'] = {'title': _('Warning'), 'message': _('The selected supplier only sells this product by %s') % supplierinfo.product_uom.name } - min_qty = product_uom._compute_qty(cr, uid, supplierinfo.product_uom.id, supplierinfo.min_qty, to_uom_id=uom_id) - if qty < min_qty: # If the supplier quantity is greater than entered from user, set minimal. - res['warning'] = {'title': _('Warning'), 'message': _('The selected supplier has a minimal quantity set to %s %s, you should not purchase less.') % (supplierinfo.min_qty, supplierinfo.product_uom.name)} - qty = min_qty + for supplier in product.seller_ids: + if supplier.name.id == partner_id: + supplierinfo = supplier + if supplierinfo.product_uom.id != uom_id: + res['warning'] = {'title': _('Warning'), 'message': _('The selected supplier only sells this product by %s') % supplierinfo.product_uom.name } + min_qty = product_uom._compute_qty(cr, uid, supplierinfo.product_uom.id, supplierinfo.min_qty, to_uom_id=uom_id) + if qty < min_qty: # If the supplier quantity is greater than entered from user, set minimal. + res['warning'] = {'title': _('Warning'), 'message': _('The selected supplier has a minimal quantity set to %s %s, you should not purchase less.') % (supplierinfo.min_qty, supplierinfo.product_uom.name)} + qty = min_qty dt = self._get_date_planned(cr, uid, supplierinfo, date_order, context=context).strftime(DEFAULT_SERVER_DATETIME_FORMAT) From 7f28916d734eb9dc2522ca6a478dbe5a027414f1 Mon Sep 17 00:00:00 2001 From: sebastien beau Date: Wed, 11 Jul 2012 02:28:17 +0200 Subject: [PATCH 066/209] [FIX] purchase : manual or automatic purchase should have the same description for line always the partner_ref bzr revid: sebastien.beau@akretion.com.br-20120711002817-pupfagnty0so015e --- addons/purchase/purchase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 9f4c57babf9..3f351d3fc8f 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -895,7 +895,7 @@ class purchase_order_line(osv.osv): lang = res_partner.browse(cr, uid, partner_id).lang context_partner = {'lang': lang, 'partner_id': partner_id} product = product_product.browse(cr, uid, product_id, context=context_partner) - res['value'].update({'name': product.name, 'notes': notes or product.description_purchase}) + res['value'].update({'name': product.partner_ref, 'notes': notes or product.description_purchase}) # - set a domain on product_uom res['domain'] = {'product_uom': [('category_id','=',product.uom_id.category_id.id)]} From d5e57ecdf5c37d4c0f64d2075ed87c4419323237 Mon Sep 17 00:00:00 2001 From: Paramjit Singh Sahota Date: Wed, 11 Jul 2012 10:34:25 +0530 Subject: [PATCH 067/209] [MERGE] Bounce effect on QUICK CREATE[+] Button in KANBAN VIEW. bzr revid: psa@tinyerp.com-20120711050425-eiywgtwi0upzmm80 --- addons/web_kanban/static/src/js/kanban.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 8dde2efe7c3..56612f3bf08 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -417,9 +417,13 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ }); var click_column = this.$element.find('.oe_kanban_add'); click_column.addClass('oe_kanban_quick_create_bounce'); - this.$records.click(function() { + this.$records.click(function(e) { + var $target = e.target; + var $currenttarget = e.currentTarget; + if ($target == $currenttarget) { self.view.do_bounce(click_column); - }); + } + }); this.$records.find('.oe_kanban_show_more').click(this.do_show_more); if (this.state.folded) { this.do_toggle_fold(); From 90eced57d27949e7f2ed541ca4c39a888facd181 Mon Sep 17 00:00:00 2001 From: "Jiten (OpenERP)" Date: Wed, 11 Jul 2012 12:20:00 +0530 Subject: [PATCH 068/209] [IMP] Improved code for bounce effect on wrong click area. bzr revid: jra@tinyerp.com-20120711065000-jf3x8xca67jbsdzo --- addons/web/static/src/js/view_form.js | 27 +++++++++++------------ addons/web/static/src/js/view_list.js | 11 +++++---- addons/web_kanban/static/src/js/kanban.js | 15 +++++-------- 3 files changed, 24 insertions(+), 29 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 2a4b707f71e..49987151528 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -92,7 +92,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM this._super(); }, on_loaded: function(data) { - var self = this; + var self = this; if (!data) { throw new Error("No data provided."); } @@ -284,21 +284,20 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM } this._super(); }, - on_invalidclick : function (){ + on_wrong_click : function (){ var self = this; var div = $("
", {id:"bounce"}); this.$element.find(".oe_form_field, .oe_form_group_cell").click(function (e) { - $(".oe_form_button_edit").wrap(div); - $("#bounce").addClass('oe_bounce_button_left'); - var val_bounce = $(".oe_form_button_edit"); - self.do_bounce(val_bounce); - e.stopImmediatePropagation(); - }); - + $(".oe_form_button_edit").wrap(div); + $("#bounce").addClass('oe_bounce_button_left'); + var edit_btn = $(".oe_form_button_edit"); + self.do_bounce(edit_btn); + e.stopImmediatePropagation(); + }); }, on_record_loaded: function(record) { - var self = this, set_values = []; - self.on_invalidclick(); + var self = this, set_values = []; + self.on_wrong_click(); if (!record) { this.do_warn("Form", "The record could not be found in the database.", true); return $.Deferred().reject(); @@ -599,8 +598,8 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM on_button_save: function() { var self = this; return this.do_save().then(function(result) { - self.set({mode: "view"}); - self.on_invalidclick(); + self.set({mode: "view"}); + self.on_wrong_click(); }); }, @@ -2996,7 +2995,7 @@ instance.web.form.FieldOne2Many = instance.web.form.AbstractField.extend({ return def; }, reload_current_view: function() { - var self = this; + var self = this; return self.is_loaded = self.is_loaded.pipe(function() { var active_view = self.viewmanager.active_view; var view = self.viewmanager.views[active_view].controller; diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index 7bf9d4ad6bf..0cb6118af3f 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -984,13 +984,12 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web. throw "Could not find id in dataset" } self.row_clicked(e); - } - else{ - if (opts.options.$buttons){ - var bounce_val = $(opts.options.$buttons.find('.oe_list_add')); - self.view.do_bounce(bounce_val); - } + } else { + if (opts.options.$buttons) { + var create_btn = $(opts.options.$buttons.find('.oe_list_add')); + self.view.do_bounce(create_btn); } + } }); }, row_clicked: function (e, view) { diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 56612f3bf08..9b80e533d7f 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -415,15 +415,12 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ self.quick.appendTo($(".oe_kanban_group_list_header", self.$records)); self.quick.focus(); }); - var click_column = this.$element.find('.oe_kanban_add'); - click_column.addClass('oe_kanban_quick_create_bounce'); - this.$records.click(function(e) { - var $target = e.target; - var $currenttarget = e.currentTarget; - if ($target == $currenttarget) { - self.view.do_bounce(click_column); - } - }); + var add_btn = this.$element.find('.oe_kanban_add'); + this.$records.click(function (ev) { + if (ev.target == ev.currentTarget) { + self.view.do_bounce(add_btn); + } + }); this.$records.find('.oe_kanban_show_more').click(this.do_show_more); if (this.state.folded) { this.do_toggle_fold(); From 6cc7bfc593b2db8ac4b9ce4e4b31805b6b50df19 Mon Sep 17 00:00:00 2001 From: sebastien beau Date: Wed, 11 Jul 2012 10:39:42 +0200 Subject: [PATCH 069/209] [FIX] product : fix demo data due to refactor done before bzr revid: sebastien.beau@akretion.com.br-20120711083942-7lgvt13cr3apdrjk --- addons/product/product_demo.xml | 56 ++++++++++++++++----------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/addons/product/product_demo.xml b/addons/product/product_demo.xml index a331d5c8b6b..3bd67ca7e61 100644 --- a/addons/product/product_demo.xml +++ b/addons/product/product_demo.xml @@ -693,112 +693,112 @@ 10 1 - + 5 10 1 - + 5 1 1 - + 1 1 1 - + 1 1 1 - + 2 1 1 - + 2 1 1 - + 2 1 1 - + 1 1 1 - + 1 1 1 - + 1 1 1 - + 1 1 1 - + 1 1 1 - + 1 1 1 - + 5 1 1 - + 5 1 1 - + 5 @@ -806,7 +806,7 @@ 10 1 5 - + 5 @@ -814,7 +814,7 @@ 10 1 5 - + 5 @@ -822,7 +822,7 @@ 10 1 5 - + 5 @@ -831,7 +831,7 @@ --> - + 5 1 @@ -839,7 +839,7 @@ - + 5 1 @@ -847,7 +847,7 @@ - + 5 1 @@ -855,7 +855,7 @@ - + 5 1 @@ -863,7 +863,7 @@ - + 5 1 @@ -871,7 +871,7 @@ - + 5 1 @@ -879,7 +879,7 @@ - + 2 1 @@ -887,7 +887,7 @@ - + 5 1 @@ -895,7 +895,7 @@ - + 5 1 From fc0e0b056339ad8750d07e5e13838a6ff9a4c397 Mon Sep 17 00:00:00 2001 From: sebastien beau Date: Wed, 11 Jul 2012 11:43:51 +0200 Subject: [PATCH 070/209] [FIX] mrp fix demo data due to previous refactor bzr revid: sebastien.beau@akretion.com.br-20120711094351-nn21w9odo13k14t0 --- addons/mrp/mrp_demo.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/mrp/mrp_demo.xml b/addons/mrp/mrp_demo.xml index 68fe21ea16c..a008b2a1dee 100644 --- a/addons/mrp/mrp_demo.xml +++ b/addons/mrp/mrp_demo.xml @@ -930,7 +930,7 @@ - + 1.0 @@ -945,7 +945,7 @@ - + 2.0 @@ -960,7 +960,7 @@ - + 2.0 @@ -1050,7 +1050,7 @@ - + 300.0 @@ -1065,7 +1065,7 @@ - + 100.0 From a899b40b597c74b08a2c66fc486ac1f6bcfa5bca Mon Sep 17 00:00:00 2001 From: "Jiten (OpenERP)" Date: Wed, 11 Jul 2012 19:01:24 +0530 Subject: [PATCH 071/209] [IMP] Improved scrolling when scrolltop/scrollleft are not in range for bounce button. bzr revid: jra@tinyerp.com-20120711133124-j84maefl1b21i2jo --- addons/web/static/src/js/view_form.js | 6 ++++++ addons/web_kanban/static/src/js/kanban.js | 3 +++ 2 files changed, 9 insertions(+) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 49987151528..b17d05da165 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -291,6 +291,12 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM $(".oe_form_button_edit").wrap(div); $("#bounce").addClass('oe_bounce_button_left'); var edit_btn = $(".oe_form_button_edit"); + if (jQuery(window).scrollTop() > 75 ) { + $('body,html').animate({ scrollTop: 0 }, 200); + } + if (jQuery(window).scrollLeft() > 225 ) { + $('body,html').animate({ scrollLeft: 0 }, 200); + } self.do_bounce(edit_btn); e.stopImmediatePropagation(); }); diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 9b80e533d7f..903b4d32840 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -418,6 +418,9 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ var add_btn = this.$element.find('.oe_kanban_add'); this.$records.click(function (ev) { if (ev.target == ev.currentTarget) { + if (jQuery(window).scrollTop() > 120 ) { + $('body,html').animate({ scrollTop: 0 }, 200); + } self.view.do_bounce(add_btn); } }); From aef3a442e608834493d228349c2e28e4b8c22ac4 Mon Sep 17 00:00:00 2001 From: "Purnendu Singh (OpenERP)" Date: Thu, 12 Jul 2012 14:33:22 +0530 Subject: [PATCH 072/209] [IMP] crm: remove sales team from calender view of meeting bzr revid: psi@tinyerp.com-20120712090322-pu6am3gmnw24wi5h --- addons/crm/crm_meeting_view.xml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/addons/crm/crm_meeting_view.xml b/addons/crm/crm_meeting_view.xml index f7c2ada05f2..74d23a99fd8 100644 --- a/addons/crm/crm_meeting_view.xml +++ b/addons/crm/crm_meeting_view.xml @@ -16,21 +16,6 @@ - - - - CRM - Meetings Calendar - crm.meeting - calendar - - - - - - - - - From 9b52110d4b9d644d452609d96aa73f5e91f99296 Mon Sep 17 00:00:00 2001 From: "Jiten (OpenERP)" Date: Thu, 12 Jul 2012 16:19:25 +0530 Subject: [PATCH 073/209] [IMP] Improved bounce effect when kanban group column is folded. bzr revid: jra@tinyerp.com-20120712104925-3ouxmwk780x3pkra --- addons/web_kanban/static/src/js/kanban.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 903b4d32840..05505b26e53 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -416,12 +416,18 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ self.quick.focus(); }); var add_btn = this.$element.find('.oe_kanban_add'); + var fold_btn = this.$element.find('.oe_dropdown_kanban'); this.$records.click(function (ev) { if (ev.target == ev.currentTarget) { if (jQuery(window).scrollTop() > 120 ) { $('body,html').animate({ scrollTop: 0 }, 200); } - self.view.do_bounce(add_btn); + if (!self.state.folded) { + self.view.do_bounce(add_btn); + }else { + fold_btn.css('display','inline-block'); + self.view.do_bounce(fold_btn); + } } }); this.$records.find('.oe_kanban_show_more').click(this.do_show_more); From f72bbd07dce0c4f0cab4385a5baba432aada859a Mon Sep 17 00:00:00 2001 From: "Purnendu Singh (OpenERP)" Date: Thu, 12 Jul 2012 17:54:17 +0530 Subject: [PATCH 074/209] [IMP] crm: Improve the demo data in order to reflect meeting time in calender view bzr revid: psi@tinyerp.com-20120712122417-9uwvt5g32t9ssd9h --- addons/crm/crm_meeting_demo.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/crm/crm_meeting_demo.xml b/addons/crm/crm_meeting_demo.xml index 3f209aeecd9..b4710fffb2f 100644 --- a/addons/crm/crm_meeting_demo.xml +++ b/addons/crm/crm_meeting_demo.xml @@ -27,10 +27,10 @@ - + - + @@ -42,10 +42,10 @@ - + - + From 7c7d94f0025256ca541b041f35109c5305c41f15 Mon Sep 17 00:00:00 2001 From: "Jiten (OpenERP)" Date: Fri, 13 Jul 2012 15:47:53 +0530 Subject: [PATCH 075/209] [IMP] Improve bounce effect to remove auto scroll and remove useless code. bzr revid: jra@tinyerp.com-20120713101753-95dnac5u3cm3mwhn --- addons/web/static/src/js/corelib.js | 1 - addons/web/static/src/js/view_form.js | 29 +++++---------------- addons/web/static/src/xml/base.xml | 2 +- addons/web_kanban/static/src/css/kanban.css | 1 + addons/web_kanban/static/src/js/kanban.js | 5 +--- 5 files changed, 10 insertions(+), 28 deletions(-) diff --git a/addons/web/static/src/js/corelib.js b/addons/web/static/src/js/corelib.js index a200f272a91..03b67bce405 100644 --- a/addons/web/static/src/js/corelib.js +++ b/addons/web/static/src/js/corelib.js @@ -746,7 +746,6 @@ instance.web.Widget = instance.web.Class.extend(instance.web.WidgetMixin, { } return false; }, - rpc: function(url, data, success, error) { var def = $.Deferred().then(success, error); var self = this; diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index b17d05da165..b48f33f327a 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -284,26 +284,8 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM } this._super(); }, - on_wrong_click : function (){ - var self = this; - var div = $("
", {id:"bounce"}); - this.$element.find(".oe_form_field, .oe_form_group_cell").click(function (e) { - $(".oe_form_button_edit").wrap(div); - $("#bounce").addClass('oe_bounce_button_left'); - var edit_btn = $(".oe_form_button_edit"); - if (jQuery(window).scrollTop() > 75 ) { - $('body,html').animate({ scrollTop: 0 }, 200); - } - if (jQuery(window).scrollLeft() > 225 ) { - $('body,html').animate({ scrollLeft: 0 }, 200); - } - self.do_bounce(edit_btn); - e.stopImmediatePropagation(); - }); - }, on_record_loaded: function(record) { var self = this, set_values = []; - self.on_wrong_click(); if (!record) { this.do_warn("Form", "The record could not be found in the database.", true); return $.Deferred().reject(); @@ -345,7 +327,6 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM } self.$element.add(self.$buttons).removeClass('oe_form_dirty'); }); - }, on_form_changed: function() { this.trigger("view_content_has_changed"); @@ -581,6 +562,12 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM _.each(this.fields,function(field){ field.set({"force_readonly": true}); }); + var edit_btn = $(".oe_form_button_edit"); + this.$element.find(".oe_form_field, .oe_form_group_cell").click(function (e) { + edit_btn.addClass('oe_bounce_button_left'); + self.do_bounce(edit_btn); + e.stopImmediatePropagation(); + }); } else { self.$element.removeClass('oe_form_readonly').addClass('oe_form_editable'); self.$buttons.find('.oe_form_buttons_edit').show(); @@ -605,10 +592,8 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM var self = this; return this.do_save().then(function(result) { self.set({mode: "view"}); - self.on_wrong_click(); }); - - }, + }, on_button_cancel: function(event) { if (this.can_be_discarded()) { this.set({mode: "view"}); diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index f150e47b420..a8d7a061a81 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -681,7 +681,7 @@
- + diff --git a/addons/web_kanban/static/src/css/kanban.css b/addons/web_kanban/static/src/css/kanban.css index c5c4a8222db..fd18835de88 100644 --- a/addons/web_kanban/static/src/css/kanban.css +++ b/addons/web_kanban/static/src/css/kanban.css @@ -514,6 +514,7 @@ .openerp .oe_kanban_view .oe_kanban_color_9 { background-color: #ffc7f1; } + .openerp .oe_form .oe_kanban_view .oe_kanban_column, .openerp .oe_form .oe_kanban_view .oe_kanban_group_header { padding: 0px; background: white; diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 05505b26e53..524d4cdcca2 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -419,13 +419,10 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ var fold_btn = this.$element.find('.oe_dropdown_kanban'); this.$records.click(function (ev) { if (ev.target == ev.currentTarget) { - if (jQuery(window).scrollTop() > 120 ) { - $('body,html').animate({ scrollTop: 0 }, 200); - } if (!self.state.folded) { self.view.do_bounce(add_btn); }else { - fold_btn.css('display','inline-block'); +// fold_btn.css('display','inline-block'); self.view.do_bounce(fold_btn); } } From a7f251160165c1cae3077f248554acb8ce446955 Mon Sep 17 00:00:00 2001 From: "Jiten (OpenERP)" Date: Fri, 13 Jul 2012 16:39:04 +0530 Subject: [PATCH 076/209] [IMP] Improved code. bzr revid: jra@tinyerp.com-20120713110904-25smebblug0jawx2 --- addons/web/static/src/js/view_form.js | 2 +- addons/web/static/src/js/view_list.js | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index b48f33f327a..6139a8db5fd 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -564,7 +564,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM }); var edit_btn = $(".oe_form_button_edit"); this.$element.find(".oe_form_field, .oe_form_group_cell").click(function (e) { - edit_btn.addClass('oe_bounce_button_left'); + edit_btn.wrap("
").addClass('oe_bounce_button_left'); self.do_bounce(edit_btn); e.stopImmediatePropagation(); }); diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index 0cb6118af3f..f10c2bee4b2 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -287,8 +287,6 @@ 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("
") - .addClass('oe_bounce_button_left') .click(this.proxy('do_add_record')) .prop('disabled', grouped && this.options.editable); this.$buttons.on('click', '.oe_list_button_import', function() { @@ -984,11 +982,10 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web. throw "Could not find id in dataset" } self.row_clicked(e); - } else { - if (opts.options.$buttons) { - var create_btn = $(opts.options.$buttons.find('.oe_list_add')); - self.view.do_bounce(create_btn); - } + } else if (opts.options.$buttons) { + var create_btn = $(opts.options.$buttons.find('.oe_list_add')); + create_btn..wrap("
").addClass('oe_bounce_button_left') + self.view.do_bounce(create_btn); } }); }, From 3db53edefc82bb146f3281ecb9751e239fb2df49 Mon Sep 17 00:00:00 2001 From: "Jiten (OpenERP)" Date: Fri, 13 Jul 2012 18:33:25 +0530 Subject: [PATCH 077/209] [IMP] Improved code to create bounce effect by CSS. bzr revid: jra@tinyerp.com-20120713130325-q0c6km66nkv2qi7p --- addons/web/static/src/css/base.css | 23 +++++++++++++++++++-- addons/web/static/src/js/corelib.js | 6 ------ addons/web/static/src/js/view_form.js | 3 +-- addons/web/static/src/js/view_list.js | 3 +-- addons/web_kanban/static/src/css/kanban.css | 3 --- addons/web_kanban/static/src/js/kanban.js | 6 +++--- 6 files changed, 26 insertions(+), 18 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 0d79e783370..293d182e6b7 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -2367,7 +2367,26 @@ div.ui-widget-overlay { filter: alpha(opacity=30); opacity: 0.3; } -.openerp .oe_bounce_button_left { + +.oe_bounce_left { float: left; - margin-right: 4px; +} + +.openerp .oe_bounce { + -moz-animation:bounce .40s linear; + -webkit-animation:bounce .40s linear; +} + +@-moz-keyframes bounce { + 0%{ -moz-transform:scale(0); opacity:0;} + 50%{ -moz-transform:scale(1.3); opacity:0.4; } + 75%{ -moz-transform:scale(0.9); opacity:0.7;} + 100%{ -moz-transform:scale(1); opacity:1;} +} + +@-webkit-keyframes bounce { + 0%{ -webkit-transform:scale(0); opacity:0;} + 50%{ -webkit-transform:scale(1.3); opacity:0.4;} + 75%{ -webkit-transform:scale(0.9); opacity:0.7;} + 100%{ -webkit-transform:scale(1); opacity:1;} } \ No newline at end of file diff --git a/addons/web/static/src/js/corelib.js b/addons/web/static/src/js/corelib.js index 03b67bce405..1ed4c4788e3 100644 --- a/addons/web/static/src/js/corelib.js +++ b/addons/web/static/src/js/corelib.js @@ -728,12 +728,6 @@ instance.web.Widget = instance.web.Class.extend(instance.web.WidgetMixin, { } return false; }, - /** - * Add bounce effect when click on wrong area - */ - do_bounce: function(element) { - element.effect("bounce", { times:3}, 300); - }, do_notify: function() { if (this.getParent()) { return this.getParent().do_notify.apply(this,arguments); diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 6139a8db5fd..3c9ff030441 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -564,8 +564,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM }); var edit_btn = $(".oe_form_button_edit"); this.$element.find(".oe_form_field, .oe_form_group_cell").click(function (e) { - edit_btn.wrap("
").addClass('oe_bounce_button_left'); - self.do_bounce(edit_btn); + edit_btn.wrap('
').css('margin-right','4px').addClass('oe_bounce_left oe_bounce'); e.stopImmediatePropagation(); }); } else { diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index f10c2bee4b2..da93a047259 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -984,8 +984,7 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web. self.row_clicked(e); } else if (opts.options.$buttons) { var create_btn = $(opts.options.$buttons.find('.oe_list_add')); - create_btn..wrap("
").addClass('oe_bounce_button_left') - self.view.do_bounce(create_btn); + create_btn.wrap('
').css('margin-right','4px').addClass('oe_bounce_left oe_bounce'); } }); }, diff --git a/addons/web_kanban/static/src/css/kanban.css b/addons/web_kanban/static/src/css/kanban.css index fd18835de88..4c64a2be34b 100644 --- a/addons/web_kanban/static/src/css/kanban.css +++ b/addons/web_kanban/static/src/css/kanban.css @@ -518,7 +518,4 @@ .openerp .oe_form .oe_kanban_view .oe_kanban_column, .openerp .oe_form .oe_kanban_view .oe_kanban_group_header { padding: 0px; background: white; -} -.openerp .oe_kanban_quick_create_bounce { - float: right; } \ No newline at end of file diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 524d4cdcca2..dcb0ad8c0cc 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -420,10 +420,10 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ this.$records.click(function (ev) { if (ev.target == ev.currentTarget) { if (!self.state.folded) { - self.view.do_bounce(add_btn); + add_btn.wrap('
').addClass('oe_bounce'); }else { -// fold_btn.css('display','inline-block'); - self.view.do_bounce(fold_btn); +// fold_btn.css('display','inline-block'); + fold_btn.wrap('
').addClass('oe_bounce'); } } }); From cabf707734f52cd7721377f80d8efaea7056f5bc Mon Sep 17 00:00:00 2001 From: "Jiten (OpenERP)" Date: Fri, 13 Jul 2012 18:57:23 +0530 Subject: [PATCH 078/209] [ADD] Add comment for used bounce effect. bzr revid: jra@tinyerp.com-20120713132723-t5f7kv5gak13lks2 --- addons/web/static/src/js/view_form.js | 3 +++ addons/web/static/src/js/view_list.js | 6 +++++- addons/web_kanban/static/src/js/kanban.js | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 3c9ff030441..fa75c3e2348 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -562,6 +562,9 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM _.each(this.fields,function(field){ field.set({"force_readonly": true}); }); + /* + * Add bounce effect on button 'Edit' when click on readonly page view. + */ var edit_btn = $(".oe_form_button_edit"); this.$element.find(".oe_form_field, .oe_form_group_cell").click(function (e) { edit_btn.wrap('
').css('margin-right','4px').addClass('oe_bounce_left oe_bounce'); diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index da93a047259..3b120065cc4 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -982,7 +982,11 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web. throw "Could not find id in dataset" } self.row_clicked(e); - } else if (opts.options.$buttons) { + } + /* + * Add bounce effect on button 'Create' when click on empty row of list view. + */ + else if (opts.options.$buttons) { var create_btn = $(opts.options.$buttons.find('.oe_list_add')); create_btn.wrap('
').css('margin-right','4px').addClass('oe_bounce_left oe_bounce'); } diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index dcb0ad8c0cc..9d794894d5b 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -415,6 +415,9 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ self.quick.appendTo($(".oe_kanban_group_list_header", self.$records)); self.quick.focus(); }); + /* + * Add bounce effect on image '+' of kanban header when click on empty space of kanban grouped column. + */ var add_btn = this.$element.find('.oe_kanban_add'); var fold_btn = this.$element.find('.oe_dropdown_kanban'); this.$records.click(function (ev) { From 66d1d0e33493b55a7fac8340e0ce009dde363381 Mon Sep 17 00:00:00 2001 From: "Jiten (OpenERP)" Date: Mon, 16 Jul 2012 12:35:23 +0530 Subject: [PATCH 079/209] [IMP] Improved code. bzr revid: jra@tinyerp.com-20120716070523-iim1n7ghl1a0tg6o --- addons/web/static/src/css/base.css | 23 ----------------------- addons/web/static/src/js/view_form.js | 2 +- addons/web/static/src/js/view_list.js | 2 +- 3 files changed, 2 insertions(+), 25 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 293d182e6b7..66104b446ea 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -2366,27 +2366,4 @@ div.ui-widget-overlay { background: black; filter: alpha(opacity=30); opacity: 0.3; -} - -.oe_bounce_left { - float: left; -} - -.openerp .oe_bounce { - -moz-animation:bounce .40s linear; - -webkit-animation:bounce .40s linear; -} - -@-moz-keyframes bounce { - 0%{ -moz-transform:scale(0); opacity:0;} - 50%{ -moz-transform:scale(1.3); opacity:0.4; } - 75%{ -moz-transform:scale(0.9); opacity:0.7;} - 100%{ -moz-transform:scale(1); opacity:1;} -} - -@-webkit-keyframes bounce { - 0%{ -webkit-transform:scale(0); opacity:0;} - 50%{ -webkit-transform:scale(1.3); opacity:0.4;} - 75%{ -webkit-transform:scale(0.9); opacity:0.7;} - 100%{ -webkit-transform:scale(1); opacity:1;} } \ 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 fa75c3e2348..f9eaaba4b91 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -567,7 +567,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM */ var edit_btn = $(".oe_form_button_edit"); this.$element.find(".oe_form_field, .oe_form_group_cell").click(function (e) { - edit_btn.wrap('
').css('margin-right','4px').addClass('oe_bounce_left oe_bounce'); + edit_btn.wrap('
').css('margin-right','4px').addClass('oe_left oe_bounce'); e.stopImmediatePropagation(); }); } else { diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index 3b120065cc4..a79e25a1474 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -988,7 +988,7 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web. */ else if (opts.options.$buttons) { var create_btn = $(opts.options.$buttons.find('.oe_list_add')); - create_btn.wrap('
').css('margin-right','4px').addClass('oe_bounce_left oe_bounce'); + create_btn.wrap('
').css('margin-right','4px').addClass('oe_left oe_bounce'); } }); }, From 5bba0c8e6b899c29ff2102b94ebf6abf290e1402 Mon Sep 17 00:00:00 2001 From: "Jiten (OpenERP)" Date: Mon, 16 Jul 2012 12:56:44 +0530 Subject: [PATCH 080/209] [ADD] Add css and sass file for bounce animation effect. bzr revid: jra@tinyerp.com-20120716072644-ls2q54fr5o8fjyd7 --- addons/web/static/src/css/base.css | 19 +++++++++++++++++ addons/web/static/src/css/base.sass | 33 +++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 66104b446ea..3e260601581 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -2366,4 +2366,23 @@ div.ui-widget-overlay { background: black; filter: alpha(opacity=30); opacity: 0.3; +} + +.openerp .oe_bounce { + -moz-animation:bounce .40s linear; + -webkit-animation:bounce .40s linear; +} + +@-moz-keyframes bounce { + 0%{ -moz-transform:scale(0); opacity:0;} + 50%{ -moz-transform:scale(1.3); opacity:0.4; } + 75%{ -moz-transform:scale(0.9); opacity:0.7;} + 100%{ -moz-transform:scale(1); opacity:1;} +} + +@-webkit-keyframes bounce { + 0%{ -webkit-transform:scale(0); opacity:0;} + 50%{ -webkit-transform:scale(1.3); opacity:0.4;} + 75%{ -webkit-transform:scale(0.9); opacity:0.7;} + 100%{ -webkit-transform:scale(1); opacity:1;} } \ No newline at end of file diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 559125aa3c3..1410a1ce872 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -1865,5 +1865,38 @@ $sheet-max-width: 860px div.ui-widget-overlay background: black @include opacity(0.3) + +.openerp .oe_bounce + -moz-animation: bounce .40s linear + -webkit-animation: bounce .40s linear + +@-moz-keyframes bounce + 0% + -moz-transform: scale(0) + opacity: 0 + 50% + -moz-transform: scale(1.3) + opacity: 0.4 + 75% + -moz-transform: scale(0.9) + opacity: 0.7 + 100% + -moz-transform: scale(1) + opacity: 1 + + +@-webkit-keyframes bounce + 0% + -webkit-transform: scale(0) + opacity: 0 + 50% + -webkit-transform: scale(1.3) + opacity: 0.4 + 75% + -webkit-transform: scale(0.9) + opacity: 0.7 + 100% + -webkit-transform: scale(1) + opacity: 1 // au BufWritePost,FileWritePost *.sass :!sass --style expanded --line-numbers > "%:p:r.css" // vim:tabstop=4:shiftwidth=4:softtabstop=4:fdm=marker: From 6d9cf3fe2dd641fdffa7f5e816728b66d0ec3c50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Mon, 16 Jul 2012 11:46:37 +0200 Subject: [PATCH 081/209] [IMP] point_of_sale: no scrollbar in fullscreen mode bzr revid: fva@openerp.com-20120716094637-n2mdh94pb147ggc0 --- addons/web/static/src/js/chrome.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 094e2f184e6..7830102f9f6 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -1056,10 +1056,13 @@ instance.web.WebClient = instance.web.Widget.extend({ } }, set_content_full_screen: function(fullscreen) { - if (fullscreen) + if (fullscreen){ $(".oe_webclient", this.$element).addClass("oe_content_full_screen"); - else + $("body").css({'overflow-y':'hidden'}); + }else{ $(".oe_webclient", this.$element).removeClass("oe_content_full_screen"); + $("body").css({'overflow-y':'scroll'}); + } } }); From f04758ec010af9c1a000c89e87c5ca29a3cfadef Mon Sep 17 00:00:00 2001 From: "Amit (OpenERP)" Date: Mon, 16 Jul 2012 15:59:20 +0530 Subject: [PATCH 082/209] [FIX] account : Fixes the cash register problem lp bug: https://launchpad.net/bugs/1003849 fixed bzr revid: amp@tinyerp.com-20120716102920-ifte2m8c6v8cldjl --- addons/account/account_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 80202d97d6c..a881519776e 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -2550,7 +2550,7 @@ action = pool.get('res.config').next(cr, uid, [], context) - + From c2e7e54fe322dd1e8fa9701305f21cec415b7e02 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Tue, 17 Jul 2012 17:24:28 +0200 Subject: [PATCH 083/209] [FIX] base_calendar: make all-day events start at 00:00:00 in the user's timezone bzr revid: rco@openerp.com-20120717152428-91wl4cqqxwgjn962 --- addons/base_calendar/base_calendar.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index 5fc38c884da..918ab97990a 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -941,16 +941,19 @@ class calendar_event(osv.osv): duration = 1.00 value['duration'] = duration - if allday: # For all day event - value = {'duration': 24.0} - duration = 24.0 - if start_date: - start = datetime.strptime(start_date, "%Y-%m-%d %H:%M:%S") - start_date = datetime.strftime(datetime(start.year, start.month, start.day, 0,0,0), "%Y-%m-%d %H:%M:%S") - value['date'] = start_date - - start = datetime.strptime(start_date, "%Y-%m-%d %H:%M:%S") + if allday: # For all day event + duration = 24.0 + value['duration'] = duration + # change start_date's time to 00:00:00 in the user's timezone + user = self.pool.get('res.users').browse(cr, uid, uid) + tz = pytz.timezone(user.context_tz) if user.context_tz else pytz.utc + start = pytz.utc.localize(start).astimezone(tz) # convert start in user's timezone + start = start.replace(hour=0, minute=0, second=0) # change start's time to 00:00:00 + start = start.astimezone(pytz.utc) # convert start back to utc + start_date = start.strftime("%Y-%m-%d %H:%M:%S") + value['date'] = start_date + if end_date and not duration: end = datetime.strptime(end_date, "%Y-%m-%d %H:%M:%S") diff = end - start From 7e9a1f13b0d7c3b5e78b18ab0cbf78fa442624ed Mon Sep 17 00:00:00 2001 From: "Divyesh Makwana (Open ERP)" Date: Wed, 18 Jul 2012 11:12:59 +0530 Subject: [PATCH 084/209] [FIX] base_calendar : TypeError: strptime() argument 1 must be string, not bool. bzr revid: mdi@tinyerp.com-20120718054259-cve7ms8krk19uw8o --- addons/base_calendar/base_calendar.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index 918ab97990a..b51f3cbd0b9 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -1028,8 +1028,8 @@ class calendar_event(osv.osv): 'id': fields.integer('ID', readonly=True), 'sequence': fields.integer('Sequence'), 'name': fields.char('Description', size=64, required=False, states={'done': [('readonly', True)]}), - 'date': fields.datetime('Date', states={'done': [('readonly', True)]}), - 'date_deadline': fields.datetime('Deadline', states={'done': [('readonly', True)]}), + 'date': fields.datetime('Date', required=True, states={'done': [('readonly', True)]}), + 'date_deadline': fields.datetime('Deadline', required=True, states={'done': [('readonly', True)]}), 'create_date': fields.datetime('Created', readonly=True), 'duration': fields.float('Duration', states={'done': [('readonly', True)]}), 'description': fields.text('Description', states={'done': [('readonly', True)]}), From 102049d6b0f6c7c29d0eeb140630fcfe03fb5f53 Mon Sep 17 00:00:00 2001 From: "Divyesh Makwana (Open ERP)" Date: Wed, 18 Jul 2012 12:25:11 +0530 Subject: [PATCH 085/209] [IMP] stock : Traceability section must go to tracking lot group. bzr revid: mdi@tinyerp.com-20120718065511-dfdfc59cb8ivt5j0 --- addons/stock/stock_view.xml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index 81484e0f5a3..f0f0e989e87 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -1268,23 +1268,22 @@ - -