From 3d98f01646fc82233698d895170eadeaee459938 Mon Sep 17 00:00:00 2001 From: Numerigraphe - Lionel Sausin Date: Wed, 17 Jun 2009 09:27:15 +0200 Subject: [PATCH 002/711] [ADD] Added a module to easily enter RIBs (standard French bank details slips). bzr revid: ls@numerigraphe.fr-20090617072715-hdkf86qq0nskc5q7 --- addons/base_rib/__init__.py | 26 +++++++ addons/base_rib/__terp__.py | 40 +++++++++++ addons/base_rib/base_rib.py | 112 ++++++++++++++++++++++++++++++ addons/base_rib/base_rib_data.xml | 38 ++++++++++ addons/base_rib/base_rib_view.xml | 90 ++++++++++++++++++++++++ addons/base_rib/i18n/fr_FR.po | 81 +++++++++++++++++++++ 6 files changed, 387 insertions(+) create mode 100644 addons/base_rib/__init__.py create mode 100644 addons/base_rib/__terp__.py create mode 100644 addons/base_rib/base_rib.py create mode 100644 addons/base_rib/base_rib_data.xml create mode 100644 addons/base_rib/base_rib_view.xml create mode 100644 addons/base_rib/i18n/fr_FR.po diff --git a/addons/base_rib/__init__.py b/addons/base_rib/__init__.py new file mode 100644 index 00000000000..f715da6a386 --- /dev/null +++ b/addons/base_rib/__init__.py @@ -0,0 +1,26 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2009 Tiny SPRL (). All Rights Reserved +# $Id$ +# +# 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 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +############################################################################## + +import base_rib + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: + diff --git a/addons/base_rib/__terp__.py b/addons/base_rib/__terp__.py new file mode 100644 index 00000000000..4712b449b9d --- /dev/null +++ b/addons/base_rib/__terp__.py @@ -0,0 +1,40 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2009 Tiny SPRL (). All Rights Reserved +# $Id$ +# +# 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 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +############################################################################## + + +{ + 'name': 'RIB', + 'version': '0.1', + 'category': 'Generic Modules/Base', + 'description': """ +This module install the base for RIB bank accounts (French standard for bank accounts). +To make it easier to enter RIB data, it will also allow to search for banks by code. + + """, + "author" : "Numérigraphe SARL", + 'depends': ['base', 'account'], + 'init_xml': ['base_rib_data.xml', ], + 'update_xml': ['base_rib_view.xml', ], + 'installable': True, + 'active': False, +} +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_rib/base_rib.py b/addons/base_rib/base_rib.py new file mode 100644 index 00000000000..34c86902a67 --- /dev/null +++ b/addons/base_rib/base_rib.py @@ -0,0 +1,112 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2009 Tiny SPRL (). All Rights Reserved +# $Id$ +# +# 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 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +############################################################################## + +import string +import unicodedata + +import netsvc +from osv import fields, osv + +# Add fields and behavior for French RIB +class res_partner_bank(osv.osv): + _inherit = "res.partner.bank" + + def _check_key(self, cr, uid, ids): + ''' + Check the RIB key + ''' + for bank_acc in self.browse(cr, uid, ids): + # ignore the accounts of type other than rib + if bank_acc.state !='rib': + continue + + # Fail if the needed values are empty of too short + if (not bank_acc.bank or not bank_acc.bank.code or len(bank_acc.bank.code) != 5 + or not bank_acc.office or len(bank_acc.office) != 5 + or not bank_acc.acc_number or len(bank_acc.acc_number) != 11 + or not bank_acc.key or len(bank_acc.key) != 2): + return False + + # get the rib data (without the key) + rib = "%s%s%s" % (bank_acc.bank.code, bank_acc.office, bank_acc.acc_number) + # translate letters into numbers according to a specific table (notice how s -> 2) + # Note: maketrans and translate work best with latin1 - that should not be a problem for RIB data + rib = rib.lower().encode('latin-1').translate(string.maketrans(u'abcdefghijklmnopqrstuvwxyz', u'12345678912345678923456789')) + + # compute the key + key = 97 - (100 * int(rib)) % 97 + + if int(bank_acc.key) != key: + return False + return True + + def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False): + #overwrite the search method in order to search not only on bank type == basic account number but also on type == rib + res = super(res_partner_bank, self).search(cr, uid, args, offset, limit, order, context=context, count=count) + if filter(lambda x:x[0] == 'acc_number' , args): + #get the value of the search + rib_value = filter(lambda x:x[0] == 'acc_number' , args)[0][2] + #get the other arguments of the search + args1 = filter(lambda x:x[0] != 'acc_number' , args) + #add the new criterion + args1 += [('rib', 'ilike', rib_value)] + #append the results to the older search + res += super(res_partner_bank, self).search(cr, uid, args1, offset, limit, + order, context=context, count=count) + return res + + _columns = { + 'office': fields.char('Office Code', size=5, readonly=True, help="Office Code"), + 'key': fields.char('Key', size=2, readonly=True, help="The key is a number allowing to check the correctness of the other codes."), + } + + _constraints = [(_check_key, "The RIB key does not correspond to the other codes.", ["key"])] + +res_partner_bank() + +# overload the name_search method on banks to make it easier to enter RIB data +class res_bank(osv.osv): + _inherit = 'res.bank' + + # allow a search by code + def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=80): + if not args: + args = [] + if context is None: + context = {} + ids = [] + if name: + ids = self.search(cr, user, [('name', operator, name)] + args, limit=limit, context=context) + if not ids: + ids = self.search(cr, user, [('code', operator, name)] + args, limit=limit, context=context) + return self.name_get(cr, user, ids, context) + + # show the code before the name + def name_get(self, cr, uid, ids, context=None): + result = [] + for bank in self.browse(cr, uid, ids, context): + result.append((bank.id, (bank.code and (bank.code + ' - ') or '') + bank.name)) + return result + +res_bank() +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: + diff --git a/addons/base_rib/base_rib_data.xml b/addons/base_rib/base_rib_data.xml new file mode 100644 index 00000000000..40d57851912 --- /dev/null +++ b/addons/base_rib/base_rib_data.xml @@ -0,0 +1,38 @@ + + + + + + + RIB Bank Details + rib + + + bank + + + + + + office + + + + + + acc_number + + + + 11 + + + key + + + + + + diff --git a/addons/base_rib/base_rib_view.xml b/addons/base_rib/base_rib_view.xml new file mode 100644 index 00000000000..eacfaf1cb5b --- /dev/null +++ b/addons/base_rib/base_rib_view.xml @@ -0,0 +1,90 @@ + + + + + + res.partner.form.rib0.inherit + res.partner + + form + + + + + + res.partner.form.rib1.inherit + res.partner + + form + + + + + + + + + + + res.partner.form.rib2.inherit + res.partner + + form + + + + + + + + + diff --git a/addons/base_rib/i18n/fr_FR.po b/addons/base_rib/i18n/fr_FR.po new file mode 100644 index 00000000000..af12a611964 --- /dev/null +++ b/addons/base_rib/i18n/fr_FR.po @@ -0,0 +1,81 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * base_rib +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 5.0.1\n" +"Report-Msgid-Bugs-To: support@openerp.com\n" +"POT-Creation-Date: 2009-06-16 14:15:16+0000\n" +"PO-Revision-Date: 2009-06-16 14:15:16+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: base_rib +#: model:res.partner.bank.type.field,name:base_rib.rib_key_field +msgid "key" +msgstr "key" + +#. module: base_rib +#: constraint:ir.ui.view:0 +msgid "Invalid XML for View Architecture!" +msgstr "XML non valide pour l'architecture de la vue" + +#. module: base_rib +#: model:ir.module.module,description:base_rib.module_meta_information +msgid "\n" +"This module install the base for RIB bank accounts (French standard for bank accounts). \n" +"To make it easier to enter RIB data, it will also allow to search for banks by code.\n" +"\n" +" " +msgstr "\n" +"Ce module configure la base pour la saisie des RIB (Relevés d'Identité Bancaires) standards français. \n" +"Pour faciliter la saisie des RIB, il permet également une recherche des banques par code.\n" +"\n" +" " + +#. module: base_rib +#: model:res.partner.bank.type.field,name:base_rib.rib_office_field +msgid "office" +msgstr "Agence" + +#. module: base_rib +#: field:res.partner.bank,office:0 +#: help:res.partner.bank,office:0 +msgid "Office Code" +msgstr "Code agence" + +#. module: base_rib +#: model:res.partner.bank.type,name:base_rib.bank_rib +msgid "RIB Bank Details" +msgstr "Relevé d'identité bancaire (RIB)" + +#. module: base_rib +#: help:res.partner.bank,key:0 +msgid "The key is a number allowing to check the correctness of the other codes." +msgstr "La clé est un nombre permettant de vérifier que les autres codes sont corrects." + +#. module: base_rib +#: field:res.partner.bank,key:0 +msgid "Key" +msgstr "Clé" + +#. module: base_rib +#: model:ir.module.module,shortdesc:base_rib.module_meta_information +msgid "RIB" +msgstr "RIB" + +#. module: base_rib +#: model:res.partner.bank.type.field,name:base_rib.rib_bank_field +msgid "bank" +msgstr "bank" + +#. module: base_rib +#: model:res.partner.bank.type.field,name:base_rib.bank_acc_number_field +msgid "acc_number" +msgstr "acc_number" + From cf00c7a7be240762baf092d30966a54a930d8df4 Mon Sep 17 00:00:00 2001 From: Numerigraphe - Lionel Sausin Date: Fri, 19 Jun 2009 10:28:35 +0200 Subject: [PATCH 003/711] Fixed licence for base_rib bzr revid: ls@numerigraphe.fr-20090619082835-b4vr0z9tojhpnk5a --- addons/base_rib/__init__.py | 4 +--- addons/base_rib/__terp__.py | 5 +---- addons/base_rib/base_rib.py | 4 +--- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/addons/base_rib/__init__.py b/addons/base_rib/__init__.py index f715da6a386..b49b0bdb212 100644 --- a/addons/base_rib/__init__.py +++ b/addons/base_rib/__init__.py @@ -1,9 +1,7 @@ # -*- encoding: utf-8 -*- ############################################################################## # -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2009 Tiny SPRL (). All Rights Reserved -# $Id$ +# Copyright (C) 2009 Numérigraphe SARL. # # 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 diff --git a/addons/base_rib/__terp__.py b/addons/base_rib/__terp__.py index 4712b449b9d..30741be0543 100644 --- a/addons/base_rib/__terp__.py +++ b/addons/base_rib/__terp__.py @@ -1,9 +1,7 @@ # -*- encoding: utf-8 -*- ############################################################################## # -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2009 Tiny SPRL (). All Rights Reserved -# $Id$ +# Copyright (C) 2009 Numérigraphe SARL. # # 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 @@ -20,7 +18,6 @@ # ############################################################################## - { 'name': 'RIB', 'version': '0.1', diff --git a/addons/base_rib/base_rib.py b/addons/base_rib/base_rib.py index 34c86902a67..69a9d2284f2 100644 --- a/addons/base_rib/base_rib.py +++ b/addons/base_rib/base_rib.py @@ -1,9 +1,7 @@ # -*- encoding: utf-8 -*- ############################################################################## # -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2009 Tiny SPRL (). All Rights Reserved -# $Id$ +# Copyright (C) 2009 Numérigraphe SARL. All Rights Reserved # # 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 From 297637f890a77b7b119698f56ca6264fac71b1aa Mon Sep 17 00:00:00 2001 From: Numerigraphe - Lionel Sausin Date: Fri, 19 Jun 2009 13:54:17 +0200 Subject: [PATCH 004/711] [IMP] POT file for base_rib. bzr revid: ls@numerigraphe.fr-20090619115417-e14n1md5j9aakzmc --- addons/base_rib/i18n/base_rib.pot | 77 +++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 addons/base_rib/i18n/base_rib.pot diff --git a/addons/base_rib/i18n/base_rib.pot b/addons/base_rib/i18n/base_rib.pot new file mode 100644 index 00000000000..393825233e5 --- /dev/null +++ b/addons/base_rib/i18n/base_rib.pot @@ -0,0 +1,77 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * base_rib +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 5.0.1\n" +"Report-Msgid-Bugs-To: support@openerp.com\n" +"POT-Creation-Date: 2009-06-19 11:39:18+0000\n" +"PO-Revision-Date: 2009-06-19 11:39:18+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: base_rib +#: model:res.partner.bank.type.field,name:base_rib.rib_key_field +msgid "key" +msgstr "" + +#. module: base_rib +#: constraint:ir.ui.view:0 +msgid "Invalid XML for View Architecture!" +msgstr "" + +#. module: base_rib +#: model:ir.module.module,description:base_rib.module_meta_information +msgid "\n" +"This module install the base for RIB bank accounts (French standard for bank accounts). \n" +"To make it easier to enter RIB data, it will also allow to search for banks by code.\n" +"\n" +" " +msgstr "" + +#. module: base_rib +#: model:res.partner.bank.type.field,name:base_rib.rib_office_field +msgid "office" +msgstr "" + +#. module: base_rib +#: field:res.partner.bank,office:0 +#: help:res.partner.bank,office:0 +msgid "Office Code" +msgstr "" + +#. module: base_rib +#: model:res.partner.bank.type,name:base_rib.bank_rib +msgid "RIB Bank Details" +msgstr "" + +#. module: base_rib +#: help:res.partner.bank,key:0 +msgid "The key is a number allowing to check the correctness of the other codes." +msgstr "" + +#. module: base_rib +#: field:res.partner.bank,key:0 +msgid "Key" +msgstr "" + +#. module: base_rib +#: model:ir.module.module,shortdesc:base_rib.module_meta_information +msgid "RIB" +msgstr "" + +#. module: base_rib +#: model:res.partner.bank.type.field,name:base_rib.rib_bank_field +msgid "bank" +msgstr "" + +#. module: base_rib +#: model:res.partner.bank.type.field,name:base_rib.bank_acc_number_field +msgid "acc_number" +msgstr "" + From 5ec8cd1146a15d170c5f460f570f38b6037889b9 Mon Sep 17 00:00:00 2001 From: "ARA (OpenERP)" Date: Mon, 23 May 2011 18:04:04 +0530 Subject: [PATCH 005/711] [FIX] analytic:Wrong adaptation of the partner address in the Project view lp bug: https://launchpad.net/bugs/781189 fixed bzr revid: ara@tinyerp.com-20110523123404-zjqi69go1ecv36f1 --- addons/account/project/project_view.xml | 3 ++- addons/analytic/analytic.py | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/addons/account/project/project_view.xml b/addons/account/project/project_view.xml index 8fd35a21a89..983d8311229 100644 --- a/addons/account/project/project_view.xml +++ b/addons/account/project/project_view.xml @@ -88,7 +88,8 @@ - + + diff --git a/addons/analytic/analytic.py b/addons/analytic/analytic.py index 6dfaac21e70..e487a742e47 100644 --- a/addons/analytic/analytic.py +++ b/addons/analytic/analytic.py @@ -236,6 +236,13 @@ class account_analytic_account(osv.osv): res['value']['partner_id'] = partner return res + def onchange_partner_id(self, cr, uid, ids, partner, context=None): + partner_obj = self.pool.get('res.partner') + if not partner: + return {'value':{'contact_id': False}} + address = partner_obj.address_get(cr, uid, [partner], ['contact']) + return {'value':{'contact_id': address['contact']}} + def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=100): if not args: args=[] From ecd639c4ef8d7ab73cef51767ef3397e30bc9d94 Mon Sep 17 00:00:00 2001 From: "aag (OpenERP)" Date: Wed, 25 May 2011 15:44:03 +0530 Subject: [PATCH 006/711] [FIX] STOCK:Physical Inventory - wrong calculation, now calculate current location stock not child location stock lp bug: https://launchpad.net/bugs/787717 fixed bzr revid: aag@tinyerp.co.in-20110525101403-l02frg06h70lq6y4 --- addons/stock/stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 636ae0cb067..7811d22377f 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -2646,7 +2646,7 @@ class stock_inventory_line(osv.osv): return {'value': {'product_qty': 0.0, 'product_uom': False}} obj_product = self.pool.get('product.product').browse(cr, uid, product) uom = uom or obj_product.uom_id.id - amount = self.pool.get('stock.location')._product_get(cr, uid, location_id, [product], {'uom': uom, 'to_date': to_date})[product] + amount = self.pool.get('stock.location')._product_get(cr, uid, location_id, [product], {'uom': uom, 'to_date': to_date, 'compute_child': False})[product] result = {'product_qty': amount, 'product_uom': uom} return {'value': result} From f407e76f9167b8fbad0cbe50a8a23d93567a674d Mon Sep 17 00:00:00 2001 From: "ARA (OpenERP)" Date: Wed, 25 May 2011 16:39:06 +0530 Subject: [PATCH 007/711] [FIX] Accounting - Generic Chart of Accounts - Wrong demo data lp bug: https://launchpad.net/bugs/785110 fixed bzr revid: ara@tinyerp.com-20110525110906-nel3idjx81zsuq5s --- addons/account/configurable_account_chart.xml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/addons/account/configurable_account_chart.xml b/addons/account/configurable_account_chart.xml index 1a0a21d3971..14dceb185a6 100644 --- a/addons/account/configurable_account_chart.xml +++ b/addons/account/configurable_account_chart.xml @@ -593,12 +593,18 @@ - + - + + + + + + + From 753dba6bf7510c012da1d366b04c3c9b749d01a3 Mon Sep 17 00:00:00 2001 From: "aag (OpenERP)" Date: Fri, 17 Jun 2011 19:13:05 +0530 Subject: [PATCH 008/711] [FIX] stock:payment term is set for supplier invoices in PO from Picking lp bug: https://launchpad.net/bugs/798256 fixed bzr revid: aag@tinyerp.co.in-20110617134305-2f5gvs58blj1e5rf --- addons/stock/stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index d478ab39c9c..ef71c273273 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1012,7 +1012,7 @@ class stock_picking(osv.osv): 'address_invoice_id': address_invoice_id, 'address_contact_id': address_contact_id, 'comment': comment, - 'payment_term': payment_term_id, + 'payment_term': address.partner_id.property_payment_term and address.partner_id.property_payment_term.id or False, 'fiscal_position': partner.property_account_position.id, 'date_invoice': context.get('date_inv',False), 'company_id': picking.company_id.id, From b55387a8bb0b8fd4b4e3164652cef72e839ad825 Mon Sep 17 00:00:00 2001 From: "Ujjvala Collins (OpenERP)" Date: Tue, 21 Jun 2011 14:27:43 +0530 Subject: [PATCH 009/711] [REF] account: Replaced tax mappings for Normal tax in generic chart of accounts demo data. bzr revid: uco@tinyerp.com-20110621085743-36fua2qguh2q1cj9 --- addons/account/configurable_account_chart.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/configurable_account_chart.xml b/addons/account/configurable_account_chart.xml index 14dceb185a6..2373d01618c 100644 --- a/addons/account/configurable_account_chart.xml +++ b/addons/account/configurable_account_chart.xml @@ -592,8 +592,8 @@ - - + + From 8e6ca32aebb6a20ccc3586814f9c263856154497 Mon Sep 17 00:00:00 2001 From: "Ujjvala Collins (OpenERP)" Date: Tue, 21 Jun 2011 17:55:25 +0530 Subject: [PATCH 010/711] [FIX] sale: Fixed wrong quantities on Sales Analysis report. lp bug: https://launchpad.net/bugs/798148 fixed bzr revid: uco@tinyerp.com-20110621122525-td4gwknknl92bx54 --- addons/sale/report/sale_report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale/report/sale_report.py b/addons/sale/report/sale_report.py index aaaec228d7b..57f47176b75 100644 --- a/addons/sale/report/sale_report.py +++ b/addons/sale/report/sale_report.py @@ -95,7 +95,7 @@ class sale_report(osv.osv): else u.name end) as uom_name, - sum(l.product_uom_qty * u.factor) as product_uom_qty, + sum(l.product_uom_qty / u.factor) as product_uom_qty, sum(l.product_uom_qty * l.price_unit) as price_total, pt.categ_id, l.order_id from From 965b3320826d05e807ed490817baa6012678065b Mon Sep 17 00:00:00 2001 From: "mayur maheshwari (Open ERP)" Date: Tue, 21 Jun 2011 18:15:42 +0530 Subject: [PATCH 011/711] [FIX]product: set a default value public price in pricelist rule lp bug: https://launchpad.net/bugs/799615 fixed bzr revid: mma@tinyerp.com-20110621124542-lldjf5fnjb6ff9e5 --- addons/product/pricelist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/product/pricelist.py b/addons/product/pricelist.py index 81cec0e7d95..abbc6dc86f2 100644 --- a/addons/product/pricelist.py +++ b/addons/product/pricelist.py @@ -522,7 +522,7 @@ class product_pricelist_item(osv.osv): _description = "Pricelist item" _order = "sequence, min_quantity desc" _defaults = { - 'base': lambda *a: -1, + 'base': lambda *a: 1, 'min_quantity': lambda *a: 0, 'sequence': lambda *a: 5, 'price_discount': lambda *a: 0, From c5fe5a76c36097eef182bb19288e8a395d83c2e3 Mon Sep 17 00:00:00 2001 From: "aag (OpenERP)" Date: Tue, 21 Jun 2011 18:59:56 +0530 Subject: [PATCH 012/711] [FIX] stock:payment term is set for supplier invoices in PO from Picking and code optimize lp bug: https://launchpad.net/bugs/798256 fixed bzr revid: aag@tinyerp.co.in-20110621132956-d3tru3edcsx430fe --- addons/stock/stock.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index ef71c273273..8b83cad915d 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -971,7 +971,6 @@ class stock_picking(osv.osv): for picking in self.browse(cr, uid, ids, context=context): if picking.invoice_state != '2binvoiced': continue - payment_term_id = False partner = picking.address_id and picking.address_id.partner_id if not partner: raise osv.except_osv(_('Error, no partner !'), @@ -979,13 +978,7 @@ class stock_picking(osv.osv): if not inv_type: inv_type = self._get_invoice_type(picking) - - if inv_type in ('out_invoice', 'out_refund'): - account_id = partner.property_account_receivable.id - payment_term_id = self._get_payment_term(cr, uid, picking) - else: - account_id = partner.property_account_payable.id - + account_id = partner.property_account_payable.id address_contact_id, address_invoice_id = \ self._get_address_invoice(cr, uid, picking).values() address = address_obj.browse(cr, uid, address_contact_id, context=context) @@ -1012,7 +1005,7 @@ class stock_picking(osv.osv): 'address_invoice_id': address_invoice_id, 'address_contact_id': address_contact_id, 'comment': comment, - 'payment_term': address.partner_id.property_payment_term and address.partner_id.property_payment_term.id or False, + 'payment_term': self._get_payment_term(cr, uid, picking), 'fiscal_position': partner.property_account_position.id, 'date_invoice': context.get('date_inv',False), 'company_id': picking.company_id.id, From 91efe04bcbf794849dd583388a7b5c1ebbfe2cdc Mon Sep 17 00:00:00 2001 From: "aag (OpenERP)" Date: Wed, 22 Jun 2011 14:56:54 +0530 Subject: [PATCH 013/711] [FIX] stock:payment term is set for supplier invoices in PO from Picking and code optimize bzr revid: aag@tinyerp.co.in-20110622092654-2f96sin4szcnvcuy --- addons/stock/stock.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 8b83cad915d..35f54c2c8c2 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -978,7 +978,11 @@ class stock_picking(osv.osv): if not inv_type: inv_type = self._get_invoice_type(picking) - account_id = partner.property_account_payable.id + + if inv_type in ('out_invoice', 'out_refund'): + account_id = partner.property_account_receivable.id + else: + account_id = partner.property_account_payable.id address_contact_id, address_invoice_id = \ self._get_address_invoice(cr, uid, picking).values() address = address_obj.browse(cr, uid, address_contact_id, context=context) From f469345cfdcadf9c2985d95bad6318535209a971 Mon Sep 17 00:00:00 2001 From: "mayur maheshwari (Open ERP)" Date: Mon, 27 Jun 2011 10:43:35 +0530 Subject: [PATCH 014/711] [FIX]purchase,sale,stock: putting a product UOM decimal prescription In quantity field lp bug: https://launchpad.net/bugs/800970 fixed bzr revid: mma@tinyerp.com-20110627051335-nj8cnvdd993aagfb --- addons/purchase/purchase.py | 2 +- addons/sale/sale.py | 2 +- addons/stock/wizard/stock_partial_move.py | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 6f6ab0c1b44..124de6d2136 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -614,7 +614,7 @@ class purchase_order_line(osv.osv): _columns = { 'name': fields.char('Description', size=256, required=True), - 'product_qty': fields.float('Quantity', required=True, digits=(16,2)), + 'product_qty': fields.float('Quantity', required=True, digits_compute= dp.get_precision('Product UoM')), 'date_planned': fields.date('Scheduled Date', required=True, select=True), 'taxes_id': fields.many2many('account.tax', 'purchase_order_taxe', 'ord_id', 'tax_id', 'Taxes'), 'product_uom': fields.many2one('product.uom', 'Product UOM', required=True), diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 0b436f0dc91..53e60b3d1a2 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -856,7 +856,7 @@ class sale_order_line(osv.osv): 'type': fields.selection([('make_to_stock', 'from stock'), ('make_to_order', 'on order')], 'Procurement Method', required=True, readonly=True, states={'draft': [('readonly', False)]}), 'property_ids': fields.many2many('mrp.property', 'sale_order_line_property_rel', 'order_id', 'property_id', 'Properties', readonly=True, states={'draft': [('readonly', False)]}), 'address_allotment_id': fields.many2one('res.partner.address', 'Allotment Partner'), - 'product_uom_qty': fields.float('Quantity (UoM)', digits=(16, 2), required=True, readonly=True, states={'draft': [('readonly', False)]}), + 'product_uom_qty': fields.float('Quantity (UoM)', digits_compute= dp.get_precision('Product UoM'), required=True, readonly=True, states={'draft': [('readonly', False)]}), 'product_uom': fields.many2one('product.uom', 'Unit of Measure ', required=True, readonly=True, states={'draft': [('readonly', False)]}), 'product_uos_qty': fields.float('Quantity (UoS)', readonly=True, states={'draft': [('readonly', False)]}), 'product_uos': fields.many2one('product.uom', 'Product UoS'), diff --git a/addons/stock/wizard/stock_partial_move.py b/addons/stock/wizard/stock_partial_move.py index 874b22844d1..20bb351a42c 100644 --- a/addons/stock/wizard/stock_partial_move.py +++ b/addons/stock/wizard/stock_partial_move.py @@ -22,6 +22,7 @@ from osv import fields, osv from tools.translate import _ import time +import decimal_precision as dp class stock_partial_move_memory_out(osv.osv_memory): @@ -29,7 +30,7 @@ class stock_partial_move_memory_out(osv.osv_memory): _rec_name = 'product_id' _columns = { 'product_id' : fields.many2one('product.product', string="Product", required=True), - 'quantity' : fields.float("Quantity", required=True), + 'quantity' : fields.float("Quantity", required=True, digits_compute= dp.get_precision('Product UoM')), 'product_uom': fields.many2one('product.uom', 'Unit of Measure', required=True), 'prodlot_id' : fields.many2one('stock.production.lot', 'Production Lot'), 'move_id' : fields.many2one('stock.move', "Move"), From f0cc97b2e46370896bec5f667652a1e278b80aba Mon Sep 17 00:00:00 2001 From: Thibaut DIRLIK Date: Thu, 25 Aug 2011 16:58:56 +0200 Subject: [PATCH 015/711] [FIX] create() does not write in the _inherits parent when fields have the same name. The problem is that when you have a field in an object, and that field is also defined in its parent (defined with _inherits), when OpenERP creates the object, the field value was used to fill the parent value, not object. bzr revid: t.dirlik@adep.com-20110825145856-2qa7im2awmm5gxjz --- openerp/osv/orm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index d4a5d808990..8de5c829402 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -4050,7 +4050,7 @@ class orm(orm_template): (upd0, upd1, upd2) = ('', '', []) upd_todo = [] for v in vals.keys(): - if v in self._inherit_fields: + if v in self._inherit_fields and v not in self._columns: (table, col, col_detail) = self._inherit_fields[v] tocreate[table][v] = vals[v] del vals[v] From aebad6a8ee1afaf23dcc2777e93aee7c5e6996df Mon Sep 17 00:00:00 2001 From: eLBati Date: Tue, 30 Aug 2011 10:55:33 +0200 Subject: [PATCH 017/711] [FIX] http://wiki.openerp-italia.org/doku.php/moduli/l10n_it_iva_indetraibile [FIX] https://bugs.launchpad.net/openobject-italia/+bug/836847 bzr revid: lorenzo.battistini@agilebg.com-20110830085533-3tmpd2ai12exc9ai --- addons/l10n_it/__init__.py | 11 +- addons/l10n_it/__openerp__.py | 9 +- addons/l10n_it/account.py | 56 ++ addons/l10n_it/data/account.tax.template.csv | 86 +-- addons/l10n_it/i18n/it.po | 179 +---- addons/l10n_it/i18n/l10n_it.pot | 137 +--- addons/l10n_it/libroIVA.py | 54 -- addons/l10n_it/libroIVA_menu.xml | 16 - addons/l10n_it/libroIVA_view.xml | 47 -- addons/l10n_it/report.xml | 24 - addons/l10n_it/report/__init__.py | 2 - addons/l10n_it/report/libroIVA_credito.py | 79 --- addons/l10n_it/report/libroIVA_credito.rml | 203 ------ addons/l10n_it/report/libroIVA_debito.py | 80 --- addons/l10n_it/report/libroIVA_debito.rml | 195 ------ addons/l10n_it/report/normalized_oo2rml.xsl | 696 ------------------- addons/l10n_it/security/ir.model.access.csv | 3 - 17 files changed, 147 insertions(+), 1730 deletions(-) create mode 100644 addons/l10n_it/account.py delete mode 100644 addons/l10n_it/libroIVA.py delete mode 100644 addons/l10n_it/libroIVA_menu.xml delete mode 100644 addons/l10n_it/libroIVA_view.xml delete mode 100644 addons/l10n_it/report.xml delete mode 100644 addons/l10n_it/report/__init__.py delete mode 100644 addons/l10n_it/report/libroIVA_credito.py delete mode 100644 addons/l10n_it/report/libroIVA_credito.rml delete mode 100644 addons/l10n_it/report/libroIVA_debito.py delete mode 100644 addons/l10n_it/report/libroIVA_debito.rml delete mode 100644 addons/l10n_it/report/normalized_oo2rml.xsl delete mode 100644 addons/l10n_it/security/ir.model.access.csv diff --git a/addons/l10n_it/__init__.py b/addons/l10n_it/__init__.py index 026004bfa0f..f9126cd880e 100644 --- a/addons/l10n_it/__init__.py +++ b/addons/l10n_it/__init__.py @@ -1,13 +1,15 @@ -# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010 -# Italian OpenERP Community () +# OpenERP Italian Community () # Servabit srl # Agile Business Group sagl # Domsense srl -# Albatos srl +# Albatos srl +# +# Copyright (C) 2011 +# Associazione OpenERP Italia () # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -24,5 +26,4 @@ # ############################################################################## -import libroIVA -import report +import account diff --git a/addons/l10n_it/__openerp__.py b/addons/l10n_it/__openerp__.py index 41161f67a70..0be022a6a80 100644 --- a/addons/l10n_it/__openerp__.py +++ b/addons/l10n_it/__openerp__.py @@ -3,12 +3,15 @@ # # OpenERP, Open Source Management Solution # Copyright (C) 2010 -# Italian OpenERP Community () +# OpenERP Italian Community () # Servabit srl # Agile Business Group sagl # Domsense srl # Albatos srl # +# Copyright (C) 2011 +# Associazione OpenERP Italia () +# # 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 @@ -39,9 +42,6 @@ Italian accounting chart and localization. "category" : "Finance", 'website': 'http://www.openerp-italia.org/', 'init_xml': [ - 'report.xml', - 'libroIVA_view.xml', - 'libroIVA_menu.xml', ], 'update_xml': [ 'data/account.account.type.csv', @@ -51,7 +51,6 @@ Italian accounting chart and localization. 'data/account.tax.template.csv', 'data/account.fiscal.position.template.csv', 'l10n_chart_it_generic.xml', - 'security/ir.model.access.csv', ], 'demo_xml': [ ], diff --git a/addons/l10n_it/account.py b/addons/l10n_it/account.py new file mode 100644 index 00000000000..98e4d5ae68b --- /dev/null +++ b/addons/l10n_it/account.py @@ -0,0 +1,56 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2011 +# Associazione OpenERP Italia () +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from osv import fields, osv +import decimal_precision as dp +from decimal import * + +class account_tax(osv.osv): + + _inherit = 'account.tax' + + def compute_all(self, cr, uid, taxes, price_unit, quantity, address_id=None, product=None, partner=None): + res = super(account_tax, self).compute_all(cr, uid, taxes, price_unit, quantity, address_id, product, partner) + + precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account') + tax_list = res['taxes'] + totalex = res['total'] + if len(tax_list) == 2: + for tax in tax_list: + if tax.get('balance',False): # Calcolo di imponibili e imposte per l'IVA parzialmente detraibile + deductible_base = totalex + ind_tax = tax_list[abs(tax_list.index(tax)-1)] + ind_tax_obj = self.browse(cr, uid, ind_tax['id']) + ded_tax_obj = self.browse(cr, uid, tax['id']) + base_ind = float(Decimal(str(totalex * ind_tax_obj.amount)).quantize(Decimal('1.'+precision*'0'), rounding=ROUND_HALF_UP)) + base_ded = float(Decimal(str(totalex - base_ind)).quantize(Decimal('1.'+precision*'0'), rounding=ROUND_HALF_UP)) + tax_total = float(Decimal(str(tax['balance'])).quantize(Decimal('1.'+precision*'0'), rounding=ROUND_HALF_UP)) + tax_ind = float(Decimal(str(tax_total * ind_tax_obj.amount)).quantize(Decimal('1.'+precision*'0'), rounding=ROUND_HALF_UP)) + tax_ded = tax_total - tax_ind + ind_tax['price_unit'] = base_ind + tax['price_unit'] = base_ded + ind_tax['amount'] = tax_ind + tax['amount'] = tax_ded + + return res + +account_tax() diff --git a/addons/l10n_it/data/account.tax.template.csv b/addons/l10n_it/data/account.tax.template.csv index cf9caeeb0d4..5be051ed009 100644 --- a/addons/l10n_it/data/account.tax.template.csv +++ b/addons/l10n_it/data/account.tax.template.csv @@ -1,40 +1,46 @@ -"id","description","chart_template_id:id","name","amount","parent_id:id","child_depend","type","account_collected_id:id","account_paid_id:id","type_tax_use","base_code_id:id","tax_code_id:id","ref_base_code_id:id","ref_tax_code_id:id" -"20a","20a","l10n_it_chart_template_generic","Iva al 20% (debito)","0.2",,"False","percent","2601","2601","sale","template_impcode_riscossa_20","template_ivacode_riscossa_20","template_impcode_riscossa_20","template_ivacode_riscossa_20" -"20b","20b","l10n_it_chart_template_generic","Iva al 20% (credito)","0.2",,"False","percent","1601","1601","purchase","template_impcode_pagata_20","template_ivacode_pagata_20","template_impcode_pagata_20","template_ivacode_pagata_20" -"10a","10a","l10n_it_chart_template_generic","Iva al 10% (debito)","0.1",,"False","percent","2601","2601","sale","template_impcode_riscossa_10","template_ivacode_riscossa_10","template_impcode_riscossa_10","template_ivacode_riscossa_10" -"10b","10b","l10n_it_chart_template_generic","Iva al 10% (credito)","0.1",,"False","percent","1601","1601","purchase","template_impcode_pagata_10","template_ivacode_pagata_10","template_impcode_pagata_10","template_ivacode_pagata_10" -"10AO","10AO","l10n_it_chart_template_generic","Iva al 10% indetraibile","1",,"True","percent",,,"purchase",,,, -"10AOa","10AOa","l10n_it_chart_template_generic","Iva al 10% indetraibile (1)","0","10AO","False","percent","1601","1601","purchase","template_impcode_pagata_10ind","template_ivacode_pagata_10ind","template_impcode_pagata_10ind","template_ivacode_pagata_10ind" -"10AOb","10AOb","l10n_it_chart_template_generic","Iva al 10% indetraibile (2)","0.1","10AO","False","percent",,,"purchase",,,, -"12a","12a","l10n_it_chart_template_generic","Iva 12% (debito)","0.12",,"False","percent","2601","2601","sale","template_impcode_riscossa_12","template_ivacode_riscossa_12","template_impcode_riscossa_12","template_ivacode_riscossa_12" -"12b","12b","l10n_it_chart_template_generic","Iva 12% (credito)","0.12",,"False","percent","1601","1601","purchase","template_impcode_pagata_12","template_ivacode_pagata_12","template_impcode_pagata_12","template_ivacode_pagata_12" -"2010","2010","l10n_it_chart_template_generic","Iva al 20% detraibile 10%","1",,"True","percent",,,"purchase",,,, -"2010a","2010a","l10n_it_chart_template_generic","Iva al 20% detraibile 10% (1)","0.02","2010","False","percent","1601","1601","purchase","template_impcode_pagata_20det10","template_ivacode_pagata_20det10","template_impcode_pagata_20det10","template_ivacode_pagata_20det10" -"2010b","2010b","l10n_it_chart_template_generic","Iva al 20% detraibile 10% (2)","0.18","2010","False","percent",,,"purchase",,,, -"2015","2015","l10n_it_chart_template_generic","Iva al 20% detraibile 15%","1",,"True","percent",,,"purchase",,,, -"2015a","2015a","l10n_it_chart_template_generic","Iva al 20% detraibile 15% (1)","0.03","2015","False","percent","1601","1601","purchase","template_impcode_pagata_20det15","template_ivacode_pagata_20det15","template_impcode_pagata_20det15","template_ivacode_pagata_20det15" -"2015b","2015b","l10n_it_chart_template_generic","Iva al 20% detraibile 15% (2)","0.17","2015","False","percent",,,"purchase",,,, -"2040","2040","l10n_it_chart_template_generic","Iva al 20% detraibile 40%","1",,"True","percent",,,"purchase",,,, -"2040a","2040a","l10n_it_chart_template_generic","Iva al 20% detraibile 40% (1)","0.08","2040","False","percent","1601","1601","purchase","template_impcode_pagata_20det40","template_ivacode_pagata_20det40","template_impcode_pagata_20det40","template_ivacode_pagata_20det40" -"2040b","2040b","l10n_it_chart_template_generic","Iva al 20% detraibile 40% (2)","0.12","2040","False","percent",,,"purchase",,,, -"20AO","20AO","l10n_it_chart_template_generic","Iva al 20% indetraibile","1",,"True","percent",,,"purchase",,,, -"20AOa","20AOa","l10n_it_chart_template_generic","Iva al 20% indetraibile (1)","0","20AO","False","percent","1601","1601","purchase","template_impcode_pagata_20ind","template_ivacode_pagata_20ind","template_impcode_pagata_20ind","template_ivacode_pagata_20ind" -"20AOb","20AOb","l10n_it_chart_template_generic","Iva al 20% indetraibile (2)","0.2","20AO","False","percent",,,"purchase",,,, -"20I5","20I5","l10n_it_chart_template_generic","IVA al 20% detraibile al 50%","1",,"True","percent",,,"purchase",,,, -"20I5a","20I5a","l10n_it_chart_template_generic","IVA al 20% detraibile al 50% (1)","0.1","20I5","False","percent","1601","1601","purchase","template_impcode_pagata_20det50","template_ivacode_pagata_20det50","template_impcode_pagata_20det50","template_ivacode_pagata_20det50" -"20I5b","20I5b","l10n_it_chart_template_generic","IVA al 20% detraibile al 50% (2)","0.1","20I5","False","percent",,,"purchase",,,, -"22a","22a","l10n_it_chart_template_generic","Iva 2% (debito)","0.02",,"False","percent","2601","2601","sale","template_impcode_riscossa_2","template_ivacode_riscossa_2","template_impcode_riscossa_2","template_ivacode_riscossa_2" -"22b","22b","l10n_it_chart_template_generic","Iva 2% (credito)","0.02",,"False","percent","1601","1601","purchase","template_impcode_pagata_2","template_ivacode_pagata_2","template_impcode_pagata_2","template_ivacode_pagata_2" -"4a","4a","l10n_it_chart_template_generic","Iva 4% (debito)","0.04",,"False","percent","2601","2601","sale","template_impcode_riscossa_4","template_ivacode_riscossa_4","template_impcode_riscossa_4","template_ivacode_riscossa_4" -"4b","4b","l10n_it_chart_template_generic","Iva 4% (credito)","0.04",,"False","percent","1601","1601","purchase","template_impcode_pagata_4","template_ivacode_pagata_4","template_impcode_pagata_4","template_ivacode_pagata_4" -"4AO","4AO","l10n_it_chart_template_generic","Iva al 4% indetraibile","1",,"True","percent",,,"purchase",,,, -"4AOa","4AOa","l10n_it_chart_template_generic","Iva al 4% indetraibile (1)","0","4AO","False","percent","1601","1601","purchase","template_impcode_pagata_4ind","template_ivacode_pagata_4ind","template_impcode_pagata_4ind","template_ivacode_pagata_4ind" -"4AOb","4AOb","l10n_it_chart_template_generic","Iva al 4% indetraibile (2)","0.04","4AO","False","percent",,,"purchase",,,, -"10I5","10I5","l10n_it_chart_template_generic","IVA al 10% detraibile al 50%","1",,"True","percent",,,"purchase",,,, -"10I5a","10I5a","l10n_it_chart_template_generic","IVA al 10% detraibile al 50% (1)","0.05","10I5","False","percent","1601","1601","purchase","template_impcode_pagata_10det50","template_ivacode_pagata_10det50","template_impcode_pagata_10det50","template_ivacode_pagata_10det50" -"10I5b","10I5b","l10n_it_chart_template_generic","IVA al 10% detraibile al 50% (2)","0.05","10I5","False","percent",,,"purchase",,,, -"4I5","4I5","l10n_it_chart_template_generic","IVA al 4% detraibile al 50%","1",,"True","percent",,,"purchase",,,, -"4I5a","4I5a","l10n_it_chart_template_generic","IVA al 4% detraibile al 50% (1)","0.02","4I5","False","percent","1601","1601","purchase","template_impcode_pagata_4det50","template_ivacode_pagata_4det50","template_impcode_pagata_4det50","template_ivacode_pagata_4det50" -"4I5b","4I5b","l10n_it_chart_template_generic","IVA al 4% detraibile al 50% (2)","0.02","4I5","False","percent",,,"purchase",,,, -"00a","00a","l10n_it_chart_template_generic","Esente IVA (debito)","0",,"False","percent","2601","2601","sale","template_impcode_riscossa_0","template_ivacode_riscossa_0","template_impcode_riscossa_0","template_ivacode_riscossa_0" -"00b","00b","l10n_it_chart_template_generic","Esente IVA (credito)","0",,"False","percent","1601","1601","purchase","template_impcode_pagata_0","template_ivacode_pagata_0","template_impcode_pagata_0","template_ivacode_pagata_0" +"id","description","chart_template_id:id","name","sequence","amount","parent_id:id","child_depend","type","account_collected_id:id","account_paid_id:id","type_tax_use","base_code_id:id","tax_code_id:id","ref_base_code_id:id","ref_tax_code_id:id","ref_base_sign","ref_tax_sign","price_include" +"20a","20a","l10n_it_chart_template_generic","Iva al 20% (debito)",,"0.2",,"False","percent","2601","2601","sale","template_impcode_riscossa_20","template_ivacode_riscossa_20","template_impcode_riscossa_20","template_ivacode_riscossa_20",-1,-1,"False" +"20b","20b","l10n_it_chart_template_generic","Iva al 20% (credito)",,"0.2",,"False","percent","1601","1601","purchase","template_impcode_pagata_20","template_ivacode_pagata_20","template_impcode_pagata_20","template_ivacode_pagata_20",-1,-1,"False" +"10a","10a","l10n_it_chart_template_generic","Iva al 10% (debito)",,"0.1",,"False","percent","2601","2601","sale","template_impcode_riscossa_10","template_ivacode_riscossa_10","template_impcode_riscossa_10","template_ivacode_riscossa_10",-1,-1,"False" +"10b","10b","l10n_it_chart_template_generic","Iva al 10% (credito)",,"0.1",,"False","percent","1601","1601","purchase","template_impcode_pagata_10","template_ivacode_pagata_10","template_impcode_pagata_10","template_ivacode_pagata_10",-1,-1,"False" +"10AO","10AO","l10n_it_chart_template_generic","Iva al 10% indetraibile",,"0.1",,"True","percent",,,"purchase","template_impcode_pagata_10ind",,"template_impcode_pagata_10ind",,-1,,"False" +"10AOa","10AOa","l10n_it_chart_template_generic","Iva al 10% indetraibile (D)","2","0","10AO","False","balance","1601","1601","purchase",,"template_ivacode_pagata_10ind",,"template_ivacode_pagata_10ind",,-1,"False" +"10AOb","10AOb","l10n_it_chart_template_generic","Iva al 10% indetraibile (I)","1","1","10AO","False","percent",,,"purchase",,,,,,,"False" +"12a","12a","l10n_it_chart_template_generic","Iva 12% (debito)",,"0.12",,"False","percent","2601","2601","sale","template_impcode_riscossa_12","template_ivacode_riscossa_12","template_impcode_riscossa_12","template_ivacode_riscossa_12",-1,-1,"False" +"12b","12b","l10n_it_chart_template_generic","Iva 12% (credito)",,"0.12",,"False","percent","1601","1601","purchase","template_impcode_pagata_12","template_ivacode_pagata_12","template_impcode_pagata_12","template_ivacode_pagata_12",-1,-1,"False" +"2010","2010","l10n_it_chart_template_generic","Iva al 20% detraibile 10%",,"0.2",,"True","percent",,,"purchase","template_impcode_pagata_20det10",,"template_impcode_pagata_20det10",,-1,,"False" +"2010a","2010a","l10n_it_chart_template_generic","Iva al 20% detraibile 10% (D)","2","0","2010","False","balance","1601","1601","purchase",,"template_ivacode_pagata_20det10",,"template_ivacode_pagata_20det10",,-1,"False" +"2010b","2010b","l10n_it_chart_template_generic","Iva al 20% detraibile 10% (I)","1","0.9","2010","False","percent",,,"purchase",,,,,,,"False" +"2015","2015","l10n_it_chart_template_generic","Iva al 20% detraibile 15%",,"0.2",,"True","percent",,,"purchase","template_impcode_pagata_20det15",,"template_impcode_pagata_20det15",,-1,,"False" +"2015a","2015a","l10n_it_chart_template_generic","Iva al 20% detraibile 15% (D)","2","0","2015","False","balance","1601","1601","purchase",,"template_ivacode_pagata_20det15",,"template_ivacode_pagata_20det15",,-1,"False" +"2015b","2015b","l10n_it_chart_template_generic","Iva al 20% detraibile 15% (I)","1","0.85","2015","False","percent",,,"purchase",,,,,,,"False" +"2040","2040","l10n_it_chart_template_generic","Iva al 20% detraibile 40%",,"0.2",,"True","percent",,,"purchase","template_impcode_pagata_20det40",,"template_impcode_pagata_20det40",,-1,,"False" +"2040a","2040a","l10n_it_chart_template_generic","Iva al 20% detraibile 40% (D)","2","0","2040","False","balance","1601","1601","purchase",,"template_ivacode_pagata_20det40",,"template_ivacode_pagata_20det40",,-1,"False" +"2040b","2040b","l10n_it_chart_template_generic","Iva al 20% detraibile 40% (I)","1","0.6","2040","False","percent",,,"purchase",,,,,,,"False" +"20AO","20AO","l10n_it_chart_template_generic","Iva al 20% indetraibile",,"0.2",,"True","percent",,,"purchase","template_impcode_pagata_20ind",,"template_impcode_pagata_20ind",,-1,,"False" +"20AOa","20AOa","l10n_it_chart_template_generic","Iva al 20% indetraibile (D)","2","0","20AO","False","balance","1601","1601","purchase",,"template_ivacode_pagata_20ind",,"template_ivacode_pagata_20ind",,-1,"False" +"20AOb","20AOb","l10n_it_chart_template_generic","Iva al 20% indetraibile (I)","1","1","20AO","False","percent",,,"purchase",,,,,,,"False" +"20I5","20I5","l10n_it_chart_template_generic","IVA al 20% detraibile al 50%",,"0.2",,"True","percent",,,"purchase","template_impcode_pagata_20det50",,"template_impcode_pagata_20det50",,-1,,"False" +"20I5b","20I5b","l10n_it_chart_template_generic","IVA al 20% detraibile al 50% (I)","1","0.5","20I5","False","percent",,,"purchase",,,,,,,"False" +"20I5a","20I5a","l10n_it_chart_template_generic","IVA al 20% detraibile al 50% (D)","2","0","20I5","False","balance","1601","1601","purchase",,"template_ivacode_pagata_20det50",,"template_ivacode_pagata_20det50",,-1,"False" +"22a","22a","l10n_it_chart_template_generic","Iva 2% (debito)",,"0.02",,"False","percent","2601","2601","sale","template_impcode_riscossa_2","template_ivacode_riscossa_2","template_impcode_riscossa_2","template_ivacode_riscossa_2",-1,-1,"False" +"22b","22b","l10n_it_chart_template_generic","Iva 2% (credito)",,"0.02",,"False","percent","1601","1601","purchase","template_impcode_pagata_2","template_ivacode_pagata_2","template_impcode_pagata_2","template_ivacode_pagata_2",-1,-1,"False" +"4a","4a","l10n_it_chart_template_generic","Iva 4% (debito)",,"0.04",,"False","percent","2601","2601","sale","template_impcode_riscossa_4","template_ivacode_riscossa_4","template_impcode_riscossa_4","template_ivacode_riscossa_4",-1,-1,"False" +"4b","4b","l10n_it_chart_template_generic","Iva 4% (credito)",,"0.04",,"False","percent","1601","1601","purchase","template_impcode_pagata_4","template_ivacode_pagata_4","template_impcode_pagata_4","template_ivacode_pagata_4",-1,-1,"False" +"4AO","4AO","l10n_it_chart_template_generic","Iva al 4% indetraibile",,"0.04",,"True","percent",,,"purchase","template_impcode_pagata_4ind",,"template_impcode_pagata_4ind",,-1,,"False" +"4AOa","4AOa","l10n_it_chart_template_generic","Iva al 4% indetraibile (D)","2","0","4AO","False","balance","1601","1601","purchase",,"template_ivacode_pagata_4ind",,"template_ivacode_pagata_4ind",,-1,"False" +"4AOb","4AOb","l10n_it_chart_template_generic","Iva al 4% indetraibile (I)","1","1","4AO","False","percent",,,"purchase",,,,,,,"False" +"10I5","10I5","l10n_it_chart_template_generic","IVA al 10% detraibile al 50%",,"0.1",,"True","percent",,,"purchase","template_impcode_pagata_10det50",,"template_impcode_pagata_10det50",,-1,,"False" +"10I5a","10I5a","l10n_it_chart_template_generic","IVA al 10% detraibile al 50% (D)","2","0","10I5","False","balance","1601","1601","purchase",,"template_ivacode_pagata_10det50",,"template_ivacode_pagata_10det50",,-1,"False" +"10I5b","10I5b","l10n_it_chart_template_generic","IVA al 10% detraibile al 50% (I)","1","0.5","10I5","False","percent",,,"purchase",,,,,,,"False" +"4I5","4I5","l10n_it_chart_template_generic","IVA al 4% detraibile al 50%",,"0.04",,"True","percent",,,"purchase","template_impcode_pagata_4det50",,"template_impcode_pagata_4det50",,-1,,"False" +"4I5a","4I5a","l10n_it_chart_template_generic","IVA al 4% detraibile al 50% (D)","2","0","4I5","False","balance","1601","1601","purchase",,"template_ivacode_pagata_4det50",,"template_ivacode_pagata_4det50",,-1,"False" +"4I5b","4I5b","l10n_it_chart_template_generic","IVA al 4% detraibile al 50% (I)","1","0.5","4I5","False","percent",,,"purchase",,,,,,,"False" +"00a","00a","l10n_it_chart_template_generic","Esente IVA (debito)",,"0",,"False","percent","2601","2601","sale","template_impcode_riscossa_0","template_ivacode_riscossa_0","template_impcode_riscossa_0","template_ivacode_riscossa_0",-1,-1,"False" +"00b","00b","l10n_it_chart_template_generic","Esente IVA (credito)",,"0",,"False","percent","1601","1601","purchase","template_impcode_pagata_0","template_ivacode_pagata_0","template_impcode_pagata_0","template_ivacode_pagata_0",-1,-1,"False" +"20a INC","20a INC","l10n_it_chart_template_generic","Iva al 20% (debito) INC",,"0.2",,"False","percent","l10n_it.2601","l10n_it.2601","sale","l10n_it.template_impcode_riscossa_20","l10n_it.template_ivacode_riscossa_20","l10n_it.template_impcode_riscossa_20","l10n_it.template_ivacode_riscossa_20",-1,-1,"True" +"10a INC","10a INC","l10n_it_chart_template_generic","Iva al 10% (debito) INC",,"0.1",,"False","percent","l10n_it.2601","l10n_it.2601","sale","l10n_it.template_impcode_riscossa_10","l10n_it.template_ivacode_riscossa_10","l10n_it.template_impcode_riscossa_10","l10n_it.template_ivacode_riscossa_10",-1,-1,"True" +"12a INC","12a INC","l10n_it_chart_template_generic","Iva 12% (debito) INC",,"0.12",,"False","percent","l10n_it.2601","l10n_it.2601","sale","l10n_it.template_impcode_riscossa_12","l10n_it.template_ivacode_riscossa_12","l10n_it.template_impcode_riscossa_12","l10n_it.template_ivacode_riscossa_12",-1,-1,"True" +"22a INC","22a INC","l10n_it_chart_template_generic","Iva 2% (debito) INC",,"0.02",,"False","percent","l10n_it.2601","l10n_it.2601","sale","l10n_it.template_impcode_riscossa_2","l10n_it.template_ivacode_riscossa_2","l10n_it.template_impcode_riscossa_2","l10n_it.template_ivacode_riscossa_2",-1,-1,"True" +"4a INC","4a INC","l10n_it_chart_template_generic","Iva 4% (debito) INC",,"0.04",,"False","percent","l10n_it.2601","l10n_it.2601","sale","l10n_it.template_impcode_riscossa_4","l10n_it.template_ivacode_riscossa_4","l10n_it.template_impcode_riscossa_4","l10n_it.template_ivacode_riscossa_4",-1,-1,"True" +"00a INC","00a INC","l10n_it_chart_template_generic","Esente IVA (debito) INC",,"0",,"False","percent","l10n_it.2601","l10n_it.2601","sale","l10n_it.template_impcode_riscossa_0","l10n_it.template_ivacode_riscossa_0","l10n_it.template_impcode_riscossa_0","l10n_it.template_ivacode_riscossa_0",-1,-1,"True" diff --git a/addons/l10n_it/i18n/it.po b/addons/l10n_it/i18n/it.po index 817a7e64b77..de209ab08fc 100644 --- a/addons/l10n_it/i18n/it.po +++ b/addons/l10n_it/i18n/it.po @@ -1,174 +1,43 @@ -# Italian 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. +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * l10n_it # msgid "" msgstr "" -"Project-Id-Version: openobject-addons\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2011-01-07 06:04+0000\n" -"PO-Revision-Date: 2011-02-15 15:37+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Italian \n" +"Project-Id-Version: OpenERP Server 6.0.2\n" +"Report-Msgid-Bugs-To: support@openerp.com\n" +"POT-Creation-Date: 2011-08-11 20:06+0000\n" +"PO-Revision-Date: 2011-08-11 20:06+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-04-29 05:56+0000\n" -"X-Generator: Launchpad (build 12758)\n" - -#. module: l10n_it -#: model:ir.actions.report.xml,name:l10n_it.account_ita_libroIVA_debit -msgid "Registro acquisti" -msgstr "Registro acquisti" - -#. module: l10n_it -#: model:ir.actions.todo,note:l10n_it.config_call_account_template_generic -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 "" -"Genera il Piano dei Conti da un Modello. Vi verrà richiesto di passare il " -"nome dell'azienda, il modello da seguire, il numero di decimali per generare " -"il codice dei tuoi conti e, per il conto della Banca, la valuta per creare " -"il Libro Giornale. Così una copia vergine del Piano dei Conti, derivatante " -"dal modello, viene generata.\n" -"\tQuesto è la stessa procedura automatica che viene lanciata da: Gestione " -"Finanziaria / Configurazione / Contabilità / Conti finanziari / Genera il " -"Piano dei conti da un modello." - -#. module: l10n_it -#: view:account.report_libroiva:0 -msgid "Anno Fiscale" -msgstr "Anno Fiscale" - -#. module: l10n_it -#: model:account.fiscal.position.template,name:l10n_it.it -msgid "Italia" -msgstr "Italia" - -#. module: l10n_it -#: report:l10n_it.report.libroIVA_credito:0 -#: report:l10n_it.report.libroIVA_debito:0 -msgid "REGISTRO IVA" -msgstr "REGISTRO IVA" - -#. module: l10n_it -#: report:l10n_it.report.libroIVA_credito:0 -#: report:l10n_it.report.libroIVA_debito:0 -msgid "Protocollo" -msgstr "Protocollo" - -#. module: l10n_it -#: model:account.fiscal.position.template,name:l10n_it.extra -msgid "Regime Extra comunitario" -msgstr "Regime Extra comunitario" - -#. module: l10n_it -#: report:l10n_it.report.libroIVA_credito:0 -msgid "VENDITE" -msgstr "VENDITE" - -#. module: l10n_it -#: report:l10n_it.report.libroIVA_credito:0 -#: report:l10n_it.report.libroIVA_debito:0 -msgid "Aliquota" -msgstr "Aliquota" - -#. module: l10n_it -#: field:account.report_libroiva,company_id:0 -msgid "Company" -msgstr "Azienda" - -#. module: l10n_it -#: field:account.report_libroiva,name:0 -msgid "Fiscal year" -msgstr "Anno fiscale" - -#. module: l10n_it -#: report:l10n_it.report.libroIVA_credito:0 -#: report:l10n_it.report.libroIVA_debito:0 -msgid "Numero" -msgstr "Numero" - -#. module: l10n_it -#: report:l10n_it.report.libroIVA_debito:0 -msgid "Fornitore" -msgstr "Fornitore" - -#. module: l10n_it -#: report:l10n_it.report.libroIVA_debito:0 -msgid "ACQUISTI" -msgstr "ACQUISTI" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" #. module: l10n_it #: model:ir.module.module,description:l10n_it.module_meta_information -msgid "" -"\n" +msgid "\n" " Piano dei conti italiano di un'impresa generica\n" " " -msgstr "" -"\n" +msgstr "\n" " Piano dei conti italiano di un'impresa generica\n" " " -#. module: l10n_it -#: report:l10n_it.report.libroIVA_credito:0 -msgid "Cliente" -msgstr "Cliente" - -#. module: l10n_it -#: model:ir.actions.report.xml,name:l10n_it.account_ita_libroIVA_credit -msgid "Registro vendite" -msgstr "Registro vendite" - -#. module: l10n_it -#: report:l10n_it.report.libroIVA_credito:0 -#: report:l10n_it.report.libroIVA_debito:0 -msgid "Periodo" -msgstr "Periodo" - -#. module: l10n_it -#: view:account.report_libroiva:0 -#: model:ir.actions.act_window,name:l10n_it.l10n_chart_it_report_libroIVA_action -#: model:ir.ui.menu,name:l10n_it.menu_report_l10n_chart_it_libroIVA -msgid "Registri IVA" -msgstr "Registri IVA" - -#. module: l10n_it -#: report:l10n_it.report.libroIVA_credito:0 -#: report:l10n_it.report.libroIVA_debito:0 -msgid "Imposta" -msgstr "Imposta" - -#. module: l10n_it -#: model:account.fiscal.position.template,name:l10n_it.intra -msgid "Regime Intra comunitario" -msgstr "Regime Intra comunitario" - -#. module: l10n_it -#: report:l10n_it.report.libroIVA_credito:0 -#: report:l10n_it.report.libroIVA_debito:0 -msgid "Data fattura" -msgstr "Data fattura" - -#. module: l10n_it -#: report:l10n_it.report.libroIVA_credito:0 -#: report:l10n_it.report.libroIVA_debito:0 -msgid "Imponibile" -msgstr "Imponibile" - #. module: l10n_it #: model:ir.module.module,shortdesc:l10n_it.module_meta_information msgid "Italy - Generic Chart of Accounts" msgstr "Italia - Piano dei conti generico" #. module: l10n_it -#: model:ir.model,name:l10n_it.model_account_report_libroiva -msgid "SQL view for libro IVA" -msgstr "Vista SQL per registro IVA" +#: model:ir.actions.todo,note:l10n_it.config_call_account_template_generic +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 "Genera il piano dei conti da un template. Verrà chiesto di indicare il nome dell'azienda, il piano dei conti da seguire, il numero di cifre per generare il codice dei conti, la valuta per creare i sezionali. Quindi, una semplice copia del template verrà generata.\n" +" Questo è lo stesso wizard che viene eseguito da Contabilità/Configurazione/Contabilità Generale/Assetto finanziario della nuova azienda" + +#. module: l10n_it +#: model:ir.model,name:l10n_it.model_account_tax +msgid "account.tax" +msgstr "account.tax" + diff --git a/addons/l10n_it/i18n/l10n_it.pot b/addons/l10n_it/i18n/l10n_it.pot index 7f210e4cd75..1c46674bb28 100644 --- a/addons/l10n_it/i18n/l10n_it.pot +++ b/addons/l10n_it/i18n/l10n_it.pot @@ -4,10 +4,10 @@ # msgid "" msgstr "" -"Project-Id-Version: OpenERP Server 6.0.0-rc2\n" +"Project-Id-Version: OpenERP Server 6.0.2\n" "Report-Msgid-Bugs-To: support@openerp.com\n" -"POT-Creation-Date: 2011-01-07 06:04:30+0000\n" -"PO-Revision-Date: 2011-01-07 06:04:30+0000\n" +"POT-Creation-Date: 2011-08-11 20:06+0000\n" +"PO-Revision-Date: 2011-08-11 20:06+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -15,81 +15,6 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" -#. module: l10n_it -#: model:ir.actions.report.xml,name:l10n_it.account_ita_libroIVA_debit -msgid "Registro acquisti" -msgstr "" - -#. module: l10n_it -#: model:ir.actions.todo,note:l10n_it.config_call_account_template_generic -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 "" - -#. module: l10n_it -#: view:account.report_libroiva:0 -msgid "Anno Fiscale" -msgstr "" - -#. module: l10n_it -#: model:account.fiscal.position.template,name:l10n_it.it -msgid "Italia" -msgstr "" - -#. module: l10n_it -#: report:l10n_it.report.libroIVA_credito:0 -#: report:l10n_it.report.libroIVA_debito:0 -msgid "REGISTRO IVA" -msgstr "" - -#. module: l10n_it -#: report:l10n_it.report.libroIVA_credito:0 -#: report:l10n_it.report.libroIVA_debito:0 -msgid "Protocollo" -msgstr "" - -#. module: l10n_it -#: model:account.fiscal.position.template,name:l10n_it.extra -msgid "Regime Extra comunitario" -msgstr "" - -#. module: l10n_it -#: report:l10n_it.report.libroIVA_credito:0 -msgid "VENDITE" -msgstr "" - -#. module: l10n_it -#: report:l10n_it.report.libroIVA_credito:0 -#: report:l10n_it.report.libroIVA_debito:0 -msgid "Aliquota" -msgstr "" - -#. module: l10n_it -#: field:account.report_libroiva,company_id:0 -msgid "Company" -msgstr "" - -#. module: l10n_it -#: field:account.report_libroiva,name:0 -msgid "Fiscal year" -msgstr "" - -#. module: l10n_it -#: report:l10n_it.report.libroIVA_credito:0 -#: report:l10n_it.report.libroIVA_debito:0 -msgid "Numero" -msgstr "" - -#. module: l10n_it -#: report:l10n_it.report.libroIVA_debito:0 -msgid "Fornitore" -msgstr "" - -#. module: l10n_it -#: report:l10n_it.report.libroIVA_debito:0 -msgid "ACQUISTI" -msgstr "" - #. module: l10n_it #: model:ir.module.module,description:l10n_it.module_meta_information msgid "\n" @@ -97,59 +22,19 @@ msgid "\n" " " msgstr "" -#. module: l10n_it -#: report:l10n_it.report.libroIVA_credito:0 -msgid "Cliente" -msgstr "" - -#. module: l10n_it -#: model:ir.actions.report.xml,name:l10n_it.account_ita_libroIVA_credit -msgid "Registro vendite" -msgstr "" - -#. module: l10n_it -#: report:l10n_it.report.libroIVA_credito:0 -#: report:l10n_it.report.libroIVA_debito:0 -msgid "Periodo" -msgstr "" - -#. module: l10n_it -#: view:account.report_libroiva:0 -#: model:ir.actions.act_window,name:l10n_it.l10n_chart_it_report_libroIVA_action -#: model:ir.ui.menu,name:l10n_it.menu_report_l10n_chart_it_libroIVA -msgid "Registri IVA" -msgstr "" - -#. module: l10n_it -#: report:l10n_it.report.libroIVA_credito:0 -#: report:l10n_it.report.libroIVA_debito:0 -msgid "Imposta" -msgstr "" - -#. module: l10n_it -#: model:account.fiscal.position.template,name:l10n_it.intra -msgid "Regime Intra comunitario" -msgstr "" - -#. module: l10n_it -#: report:l10n_it.report.libroIVA_credito:0 -#: report:l10n_it.report.libroIVA_debito:0 -msgid "Data fattura" -msgstr "" - -#. module: l10n_it -#: report:l10n_it.report.libroIVA_credito:0 -#: report:l10n_it.report.libroIVA_debito:0 -msgid "Imponibile" -msgstr "" - #. module: l10n_it #: model:ir.module.module,shortdesc:l10n_it.module_meta_information msgid "Italy - Generic Chart of Accounts" msgstr "" #. module: l10n_it -#: model:ir.model,name:l10n_it.model_account_report_libroiva -msgid "SQL view for libro IVA" +#: model:ir.actions.todo,note:l10n_it.config_call_account_template_generic +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 "" + +#. module: l10n_it +#: model:ir.model,name:l10n_it.model_account_tax +msgid "account.tax" msgstr "" diff --git a/addons/l10n_it/libroIVA.py b/addons/l10n_it/libroIVA.py deleted file mode 100644 index a78c81ffdb3..00000000000 --- a/addons/l10n_it/libroIVA.py +++ /dev/null @@ -1,54 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2010 -# Italian OpenERP Community () -# Servabit srl -# Agile Business Group sagl -# Domsense srl -# -# 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 . -# -############################################################################## - - -# ################################################################################## -# Questa vista SQL viene usata solo per far scegliere l'anno di pianificazione all'utente -# Viene infatti costruita una vista XML di tipo tree che contiene solo i diversi anni per i quali stata fatta almeno una pianificazione -# ################################################################################## - -from osv import fields, osv - -class l10n_chart_it_report_libroIVA (osv.osv): - _name = "account.report_libroiva" - _description = "SQL view for libro IVA" - _auto = False - _rec_name = "name" - #_order = "fiscal_year"; - - _columns = { - 'name': fields.char('Fiscal year',size=64), - 'company_id': fields.many2one('res.company', 'Company'), - } - - def init (self, cr) : - cr.execute("""DROP VIEW IF EXISTS account_report_libroiva""") - cr.execute(""" - CREATE VIEW account_report_libroiva AS ( - SELECT id, name, company_id FROM account_fiscalyear - )""") -l10n_chart_it_report_libroIVA() - - diff --git a/addons/l10n_it/libroIVA_menu.xml b/addons/l10n_it/libroIVA_menu.xml deleted file mode 100644 index 51e581ac11c..00000000000 --- a/addons/l10n_it/libroIVA_menu.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - diff --git a/addons/l10n_it/libroIVA_view.xml b/addons/l10n_it/libroIVA_view.xml deleted file mode 100644 index bbc905e6da0..00000000000 --- a/addons/l10n_it/libroIVA_view.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - l10n_chart_it_report_libroIVA_tree - account.report_libroiva - tree - - - - - - - - - - - l10n_chart_it_report_libroIVA_form - account.report_libroiva - form - -
- - -
-
- - - - Registri IVA - account.report_libroiva - - form - tree,form - - - -
-
diff --git a/addons/l10n_it/report.xml b/addons/l10n_it/report.xml deleted file mode 100644 index e0ba4a33daf..00000000000 --- a/addons/l10n_it/report.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - diff --git a/addons/l10n_it/report/__init__.py b/addons/l10n_it/report/__init__.py deleted file mode 100644 index be32155c675..00000000000 --- a/addons/l10n_it/report/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -import libroIVA_credito -import libroIVA_debito \ No newline at end of file diff --git a/addons/l10n_it/report/libroIVA_credito.py b/addons/l10n_it/report/libroIVA_credito.py deleted file mode 100644 index b48c81d2475..00000000000 --- a/addons/l10n_it/report/libroIVA_credito.py +++ /dev/null @@ -1,79 +0,0 @@ -import datetime -import time -from report import report_sxw -from osv import osv -import pooler - - -class l10n_chart_it_report_libroIVA_credito(report_sxw.rml_parse): - - def __init__(self, cr, uid, name, context): - super(l10n_chart_it_report_libroIVA_credito,self).__init__(cr,uid,name,context) - self.localcontext.update({ - 'time' : time, - 'get_company' : self.get_company, - 'get_periods' : self.get_periods, - 'get_lines' : self.get_lines, - }) - - - def get_company(self,fiscal_year): - #print 'COMP = ',fiscal_year - return "" - - def get_periods(self,fiscal_year): - #print 'Fiscal year id:',fiscal_year.id - obj=pooler.get_pool(self.cr.dbname).get('account.fiscalyear') - fy=obj.browse(self.cr,self.uid,fiscal_year.id) - #print 'Periods = ',fy.period_ids - res=[rec for rec in fy.period_ids] - #return fy.periods => non funziona?!? bool object !?!? - return res - - def get_invoices(self,period): - #print 'PERIOD = ',period.name - obj=pooler.get_pool(self.cr.dbname).get('account.invoice') - # Selezione tutte le fatture emesse nel periodo - self.cr.execute( """ - SELECT id FROM account_invoice - WHERE (state='open' OR state='paid') AND - period_id="""+str(period.id)+""" - AND (type='out_invoice' OR type='out_refund') - """) - ids=self.cr.fetchall() - #print 'IDS = ', - if ids: - ids=[id[0] for id in ids ] - invoices=obj.browse(self.cr,self.uid,ids) - #print 'INVOICES = ',invoices - return invoices - - def get_lines(self,fiscal_year): - res=[] - obj_fy=pooler.get_pool(self.cr.dbname).get('account.fiscalyear') - fy=obj_fy.browse(self.cr,self.uid,fiscal_year.id) - for period in fy.period_ids: - invoices=self.get_invoices(period) - for invoice in invoices: - d={'periodo': period.name} - d['protocollo']=invoice.number - #print 'PARTNER ',invoice.partner_id.name - causale=invoice.partner_id.name - #print 'CAUSALE = ',causale - d['causale']=causale - d['numero']=invoice.reference - d['data_doc']=invoice.date_invoice - for tax in invoice.tax_line: - #print '\tTAX: ',tax - d['aliquota']=tax.tax_code_id.name - d['imponibile']=tax.base - d['imposta']=tax.amount - res.append(d) - d={'periodo':'', 'protocollo':'', 'causale':'', 'numero':'', 'data_doc':'', } - return res - - - -report_sxw.report_sxw('report.l10n_it.report.libroIVA_credito','account.report_libroiva', - 'l10n_it/report/libroIVA_credito.rml', - parser=l10n_chart_it_report_libroIVA_credito,header=False) diff --git a/addons/l10n_it/report/libroIVA_credito.rml b/addons/l10n_it/report/libroIVA_credito.rml deleted file mode 100644 index 2b282f760b4..00000000000 --- a/addons/l10n_it/report/libroIVA_credito.rml +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[ repeatIn(objects, 'o') ]] - - - - - [[ get_company(o) ]] - - - - - REGISTRO IVA - - - VENDITE - - - - - - - - [[ o.name ]] - - - - - - - Periodo - - - Protocollo - - - Cliente - - - Numero - - - Data fattura - - - Aliquota - - - Imponibile - - - Imposta - - - - - [[ repeatIn(get_lines(o), 'line') ]] - [[ line['periodo'] ]] - - - [[ line['protocollo'] ]] - - - [[ line['causale'] ]] - - - [[ line['numero'] ]] - - - [[ line['data_doc'] ]] - - - [[ line['aliquota'] ]] - - - [[ line['imponibile'] ]] - - - [[ line['imposta'] ]] - - - - - - - - - - - - - - - diff --git a/addons/l10n_it/report/libroIVA_debito.py b/addons/l10n_it/report/libroIVA_debito.py deleted file mode 100644 index c7720ab69a1..00000000000 --- a/addons/l10n_it/report/libroIVA_debito.py +++ /dev/null @@ -1,80 +0,0 @@ -import datetime -import time -from report import report_sxw -from osv import osv -import pooler - - -class l10n_chart_it_report_libroIVA_debito(report_sxw.rml_parse): - - def __init__(self, cr, uid, name, context): - super(l10n_chart_it_report_libroIVA_debito,self).__init__(cr,uid,name,context) - self.localcontext.update({ - 'time' : time, - 'get_company' : self.get_company, - 'get_periods' : self.get_periods, - 'get_lines' : self.get_lines, - }) - - - def get_company(self,fiscal_year): - #print 'COMP = ',fiscal_year - return "" - - - def get_periods(self,fiscal_year): - #print 'Fiscal year id:',fiscal_year.id - obj=pooler.get_pool(self.cr.dbname).get('account.fiscalyear') - fy=obj.browse(self.cr,self.uid,fiscal_year.id) - #print 'Periods = ',fy.period_ids - res=[rec for rec in fy.period_ids] - #return fy.periods => non funziona?!? bool object !?!? - return res - - def get_invoices(self,period): - #print 'PERIOD = ',period.name - obj=pooler.get_pool(self.cr.dbname).get('account.invoice') - # Selezione tutte le fatture emesse nel periodo - self.cr.execute( """ - SELECT id FROM account_invoice - WHERE (state='open' OR state='paid') AND - period_id="""+str(period.id)+""" - AND (type='in_invoice' OR type='in_refund') - """) - ids=self.cr.fetchall() - #print 'IDS = ', - if ids: - ids=[id[0] for id in ids ] - invoices=obj.browse(self.cr,self.uid,ids) - #print 'INVOICES = ',invoices - return invoices - - def get_lines(self,fiscal_year): - res=[] - obj_fy=pooler.get_pool(self.cr.dbname).get('account.fiscalyear') - fy=obj_fy.browse(self.cr,self.uid,fiscal_year.id) - for period in fy.period_ids: - invoices=self.get_invoices(period) - for invoice in invoices: - d={'periodo': period.name} - d['protocollo']=invoice.number - #print 'PARTNER ',invoice.partner_id.name - causale=invoice.partner_id.name - #print 'CAUSALE = ',causale - d['causale']=causale - d['numero']=invoice.reference - d['data_doc']=invoice.date_invoice - for tax in invoice.tax_line: - #print '\tTAX: ',tax - d['aliquota']=tax.tax_code_id.name - d['imponibile']=tax.base - d['imposta']=tax.amount - res.append(d) - d={'periodo':'', 'protocollo':'', 'causale':'', 'numero':'', 'data_doc':'', } - return res - - - -report_sxw.report_sxw('report.l10n_it.report.libroIVA_debito','account.report_libroiva', - 'l10n_it/report/libroIVA_debito.rml', - parser=l10n_chart_it_report_libroIVA_debito,header=False) diff --git a/addons/l10n_it/report/libroIVA_debito.rml b/addons/l10n_it/report/libroIVA_debito.rml deleted file mode 100644 index ced847722af..00000000000 --- a/addons/l10n_it/report/libroIVA_debito.rml +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[ repeatIn(objects, 'o') ]] - - - - - [[ get_company(o) ]] - - - - - REGISTRO IVA - - - ACQUISTI - - - - - - - - [[ o.name ]] - - - - - - - Periodo - - - Protocollo - - - Fornitore - - - Numero - - - Data fattura - - - Aliquota - - - Imponibile - - - Imposta - - - - - [[ repeatIn(get_lines(o), 'line') ]] - [[ line['periodo'] ]] - - - [[ line['protocollo'] ]] - - - [[ line['causale'] ]] - - - [[ line['numero'] ]] - - - [[ line['data_doc'] ]] - - - [[ line['aliquota'] ]] - - - [[ line['imponibile'] ]] - - - [[ line['imposta'] ]] - - - - - - - - - - - - diff --git a/addons/l10n_it/report/normalized_oo2rml.xsl b/addons/l10n_it/report/normalized_oo2rml.xsl deleted file mode 100644 index 14fcf598e54..00000000000 --- a/addons/l10n_it/report/normalized_oo2rml.xsl +++ /dev/null @@ -1,696 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - ( - - , - - ) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 - - - - - - - - - - - - - - - - - - - - - - - - - , - - - - - - - - - - - - - - - - - - - -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - white - - - - - - - - - - - ......... - - - - - - - - - - - - - 15 - 0 - - - - - - - - - - 6 - - - - - - ZapfDingbats - l - - - - - - - - - - - - - - - . - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - yes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LEFT - - - CENTER - - - RIGHT - - - JUSTIFY - - - - - - - - - - - - - - - - - - - - - - - - - - - Courier-BoldOblique - - - Courier-Bold - - - Courier-Oblique - - - Courier - - - - - - - Helvetica-BoldOblique - - - Helvetica-Bold - - - Helvetica-Oblique - - - Helvetica - - - - - - - Times-BoldItalic - - - Times-Bold - - - Times-Italic - - - Times-Roman - - - - - - - - Times-Roman - - - - - - - - - - - - - - - - -
- - diff --git a/addons/l10n_it/security/ir.model.access.csv b/addons/l10n_it/security/ir.model.access.csv deleted file mode 100644 index 8a8908511db..00000000000 --- a/addons/l10n_it/security/ir.model.access.csv +++ /dev/null @@ -1,3 +0,0 @@ -"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" -"access_l10n_it_report_manager","l10n_it.report account manager","model_account_report_libroiva","account.group_account_manager",1,1,1,1 -"access_l10n_it_report_user","l10n_it_report account user","model_account_report_libroiva","account.group_account_user",1,1,1,1 From 9a4bc3fe0d51d1b45fc83035fee8409642f0fd9b Mon Sep 17 00:00:00 2001 From: eLBati Date: Sat, 3 Sep 2011 13:01:35 +0200 Subject: [PATCH 018/711] [FIX] internal type of tax authority account bzr revid: lorenzo.battistini@agilebg.com-20110903110135-93slbgpt17cf2f5l --- .../l10n_it/data/account.account.template.csv | 466 +++++++++--------- 1 file changed, 233 insertions(+), 233 deletions(-) diff --git a/addons/l10n_it/data/account.account.template.csv b/addons/l10n_it/data/account.account.template.csv index ff91ccba79a..d31d42180d0 100644 --- a/addons/l10n_it/data/account.account.template.csv +++ b/addons/l10n_it/data/account.account.template.csv @@ -1,234 +1,234 @@ "id","code","name","parent_id:id","user_type:id","type","reconcile" -0,0,"Azienda",,"account_type_view","view",FALSE -1,1,"ATTIVO ",0,"account_type_view","view",TRUE -11,11,"IMMOBILIZZAZIONI IMMATERIALI ",1,"account_type_view","view",TRUE -1101,1101,"costi di impianto ",11,"account_type_view","other",TRUE -1106,1106,"software ",11,"account_type_view","other",TRUE -1108,1108,"avviamento ",11,"account_type_view","other",TRUE -1111,1111,"fondo ammortamento costi di impianto ",11,"account_type_view","other",TRUE -1116,1116,"fondo ammortamento software ",11,"account_type_view","other",TRUE -1118,1118,"fondo ammortamento avviamento ",11,"account_type_view","other",TRUE -12,12,"IMMOBILIZZAZIONI MATERIALI ",1,"account_type_view","view",TRUE -1201,1201,"fabbricati ",12,"account_type_view","other",TRUE -1202,1202,"impianti e macchinari ",12,"account_type_view","other",TRUE -1204,1204,"attrezzature commerciali ",12,"account_type_view","other",TRUE -1205,1205,"macchine d'ufficio ",12,"account_type_view","other",TRUE -1206,1206,"arredamento ",12,"account_type_view","other",TRUE -1207,1207,"automezzi ",12,"account_type_view","other",TRUE -1208,1208,"imballaggi durevoli ",12,"account_type_view","other",TRUE -1211,1211,"fondo ammortamento fabbricati ",12,"account_type_view","other",TRUE -1212,1212,"fondo ammortamento impianti e macchinari ",12,"account_type_view","other",TRUE -1214,1214,"fondo ammortamento attrezzature commerciali ",12,"account_type_view","other",TRUE -1215,1215,"fondo ammortamento macchine d'ufficio ",12,"account_type_view","other",TRUE -1216,1216,"fondo ammortamento arredamento ",12,"account_type_view","other",TRUE -1217,1217,"fondo ammortamento automezzi ",12,"account_type_view","other",TRUE -1218,1218,"fondo ammortamento imballaggi durevoli ",12,"account_type_view","other",TRUE -1220,1220,"fornitori immobilizzazioni c/acconti ",12,"account_type_view","other",TRUE -13,13,"IMMOBILIZZAZIONI FINANZIARIE ",1,"account_type_view","view",TRUE -1301,1301,"mutui attivi ",13,"account_type_view","other",TRUE -14,14,"RIMANENZE ",1,"account_type_view","view",TRUE -1401,1401,"materie di consumo ",14,"account_type_view","other",TRUE -1404,1404,"merci ",14,"account_type_view","other",TRUE -1410,1410,"fornitori c/acconti ",14,"account_type_view","other",TRUE -15,15,"CREDITI COMMERCIALI ",1,"account_type_view","view",TRUE -1501,1501,"crediti v/clienti ",15,"account_type_receivable","receivable",TRUE -1502,1502,"crediti commerciali diversi ",15,"account_type_receivable","other",TRUE -1503,1503,"clienti c/spese anticipate ",15,"account_type_receivable","receivable",TRUE -1505,1505,"cambiali attive ",15,"account_type_receivable","other",TRUE -1506,1506,"cambiali allo sconto ",15,"account_type_receivable","other",TRUE -1507,1507,"cambiali all'incasso ",15,"account_type_receivable","other",TRUE -1509,1509,"fatture da emettere ",15,"account_type_receivable","other",TRUE -1510,1510,"crediti insoluti ",15,"account_type_receivable","other",TRUE -1511,1511,"cambiali insolute ",15,"account_type_receivable","other",TRUE -1531,1531,"crediti da liquidare ",15,"account_type_receivable","other",TRUE -1540,1540,"fondo svalutazione crediti ",15,"account_type_receivable","other",TRUE -1541,1541,"fondo rischi su crediti ",15,"account_type_receivable","other",TRUE -16,16,"CREDITI DIVERSI ",1,"account_type_view","view",TRUE -1601,1601,"IVA n/credito ",16,"account_type_receivable","other",TRUE -1602,1602,"IVA c/acconto ",16,"account_type_receivable","other",TRUE -1605,1605,"crediti per IVA ",16,"account_type_receivable","other",TRUE -1607,1607,"imposte c/acconto ",16,"account_type_receivable","other",TRUE -1608,1608,"crediti per imposte ",16,"account_type_receivable","other",TRUE -1609,1609,"crediti per ritenute subite ",16,"account_type_receivable","other",TRUE -1610,1610,"crediti per cauzioni ",16,"account_type_receivable","other",TRUE -1620,1620,"personale c/acconti ",16,"account_type_receivable","other",TRUE -1630,1630,"crediti v/istituti previdenziali ",16,"account_type_receivable","other",TRUE -1640,1640,"debitori diversi ",16,"account_type_receivable","receivable",TRUE -18,18,"DISPONIBILITÀ LIQUIDE ",1,"account_type_view","view",TRUE -1801,1801,"banche c/c ",18,"account_type_bank","liquidity",TRUE -1810,1810,"c/c postali ",18,"account_type_cash","liquidity",TRUE -1820,1820,"denaro in cassa ",18,"account_type_cash","liquidity",TRUE -1821,1821,"assegni ",18,"account_type_cash","liquidity",TRUE -1822,1822,"valori bollati ",18,"account_type_cash","liquidity",TRUE -19,19,"RATEI E RISCONTI ATTIVI ",1,"account_type_view","view",TRUE -1901,1901,"ratei attivi ",19,"account_type_view","other",TRUE -1902,1902,"risconti attivi ",19,"account_type_view","other",TRUE -2,2,"PASSIVO ",0,"account_type_view","view",TRUE -20,20,"PATRIMONIO NETTO ",2,"account_type_view","view",TRUE -2101,2101,"patrimonio netto ",20,"account_type_view","other",TRUE -2102,2102,"utile d'esercizio ",20,"account_type_view","receivable",TRUE -2103,2103,"perdita d'esercizio ",20,"account_type_view","payable",TRUE -2104,2104,"prelevamenti extra gestione ",20,"account_type_view","other",TRUE -2105,2105,"titolare c/ritenute subite ",20,"account_type_view","other",TRUE -22,22,"FONDI PER RISCHI E ONERI ",2,"account_type_view","view",TRUE -2201,2201,"fondo per imposte ",22,"account_type_view","other",TRUE -2204,2204,"fondo responsabilità civile ",22,"account_type_view","other",TRUE -2205,2205,"fondo spese future ",22,"account_type_view","other",TRUE -2211,2211,"fondo manutenzioni programmate ",22,"account_type_view","other",TRUE -23,23,"TRATTAMENTO FINE RAPPORTO DI LAVORO ",2,"account_type_view","view",TRUE -2301,2301,"debiti per TFRL ",23,"account_type_view","other",TRUE -24,24,"DEBITI FINANZIARI ",2,"account_type_view","view",TRUE -2410,2410,"mutui passivi ",24,"account_type_payable","other",TRUE -2411,2411,"banche c/sovvenzioni ",24,"account_type_payable","other",TRUE -2420,2420,"banche c/c passivi ",24,"account_type_payable","other",TRUE -2421,2421,"banche c/RIBA all'incasso ",24,"account_type_payable","other",TRUE -2422,2422,"banche c/cambiali all'incasso ",24,"account_type_payable","other",TRUE -2423,2423,"banche c/anticipi su fatture ",24,"account_type_payable","other",TRUE -2440,2440,"debiti v/altri finanziatori ",24,"account_type_payable","other",TRUE -25,25,"DEBITI COMMERCIALI ",2,"account_type_view","view",TRUE -2501,2501,"debiti v/fornitori ",25,"account_type_payable","payable",TRUE -2503,2503,"cambiali passive ",25,"account_type_payable","other",TRUE -2520,2520,"fatture da ricevere ",25,"account_type_payable","other",TRUE -2521,2521,"debiti da liquidare ",25,"account_type_payable","other",TRUE -2530,2530,"clienti c/acconti ",25,"account_type_payable","payable",TRUE -26,26,"DEBITI DIVERSI ",2,"account_type_view","view",TRUE -2601,2601,"IVA n/debito ",26,"account_type_payable","other",TRUE -2602,2602,"debiti per ritenute da versare ",26,"account_type_payable","other",TRUE -2605,2605,"erario c/IVA ",26,"account_type_payable","other",TRUE -2606,2606,"debiti per imposte ",26,"account_type_payable","other",TRUE -2619,2619,"debiti per cauzioni ",26,"account_type_payable","other",TRUE -2620,2620,"personale c/retribuzioni ",26,"account_type_payable","other",TRUE -2621,2621,"personale c/liquidazioni ",26,"account_type_payable","other",TRUE -2622,2622,"clienti c/cessione ",26,"account_type_payable","other",TRUE -2630,2630,"debiti v/istituti previdenziali ",26,"account_type_payable","other",TRUE -2640,2640,"creditori diversi ",26,"account_type_payable","payable",TRUE -27,27,"RATEI E RISCONTI PASSIVI ",2,"account_type_view","view",TRUE -2701,2701,"ratei passivi ",27,"account_type_view","other",TRUE -2702,2702,"risconti passivi ",27,"account_type_view","other",TRUE -28,28,"CONTI TRANSITORI E DIVERSI ",2,"account_type_view","view",TRUE -2801,2801,"bilancio di apertura ",28,"account_type_view","other",TRUE -2802,2802,"bilancio di chiusura ",28,"account_type_view","other",TRUE -2810,2810,"IVA c/liquidazioni ",28,"account_type_view","other",TRUE -2811,2811,"istituti previdenziali ",28,"account_type_view","other",TRUE -2820,2820,"banca ... c/c ",28,"account_type_view","other",TRUE -2821,2821,"banca ... c/c ",28,"account_type_view","other",TRUE -2822,2822,"banca ... c/c ",28,"account_type_view","other",TRUE -29,29,"CONTI DEI SISTEMI SUPPLEMENTARI ",2,"account_type_view","view",TRUE -2901,2901,"beni di terzi ",29,"account_type_view","other",TRUE -2902,2902,"depositanti beni ",29,"account_type_view","other",TRUE -2911,2911,"merci da ricevere ",29,"account_type_view","other",TRUE -2912,2912,"fornitori c/impegni ",29,"account_type_view","other",TRUE -2913,2913,"impegni per beni in leasing ",29,"account_type_view","other",TRUE -2914,2914,"creditori c/leasing ",29,"account_type_view","other",TRUE -2916,2916,"clienti c/impegni ",29,"account_type_view","other",TRUE -2917,2917,"merci da consegnare ",29,"account_type_view","other",TRUE -2921,2921,"rischi per effetti scontati ",29,"account_type_view","other",TRUE -2922,2922,"banche c/effetti scontati ",29,"account_type_view","other",TRUE -2926,2926,"rischi per fideiussioni ",29,"account_type_view","other",TRUE -2927,2927,"creditori per fideiussioni ",29,"account_type_view","other",TRUE -2931,2931,"rischi per avalli ",29,"account_type_view","other",TRUE -2932,2932,"creditori per avalli ",29,"account_type_view","other",TRUE -3,3,"VALORE DELLA PRODUZIONE ",0,"account_type_view","view",TRUE -31,31,"VENDITE E PRESTAZIONI ",3,"account_type_view","view",TRUE -3101,3101,"merci c/vendite ",31,"account_type_income","other",TRUE -3103,3103,"rimborsi spese di vendita ",31,"account_type_income","other",TRUE -3110,3110,"resi su vendite ",31,"account_type_income","other",TRUE -3111,3111,"ribassi e abbuoni passivi ",31,"account_type_income","other",TRUE -3112,3112,"premi su vendite ",31,"account_type_income","other",TRUE -32,32,"RICAVI E PROVENTI DIVERSI ",3,"account_type_view","view",TRUE -3201,3201,"fitti attivi ",32,"account_type_income","other",TRUE -3202,3202,"proventi vari ",32,"account_type_income","other",TRUE -3210,3210,"arrotondamenti attivi ",32,"account_type_income","other",TRUE -3220,3220,"plusvalenze ordinarie diverse ",32,"account_type_income","other",TRUE -3230,3230,"sopravvenienze attive ordinarie diverse ",32,"account_type_income","other",TRUE -3240,3240,"insussistenze attive ordinarie diverse ",32,"account_type_income","other",TRUE -4,4,"COSTI DELLA PRODUZIONE ",0,"account_type_view","view",TRUE -41,41,"COSTO DEL VENDUTO ",4,"account_type_view","view",TRUE -4101,4101,"merci c/acquisti ",41,"account_type_expense","other",TRUE -4102,4102,"materie di consumo c/acquisti ",41,"account_type_expense","other",TRUE -4105,4105,"merci c/apporti ",41,"account_type_expense","other",TRUE -4110,4110,"resi su acquisti ",41,"account_type_expense","other",TRUE -4111,4111,"ribassi e abbuoni attivi ",41,"account_type_expense","other",TRUE -4112,4112,"premi su acquisti ",41,"account_type_expense","other",TRUE -4121,4121,"merci c/esistenze iniziali ",41,"account_type_expense","other",TRUE -4122,4122,"materie di consumo c/esistenze iniziali ",41,"account_type_expense","other",TRUE -4131,4131,"merci c/rimanenze finali ",41,"account_type_expense","other",TRUE -4132,4132,"materie di consumo c/rimanenze finali ",41,"account_type_expense","other",TRUE -42,42,"COSTI PER SERVIZI ",4,"account_type_view","view",TRUE -4201,4201,"costi di trasporto ",42,"account_type_expense","other",TRUE -4202,4202,"costi per energia ",42,"account_type_expense","other",TRUE -4203,4203,"costi di pubblicità ",42,"account_type_expense","other",TRUE -4204,4204,"costi di consulenze ",42,"account_type_expense","other",TRUE -4205,4205,"costi postali ",42,"account_type_expense","other",TRUE -4206,4206,"costi telefonici ",42,"account_type_expense","other",TRUE -4207,4207,"costi di assicurazione ",42,"account_type_expense","other",TRUE -4208,4208,"costi di vigilanza ",42,"account_type_expense","other",TRUE -4209,4209,"costi per i locali ",42,"account_type_expense","other",TRUE -4210,4210,"costi di esercizio automezzi ",42,"account_type_expense","other",TRUE -4211,4211,"costi di manutenzione e riparazione ",42,"account_type_expense","other",TRUE -4212,4212,"provvigioni passive ",42,"account_type_expense","other",TRUE -4213,4213,"spese di incasso ",42,"account_type_expense","other",TRUE -43,43,"COSTI PER GODIMENTO BENI DI TERZI ",4,"account_type_view","view",TRUE -4301,4301,"fitti passivi ",43,"account_type_expense","other",TRUE -4302,4302,"canoni di leasing ",43,"account_type_expense","other",TRUE -44,44,"COSTI PER IL PERSONALE ",4,"account_type_view","view",TRUE -4401,4401,"salari e stipendi ",44,"account_type_expense","other",TRUE -4402,4402,"oneri sociali ",44,"account_type_expense","other",TRUE -4403,4403,"TFRL ",44,"account_type_expense","other",TRUE -4404,4404,"altri costi per il personale ",44,"account_type_expense","other",TRUE -45,45,"AMMORTAMENTI IMMOBILIZZAZIONI IMMATERIALI ",4,"account_type_view","view",TRUE -4501,4501,"ammortamento costi di impianto ",45,"account_type_view","other",TRUE -4506,4506,"ammortamento software ",45,"account_type_view","other",TRUE -4508,4508,"ammortamento avviamento ",45,"account_type_view","other",TRUE -46,46,"AMMORTAMENTI IMMOBILIZZAZIONI MATERIALI ",4,"account_type_view","view",TRUE -4601,4601,"ammortamento fabbricati ",46,"account_type_view","other",TRUE -4602,4602,"ammortamento impianti e macchinari ",46,"account_type_view","other",TRUE -4604,4604,"ammortamento attrezzature commerciali ",46,"account_type_view","other",TRUE -4605,4605,"ammortamento macchine d'ufficio ",46,"account_type_view","other",TRUE -4606,4606,"ammortamento arredamento ",46,"account_type_view","other",TRUE -4607,4607,"ammortamento automezzi ",46,"account_type_view","other",TRUE -4608,4608,"ammortamento imballaggi durevoli ",46,"account_type_view","other",TRUE -47,47,"SVALUTAZIONI ",4,"account_type_view","view",TRUE -4701,4701,"svalutazioni immobilizzazioni immateriali ",47,"account_type_view","other",TRUE -4702,4702,"svalutazioni immobilizzazioni materiali ",47,"account_type_view","other",TRUE -4706,4706,"svalutazione crediti ",47,"account_type_view","other",TRUE -48,48,"ACCANTONAMENTI ",4,"account_type_view","view",TRUE -481,481,"ACCANTONAMENTI PER RISCHI ",48,"account_type_view","view",TRUE -4814,4814,"accantonamento per responsabilità civile ",481,"account_type_view","other",TRUE -482,482,"ALTRI ACCANTONAMENTI ",48,"account_type_view","view",TRUE -4821,4821,"accantonamento per spese future ",482,"account_type_view","other",TRUE -4823,4823,"accantonamento per manutenzioni programmate ",482,"account_type_view","other",TRUE -49,49,"ONERI DIVERSI ",4,"account_type_view","view",TRUE -4901,4901,"oneri fiscali diversi ",49,"account_type_view","other",TRUE -4903,4903,"oneri vari ",49,"account_type_view","other",TRUE -4905,4905,"perdite su crediti ",49,"account_type_view","other",TRUE -4910,4910,"arrotondamenti passivi ",49,"account_type_view","other",TRUE -4920,4920,"minusvalenze ordinarie diverse ",49,"account_type_view","other",TRUE -4930,4930,"sopravvenienze passive ordinarie diverse ",49,"account_type_view","other",TRUE -4940,4940,"insussistenze passive ordinarie diverse ",49,"account_type_view","other",TRUE -5,5,"PROVENTI E ONERI FINANZIARI ",0,"account_type_view","view",TRUE -51,51,"PROVENTI FINANZIARI ",5,"account_type_view","view",TRUE -5110,5110,"interessi attivi v/clienti ",51,"account_type_view","other",TRUE -5115,5115,"interessi attivi bancari ",51,"account_type_view","other",TRUE -5116,5116,"interessi attivi postali ",51,"account_type_view","other",TRUE -5140,5140,"proventi finanziari diversi ",51,"account_type_view","other",TRUE -52,52,"ONERI FINANZIARI ",5,"account_type_view","view",TRUE -5201,5201,"interessi passivi v/fornitori ",52,"account_type_view","other",TRUE -5202,5202,"interessi passivi bancari ",52,"account_type_view","other",TRUE -5203,5203,"sconti passivi bancari ",52,"account_type_view","other",TRUE -5210,5210,"interessi passivi su mutui ",52,"account_type_view","other",TRUE -5240,5240,"oneri finanziari diversi ",52,"account_type_view","other",TRUE -7,7,"PROVENTI E ONERI STRAORDINARI ",0,"account_type_view","view",TRUE -71,71,"PROVENTI STRAORDINARI ",7,"account_type_view","view",TRUE -7101,7101,"plusvalenze straordinarie ",71,"account_type_view","other",TRUE -7102,7102,"sopravvenienze attive straordinarie ",71,"account_type_view","other",TRUE -7103,7103,"insussistenze attive straordinarie ",71,"account_type_view","other",TRUE -72,72,"ONERI STRAORDINARI ",7,"account_type_view","view",TRUE -7201,7201,"minusvalenze straordinarie ",72,"account_type_view","other",TRUE -7202,7202,"sopravvenienze passive straordinarie ",72,"account_type_view","other",TRUE -7203,7203,"insussistenze passive straordinarie ",72,"account_type_view","other",TRUE -7204,7204,"imposte esercizi precedenti ",72,"account_type_view","other",TRUE -81,81,"IMPOSTE DELL'ESERCIZIO ",7,"account_type_view","view",TRUE -8101,8101,"imposte dell'esercizio ",81,"account_type_view","other",TRUE -91,91,"CONTI DI RISULTATO ",7,"account_type_view","view",TRUE -9101,9101,"conto di risultato economico ",91,"account_type_view","other",TRUE +"0","0","Azienda",,"account_type_view","view","FALSE" +"1","1","ATTIVO ","0","account_type_view","view","TRUE" +"11","11","IMMOBILIZZAZIONI IMMATERIALI ","1","account_type_view","view","TRUE" +"1101","1101","costi di impianto ","11","account_type_view","other","TRUE" +"1106","1106","software ","11","account_type_view","other","TRUE" +"1108","1108","avviamento ","11","account_type_view","other","TRUE" +"1111","1111","fondo ammortamento costi di impianto ","11","account_type_view","other","TRUE" +"1116","1116","fondo ammortamento software ","11","account_type_view","other","TRUE" +"1118","1118","fondo ammortamento avviamento ","11","account_type_view","other","TRUE" +"12","12","IMMOBILIZZAZIONI MATERIALI ","1","account_type_view","view","TRUE" +"1201","1201","fabbricati ","12","account_type_view","other","TRUE" +"1202","1202","impianti e macchinari ","12","account_type_view","other","TRUE" +"1204","1204","attrezzature commerciali ","12","account_type_view","other","TRUE" +"1205","1205","macchine d'ufficio ","12","account_type_view","other","TRUE" +"1206","1206","arredamento ","12","account_type_view","other","TRUE" +"1207","1207","automezzi ","12","account_type_view","other","TRUE" +"1208","1208","imballaggi durevoli ","12","account_type_view","other","TRUE" +"1211","1211","fondo ammortamento fabbricati ","12","account_type_view","other","TRUE" +"1212","1212","fondo ammortamento impianti e macchinari ","12","account_type_view","other","TRUE" +"1214","1214","fondo ammortamento attrezzature commerciali ","12","account_type_view","other","TRUE" +"1215","1215","fondo ammortamento macchine d'ufficio ","12","account_type_view","other","TRUE" +"1216","1216","fondo ammortamento arredamento ","12","account_type_view","other","TRUE" +"1217","1217","fondo ammortamento automezzi ","12","account_type_view","other","TRUE" +"1218","1218","fondo ammortamento imballaggi durevoli ","12","account_type_view","other","TRUE" +"1220","1220","fornitori immobilizzazioni c/acconti ","12","account_type_view","other","TRUE" +"13","13","IMMOBILIZZAZIONI FINANZIARIE ","1","account_type_view","view","TRUE" +"1301","1301","mutui attivi ","13","account_type_view","other","TRUE" +"14","14","RIMANENZE ","1","account_type_view","view","TRUE" +"1401","1401","materie di consumo ","14","account_type_view","other","TRUE" +"1404","1404","merci ","14","account_type_view","other","TRUE" +"1410","1410","fornitori c/acconti ","14","account_type_view","other","TRUE" +"15","15","CREDITI COMMERCIALI ","1","account_type_view","view","TRUE" +"1501","1501","crediti v/clienti ","15","account_type_receivable","receivable","TRUE" +"1502","1502","crediti commerciali diversi ","15","account_type_receivable","other","TRUE" +"1503","1503","clienti c/spese anticipate ","15","account_type_receivable","receivable","TRUE" +"1505","1505","cambiali attive ","15","account_type_receivable","other","TRUE" +"1506","1506","cambiali allo sconto ","15","account_type_receivable","other","TRUE" +"1507","1507","cambiali all'incasso ","15","account_type_receivable","other","TRUE" +"1509","1509","fatture da emettere ","15","account_type_receivable","other","TRUE" +"1510","1510","crediti insoluti ","15","account_type_receivable","other","TRUE" +"1511","1511","cambiali insolute ","15","account_type_receivable","other","TRUE" +"1531","1531","crediti da liquidare ","15","account_type_receivable","other","TRUE" +"1540","1540","fondo svalutazione crediti ","15","account_type_receivable","other","TRUE" +"1541","1541","fondo rischi su crediti ","15","account_type_receivable","other","TRUE" +"16","16","CREDITI DIVERSI ","1","account_type_view","view","TRUE" +"1601","1601","IVA n/credito ","16","account_type_receivable","other","TRUE" +"1602","1602","IVA c/acconto ","16","account_type_receivable","other","TRUE" +"1605","1605","crediti per IVA ","16","account_type_receivable","other","TRUE" +"1607","1607","imposte c/acconto ","16","account_type_receivable","other","TRUE" +"1608","1608","crediti per imposte ","16","account_type_receivable","other","TRUE" +"1609","1609","crediti per ritenute subite ","16","account_type_receivable","other","TRUE" +"1610","1610","crediti per cauzioni ","16","account_type_receivable","other","TRUE" +"1620","1620","personale c/acconti ","16","account_type_receivable","other","TRUE" +"1630","1630","crediti v/istituti previdenziali ","16","account_type_receivable","other","TRUE" +"1640","1640","debitori diversi ","16","account_type_receivable","receivable","TRUE" +"18","18","DISPONIBILITÀ LIQUIDE ","1","account_type_view","view","TRUE" +"1801","1801","banche c/c ","18","account_type_bank","liquidity","TRUE" +"1810","1810","c/c postali ","18","account_type_cash","liquidity","TRUE" +"1820","1820","denaro in cassa ","18","account_type_cash","liquidity","TRUE" +"1821","1821","assegni ","18","account_type_cash","liquidity","TRUE" +"1822","1822","valori bollati ","18","account_type_cash","liquidity","TRUE" +"19","19","RATEI E RISCONTI ATTIVI ","1","account_type_view","view","TRUE" +"1901","1901","ratei attivi ","19","account_type_view","other","TRUE" +"1902","1902","risconti attivi ","19","account_type_view","other","TRUE" +"2","2","PASSIVO ","0","account_type_view","view","TRUE" +"20","20","PATRIMONIO NETTO ","2","account_type_view","view","TRUE" +"2101","2101","patrimonio netto ","20","account_type_view","other","TRUE" +"2102","2102","utile d'esercizio ","20","account_type_view","receivable","TRUE" +"2103","2103","perdita d'esercizio ","20","account_type_view","payable","TRUE" +"2104","2104","prelevamenti extra gestione ","20","account_type_view","other","TRUE" +"2105","2105","titolare c/ritenute subite ","20","account_type_view","other","TRUE" +"22","22","FONDI PER RISCHI E ONERI ","2","account_type_view","view","TRUE" +"2201","2201","fondo per imposte ","22","account_type_view","other","TRUE" +"2204","2204","fondo responsabilità civile ","22","account_type_view","other","TRUE" +"2205","2205","fondo spese future ","22","account_type_view","other","TRUE" +"2211","2211","fondo manutenzioni programmate ","22","account_type_view","other","TRUE" +"23","23","TRATTAMENTO FINE RAPPORTO DI LAVORO ","2","account_type_view","view","TRUE" +"2301","2301","debiti per TFRL ","23","account_type_view","other","TRUE" +"24","24","DEBITI FINANZIARI ","2","account_type_view","view","TRUE" +"2410","2410","mutui passivi ","24","account_type_payable","other","TRUE" +"2411","2411","banche c/sovvenzioni ","24","account_type_payable","other","TRUE" +"2420","2420","banche c/c passivi ","24","account_type_payable","other","TRUE" +"2421","2421","banche c/RIBA all'incasso ","24","account_type_payable","other","TRUE" +"2422","2422","banche c/cambiali all'incasso ","24","account_type_payable","other","TRUE" +"2423","2423","banche c/anticipi su fatture ","24","account_type_payable","other","TRUE" +"2440","2440","debiti v/altri finanziatori ","24","account_type_payable","other","TRUE" +"25","25","DEBITI COMMERCIALI ","2","account_type_view","view","TRUE" +"2501","2501","debiti v/fornitori ","25","account_type_payable","payable","TRUE" +"2503","2503","cambiali passive ","25","account_type_payable","other","TRUE" +"2520","2520","fatture da ricevere ","25","account_type_payable","other","TRUE" +"2521","2521","debiti da liquidare ","25","account_type_payable","other","TRUE" +"2530","2530","clienti c/acconti ","25","account_type_payable","payable","TRUE" +"26","26","DEBITI DIVERSI ","2","account_type_view","view","TRUE" +"2601","2601","IVA n/debito ","26","account_type_payable","other","TRUE" +"2602","2602","debiti per ritenute da versare ","26","account_type_payable","other","TRUE" +"2605","2605","erario c/IVA ","26","account_type_payable","payable","TRUE" +"2606","2606","debiti per imposte ","26","account_type_payable","other","TRUE" +"2619","2619","debiti per cauzioni ","26","account_type_payable","other","TRUE" +"2620","2620","personale c/retribuzioni ","26","account_type_payable","other","TRUE" +"2621","2621","personale c/liquidazioni ","26","account_type_payable","other","TRUE" +"2622","2622","clienti c/cessione ","26","account_type_payable","other","TRUE" +"2630","2630","debiti v/istituti previdenziali ","26","account_type_payable","other","TRUE" +"2640","2640","creditori diversi ","26","account_type_payable","payable","TRUE" +"27","27","RATEI E RISCONTI PASSIVI ","2","account_type_view","view","TRUE" +"2701","2701","ratei passivi ","27","account_type_view","other","TRUE" +"2702","2702","risconti passivi ","27","account_type_view","other","TRUE" +"28","28","CONTI TRANSITORI E DIVERSI ","2","account_type_view","view","TRUE" +"2801","2801","bilancio di apertura ","28","account_type_view","other","TRUE" +"2802","2802","bilancio di chiusura ","28","account_type_view","other","TRUE" +"2810","2810","IVA c/liquidazioni ","28","account_type_view","other","TRUE" +"2811","2811","istituti previdenziali ","28","account_type_view","other","TRUE" +"2820","2820","banca ... c/c ","28","account_type_view","other","TRUE" +"2821","2821","banca ... c/c ","28","account_type_view","other","TRUE" +"2822","2822","banca ... c/c ","28","account_type_view","other","TRUE" +"29","29","CONTI DEI SISTEMI SUPPLEMENTARI ","2","account_type_view","view","TRUE" +"2901","2901","beni di terzi ","29","account_type_view","other","TRUE" +"2902","2902","depositanti beni ","29","account_type_view","other","TRUE" +"2911","2911","merci da ricevere ","29","account_type_view","other","TRUE" +"2912","2912","fornitori c/impegni ","29","account_type_view","other","TRUE" +"2913","2913","impegni per beni in leasing ","29","account_type_view","other","TRUE" +"2914","2914","creditori c/leasing ","29","account_type_view","other","TRUE" +"2916","2916","clienti c/impegni ","29","account_type_view","other","TRUE" +"2917","2917","merci da consegnare ","29","account_type_view","other","TRUE" +"2921","2921","rischi per effetti scontati ","29","account_type_view","other","TRUE" +"2922","2922","banche c/effetti scontati ","29","account_type_view","other","TRUE" +"2926","2926","rischi per fideiussioni ","29","account_type_view","other","TRUE" +"2927","2927","creditori per fideiussioni ","29","account_type_view","other","TRUE" +"2931","2931","rischi per avalli ","29","account_type_view","other","TRUE" +"2932","2932","creditori per avalli ","29","account_type_view","other","TRUE" +"3","3","VALORE DELLA PRODUZIONE ","0","account_type_view","view","TRUE" +"31","31","VENDITE E PRESTAZIONI ","3","account_type_view","view","TRUE" +"3101","3101","merci c/vendite ","31","account_type_income","other","TRUE" +"3103","3103","rimborsi spese di vendita ","31","account_type_income","other","TRUE" +"3110","3110","resi su vendite ","31","account_type_income","other","TRUE" +"3111","3111","ribassi e abbuoni passivi ","31","account_type_income","other","TRUE" +"3112","3112","premi su vendite ","31","account_type_income","other","TRUE" +"32","32","RICAVI E PROVENTI DIVERSI ","3","account_type_view","view","TRUE" +"3201","3201","fitti attivi ","32","account_type_income","other","TRUE" +"3202","3202","proventi vari ","32","account_type_income","other","TRUE" +"3210","3210","arrotondamenti attivi ","32","account_type_income","other","TRUE" +"3220","3220","plusvalenze ordinarie diverse ","32","account_type_income","other","TRUE" +"3230","3230","sopravvenienze attive ordinarie diverse ","32","account_type_income","other","TRUE" +"3240","3240","insussistenze attive ordinarie diverse ","32","account_type_income","other","TRUE" +"4","4","COSTI DELLA PRODUZIONE ","0","account_type_view","view","TRUE" +"41","41","COSTO DEL VENDUTO ","4","account_type_view","view","TRUE" +"4101","4101","merci c/acquisti ","41","account_type_expense","other","TRUE" +"4102","4102","materie di consumo c/acquisti ","41","account_type_expense","other","TRUE" +"4105","4105","merci c/apporti ","41","account_type_expense","other","TRUE" +"4110","4110","resi su acquisti ","41","account_type_expense","other","TRUE" +"4111","4111","ribassi e abbuoni attivi ","41","account_type_expense","other","TRUE" +"4112","4112","premi su acquisti ","41","account_type_expense","other","TRUE" +"4121","4121","merci c/esistenze iniziali ","41","account_type_expense","other","TRUE" +"4122","4122","materie di consumo c/esistenze iniziali ","41","account_type_expense","other","TRUE" +"4131","4131","merci c/rimanenze finali ","41","account_type_expense","other","TRUE" +"4132","4132","materie di consumo c/rimanenze finali ","41","account_type_expense","other","TRUE" +"42","42","COSTI PER SERVIZI ","4","account_type_view","view","TRUE" +"4201","4201","costi di trasporto ","42","account_type_expense","other","TRUE" +"4202","4202","costi per energia ","42","account_type_expense","other","TRUE" +"4203","4203","costi di pubblicità ","42","account_type_expense","other","TRUE" +"4204","4204","costi di consulenze ","42","account_type_expense","other","TRUE" +"4205","4205","costi postali ","42","account_type_expense","other","TRUE" +"4206","4206","costi telefonici ","42","account_type_expense","other","TRUE" +"4207","4207","costi di assicurazione ","42","account_type_expense","other","TRUE" +"4208","4208","costi di vigilanza ","42","account_type_expense","other","TRUE" +"4209","4209","costi per i locali ","42","account_type_expense","other","TRUE" +"4210","4210","costi di esercizio automezzi ","42","account_type_expense","other","TRUE" +"4211","4211","costi di manutenzione e riparazione ","42","account_type_expense","other","TRUE" +"4212","4212","provvigioni passive ","42","account_type_expense","other","TRUE" +"4213","4213","spese di incasso ","42","account_type_expense","other","TRUE" +"43","43","COSTI PER GODIMENTO BENI DI TERZI ","4","account_type_view","view","TRUE" +"4301","4301","fitti passivi ","43","account_type_expense","other","TRUE" +"4302","4302","canoni di leasing ","43","account_type_expense","other","TRUE" +"44","44","COSTI PER IL PERSONALE ","4","account_type_view","view","TRUE" +"4401","4401","salari e stipendi ","44","account_type_expense","other","TRUE" +"4402","4402","oneri sociali ","44","account_type_expense","other","TRUE" +"4403","4403","TFRL ","44","account_type_expense","other","TRUE" +"4404","4404","altri costi per il personale ","44","account_type_expense","other","TRUE" +"45","45","AMMORTAMENTI IMMOBILIZZAZIONI IMMATERIALI ","4","account_type_view","view","TRUE" +"4501","4501","ammortamento costi di impianto ","45","account_type_view","other","TRUE" +"4506","4506","ammortamento software ","45","account_type_view","other","TRUE" +"4508","4508","ammortamento avviamento ","45","account_type_view","other","TRUE" +"46","46","AMMORTAMENTI IMMOBILIZZAZIONI MATERIALI ","4","account_type_view","view","TRUE" +"4601","4601","ammortamento fabbricati ","46","account_type_view","other","TRUE" +"4602","4602","ammortamento impianti e macchinari ","46","account_type_view","other","TRUE" +"4604","4604","ammortamento attrezzature commerciali ","46","account_type_view","other","TRUE" +"4605","4605","ammortamento macchine d'ufficio ","46","account_type_view","other","TRUE" +"4606","4606","ammortamento arredamento ","46","account_type_view","other","TRUE" +"4607","4607","ammortamento automezzi ","46","account_type_view","other","TRUE" +"4608","4608","ammortamento imballaggi durevoli ","46","account_type_view","other","TRUE" +"47","47","SVALUTAZIONI ","4","account_type_view","view","TRUE" +"4701","4701","svalutazioni immobilizzazioni immateriali ","47","account_type_view","other","TRUE" +"4702","4702","svalutazioni immobilizzazioni materiali ","47","account_type_view","other","TRUE" +"4706","4706","svalutazione crediti ","47","account_type_view","other","TRUE" +"48","48","ACCANTONAMENTI ","4","account_type_view","view","TRUE" +"481","481","ACCANTONAMENTI PER RISCHI ","48","account_type_view","view","TRUE" +"4814","4814","accantonamento per responsabilità civile ","481","account_type_view","other","TRUE" +"482","482","ALTRI ACCANTONAMENTI ","48","account_type_view","view","TRUE" +"4821","4821","accantonamento per spese future ","482","account_type_view","other","TRUE" +"4823","4823","accantonamento per manutenzioni programmate ","482","account_type_view","other","TRUE" +"49","49","ONERI DIVERSI ","4","account_type_view","view","TRUE" +"4901","4901","oneri fiscali diversi ","49","account_type_view","other","TRUE" +"4903","4903","oneri vari ","49","account_type_view","other","TRUE" +"4905","4905","perdite su crediti ","49","account_type_view","other","TRUE" +"4910","4910","arrotondamenti passivi ","49","account_type_view","other","TRUE" +"4920","4920","minusvalenze ordinarie diverse ","49","account_type_view","other","TRUE" +"4930","4930","sopravvenienze passive ordinarie diverse ","49","account_type_view","other","TRUE" +"4940","4940","insussistenze passive ordinarie diverse ","49","account_type_view","other","TRUE" +"5","5","PROVENTI E ONERI FINANZIARI ","0","account_type_view","view","TRUE" +"51","51","PROVENTI FINANZIARI ","5","account_type_view","view","TRUE" +"5110","5110","interessi attivi v/clienti ","51","account_type_view","other","TRUE" +"5115","5115","interessi attivi bancari ","51","account_type_view","other","TRUE" +"5116","5116","interessi attivi postali ","51","account_type_view","other","TRUE" +"5140","5140","proventi finanziari diversi ","51","account_type_view","other","TRUE" +"52","52","ONERI FINANZIARI ","5","account_type_view","view","TRUE" +"5201","5201","interessi passivi v/fornitori ","52","account_type_view","other","TRUE" +"5202","5202","interessi passivi bancari ","52","account_type_view","other","TRUE" +"5203","5203","sconti passivi bancari ","52","account_type_view","other","TRUE" +"5210","5210","interessi passivi su mutui ","52","account_type_view","other","TRUE" +"5240","5240","oneri finanziari diversi ","52","account_type_view","other","TRUE" +"7","7","PROVENTI E ONERI STRAORDINARI ","0","account_type_view","view","TRUE" +"71","71","PROVENTI STRAORDINARI ","7","account_type_view","view","TRUE" +"7101","7101","plusvalenze straordinarie ","71","account_type_view","other","TRUE" +"7102","7102","sopravvenienze attive straordinarie ","71","account_type_view","other","TRUE" +"7103","7103","insussistenze attive straordinarie ","71","account_type_view","other","TRUE" +"72","72","ONERI STRAORDINARI ","7","account_type_view","view","TRUE" +"7201","7201","minusvalenze straordinarie ","72","account_type_view","other","TRUE" +"7202","7202","sopravvenienze passive straordinarie ","72","account_type_view","other","TRUE" +"7203","7203","insussistenze passive straordinarie ","72","account_type_view","other","TRUE" +"7204","7204","imposte esercizi precedenti ","72","account_type_view","other","TRUE" +"81","81","IMPOSTE DELL'ESERCIZIO ","7","account_type_view","view","TRUE" +"8101","8101","imposte dell'esercizio ","81","account_type_view","other","TRUE" +"91","91","CONTI DI RISULTATO ","7","account_type_view","view","TRUE" +"9101","9101","conto di risultato economico ","91","account_type_view","other","TRUE" From baf3c74fc43a3ff47ff68684ce36969a1eb0bce5 Mon Sep 17 00:00:00 2001 From: eLBati Date: Sat, 17 Sep 2011 09:29:30 +0200 Subject: [PATCH 019/711] [FIX] new ordinary VAT 21% http://www.ilsole24ore.com/art/norme-e-tributi/2011-09-15/domani-aumenta-224724.shtml bzr revid: lorenzo.battistini@agilebg.com-20110917072930-i6rnvkjgw4lffgla --- .../data/account.tax.code.template.csv | 4 + addons/l10n_it/data/account.tax.template.csv | 74 ++++++++++--------- 2 files changed, 42 insertions(+), 36 deletions(-) diff --git a/addons/l10n_it/data/account.tax.code.template.csv b/addons/l10n_it/data/account.tax.code.template.csv index 288f169f4ab..01699380f81 100644 --- a/addons/l10n_it/data/account.tax.code.template.csv +++ b/addons/l10n_it/data/account.tax.code.template.csv @@ -26,6 +26,8 @@ "IVC4Idet50","template_impcode_pagata_4det50","IVA a credito 4% detraibile 50% (imponibile)","template_impcode_pagata" "IVC20","template_ivacode_pagata_20","IVA a credito 20%","template_ivacode_pagata" "IVC20I","template_impcode_pagata_20","IVA a credito 20% (imponibile)","template_impcode_pagata" +"IVC21","template_ivacode_pagata_21","IVA a credito 21%","template_ivacode_pagata" +"IVC21I","template_impcode_pagata_21","IVA a credito 21% (imponibile)","template_impcode_pagata" "IVC4","template_ivacode_pagata_4","IVA a credito 4%","template_ivacode_pagata" "IVC4I","template_impcode_pagata_4","IVA a credito 4% (imponibile)","template_impcode_pagata" "IVC12","template_ivacode_pagata_12","IVA a credito 12%","template_ivacode_pagata" @@ -40,6 +42,8 @@ "IVD10I","template_impcode_riscossa_10","IVA a debito 10% (imponibile)","template_impcode_riscossa" "IVD20","template_ivacode_riscossa_20","IVA a debito 20%","template_ivacode_riscossa" "IVD20I","template_impcode_riscossa_20","IVA a debito 20% (imponibile)","template_impcode_riscossa" +"IVD21","template_ivacode_riscossa_21","IVA a debito 21%","template_ivacode_riscossa" +"IVD21I","template_impcode_riscossa_21","IVA a debito 21% (imponibile)","template_impcode_riscossa" "IVD4","template_ivacode_riscossa_4","IVA a debito 4%","template_ivacode_riscossa" "IVD4I","template_impcode_riscossa_4","IVA a debito 4% (imponibile)","template_impcode_riscossa" "IVD12","template_ivacode_riscossa_12","IVA a debito 12%","template_ivacode_riscossa" diff --git a/addons/l10n_it/data/account.tax.template.csv b/addons/l10n_it/data/account.tax.template.csv index 5be051ed009..08a4d770b31 100644 --- a/addons/l10n_it/data/account.tax.template.csv +++ b/addons/l10n_it/data/account.tax.template.csv @@ -1,46 +1,48 @@ "id","description","chart_template_id:id","name","sequence","amount","parent_id:id","child_depend","type","account_collected_id:id","account_paid_id:id","type_tax_use","base_code_id:id","tax_code_id:id","ref_base_code_id:id","ref_tax_code_id:id","ref_base_sign","ref_tax_sign","price_include" -"20a","20a","l10n_it_chart_template_generic","Iva al 20% (debito)",,"0.2",,"False","percent","2601","2601","sale","template_impcode_riscossa_20","template_ivacode_riscossa_20","template_impcode_riscossa_20","template_ivacode_riscossa_20",-1,-1,"False" -"20b","20b","l10n_it_chart_template_generic","Iva al 20% (credito)",,"0.2",,"False","percent","1601","1601","purchase","template_impcode_pagata_20","template_ivacode_pagata_20","template_impcode_pagata_20","template_ivacode_pagata_20",-1,-1,"False" -"10a","10a","l10n_it_chart_template_generic","Iva al 10% (debito)",,"0.1",,"False","percent","2601","2601","sale","template_impcode_riscossa_10","template_ivacode_riscossa_10","template_impcode_riscossa_10","template_ivacode_riscossa_10",-1,-1,"False" -"10b","10b","l10n_it_chart_template_generic","Iva al 10% (credito)",,"0.1",,"False","percent","1601","1601","purchase","template_impcode_pagata_10","template_ivacode_pagata_10","template_impcode_pagata_10","template_ivacode_pagata_10",-1,-1,"False" -"10AO","10AO","l10n_it_chart_template_generic","Iva al 10% indetraibile",,"0.1",,"True","percent",,,"purchase","template_impcode_pagata_10ind",,"template_impcode_pagata_10ind",,-1,,"False" -"10AOa","10AOa","l10n_it_chart_template_generic","Iva al 10% indetraibile (D)","2","0","10AO","False","balance","1601","1601","purchase",,"template_ivacode_pagata_10ind",,"template_ivacode_pagata_10ind",,-1,"False" +"21a","21a","l10n_it_chart_template_generic","Iva al 21% (debito)",,"0.21",,"False","percent","2601","2601","sale","template_impcode_riscossa_21","template_ivacode_riscossa_21","template_impcode_riscossa_21","template_ivacode_riscossa_21","-1","-1","False" +"21b","21b","l10n_it_chart_template_generic","Iva al 21% (credito)",,"0.21",,"False","percent","1601","1601","purchase","template_impcode_pagata_21","template_ivacode_pagata_21","template_impcode_pagata_21","template_ivacode_pagata_21","-1","-1","False" +"20a","20a","l10n_it_chart_template_generic","Iva al 20% (debito)",,"0.2",,"False","percent","2601","2601","sale","template_impcode_riscossa_20","template_ivacode_riscossa_20","template_impcode_riscossa_20","template_ivacode_riscossa_20","-1","-1","False" +"20b","20b","l10n_it_chart_template_generic","Iva al 20% (credito)",,"0.2",,"False","percent","1601","1601","purchase","template_impcode_pagata_20","template_ivacode_pagata_20","template_impcode_pagata_20","template_ivacode_pagata_20","-1","-1","False" +"10a","10a","l10n_it_chart_template_generic","Iva al 10% (debito)",,"0.1",,"False","percent","2601","2601","sale","template_impcode_riscossa_10","template_ivacode_riscossa_10","template_impcode_riscossa_10","template_ivacode_riscossa_10","-1","-1","False" +"10b","10b","l10n_it_chart_template_generic","Iva al 10% (credito)",,"0.1",,"False","percent","1601","1601","purchase","template_impcode_pagata_10","template_ivacode_pagata_10","template_impcode_pagata_10","template_ivacode_pagata_10","-1","-1","False" +"10AO","10AO","l10n_it_chart_template_generic","Iva al 10% indetraibile",,"0.1",,"True","percent",,,"purchase","template_impcode_pagata_10ind",,"template_impcode_pagata_10ind",,"-1",,"False" +"10AOa","10AOa","l10n_it_chart_template_generic","Iva al 10% indetraibile (D)","2","0","10AO","False","balance","1601","1601","purchase",,"template_ivacode_pagata_10ind",,"template_ivacode_pagata_10ind",,"-1","False" "10AOb","10AOb","l10n_it_chart_template_generic","Iva al 10% indetraibile (I)","1","1","10AO","False","percent",,,"purchase",,,,,,,"False" -"12a","12a","l10n_it_chart_template_generic","Iva 12% (debito)",,"0.12",,"False","percent","2601","2601","sale","template_impcode_riscossa_12","template_ivacode_riscossa_12","template_impcode_riscossa_12","template_ivacode_riscossa_12",-1,-1,"False" -"12b","12b","l10n_it_chart_template_generic","Iva 12% (credito)",,"0.12",,"False","percent","1601","1601","purchase","template_impcode_pagata_12","template_ivacode_pagata_12","template_impcode_pagata_12","template_ivacode_pagata_12",-1,-1,"False" -"2010","2010","l10n_it_chart_template_generic","Iva al 20% detraibile 10%",,"0.2",,"True","percent",,,"purchase","template_impcode_pagata_20det10",,"template_impcode_pagata_20det10",,-1,,"False" -"2010a","2010a","l10n_it_chart_template_generic","Iva al 20% detraibile 10% (D)","2","0","2010","False","balance","1601","1601","purchase",,"template_ivacode_pagata_20det10",,"template_ivacode_pagata_20det10",,-1,"False" +"12a","12a","l10n_it_chart_template_generic","Iva 12% (debito)",,"0.12",,"False","percent","2601","2601","sale","template_impcode_riscossa_12","template_ivacode_riscossa_12","template_impcode_riscossa_12","template_ivacode_riscossa_12","-1","-1","False" +"12b","12b","l10n_it_chart_template_generic","Iva 12% (credito)",,"0.12",,"False","percent","1601","1601","purchase","template_impcode_pagata_12","template_ivacode_pagata_12","template_impcode_pagata_12","template_ivacode_pagata_12","-1","-1","False" +"2010","2010","l10n_it_chart_template_generic","Iva al 20% detraibile 10%",,"0.2",,"True","percent",,,"purchase","template_impcode_pagata_20det10",,"template_impcode_pagata_20det10",,"-1",,"False" +"2010a","2010a","l10n_it_chart_template_generic","Iva al 20% detraibile 10% (D)","2","0","2010","False","balance","1601","1601","purchase",,"template_ivacode_pagata_20det10",,"template_ivacode_pagata_20det10",,"-1","False" "2010b","2010b","l10n_it_chart_template_generic","Iva al 20% detraibile 10% (I)","1","0.9","2010","False","percent",,,"purchase",,,,,,,"False" -"2015","2015","l10n_it_chart_template_generic","Iva al 20% detraibile 15%",,"0.2",,"True","percent",,,"purchase","template_impcode_pagata_20det15",,"template_impcode_pagata_20det15",,-1,,"False" -"2015a","2015a","l10n_it_chart_template_generic","Iva al 20% detraibile 15% (D)","2","0","2015","False","balance","1601","1601","purchase",,"template_ivacode_pagata_20det15",,"template_ivacode_pagata_20det15",,-1,"False" +"2015","2015","l10n_it_chart_template_generic","Iva al 20% detraibile 15%",,"0.2",,"True","percent",,,"purchase","template_impcode_pagata_20det15",,"template_impcode_pagata_20det15",,"-1",,"False" +"2015a","2015a","l10n_it_chart_template_generic","Iva al 20% detraibile 15% (D)","2","0","2015","False","balance","1601","1601","purchase",,"template_ivacode_pagata_20det15",,"template_ivacode_pagata_20det15",,"-1","False" "2015b","2015b","l10n_it_chart_template_generic","Iva al 20% detraibile 15% (I)","1","0.85","2015","False","percent",,,"purchase",,,,,,,"False" -"2040","2040","l10n_it_chart_template_generic","Iva al 20% detraibile 40%",,"0.2",,"True","percent",,,"purchase","template_impcode_pagata_20det40",,"template_impcode_pagata_20det40",,-1,,"False" -"2040a","2040a","l10n_it_chart_template_generic","Iva al 20% detraibile 40% (D)","2","0","2040","False","balance","1601","1601","purchase",,"template_ivacode_pagata_20det40",,"template_ivacode_pagata_20det40",,-1,"False" +"2040","2040","l10n_it_chart_template_generic","Iva al 20% detraibile 40%",,"0.2",,"True","percent",,,"purchase","template_impcode_pagata_20det40",,"template_impcode_pagata_20det40",,"-1",,"False" +"2040a","2040a","l10n_it_chart_template_generic","Iva al 20% detraibile 40% (D)","2","0","2040","False","balance","1601","1601","purchase",,"template_ivacode_pagata_20det40",,"template_ivacode_pagata_20det40",,"-1","False" "2040b","2040b","l10n_it_chart_template_generic","Iva al 20% detraibile 40% (I)","1","0.6","2040","False","percent",,,"purchase",,,,,,,"False" -"20AO","20AO","l10n_it_chart_template_generic","Iva al 20% indetraibile",,"0.2",,"True","percent",,,"purchase","template_impcode_pagata_20ind",,"template_impcode_pagata_20ind",,-1,,"False" -"20AOa","20AOa","l10n_it_chart_template_generic","Iva al 20% indetraibile (D)","2","0","20AO","False","balance","1601","1601","purchase",,"template_ivacode_pagata_20ind",,"template_ivacode_pagata_20ind",,-1,"False" +"20AO","20AO","l10n_it_chart_template_generic","Iva al 20% indetraibile",,"0.2",,"True","percent",,,"purchase","template_impcode_pagata_20ind",,"template_impcode_pagata_20ind",,"-1",,"False" +"20AOa","20AOa","l10n_it_chart_template_generic","Iva al 20% indetraibile (D)","2","0","20AO","False","balance","1601","1601","purchase",,"template_ivacode_pagata_20ind",,"template_ivacode_pagata_20ind",,"-1","False" "20AOb","20AOb","l10n_it_chart_template_generic","Iva al 20% indetraibile (I)","1","1","20AO","False","percent",,,"purchase",,,,,,,"False" -"20I5","20I5","l10n_it_chart_template_generic","IVA al 20% detraibile al 50%",,"0.2",,"True","percent",,,"purchase","template_impcode_pagata_20det50",,"template_impcode_pagata_20det50",,-1,,"False" +"20I5","20I5","l10n_it_chart_template_generic","IVA al 20% detraibile al 50%",,"0.2",,"True","percent",,,"purchase","template_impcode_pagata_20det50",,"template_impcode_pagata_20det50",,"-1",,"False" "20I5b","20I5b","l10n_it_chart_template_generic","IVA al 20% detraibile al 50% (I)","1","0.5","20I5","False","percent",,,"purchase",,,,,,,"False" -"20I5a","20I5a","l10n_it_chart_template_generic","IVA al 20% detraibile al 50% (D)","2","0","20I5","False","balance","1601","1601","purchase",,"template_ivacode_pagata_20det50",,"template_ivacode_pagata_20det50",,-1,"False" -"22a","22a","l10n_it_chart_template_generic","Iva 2% (debito)",,"0.02",,"False","percent","2601","2601","sale","template_impcode_riscossa_2","template_ivacode_riscossa_2","template_impcode_riscossa_2","template_ivacode_riscossa_2",-1,-1,"False" -"22b","22b","l10n_it_chart_template_generic","Iva 2% (credito)",,"0.02",,"False","percent","1601","1601","purchase","template_impcode_pagata_2","template_ivacode_pagata_2","template_impcode_pagata_2","template_ivacode_pagata_2",-1,-1,"False" -"4a","4a","l10n_it_chart_template_generic","Iva 4% (debito)",,"0.04",,"False","percent","2601","2601","sale","template_impcode_riscossa_4","template_ivacode_riscossa_4","template_impcode_riscossa_4","template_ivacode_riscossa_4",-1,-1,"False" -"4b","4b","l10n_it_chart_template_generic","Iva 4% (credito)",,"0.04",,"False","percent","1601","1601","purchase","template_impcode_pagata_4","template_ivacode_pagata_4","template_impcode_pagata_4","template_ivacode_pagata_4",-1,-1,"False" -"4AO","4AO","l10n_it_chart_template_generic","Iva al 4% indetraibile",,"0.04",,"True","percent",,,"purchase","template_impcode_pagata_4ind",,"template_impcode_pagata_4ind",,-1,,"False" -"4AOa","4AOa","l10n_it_chart_template_generic","Iva al 4% indetraibile (D)","2","0","4AO","False","balance","1601","1601","purchase",,"template_ivacode_pagata_4ind",,"template_ivacode_pagata_4ind",,-1,"False" +"20I5a","20I5a","l10n_it_chart_template_generic","IVA al 20% detraibile al 50% (D)","2","0","20I5","False","balance","1601","1601","purchase",,"template_ivacode_pagata_20det50",,"template_ivacode_pagata_20det50",,"-1","False" +"22a","22a","l10n_it_chart_template_generic","Iva 2% (debito)",,"0.02",,"False","percent","2601","2601","sale","template_impcode_riscossa_2","template_ivacode_riscossa_2","template_impcode_riscossa_2","template_ivacode_riscossa_2","-1","-1","False" +"22b","22b","l10n_it_chart_template_generic","Iva 2% (credito)",,"0.02",,"False","percent","1601","1601","purchase","template_impcode_pagata_2","template_ivacode_pagata_2","template_impcode_pagata_2","template_ivacode_pagata_2","-1","-1","False" +"4a","4a","l10n_it_chart_template_generic","Iva 4% (debito)",,"0.04",,"False","percent","2601","2601","sale","template_impcode_riscossa_4","template_ivacode_riscossa_4","template_impcode_riscossa_4","template_ivacode_riscossa_4","-1","-1","False" +"4b","4b","l10n_it_chart_template_generic","Iva 4% (credito)",,"0.04",,"False","percent","1601","1601","purchase","template_impcode_pagata_4","template_ivacode_pagata_4","template_impcode_pagata_4","template_ivacode_pagata_4","-1","-1","False" +"4AO","4AO","l10n_it_chart_template_generic","Iva al 4% indetraibile",,"0.04",,"True","percent",,,"purchase","template_impcode_pagata_4ind",,"template_impcode_pagata_4ind",,"-1",,"False" +"4AOa","4AOa","l10n_it_chart_template_generic","Iva al 4% indetraibile (D)","2","0","4AO","False","balance","1601","1601","purchase",,"template_ivacode_pagata_4ind",,"template_ivacode_pagata_4ind",,"-1","False" "4AOb","4AOb","l10n_it_chart_template_generic","Iva al 4% indetraibile (I)","1","1","4AO","False","percent",,,"purchase",,,,,,,"False" -"10I5","10I5","l10n_it_chart_template_generic","IVA al 10% detraibile al 50%",,"0.1",,"True","percent",,,"purchase","template_impcode_pagata_10det50",,"template_impcode_pagata_10det50",,-1,,"False" -"10I5a","10I5a","l10n_it_chart_template_generic","IVA al 10% detraibile al 50% (D)","2","0","10I5","False","balance","1601","1601","purchase",,"template_ivacode_pagata_10det50",,"template_ivacode_pagata_10det50",,-1,"False" +"10I5","10I5","l10n_it_chart_template_generic","IVA al 10% detraibile al 50%",,"0.1",,"True","percent",,,"purchase","template_impcode_pagata_10det50",,"template_impcode_pagata_10det50",,"-1",,"False" +"10I5a","10I5a","l10n_it_chart_template_generic","IVA al 10% detraibile al 50% (D)","2","0","10I5","False","balance","1601","1601","purchase",,"template_ivacode_pagata_10det50",,"template_ivacode_pagata_10det50",,"-1","False" "10I5b","10I5b","l10n_it_chart_template_generic","IVA al 10% detraibile al 50% (I)","1","0.5","10I5","False","percent",,,"purchase",,,,,,,"False" -"4I5","4I5","l10n_it_chart_template_generic","IVA al 4% detraibile al 50%",,"0.04",,"True","percent",,,"purchase","template_impcode_pagata_4det50",,"template_impcode_pagata_4det50",,-1,,"False" -"4I5a","4I5a","l10n_it_chart_template_generic","IVA al 4% detraibile al 50% (D)","2","0","4I5","False","balance","1601","1601","purchase",,"template_ivacode_pagata_4det50",,"template_ivacode_pagata_4det50",,-1,"False" +"4I5","4I5","l10n_it_chart_template_generic","IVA al 4% detraibile al 50%",,"0.04",,"True","percent",,,"purchase","template_impcode_pagata_4det50",,"template_impcode_pagata_4det50",,"-1",,"False" +"4I5a","4I5a","l10n_it_chart_template_generic","IVA al 4% detraibile al 50% (D)","2","0","4I5","False","balance","1601","1601","purchase",,"template_ivacode_pagata_4det50",,"template_ivacode_pagata_4det50",,"-1","False" "4I5b","4I5b","l10n_it_chart_template_generic","IVA al 4% detraibile al 50% (I)","1","0.5","4I5","False","percent",,,"purchase",,,,,,,"False" -"00a","00a","l10n_it_chart_template_generic","Esente IVA (debito)",,"0",,"False","percent","2601","2601","sale","template_impcode_riscossa_0","template_ivacode_riscossa_0","template_impcode_riscossa_0","template_ivacode_riscossa_0",-1,-1,"False" -"00b","00b","l10n_it_chart_template_generic","Esente IVA (credito)",,"0",,"False","percent","1601","1601","purchase","template_impcode_pagata_0","template_ivacode_pagata_0","template_impcode_pagata_0","template_ivacode_pagata_0",-1,-1,"False" -"20a INC","20a INC","l10n_it_chart_template_generic","Iva al 20% (debito) INC",,"0.2",,"False","percent","l10n_it.2601","l10n_it.2601","sale","l10n_it.template_impcode_riscossa_20","l10n_it.template_ivacode_riscossa_20","l10n_it.template_impcode_riscossa_20","l10n_it.template_ivacode_riscossa_20",-1,-1,"True" -"10a INC","10a INC","l10n_it_chart_template_generic","Iva al 10% (debito) INC",,"0.1",,"False","percent","l10n_it.2601","l10n_it.2601","sale","l10n_it.template_impcode_riscossa_10","l10n_it.template_ivacode_riscossa_10","l10n_it.template_impcode_riscossa_10","l10n_it.template_ivacode_riscossa_10",-1,-1,"True" -"12a INC","12a INC","l10n_it_chart_template_generic","Iva 12% (debito) INC",,"0.12",,"False","percent","l10n_it.2601","l10n_it.2601","sale","l10n_it.template_impcode_riscossa_12","l10n_it.template_ivacode_riscossa_12","l10n_it.template_impcode_riscossa_12","l10n_it.template_ivacode_riscossa_12",-1,-1,"True" -"22a INC","22a INC","l10n_it_chart_template_generic","Iva 2% (debito) INC",,"0.02",,"False","percent","l10n_it.2601","l10n_it.2601","sale","l10n_it.template_impcode_riscossa_2","l10n_it.template_ivacode_riscossa_2","l10n_it.template_impcode_riscossa_2","l10n_it.template_ivacode_riscossa_2",-1,-1,"True" -"4a INC","4a INC","l10n_it_chart_template_generic","Iva 4% (debito) INC",,"0.04",,"False","percent","l10n_it.2601","l10n_it.2601","sale","l10n_it.template_impcode_riscossa_4","l10n_it.template_ivacode_riscossa_4","l10n_it.template_impcode_riscossa_4","l10n_it.template_ivacode_riscossa_4",-1,-1,"True" -"00a INC","00a INC","l10n_it_chart_template_generic","Esente IVA (debito) INC",,"0",,"False","percent","l10n_it.2601","l10n_it.2601","sale","l10n_it.template_impcode_riscossa_0","l10n_it.template_ivacode_riscossa_0","l10n_it.template_impcode_riscossa_0","l10n_it.template_ivacode_riscossa_0",-1,-1,"True" +"00a","00a","l10n_it_chart_template_generic","Esente IVA (debito)",,"0",,"False","percent","2601","2601","sale","template_impcode_riscossa_0","template_ivacode_riscossa_0","template_impcode_riscossa_0","template_ivacode_riscossa_0","-1","-1","False" +"00b","00b","l10n_it_chart_template_generic","Esente IVA (credito)",,"0",,"False","percent","1601","1601","purchase","template_impcode_pagata_0","template_ivacode_pagata_0","template_impcode_pagata_0","template_ivacode_pagata_0","-1","-1","False" +"20a INC","20a INC","l10n_it_chart_template_generic","Iva al 20% (debito) INC",,"0.2",,"False","percent","l10n_it.2601","l10n_it.2601","sale","l10n_it.template_impcode_riscossa_20","l10n_it.template_ivacode_riscossa_20","l10n_it.template_impcode_riscossa_20","l10n_it.template_ivacode_riscossa_20","-1","-1","True" +"10a INC","10a INC","l10n_it_chart_template_generic","Iva al 10% (debito) INC",,"0.1",,"False","percent","l10n_it.2601","l10n_it.2601","sale","l10n_it.template_impcode_riscossa_10","l10n_it.template_ivacode_riscossa_10","l10n_it.template_impcode_riscossa_10","l10n_it.template_ivacode_riscossa_10","-1","-1","True" +"12a INC","12a INC","l10n_it_chart_template_generic","Iva 12% (debito) INC",,"0.12",,"False","percent","l10n_it.2601","l10n_it.2601","sale","l10n_it.template_impcode_riscossa_12","l10n_it.template_ivacode_riscossa_12","l10n_it.template_impcode_riscossa_12","l10n_it.template_ivacode_riscossa_12","-1","-1","True" +"22a INC","22a INC","l10n_it_chart_template_generic","Iva 2% (debito) INC",,"0.02",,"False","percent","l10n_it.2601","l10n_it.2601","sale","l10n_it.template_impcode_riscossa_2","l10n_it.template_ivacode_riscossa_2","l10n_it.template_impcode_riscossa_2","l10n_it.template_ivacode_riscossa_2","-1","-1","True" +"4a INC","4a INC","l10n_it_chart_template_generic","Iva 4% (debito) INC",,"0.04",,"False","percent","l10n_it.2601","l10n_it.2601","sale","l10n_it.template_impcode_riscossa_4","l10n_it.template_ivacode_riscossa_4","l10n_it.template_impcode_riscossa_4","l10n_it.template_ivacode_riscossa_4","-1","-1","True" +"00a INC","00a INC","l10n_it_chart_template_generic","Esente IVA (debito) INC",,"0",,"False","percent","l10n_it.2601","l10n_it.2601","sale","l10n_it.template_impcode_riscossa_0","l10n_it.template_ivacode_riscossa_0","l10n_it.template_impcode_riscossa_0","l10n_it.template_ivacode_riscossa_0","-1","-1","True" From 7f44b2a49930e3594232f39f9f9b7e03a8b5fff6 Mon Sep 17 00:00:00 2001 From: eLBati Date: Sun, 18 Sep 2011 17:19:26 +0200 Subject: [PATCH 020/711] [ADD] VAT 21% included bzr revid: lorenzo.battistini@agilebg.com-20110918151926-ux171fc0zixkbz1k --- addons/l10n_it/data/account.tax.template.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/l10n_it/data/account.tax.template.csv b/addons/l10n_it/data/account.tax.template.csv index 08a4d770b31..c0ce348693c 100644 --- a/addons/l10n_it/data/account.tax.template.csv +++ b/addons/l10n_it/data/account.tax.template.csv @@ -40,6 +40,7 @@ "4I5b","4I5b","l10n_it_chart_template_generic","IVA al 4% detraibile al 50% (I)","1","0.5","4I5","False","percent",,,"purchase",,,,,,,"False" "00a","00a","l10n_it_chart_template_generic","Esente IVA (debito)",,"0",,"False","percent","2601","2601","sale","template_impcode_riscossa_0","template_ivacode_riscossa_0","template_impcode_riscossa_0","template_ivacode_riscossa_0","-1","-1","False" "00b","00b","l10n_it_chart_template_generic","Esente IVA (credito)",,"0",,"False","percent","1601","1601","purchase","template_impcode_pagata_0","template_ivacode_pagata_0","template_impcode_pagata_0","template_ivacode_pagata_0","-1","-1","False" +"21a INC","21a INC","l10n_it_chart_template_generic","Iva al 21% (debito) INC",,"0.21",,"False","percent","l10n_it.2601","l10n_it.2601","sale","l10n_it.template_impcode_riscossa_21","l10n_it.template_ivacode_riscossa_21","l10n_it.template_impcode_riscossa_21","l10n_it.template_ivacode_riscossa_21","-1","-1","True" "20a INC","20a INC","l10n_it_chart_template_generic","Iva al 20% (debito) INC",,"0.2",,"False","percent","l10n_it.2601","l10n_it.2601","sale","l10n_it.template_impcode_riscossa_20","l10n_it.template_ivacode_riscossa_20","l10n_it.template_impcode_riscossa_20","l10n_it.template_ivacode_riscossa_20","-1","-1","True" "10a INC","10a INC","l10n_it_chart_template_generic","Iva al 10% (debito) INC",,"0.1",,"False","percent","l10n_it.2601","l10n_it.2601","sale","l10n_it.template_impcode_riscossa_10","l10n_it.template_ivacode_riscossa_10","l10n_it.template_impcode_riscossa_10","l10n_it.template_ivacode_riscossa_10","-1","-1","True" "12a INC","12a INC","l10n_it_chart_template_generic","Iva 12% (debito) INC",,"0.12",,"False","percent","l10n_it.2601","l10n_it.2601","sale","l10n_it.template_impcode_riscossa_12","l10n_it.template_ivacode_riscossa_12","l10n_it.template_impcode_riscossa_12","l10n_it.template_ivacode_riscossa_12","-1","-1","True" From 6da1004cf514289103af8fb8a51790aa4d3388c1 Mon Sep 17 00:00:00 2001 From: "Dhara (OpenERP)" <> Date: Thu, 22 Sep 2011 15:08:23 -0700 Subject: [PATCH 021/711] [NEW] new address_format field for country bzr revid: dhara_openerp-20110922220823-qaghdh4urgjdtea0 --- openerp/addons/base/base_data.xml | 10 ++++++++++ openerp/addons/base/res/res_country.py | 4 ++++ openerp/addons/base/res/res_country_view.xml | 3 +++ openerp/addons/base/res/res_partner.py | 20 ++++++++++++++++++++ 4 files changed, 37 insertions(+) diff --git a/openerp/addons/base/base_data.xml b/openerp/addons/base/base_data.xml index 00fb83a0796..0da83dbb1d2 100644 --- a/openerp/addons/base/base_data.xml +++ b/openerp/addons/base/base_data.xml @@ -85,6 +85,7 @@ Australia au + Aruba @@ -109,6 +110,7 @@ Belgium be + Burkina Faso @@ -145,6 +147,7 @@ Brazil br + Bahamas @@ -173,6 +176,7 @@ Canada ca + Cocos (Keeling) Islands @@ -254,6 +258,7 @@ Germany de + Djibouti @@ -298,6 +303,7 @@ Spain es + Ethiopia @@ -326,6 +332,7 @@ France fr + Gabon @@ -434,6 +441,7 @@ India in + British Indian Ocean Territory @@ -917,6 +925,7 @@ United Kingdom + gb @@ -926,6 +935,7 @@ United States us + Uruguay diff --git a/openerp/addons/base/res/res_country.py b/openerp/addons/base/res/res_country.py index 99e12a96f78..aa98c3995a0 100644 --- a/openerp/addons/base/res/res_country.py +++ b/openerp/addons/base/res/res_country.py @@ -31,6 +31,7 @@ class Country(osv.osv): 'code': fields.char('Country Code', size=2, help='The ISO country code in two chars.\n' 'You can use this field for quick search.', required=True), + 'address_format': fields.text('Address Format') } _sql_constraints = [ ('name_uniq', 'unique (name)', @@ -38,6 +39,9 @@ class Country(osv.osv): ('code_uniq', 'unique (code)', 'The code of the country must be unique !') ] + _defaults = { + 'address_format': "%(street)s\n%(street2)s\n%(city)s,%(state_code)s %(zip)s", + } def name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=100): diff --git a/openerp/addons/base/res/res_country_view.xml b/openerp/addons/base/res/res_country_view.xml index 36b3c6f875f..af2a72a5b40 100644 --- a/openerp/addons/base/res/res_country_view.xml +++ b/openerp/addons/base/res/res_country_view.xml @@ -26,6 +26,9 @@
+ + +
diff --git a/openerp/addons/base/res/res_partner.py b/openerp/addons/base/res/res_partner.py index 4b8f1279787..e4c0db75e8a 100644 --- a/openerp/addons/base/res/res_partner.py +++ b/openerp/addons/base/res/res_partner.py @@ -345,6 +345,26 @@ class res_partner_address(osv.osv): def get_city(self, cr, uid, id): return self.browse(cr, uid, id).city + def display_address(self, cr, uid, context, address_obj): #,field_list=[]): +# if isinstance(address_id, list): +# address_id = address_id[0] +# address_obj = self.browse(cr, uid, address_id) + + address_field = ['title','street','street2','zip','city'] + args = {} + for field in address_field : +# args[field] = field_list and field in field_list and getattr(address_obj,field) or getattr(address_obj,field) or '' + args[field] = getattr(address_obj,field) and getattr(address_obj,field) or '' + #TODO + args['state_code'] = address_obj.state_id and address_obj.state_id.code or '' + args['state_name'] = address_obj.state_id and address_obj.state_id.name or '' + args['country_code'] = address_obj.country_id and address_obj.country_id.code or '' + args['country_name'] = address_obj.country_id and address_obj.country_id.name or '' + # If no country is defined - just in case + address_format = address_obj.country_id and address_obj.country_id.address_format or \ + '%(street)s\n%(street2)s\n%(city)s,%(state_code)s %(zip)s' + return address_format % args + res_partner_address() class res_partner_category(osv.osv): From a74985d4767d073d3e33d582cf655e818701106e Mon Sep 17 00:00:00 2001 From: "Dhara (OpenERP)" <> Date: Thu, 22 Sep 2011 15:09:01 -0700 Subject: [PATCH 022/711] [NEW] changes for the address printing bzr revid: dhara_openerp-20110922220901-szgpm1lforrlgvgy --- .../account/report/account_print_invoice.rml | 6 +----- .../report/report_account_invoice_layout.rml | 6 +----- .../report/special_message_invoice.rml | 6 +----- addons/auction/report/buyer_form_report.rml | 4 +--- addons/auction/report/deposit_seller.rml | 4 +--- addons/auction/report/seller_form_report.rml | 4 +--- addons/delivery/report/shipping.rml | 12 ++---------- addons/mrp_repair/report/order.rml | 18 +++--------------- addons/purchase/report/order.rml | 12 ++---------- addons/purchase/report/request_quotation.rml | 14 +++----------- addons/report_intrastat/report/invoice.rml | 8 ++------ addons/sale/report/sale_order.rml | 17 +++-------------- .../sale_layout/report/report_sale_layout.rml | 19 ++++--------------- addons/stock/report/picking.rml | 12 ++---------- 14 files changed, 27 insertions(+), 115 deletions(-) diff --git a/addons/account/report/account_print_invoice.rml b/addons/account/report/account_print_invoice.rml index 0350fbf7379..2ca6afee023 100644 --- a/addons/account/report/account_print_invoice.rml +++ b/addons/account/report/account_print_invoice.rml @@ -162,11 +162,7 @@ [[ (o.partner_id and o.partner_id.title and o.partner_id.title.name) or '' ]] [[ (o.partner_id and o.partner_id.name) or '' ]] - [[ (o.address_invoice_id and o.address_invoice_id.street) or '' ]] - [[ (o.address_invoice_id and o.address_invoice_id.street2) or removeParentNode('para') ]] - [[ (o.address_invoice_id and o.address_invoice_id.zip) or '' ]] [[ (o.address_invoice_id and o.address_invoice_id.city) or '' ]] - [[ (o.address_invoice_id and o.address_invoice_id.state_id and o.address_invoice_id.state_id.name) or removeParentNode('para') ]] - [[ (o.address_invoice_id and o.address_invoice_id.country_id and o.address_invoice_id.country_id.name) or '' ]] + [[ o.address_invoice_id.display_address(o.address_invoice_id) ]] diff --git a/addons/account_invoice_layout/report/report_account_invoice_layout.rml b/addons/account_invoice_layout/report/report_account_invoice_layout.rml index 4e6bdfd0aa0..e47aa58b645 100644 --- a/addons/account_invoice_layout/report/report_account_invoice_layout.rml +++ b/addons/account_invoice_layout/report/report_account_invoice_layout.rml @@ -215,11 +215,7 @@ [[ (o.partner_id and o.partner_id.title and o.partner_id.title.name) or '' ]] [[ (o.partner_id and o.partner_id.name) or '' ]] - [[ (o.address_invoice_id and o.address_invoice_id.street) or '' ]] - [[ (o.address_invoice_id and o.address_invoice_id.street2) or removeParentNode('para') ]] - [[ (o.address_invoice_id and o.address_invoice_id.zip) or '' ]] [[ (o.address_invoice_id and o.address_invoice_id.city) or '' ]] - [[ (o.address_invoice_id and o.address_invoice_id.state_id and o.address_invoice_id.state_id.name) or removeParentNode('para') ]] - [[ (o.address_invoice_id and o.address_invoice_id.country_id and o.address_invoice_id.country_id.name) or '' ]] + [[ o.address_invoice_id.display_address(o.address_invoice_id) ]] diff --git a/addons/account_invoice_layout/report/special_message_invoice.rml b/addons/account_invoice_layout/report/special_message_invoice.rml index eabb8efe9c2..08c28f4a22f 100644 --- a/addons/account_invoice_layout/report/special_message_invoice.rml +++ b/addons/account_invoice_layout/report/special_message_invoice.rml @@ -219,11 +219,7 @@ [[ (o.partner_id and o.partner_id.title and o.partner_id.title.name) or '' ]] [[ (o.partner_id and o.partner_id.name) or '' ]] - [[ (o.address_invoice_id and o.address_invoice_id.street) or '' ]] - [[ (o.address_invoice_id and o.address_invoice_id.street2) or removeParentNode('para') ]] - [[ (o.address_invoice_id and o.address_invoice_id.zip) or '' ]] [[ (o.address_invoice_id and o.address_invoice_id.city) or '' ]] - [[ (o.address_invoice_id and o.address_invoice_id.state_id and o.address_invoice_id.state_id.name) or removeParentNode('para') ]] - [[ (o.address_invoice_id and o.address_invoice_id.country_id and o.address_invoice_id.country_id.name) or '' ]] + [[ o.address_invoice_id.display_address(o.address_invoice_id) ]] diff --git a/addons/auction/report/buyer_form_report.rml b/addons/auction/report/buyer_form_report.rml index c917a931fd3..60858372fcf 100644 --- a/addons/auction/report/buyer_form_report.rml +++ b/addons/auction/report/buyer_form_report.rml @@ -99,9 +99,7 @@ [[ o['partner'] and o['partner'].name or False]] - [[o['partner'] and o['partner'].address[0].street or False]] - [[o['partner'] and o['partner'].address[0].zip or False]][[o['partner'] and o['partner'].address[0].city or False]] - [[o['partner'] and o['partner'].address[0].country_id.name or False]] + [[o['partner'] and o['partner'].address[0] and o['partner'].address[0].display_address(o['partner'].address[0]) ]] diff --git a/addons/auction/report/deposit_seller.rml b/addons/auction/report/deposit_seller.rml index 3adc1152067..84979212d12 100644 --- a/addons/auction/report/deposit_seller.rml +++ b/addons/auction/report/deposit_seller.rml @@ -84,9 +84,7 @@ [[o.bord_vnd_id.partner_id.title]] [[o.bord_vnd_id.partner_id.name]] - [[o.bord_vnd_id.partner_id.address[0].street]] - [[o.bord_vnd_id.partner_id.address[0].zip]],[[o.bord_vnd_id.partner_id.address[0].city]] - [[o.bord_vnd_id.partner_id.address[0].country_id.name]] + [[o.bord_vnd_id.partner_id.address[0] and o.bord_vnd_id.partner_id.address[0].display_address(o.bord_vnd_id.partner_id.address[0]) ]] diff --git a/addons/auction/report/seller_form_report.rml b/addons/auction/report/seller_form_report.rml index c2d724eb259..da12d3f4ce4 100644 --- a/addons/auction/report/seller_form_report.rml +++ b/addons/auction/report/seller_form_report.rml @@ -74,9 +74,7 @@ [[ o['partner'] and o['partner'].name or False]] - [[o['partner'] and o['partner'].address[0].street or False]] - [[o['partner'] and o['partner'].address[0].zip or False]][[o['partner'] and o['partner'].address[0].city or False]] - [[o['partner'] and o['partner'].address[0].country_id.name or False]] + [[ o['partner'] and o['partner'].address[0] and o['partner'].address[0].display_address(o['partner'].address[0]) diff --git a/addons/delivery/report/shipping.rml b/addons/delivery/report/shipping.rml index 563c3bda826..2bebdb11279 100644 --- a/addons/delivery/report/shipping.rml +++ b/addons/delivery/report/shipping.rml @@ -131,19 +131,11 @@ Invoiced to [[ o.sale_id and o.sale_id.partner_invoice_id and o.sale_id.partner_invoice_id.name or '']] - [[ o.sale_id and o.sale_id.partner_invoice_id and o.sale_id.partner_invoice_id.street or '']] - [[ (o.sale_id and o.sale_id.partner_invoice_id and o.sale_id.partner_invoice_id.street2) or removeParentNode('para')]] - [[ o.sale_id and o.sale_id.partner_invoice_id and o.sale_id.partner_invoice_id.zip or '']] [[ o.sale_id and o.sale_id.partner_invoice_id and o.sale_id.partner_invoice_id.city or '' ]] - [[ (o.sale_id and o.sale_id.partner_invoice_id and o.sale_id.partner_invoice_id.state_id and o.sale_id.partner_invoice_id.state_id.name) or removeParentNode('para') ]] - [[ o.sale_id and o.sale_id.partner_invoice_id and o.sale_id.partner_invoice_id.country_id and o.sale_id.partner_invoice_id.country_id.name or '']] + [[ o.sale_id and o.sale_id.partner_invoice_id and o.sale_id.partner_invoice_id.display_address(o.sale_id.partner_invoice_id) ]] [[ o.address_id and o.address_id.partner_id and o.address_id.partner_id.name or '' ]] - [[ o.address_id and o.address_id.street or '']] - [[ o.address_id and o.address_id.street2 or removeParentNode('para')]] - [[ o.address_id and o.address_id.zip or '']] [[ o.address_id and o.address_id.city or '']] - [[ (o.address_id and o.address_id.state_id and o.address_id.state_id.name) or removeParentNode('para') ]] - [[ o.address_id and o.address_id.country_id and o.address_id.country_id.name or '']] + [[ o.address_id and o.address_id and o.address_id.display_address(o.address_id) ]] diff --git a/addons/mrp_repair/report/order.rml b/addons/mrp_repair/report/order.rml index b72f3d7a130..126e92d2586 100644 --- a/addons/mrp_repair/report/order.rml +++ b/addons/mrp_repair/report/order.rml @@ -189,21 +189,13 @@ Shipping address : [[ o.partner_id.name ]] - [[ o.address_id.street ]] - [[ o.address_id.street2 or removeParentNode('para') ]] - [[ o.address_id.city or '' ]] [[ o.address_id.zip or '' ]] - [[ (o.address_id.state_id and o.address_id.state_id.name) or removeParentNode('para') ]] - [[ o.address_id.country_id and o.address_id.country_id.name or '' ]] + [[ o.address_id and o.address_id.display_address(o.address_id) ]] Invoice address : [[ o.partner_id and o.partner_id.property_payment_term.name ]] - [[ o.partner_invoice_id.street ]] - [[ o.partner_invoice_id.street2 or removeParentNode('para') ]] - [[ o.partner_invoice_id.zip or '' ]] [[ o.partner_invoice_id.city or '' ]] - [[ (o.partner_invoice_id.state_id and o.partner_invoice_id.state_id.name) or removeParentNode('para') ]] - [[ o.partner_invoice_id.country_id and o.partner_invoice_id.country_id.name or '' ]] + [[ o.partner_invoice_id and o.partner_invoice_id.display_address(o.partner_invoice_id) ]] @@ -212,11 +204,7 @@ [[ o.partner_id.name or removeParentNode('para') ]] - [[ o.default_address_id and o.default_address_id.street or removeParentNode('para') ]] - [[ o.default_address_id and o.default_address_id.street2 or removeParentNode('para') ]] - [[ o.default_address_id and o.default_address_id.zip or removeParentNode('para') ]][[ o.default_address_id and o.default_address_id.city or removeParentNode('para') ]] - [[ o.default_address_id and o.default_address_id.state_id and o.default_address_id.state_id.name or removeParentNode('para') ]] - [[ o.default_address_id and o.default_address_id.country_id and o.default_address_id.country_id.name or removeParentNode('para') ]] + [[ o.default_address_id and o.default_address_id.display_address(o.default_address_id) ]] diff --git a/addons/purchase/report/order.rml b/addons/purchase/report/order.rml index 4b143d0f961..a775e8bf249 100644 --- a/addons/purchase/report/order.rml +++ b/addons/purchase/report/order.rml @@ -175,11 +175,7 @@ [[ repeatIn(o.dest_address_id and [o.dest_address_id] or [],'addr') ]] Shipping address : [[ (addr.partner_id and addr.partner_id.title and addr.partner_id.title.name) or '' ]] [[ (addr.partner_id and addr.partner_id.name) or '' ]] - [[ addr.street ]] - [[ addr.street2 or removeParentNode('para') ]] - [[ addr.zip or '' ]] [[ addr.city or '' ]] - [[ addr.state_id and addr.state_id.name or removeParentNode('para') ]] - [[ addr.country_id and addr.country_id.name or '' ]] + [[ addr.partner_id and addr.partner_id.display_address(addr.partner_id) ]] @@ -194,11 +190,7 @@ [[ (o.partner_id and o.partner_id.title and o.partner_id.title.name) or '' ]] [[ (o.partner_id and o.partner_id.name) or '' ]] - [[ (o.partner_address_id and o.partner_address_id.street ) or '']] - [[ (o.partner_address_id and o.partner_address_id.street2) or removeParentNode('para') ]] - [[ (o.partner_address_id and o.partner_address_id.zip) or '' ]] [[ (o.partner_address_id and o.partner_address_id.city) or '' ]] - [[ (o.partner_address_id and o.partner_address_id.state_id and o.partner_address_id.state_id.name) or removeParentNode('para')]] - [[ (o.partner_address_id and o.partner_address_id.country_id and o.partner_address_id.country_id.name) or '' ]] + [[ o.partner_address_id and o.partner_address_id.display_address(o.partner_address_id) ]] diff --git a/addons/purchase/report/request_quotation.rml b/addons/purchase/report/request_quotation.rml index 27e4ac39602..221fc0f2c7c 100644 --- a/addons/purchase/report/request_quotation.rml +++ b/addons/purchase/report/request_quotation.rml @@ -92,11 +92,7 @@ Expected Delivery address: [[ (order.dest_address_id and order.dest_address_id.partner_id.name) or (order.warehouse_id and order.warehouse_id.name) or '']] - [[ (order.dest_address_id and order.dest_address_id and order.dest_address_id.street) or (order.warehouse_id and order.warehouse_id.partner_address_id and order.warehouse_id.partner_address_id.street) or '']] - [[ (order.dest_address_id and order.dest_address_id and order.dest_address_id.street2) or (order.warehouse_id and order.warehouse_id.partner_address_id and order.warehouse_id.partner_address_id.street2) or removeParentNode('para') ]] - [[ (order.dest_address_id and order.dest_address_id and order.dest_address_id.zip) or (order.warehouse_id and order.warehouse_id.partner_address_id and order.warehouse_id.partner_address_id.zip) or '' ]][[ (order.dest_address_id and order.dest_address_id and order.dest_address_id.city) or (order.warehouse_id and order.warehouse_id.partner_address_id and order.warehouse_id.partner_address_id.city) or '' ]] - [[(order.warehouse_id and order.warehouse_id.partner_address_id and order.warehouse_id.partner_address_id.state_id and order.warehouse_id.partner_address_id.state_id.name) or order.partner_address_id and order.partner_address_id.state_id and order.partner_address_id.state_id.name or removeParentNode('para') ]] - [[(order.warehouse_id and order.warehouse_id.partner_address_id and order.warehouse_id.partner_address_id.country_id and order.warehouse_id.partner_address_id.country_id.name) or order.partner_address_id.country_id.name ]] + [[ order.dest_address_id and order.dest_address_id.display_address(order.dest_address_id) ]] @@ -105,11 +101,7 @@ [[ (order.partner_id and order.partner_id.title and order.partner_id.title.name) or '' ]] [[ order.partner_id.name ]] - [[ (order.partner_address_id and order.partner_address_id.street) or '']] - [[ (order.partner_address_id.street2) or removeParentNode('para') ]] - [[ (order.partner_address_id and order.partner_address_id.zip) or '' ]][[ (order.partner_address_id and order.partner_address_id.city) or '' ]] - [[ (order.partner_address_id.state_id.name) or removeParentNode('para') ]] - [[ (order.partner_address_id and order.partner_address_id.country_id and order.partner_address_id.country_id.name) or '' ]] + [[ order.partner_address_id and order.partner_address_id.display_address(order.partner_address_id) ]] @@ -180,4 +172,4 @@ [[ user.signature or '' ]] - \ No newline at end of file + diff --git a/addons/report_intrastat/report/invoice.rml b/addons/report_intrastat/report/invoice.rml index c66a39413ee..aa80e3a1cad 100644 --- a/addons/report_intrastat/report/invoice.rml +++ b/addons/report_intrastat/report/invoice.rml @@ -142,11 +142,7 @@ [[ (o.partner_id and o.partner_id.title and o.partner_id.title.name) or '' ]] [[ (o.partner_id and o.partner_id.name) or '' ]] - [[ (o.address_invoice_id and o.address_invoice_id.street) or '' ]] - [[ (o.address_invoice_id and o.address_invoice_id.street2) or removeParentNode('para') ]] - [[ (o.address_invoice_id and o.address_invoice_id.zip) or '' ]] [[ (o.address_invoice_id and o.address_invoice_id.city) or '' ]] - [[ (o.address_invoice_id and o.address_invoice_id.state_id and o.address_invoice_id.state_id.name) or removeParentNode('para') ]] - [[ (o.address_invoice_id and o.address_invoice_id.country_id and o.address_invoice_id.country_id.name) or '' ]] + [[ o.address_invoice_id and o.address_invoice_id.display_address(o.address_invoice_id) ]] @@ -402,4 +398,4 @@ - \ No newline at end of file + diff --git a/addons/sale/report/sale_order.rml b/addons/sale/report/sale_order.rml index 00ebb50472e..0d984a19e8d 100644 --- a/addons/sale/report/sale_order.rml +++ b/addons/sale/report/sale_order.rml @@ -158,21 +158,13 @@ Shipping address : [[ (o.partner_id and o.partner_id.title and o.partner_id.title.name) or '' ]] [[ (o.partner_id and o.partner_id.name) or '' ]] - [[ (o.partner_shipping_id and o.partner_shipping_id.street) or '' ]] - [[ (o.partner_shipping_id and o.partner_shipping_id.street2) or removeParentNode('para') ]] - [[ (o.partner_shipping_id and o.partner_shipping_id.zip) or '' ]] [[ (o.partner_shipping_id and o.partner_shipping_id.city) or '' ]] - [[ (o.partner_shipping_id and o.partner_shipping_id.state_id and o.partner_shipping_id.state_id.name) or removeParentNode('para') ]] - [[ (o.partner_shipping_id and o.partner_shipping_id.country_id and o.partner_shipping_id.country_id.name) or '' ]] + [[ o.partner_shipping_id and o.partner_shipping_id.display_address(o.partner_shipping_id) ]] Invoice address : [[ (o.partner_invoice_id and o.partner_invoice_id.title and o.partner_invoice_id.title.name) or '' ]] [[ (o.partner_invoice_id and o.partner_invoice_id.name) or '' ]] - [[ (o.partner_invoice_id and o.partner_invoice_id.street) or '' ]] - [[ (o.partner_invoice_id and o.partner_invoice_id.street2) or removeParentNode('para') ]] - [[ (o.partner_invoice_id and o.partner_invoice_id.zip) or '' ]] [[ (o.partner_invoice_id and o.partner_invoice_id.city) or '' ]] - [[ (o.partner_invoice_id and o.partner_invoice_id.state_id and o.partner_invoice_id.state_id.name) or removeParentNode('para') ]] - [[ (o.partner_invoice_id and o.partner_invoice_id.country_id and o.partner_invoice_id.country_id.name) or '' ]] + [[ o.partner_invoice_id and o.partner_invoice_id.display_address(o.partner_invoice_id) ]] @@ -181,10 +173,7 @@ [[ (o.partner_id and o.partner_id.title and o.partner_id.title.name) or '' ]] [[ (o.partner_id and o.partner_id.name) or '' ]] - [[ (o.partner_order_id and o.partner_order_id.street) or '' ]] - [[ (o.partner_order_id and o.partner_order_id.street2) or removeParentNode('para') ]] - [[ (o.partner_order_id and o.partner_order_id.zip) or '' ]] [[ (o.partner_order_id and o.partner_order_id.city) or '' ]] - [[ (o.partner_order_id and o.partner_order_id.state_id and o.partner_order_id.state_id.name) or removeParentNode('para')]] [[ (o.partner_order_id and o.partner_order_id.country_id and o.partner_order_id.country_id.name) or '' ]] + [[ o.partner_order_id and o.partner_order_id.display_address(o.partner_order_id) ]] diff --git a/addons/sale_layout/report/report_sale_layout.rml b/addons/sale_layout/report/report_sale_layout.rml index 941df09aeb5..15ea96f7212 100644 --- a/addons/sale_layout/report/report_sale_layout.rml +++ b/addons/sale_layout/report/report_sale_layout.rml @@ -165,21 +165,13 @@ Shipping address : [[ (o.partner_id and o.partner_id.title and o.partner_id.title.name) or '' ]] [[ (o.partner_id and o.partner_id.name) or '' ]] - [[ (o.partner_shipping_id and o.partner_shipping_id.street) or '' ]] - [[ (o.partner_shipping_id and o.partner_shipping_id.street2) or removeParentNode('para') ]] - [[ (o.partner_shipping_id and o.partner_shipping_id.zip) or '' ]] [[ (o.partner_shipping_id and o.partner_shipping_id.city) or '' ]] - [[ (o.partner_shipping_id and o.partner_shipping_id.state_id and o.partner_shipping_id.state_id.name) or removeParentNode('para') ]] - [[ (o.partner_shipping_id and o.partner_shipping_id.country_id and o.partner_shipping_id.country_id.name) or '' ]] + [[ o.partner_shipping_id and o.partner_shipping_id.display_address(o.partner_shipping_id) ]] Invoice address : [[ (o.partner_invoice_id and o.partner_invoice_id.title and o.partner_invoice_id.title.name) or '' ]] [[ (o.partner_invoice_id and o.partner_invoice_id.name) or '' ]] - [[ (o.partner_invoice_id and o.partner_invoice_id.street) or '' ]] - [[ (o.partner_invoice_id and o.partner_invoice_id.street2) or removeParentNode('para') ]] - [[ (o.partner_invoice_id and o.partner_invoice_id.zip) or '' ]] [[ (o.partner_invoice_id and o.partner_invoice_id.city) or '' ]] - [[ (o.partner_invoice_id and o.partner_invoice_id.state_id and o.partner_invoice_id.state_id.name) or removeParentNode('para') ]] - [[ (o.partner_invoice_id and o.partner_invoice_id.country_id and o.partner_invoice_id.country_id.name) or '' ]] + [[ o.partner_invoice_id and o.partner_invoice_id.display_address(o.partner_invoice_id) ]] @@ -188,10 +180,7 @@ [[ (o.partner_id and o.partner_id.title and o.partner_id.title.name) or '' ]] [[ (o.partner_id and o.partner_id.name) or '' ]] - [[ (o.partner_order_id and o.partner_order_id.street) or '' ]] - [[ (o.partner_order_id and o.partner_order_id.street2) or removeParentNode('para') ]] - [[ (o.partner_order_id and o.partner_order_id.zip) or '' ]] [[ (o.partner_order_id and o.partner_order_id.city) or '' ]] - [[ (o.partner_order_id and o.partner_order_id.state_id and o.partner_order_id.state_id.name) or removeParentNode('para')]] [[ (o.partner_order_id and o.partner_order_id.country_id and o.partner_order_id.country_id.name) or '' ]] + [[ o.partner_order_id and o.partner_order_id.display_address(o.partner_order_id) ]] @@ -398,4 +387,4 @@ - \ No newline at end of file + diff --git a/addons/stock/report/picking.rml b/addons/stock/report/picking.rml index 3d66a1b825a..2cba0b55fdd 100644 --- a/addons/stock/report/picking.rml +++ b/addons/stock/report/picking.rml @@ -163,20 +163,12 @@ Shipping Address : [[ (picking.address_id and picking.address_id.partner_id and picking.address_id.partner_id.title.name) or '' ]] [[ picking.address_id and picking.address_id.partner_id and picking.address_id.partner_id.name ]] - [[ picking.address_id and picking.address_id.street or '' ]] - [[ (picking.address_id and picking.address_id.street2) or removeParentNode('para') ]] - [[ picking.address_id and picking.address_id.zip or '' ]] [[ picking.address_id and picking.address_id.city or '' ]] - [[ (picking.address_id and picking.address_id.state_id and picking.address_id.state_id.name) or removeParentNode('para') ]] - [[ (picking.address_id and picking.address_id.country_id and picking.address_id.country_id.name) or '' ]] + [[ picking.address_id and picking.address_id.display_address(picking.address_id) ]] Contact Address : [[ picking.address_id and picking.address_id.title.name or '' ]] [[ picking.address_id and picking.address_id.name or '' ]] - [[ picking.address_id and picking.address_id.street or '' ]] - [[ (picking.address_id and picking.address_id.street2) or removeParentNode('para') ]] - [[ picking.address_id and picking.address_id.zip or '' ]] [[ picking.address_id and picking.address_id.city or '' ]] - [[ (picking.address_id and picking.address_id.state_id and picking.address_id.state_id.name) or removeParentNode('para') ]] - [[ (picking.address_id and picking.address_id.country_id and picking.address_id.country_id.name) or '' ]] + [[ picking.address_id and picking.address_id.display_address(picking.address_id) ]] From 966ed38ba4651be633d525475c4cb0d0da389953 Mon Sep 17 00:00:00 2001 From: eLBati Date: Fri, 23 Sep 2011 18:32:09 +0200 Subject: [PATCH 023/711] [FIX] various account types bzr revid: lorenzo.battistini@agilebg.com-20110923163209-73xwtba0n62d8o15 --- .../l10n_it/data/account.account.template.csv | 176 +++++++++--------- addons/l10n_it/data/account.account.type.csv | 9 +- 2 files changed, 92 insertions(+), 93 deletions(-) diff --git a/addons/l10n_it/data/account.account.template.csv b/addons/l10n_it/data/account.account.template.csv index d31d42180d0..a838a76e892 100644 --- a/addons/l10n_it/data/account.account.template.csv +++ b/addons/l10n_it/data/account.account.template.csv @@ -2,34 +2,34 @@ "0","0","Azienda",,"account_type_view","view","FALSE" "1","1","ATTIVO ","0","account_type_view","view","TRUE" "11","11","IMMOBILIZZAZIONI IMMATERIALI ","1","account_type_view","view","TRUE" -"1101","1101","costi di impianto ","11","account_type_view","other","TRUE" -"1106","1106","software ","11","account_type_view","other","TRUE" -"1108","1108","avviamento ","11","account_type_view","other","TRUE" -"1111","1111","fondo ammortamento costi di impianto ","11","account_type_view","other","TRUE" -"1116","1116","fondo ammortamento software ","11","account_type_view","other","TRUE" -"1118","1118","fondo ammortamento avviamento ","11","account_type_view","other","TRUE" +"1101","1101","costi di impianto ","11","account_type_asset","other","TRUE" +"1106","1106","software ","11","account_type_asset","other","TRUE" +"1108","1108","avviamento ","11","account_type_asset","other","TRUE" +"1111","1111","fondo ammortamento costi di impianto ","11","account_type_asset","other","TRUE" +"1116","1116","fondo ammortamento software ","11","account_type_asset","other","TRUE" +"1118","1118","fondo ammortamento avviamento ","11","account_type_asset","other","TRUE" "12","12","IMMOBILIZZAZIONI MATERIALI ","1","account_type_view","view","TRUE" -"1201","1201","fabbricati ","12","account_type_view","other","TRUE" -"1202","1202","impianti e macchinari ","12","account_type_view","other","TRUE" -"1204","1204","attrezzature commerciali ","12","account_type_view","other","TRUE" -"1205","1205","macchine d'ufficio ","12","account_type_view","other","TRUE" -"1206","1206","arredamento ","12","account_type_view","other","TRUE" -"1207","1207","automezzi ","12","account_type_view","other","TRUE" -"1208","1208","imballaggi durevoli ","12","account_type_view","other","TRUE" -"1211","1211","fondo ammortamento fabbricati ","12","account_type_view","other","TRUE" -"1212","1212","fondo ammortamento impianti e macchinari ","12","account_type_view","other","TRUE" -"1214","1214","fondo ammortamento attrezzature commerciali ","12","account_type_view","other","TRUE" -"1215","1215","fondo ammortamento macchine d'ufficio ","12","account_type_view","other","TRUE" -"1216","1216","fondo ammortamento arredamento ","12","account_type_view","other","TRUE" -"1217","1217","fondo ammortamento automezzi ","12","account_type_view","other","TRUE" -"1218","1218","fondo ammortamento imballaggi durevoli ","12","account_type_view","other","TRUE" -"1220","1220","fornitori immobilizzazioni c/acconti ","12","account_type_view","other","TRUE" +"1201","1201","fabbricati ","12","account_type_asset","other","TRUE" +"1202","1202","impianti e macchinari ","12","account_type_asset","other","TRUE" +"1204","1204","attrezzature commerciali ","12","account_type_asset","other","TRUE" +"1205","1205","macchine d'ufficio ","12","account_type_asset","other","TRUE" +"1206","1206","arredamento ","12","account_type_asset","other","TRUE" +"1207","1207","automezzi ","12","account_type_asset","other","TRUE" +"1208","1208","imballaggi durevoli ","12","account_type_asset","other","TRUE" +"1211","1211","fondo ammortamento fabbricati ","12","account_type_asset","other","TRUE" +"1212","1212","fondo ammortamento impianti e macchinari ","12","account_type_asset","other","TRUE" +"1214","1214","fondo ammortamento attrezzature commerciali ","12","account_type_asset","other","TRUE" +"1215","1215","fondo ammortamento macchine d'ufficio ","12","account_type_asset","other","TRUE" +"1216","1216","fondo ammortamento arredamento ","12","account_type_asset","other","TRUE" +"1217","1217","fondo ammortamento automezzi ","12","account_type_asset","other","TRUE" +"1218","1218","fondo ammortamento imballaggi durevoli ","12","account_type_asset","other","TRUE" +"1220","1220","fornitori immobilizzazioni c/acconti ","12","account_type_asset","other","TRUE" "13","13","IMMOBILIZZAZIONI FINANZIARIE ","1","account_type_view","view","TRUE" -"1301","1301","mutui attivi ","13","account_type_view","other","TRUE" +"1301","1301","mutui attivi ","13","account_type_asset","other","TRUE" "14","14","RIMANENZE ","1","account_type_view","view","TRUE" -"1401","1401","materie di consumo ","14","account_type_view","other","TRUE" -"1404","1404","merci ","14","account_type_view","other","TRUE" -"1410","1410","fornitori c/acconti ","14","account_type_view","other","TRUE" +"1401","1401","materie di consumo ","14","account_type_asset","other","TRUE" +"1404","1404","merci ","14","account_type_asset","other","TRUE" +"1410","1410","fornitori c/acconti ","14","account_type_asset","other","TRUE" "15","15","CREDITI COMMERCIALI ","1","account_type_view","view","TRUE" "1501","1501","crediti v/clienti ","15","account_type_receivable","receivable","TRUE" "1502","1502","crediti commerciali diversi ","15","account_type_receivable","other","TRUE" @@ -44,15 +44,15 @@ "1540","1540","fondo svalutazione crediti ","15","account_type_receivable","other","TRUE" "1541","1541","fondo rischi su crediti ","15","account_type_receivable","other","TRUE" "16","16","CREDITI DIVERSI ","1","account_type_view","view","TRUE" -"1601","1601","IVA n/credito ","16","account_type_receivable","other","TRUE" -"1602","1602","IVA c/acconto ","16","account_type_receivable","other","TRUE" -"1605","1605","crediti per IVA ","16","account_type_receivable","other","TRUE" -"1607","1607","imposte c/acconto ","16","account_type_receivable","other","TRUE" -"1608","1608","crediti per imposte ","16","account_type_receivable","other","TRUE" -"1609","1609","crediti per ritenute subite ","16","account_type_receivable","other","TRUE" -"1610","1610","crediti per cauzioni ","16","account_type_receivable","other","TRUE" -"1620","1620","personale c/acconti ","16","account_type_receivable","other","TRUE" -"1630","1630","crediti v/istituti previdenziali ","16","account_type_receivable","other","TRUE" +"1601","1601","IVA n/credito ","16","account_type_tax","other","TRUE" +"1602","1602","IVA c/acconto ","16","account_type_tax","other","TRUE" +"1605","1605","crediti per IVA ","16","account_type_tax","other","TRUE" +"1607","1607","imposte c/acconto ","16","account_type_tax","other","TRUE" +"1608","1608","crediti per imposte ","16","account_type_tax","other","TRUE" +"1609","1609","crediti per ritenute subite ","16","account_type_asset","other","TRUE" +"1610","1610","crediti per cauzioni ","16","account_type_asset","other","TRUE" +"1620","1620","personale c/acconti ","16","account_type_asset","other","TRUE" +"1630","1630","crediti v/istituti previdenziali ","16","account_type_asset","other","TRUE" "1640","1640","debitori diversi ","16","account_type_receivable","receivable","TRUE" "18","18","DISPONIBILITÀ LIQUIDE ","1","account_type_view","view","TRUE" "1801","1801","banche c/c ","18","account_type_bank","liquidity","TRUE" @@ -61,73 +61,73 @@ "1821","1821","assegni ","18","account_type_cash","liquidity","TRUE" "1822","1822","valori bollati ","18","account_type_cash","liquidity","TRUE" "19","19","RATEI E RISCONTI ATTIVI ","1","account_type_view","view","TRUE" -"1901","1901","ratei attivi ","19","account_type_view","other","TRUE" -"1902","1902","risconti attivi ","19","account_type_view","other","TRUE" +"1901","1901","ratei attivi ","19","account_type_asset","other","TRUE" +"1902","1902","risconti attivi ","19","account_type_asset","other","TRUE" "2","2","PASSIVO ","0","account_type_view","view","TRUE" "20","20","PATRIMONIO NETTO ","2","account_type_view","view","TRUE" -"2101","2101","patrimonio netto ","20","account_type_view","other","TRUE" -"2102","2102","utile d'esercizio ","20","account_type_view","receivable","TRUE" -"2103","2103","perdita d'esercizio ","20","account_type_view","payable","TRUE" -"2104","2104","prelevamenti extra gestione ","20","account_type_view","other","TRUE" -"2105","2105","titolare c/ritenute subite ","20","account_type_view","other","TRUE" +"2101","2101","patrimonio netto ","20","account_type_asset","other","TRUE" +"2102","2102","utile d'esercizio ","20","account_type_asset","other","TRUE" +"2103","2103","perdita d'esercizio ","20","account_type_asset","other","TRUE" +"2104","2104","prelevamenti extra gestione ","20","account_type_asset","other","TRUE" +"2105","2105","titolare c/ritenute subite ","20","account_type_asset","other","TRUE" "22","22","FONDI PER RISCHI E ONERI ","2","account_type_view","view","TRUE" -"2201","2201","fondo per imposte ","22","account_type_view","other","TRUE" -"2204","2204","fondo responsabilità civile ","22","account_type_view","other","TRUE" -"2205","2205","fondo spese future ","22","account_type_view","other","TRUE" -"2211","2211","fondo manutenzioni programmate ","22","account_type_view","other","TRUE" +"2201","2201","fondo per imposte ","22","account_type_asset","other","TRUE" +"2204","2204","fondo responsabilità civile ","22","account_type_asset","other","TRUE" +"2205","2205","fondo spese future ","22","account_type_asset","other","TRUE" +"2211","2211","fondo manutenzioni programmate ","22","account_type_asset","other","TRUE" "23","23","TRATTAMENTO FINE RAPPORTO DI LAVORO ","2","account_type_view","view","TRUE" -"2301","2301","debiti per TFRL ","23","account_type_view","other","TRUE" +"2301","2301","debiti per TFRL ","23","account_type_asset","other","TRUE" "24","24","DEBITI FINANZIARI ","2","account_type_view","view","TRUE" -"2410","2410","mutui passivi ","24","account_type_payable","other","TRUE" -"2411","2411","banche c/sovvenzioni ","24","account_type_payable","other","TRUE" -"2420","2420","banche c/c passivi ","24","account_type_payable","other","TRUE" -"2421","2421","banche c/RIBA all'incasso ","24","account_type_payable","other","TRUE" -"2422","2422","banche c/cambiali all'incasso ","24","account_type_payable","other","TRUE" -"2423","2423","banche c/anticipi su fatture ","24","account_type_payable","other","TRUE" -"2440","2440","debiti v/altri finanziatori ","24","account_type_payable","other","TRUE" +"2410","2410","mutui passivi ","24","account_type_asset","other","TRUE" +"2411","2411","banche c/sovvenzioni ","24","account_type_asset","other","TRUE" +"2420","2420","banche c/c passivi ","24","account_type_asset","other","TRUE" +"2421","2421","banche c/RIBA all'incasso ","24","account_type_asset","other","TRUE" +"2422","2422","banche c/cambiali all'incasso ","24","account_type_asset","other","TRUE" +"2423","2423","banche c/anticipi su fatture ","24","account_type_asset","other","TRUE" +"2440","2440","debiti v/altri finanziatori ","24","account_type_asset","other","TRUE" "25","25","DEBITI COMMERCIALI ","2","account_type_view","view","TRUE" "2501","2501","debiti v/fornitori ","25","account_type_payable","payable","TRUE" -"2503","2503","cambiali passive ","25","account_type_payable","other","TRUE" -"2520","2520","fatture da ricevere ","25","account_type_payable","other","TRUE" -"2521","2521","debiti da liquidare ","25","account_type_payable","other","TRUE" +"2503","2503","cambiali passive ","25","account_type_asset","other","TRUE" +"2520","2520","fatture da ricevere ","25","account_type_asset","other","TRUE" +"2521","2521","debiti da liquidare ","25","account_type_asset","other","TRUE" "2530","2530","clienti c/acconti ","25","account_type_payable","payable","TRUE" "26","26","DEBITI DIVERSI ","2","account_type_view","view","TRUE" -"2601","2601","IVA n/debito ","26","account_type_payable","other","TRUE" -"2602","2602","debiti per ritenute da versare ","26","account_type_payable","other","TRUE" -"2605","2605","erario c/IVA ","26","account_type_payable","payable","TRUE" -"2606","2606","debiti per imposte ","26","account_type_payable","other","TRUE" -"2619","2619","debiti per cauzioni ","26","account_type_payable","other","TRUE" -"2620","2620","personale c/retribuzioni ","26","account_type_payable","other","TRUE" -"2621","2621","personale c/liquidazioni ","26","account_type_payable","other","TRUE" -"2622","2622","clienti c/cessione ","26","account_type_payable","other","TRUE" -"2630","2630","debiti v/istituti previdenziali ","26","account_type_payable","other","TRUE" +"2601","2601","IVA n/debito ","26","account_type_tax","other","TRUE" +"2602","2602","debiti per ritenute da versare ","26","account_type_tax","other","TRUE" +"2605","2605","erario c/IVA ","26","account_type_tax","payable","TRUE" +"2606","2606","debiti per imposte ","26","account_type_tax","other","TRUE" +"2619","2619","debiti per cauzioni ","26","account_type_asset","other","TRUE" +"2620","2620","personale c/retribuzioni ","26","account_type_asset","other","TRUE" +"2621","2621","personale c/liquidazioni ","26","account_type_asset","other","TRUE" +"2622","2622","clienti c/cessione ","26","account_type_asset","other","TRUE" +"2630","2630","debiti v/istituti previdenziali ","26","account_type_asset","other","TRUE" "2640","2640","creditori diversi ","26","account_type_payable","payable","TRUE" "27","27","RATEI E RISCONTI PASSIVI ","2","account_type_view","view","TRUE" -"2701","2701","ratei passivi ","27","account_type_view","other","TRUE" -"2702","2702","risconti passivi ","27","account_type_view","other","TRUE" +"2701","2701","ratei passivi ","27","account_type_asset","other","TRUE" +"2702","2702","risconti passivi ","27","account_type_asset","other","TRUE" "28","28","CONTI TRANSITORI E DIVERSI ","2","account_type_view","view","TRUE" -"2801","2801","bilancio di apertura ","28","account_type_view","other","TRUE" -"2802","2802","bilancio di chiusura ","28","account_type_view","other","TRUE" -"2810","2810","IVA c/liquidazioni ","28","account_type_view","other","TRUE" -"2811","2811","istituti previdenziali ","28","account_type_view","other","TRUE" -"2820","2820","banca ... c/c ","28","account_type_view","other","TRUE" -"2821","2821","banca ... c/c ","28","account_type_view","other","TRUE" -"2822","2822","banca ... c/c ","28","account_type_view","other","TRUE" +"2801","2801","bilancio di apertura ","28","account_type_asset","other","TRUE" +"2802","2802","bilancio di chiusura ","28","account_type_asset","other","TRUE" +"2810","2810","IVA c/liquidazioni ","28","account_type_asset","other","TRUE" +"2811","2811","istituti previdenziali ","28","account_type_asset","other","TRUE" +"2820","2820","banca ... c/c ","28","account_type_asset","other","TRUE" +"2821","2821","banca ... c/c ","28","account_type_asset","other","TRUE" +"2822","2822","banca ... c/c ","28","account_type_asset","other","TRUE" "29","29","CONTI DEI SISTEMI SUPPLEMENTARI ","2","account_type_view","view","TRUE" -"2901","2901","beni di terzi ","29","account_type_view","other","TRUE" -"2902","2902","depositanti beni ","29","account_type_view","other","TRUE" -"2911","2911","merci da ricevere ","29","account_type_view","other","TRUE" -"2912","2912","fornitori c/impegni ","29","account_type_view","other","TRUE" -"2913","2913","impegni per beni in leasing ","29","account_type_view","other","TRUE" -"2914","2914","creditori c/leasing ","29","account_type_view","other","TRUE" -"2916","2916","clienti c/impegni ","29","account_type_view","other","TRUE" -"2917","2917","merci da consegnare ","29","account_type_view","other","TRUE" -"2921","2921","rischi per effetti scontati ","29","account_type_view","other","TRUE" -"2922","2922","banche c/effetti scontati ","29","account_type_view","other","TRUE" -"2926","2926","rischi per fideiussioni ","29","account_type_view","other","TRUE" -"2927","2927","creditori per fideiussioni ","29","account_type_view","other","TRUE" -"2931","2931","rischi per avalli ","29","account_type_view","other","TRUE" -"2932","2932","creditori per avalli ","29","account_type_view","other","TRUE" +"2901","2901","beni di terzi ","29","account_type_asset","other","TRUE" +"2902","2902","depositanti beni ","29","account_type_asset","other","TRUE" +"2911","2911","merci da ricevere ","29","account_type_asset","other","TRUE" +"2912","2912","fornitori c/impegni ","29","account_type_asset","other","TRUE" +"2913","2913","impegni per beni in leasing ","29","account_type_asset","other","TRUE" +"2914","2914","creditori c/leasing ","29","account_type_asset","other","TRUE" +"2916","2916","clienti c/impegni ","29","account_type_asset","other","TRUE" +"2917","2917","merci da consegnare ","29","account_type_asset","other","TRUE" +"2921","2921","rischi per effetti scontati ","29","account_type_asset","other","TRUE" +"2922","2922","banche c/effetti scontati ","29","account_type_asset","other","TRUE" +"2926","2926","rischi per fideiussioni ","29","account_type_asset","other","TRUE" +"2927","2927","creditori per fideiussioni ","29","account_type_asset","other","TRUE" +"2931","2931","rischi per avalli ","29","account_type_asset","other","TRUE" +"2932","2932","creditori per avalli ","29","account_type_asset","other","TRUE" "3","3","VALORE DELLA PRODUZIONE ","0","account_type_view","view","TRUE" "31","31","VENDITE E PRESTAZIONI ","3","account_type_view","view","TRUE" "3101","3101","merci c/vendite ","31","account_type_income","other","TRUE" diff --git a/addons/l10n_it/data/account.account.type.csv b/addons/l10n_it/data/account.account.type.csv index 273ff71eb05..d6827ca151c 100644 --- a/addons/l10n_it/data/account.account.type.csv +++ b/addons/l10n_it/data/account.account.type.csv @@ -1,11 +1,10 @@ "id","code","name","close_method","report_type" -"account_type_receivable","receivable","Debiti","unreconciled","liability" -"account_type_payable","payable","Crediti","unreconciled","asset" +"account_type_receivable","receivable","Crediti","unreconciled","asset" +"account_type_payable","payable","Debiti","unreconciled","liability" "account_type_view","view","Gerarchia","none", "account_type_income","income","Entrate","none","income" "account_type_expense","expense","Uscite","none","expense" -"account_type_tax","tax","Tasse","none", +"account_type_tax","tax","Tasse","balance", "account_type_cash","cash","Liquidità","balance","asset" -"account_type_asset","asset","Beni","none","asset" +"account_type_asset","asset","Beni","balance","asset" "account_type_bank","bank","Banca","balance","asset" -"account_type_equity","equity","Capitale","none","asset" From a490d148a47c8a3a2a4e7d123b57a7d6fddf85bf Mon Sep 17 00:00:00 2001 From: eLBati Date: Sun, 25 Sep 2011 11:15:08 +0200 Subject: [PATCH 024/711] [FIX] P & L accounts bzr revid: lorenzo.battistini@agilebg.com-20110925091508-tyg6fak0oiik5y2r --- .../l10n_it/data/account.account.template.csv | 82 +++++++++---------- addons/l10n_it/data/account.account.type.csv | 1 + 2 files changed, 42 insertions(+), 41 deletions(-) diff --git a/addons/l10n_it/data/account.account.template.csv b/addons/l10n_it/data/account.account.template.csv index a838a76e892..4fe01b77561 100644 --- a/addons/l10n_it/data/account.account.template.csv +++ b/addons/l10n_it/data/account.account.template.csv @@ -177,58 +177,58 @@ "4403","4403","TFRL ","44","account_type_expense","other","TRUE" "4404","4404","altri costi per il personale ","44","account_type_expense","other","TRUE" "45","45","AMMORTAMENTI IMMOBILIZZAZIONI IMMATERIALI ","4","account_type_view","view","TRUE" -"4501","4501","ammortamento costi di impianto ","45","account_type_view","other","TRUE" -"4506","4506","ammortamento software ","45","account_type_view","other","TRUE" -"4508","4508","ammortamento avviamento ","45","account_type_view","other","TRUE" +"4501","4501","ammortamento costi di impianto ","45","account_type_p_l","other","TRUE" +"4506","4506","ammortamento software ","45","account_type_p_l","other","TRUE" +"4508","4508","ammortamento avviamento ","45","account_type_p_l","other","TRUE" "46","46","AMMORTAMENTI IMMOBILIZZAZIONI MATERIALI ","4","account_type_view","view","TRUE" -"4601","4601","ammortamento fabbricati ","46","account_type_view","other","TRUE" -"4602","4602","ammortamento impianti e macchinari ","46","account_type_view","other","TRUE" -"4604","4604","ammortamento attrezzature commerciali ","46","account_type_view","other","TRUE" -"4605","4605","ammortamento macchine d'ufficio ","46","account_type_view","other","TRUE" -"4606","4606","ammortamento arredamento ","46","account_type_view","other","TRUE" -"4607","4607","ammortamento automezzi ","46","account_type_view","other","TRUE" -"4608","4608","ammortamento imballaggi durevoli ","46","account_type_view","other","TRUE" +"4601","4601","ammortamento fabbricati ","46","account_type_p_l","other","TRUE" +"4602","4602","ammortamento impianti e macchinari ","46","account_type_p_l","other","TRUE" +"4604","4604","ammortamento attrezzature commerciali ","46","account_type_p_l","other","TRUE" +"4605","4605","ammortamento macchine d'ufficio ","46","account_type_p_l","other","TRUE" +"4606","4606","ammortamento arredamento ","46","account_type_p_l","other","TRUE" +"4607","4607","ammortamento automezzi ","46","account_type_p_l","other","TRUE" +"4608","4608","ammortamento imballaggi durevoli ","46","account_type_p_l","other","TRUE" "47","47","SVALUTAZIONI ","4","account_type_view","view","TRUE" -"4701","4701","svalutazioni immobilizzazioni immateriali ","47","account_type_view","other","TRUE" -"4702","4702","svalutazioni immobilizzazioni materiali ","47","account_type_view","other","TRUE" -"4706","4706","svalutazione crediti ","47","account_type_view","other","TRUE" +"4701","4701","svalutazioni immobilizzazioni immateriali ","47","account_type_p_l","other","TRUE" +"4702","4702","svalutazioni immobilizzazioni materiali ","47","account_type_p_l","other","TRUE" +"4706","4706","svalutazione crediti ","47","account_type_p_l","other","TRUE" "48","48","ACCANTONAMENTI ","4","account_type_view","view","TRUE" "481","481","ACCANTONAMENTI PER RISCHI ","48","account_type_view","view","TRUE" -"4814","4814","accantonamento per responsabilità civile ","481","account_type_view","other","TRUE" +"4814","4814","accantonamento per responsabilità civile ","481","account_type_p_l","other","TRUE" "482","482","ALTRI ACCANTONAMENTI ","48","account_type_view","view","TRUE" -"4821","4821","accantonamento per spese future ","482","account_type_view","other","TRUE" -"4823","4823","accantonamento per manutenzioni programmate ","482","account_type_view","other","TRUE" +"4821","4821","accantonamento per spese future ","482","account_type_p_l","other","TRUE" +"4823","4823","accantonamento per manutenzioni programmate ","482","account_type_p_l","other","TRUE" "49","49","ONERI DIVERSI ","4","account_type_view","view","TRUE" -"4901","4901","oneri fiscali diversi ","49","account_type_view","other","TRUE" -"4903","4903","oneri vari ","49","account_type_view","other","TRUE" -"4905","4905","perdite su crediti ","49","account_type_view","other","TRUE" -"4910","4910","arrotondamenti passivi ","49","account_type_view","other","TRUE" -"4920","4920","minusvalenze ordinarie diverse ","49","account_type_view","other","TRUE" -"4930","4930","sopravvenienze passive ordinarie diverse ","49","account_type_view","other","TRUE" -"4940","4940","insussistenze passive ordinarie diverse ","49","account_type_view","other","TRUE" +"4901","4901","oneri fiscali diversi ","49","account_type_p_l","other","TRUE" +"4903","4903","oneri vari ","49","account_type_p_l","other","TRUE" +"4905","4905","perdite su crediti ","49","account_type_p_l","other","TRUE" +"4910","4910","arrotondamenti passivi ","49","account_type_p_l","other","TRUE" +"4920","4920","minusvalenze ordinarie diverse ","49","account_type_p_l","other","TRUE" +"4930","4930","sopravvenienze passive ordinarie diverse ","49","account_type_p_l","other","TRUE" +"4940","4940","insussistenze passive ordinarie diverse ","49","account_type_p_l","other","TRUE" "5","5","PROVENTI E ONERI FINANZIARI ","0","account_type_view","view","TRUE" "51","51","PROVENTI FINANZIARI ","5","account_type_view","view","TRUE" -"5110","5110","interessi attivi v/clienti ","51","account_type_view","other","TRUE" -"5115","5115","interessi attivi bancari ","51","account_type_view","other","TRUE" -"5116","5116","interessi attivi postali ","51","account_type_view","other","TRUE" -"5140","5140","proventi finanziari diversi ","51","account_type_view","other","TRUE" +"5110","5110","interessi attivi v/clienti ","51","account_type_p_l","other","TRUE" +"5115","5115","interessi attivi bancari ","51","account_type_p_l","other","TRUE" +"5116","5116","interessi attivi postali ","51","account_type_p_l","other","TRUE" +"5140","5140","proventi finanziari diversi ","51","account_type_p_l","other","TRUE" "52","52","ONERI FINANZIARI ","5","account_type_view","view","TRUE" -"5201","5201","interessi passivi v/fornitori ","52","account_type_view","other","TRUE" -"5202","5202","interessi passivi bancari ","52","account_type_view","other","TRUE" -"5203","5203","sconti passivi bancari ","52","account_type_view","other","TRUE" -"5210","5210","interessi passivi su mutui ","52","account_type_view","other","TRUE" -"5240","5240","oneri finanziari diversi ","52","account_type_view","other","TRUE" +"5201","5201","interessi passivi v/fornitori ","52","account_type_p_l","other","TRUE" +"5202","5202","interessi passivi bancari ","52","account_type_p_l","other","TRUE" +"5203","5203","sconti passivi bancari ","52","account_type_p_l","other","TRUE" +"5210","5210","interessi passivi su mutui ","52","account_type_p_l","other","TRUE" +"5240","5240","oneri finanziari diversi ","52","account_type_p_l","other","TRUE" "7","7","PROVENTI E ONERI STRAORDINARI ","0","account_type_view","view","TRUE" "71","71","PROVENTI STRAORDINARI ","7","account_type_view","view","TRUE" -"7101","7101","plusvalenze straordinarie ","71","account_type_view","other","TRUE" -"7102","7102","sopravvenienze attive straordinarie ","71","account_type_view","other","TRUE" -"7103","7103","insussistenze attive straordinarie ","71","account_type_view","other","TRUE" +"7101","7101","plusvalenze straordinarie ","71","account_type_p_l","other","TRUE" +"7102","7102","sopravvenienze attive straordinarie ","71","account_type_p_l","other","TRUE" +"7103","7103","insussistenze attive straordinarie ","71","account_type_p_l","other","TRUE" "72","72","ONERI STRAORDINARI ","7","account_type_view","view","TRUE" -"7201","7201","minusvalenze straordinarie ","72","account_type_view","other","TRUE" -"7202","7202","sopravvenienze passive straordinarie ","72","account_type_view","other","TRUE" -"7203","7203","insussistenze passive straordinarie ","72","account_type_view","other","TRUE" -"7204","7204","imposte esercizi precedenti ","72","account_type_view","other","TRUE" +"7201","7201","minusvalenze straordinarie ","72","account_type_p_l","other","TRUE" +"7202","7202","sopravvenienze passive straordinarie ","72","account_type_p_l","other","TRUE" +"7203","7203","insussistenze passive straordinarie ","72","account_type_p_l","other","TRUE" +"7204","7204","imposte esercizi precedenti ","72","account_type_p_l","other","TRUE" "81","81","IMPOSTE DELL'ESERCIZIO ","7","account_type_view","view","TRUE" -"8101","8101","imposte dell'esercizio ","81","account_type_view","other","TRUE" +"8101","8101","imposte dell'esercizio ","81","account_type_p_l","other","TRUE" "91","91","CONTI DI RISULTATO ","7","account_type_view","view","TRUE" -"9101","9101","conto di risultato economico ","91","account_type_view","other","TRUE" +"9101","9101","conto di risultato economico ","91","account_type_p_l","other","TRUE" diff --git a/addons/l10n_it/data/account.account.type.csv b/addons/l10n_it/data/account.account.type.csv index d6827ca151c..36eeebbbe89 100644 --- a/addons/l10n_it/data/account.account.type.csv +++ b/addons/l10n_it/data/account.account.type.csv @@ -8,3 +8,4 @@ "account_type_cash","cash","Liquidità","balance","asset" "account_type_asset","asset","Beni","balance","asset" "account_type_bank","bank","Banca","balance","asset" +"account_type_p_l","p_l","Conto Economico","none", From c9ca63f8bb7936ba02106a79b75b17e513a9142a Mon Sep 17 00:00:00 2001 From: eLBati Date: Fri, 30 Sep 2011 14:10:30 +0200 Subject: [PATCH 025/711] [FIX] conti di fine esercizio bzr revid: lorenzo.battistini@agilebg.com-20110930121030-ru3n6v06npmjt69v --- addons/l10n_it/data/account.account.template.csv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/l10n_it/data/account.account.template.csv b/addons/l10n_it/data/account.account.template.csv index 4fe01b77561..e1450bcea70 100644 --- a/addons/l10n_it/data/account.account.template.csv +++ b/addons/l10n_it/data/account.account.template.csv @@ -228,7 +228,7 @@ "7202","7202","sopravvenienze passive straordinarie ","72","account_type_p_l","other","TRUE" "7203","7203","insussistenze passive straordinarie ","72","account_type_p_l","other","TRUE" "7204","7204","imposte esercizi precedenti ","72","account_type_p_l","other","TRUE" -"81","81","IMPOSTE DELL'ESERCIZIO ","7","account_type_view","view","TRUE" +"81","81","IMPOSTE DELL'ESERCIZIO ","0","account_type_view","view","TRUE" "8101","8101","imposte dell'esercizio ","81","account_type_p_l","other","TRUE" -"91","91","CONTI DI RISULTATO ","7","account_type_view","view","TRUE" +"91","91","CONTI DI RISULTATO ","0","account_type_view","view","TRUE" "9101","9101","conto di risultato economico ","91","account_type_p_l","other","TRUE" From a403d23b7083486949922a4098429799e27c0d35 Mon Sep 17 00:00:00 2001 From: eLBati Date: Sun, 2 Oct 2011 15:45:53 +0200 Subject: [PATCH 026/711] [IMP] stato patrimoniale per la chiusura dei conti bzr revid: lorenzo.battistini@agilebg.com-20111002134553-vjk7xdk2jbebwqq2 --- addons/l10n_it/data/account.account.template.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/l10n_it/data/account.account.template.csv b/addons/l10n_it/data/account.account.template.csv index e1450bcea70..8d2b5a41769 100644 --- a/addons/l10n_it/data/account.account.template.csv +++ b/addons/l10n_it/data/account.account.template.csv @@ -232,3 +232,4 @@ "8101","8101","imposte dell'esercizio ","81","account_type_p_l","other","TRUE" "91","91","CONTI DI RISULTATO ","0","account_type_view","view","TRUE" "9101","9101","conto di risultato economico ","91","account_type_p_l","other","TRUE" +"9102","9102","stato patrimoniale","91","account_type_p_l","other","TRUE" From ee1df93906970eb03426a90cd7eaaab01c3cf726 Mon Sep 17 00:00:00 2001 From: eLBati Date: Tue, 4 Oct 2011 07:45:11 +0200 Subject: [PATCH 027/711] [FIX] account codes bzr revid: lorenzo.battistini@agilebg.com-20111004054511-4gz8em15cj4piiiq --- addons/l10n_it/data/account.account.template.csv | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/l10n_it/data/account.account.template.csv b/addons/l10n_it/data/account.account.template.csv index 8d2b5a41769..bc05351a898 100644 --- a/addons/l10n_it/data/account.account.template.csv +++ b/addons/l10n_it/data/account.account.template.csv @@ -228,8 +228,8 @@ "7202","7202","sopravvenienze passive straordinarie ","72","account_type_p_l","other","TRUE" "7203","7203","insussistenze passive straordinarie ","72","account_type_p_l","other","TRUE" "7204","7204","imposte esercizi precedenti ","72","account_type_p_l","other","TRUE" -"81","81","IMPOSTE DELL'ESERCIZIO ","0","account_type_view","view","TRUE" -"8101","8101","imposte dell'esercizio ","81","account_type_p_l","other","TRUE" -"91","91","CONTI DI RISULTATO ","0","account_type_view","view","TRUE" -"9101","9101","conto di risultato economico ","91","account_type_p_l","other","TRUE" -"9102","9102","stato patrimoniale","91","account_type_p_l","other","TRUE" +"8","8","IMPOSTE DELL'ESERCIZIO ","0","account_type_view","view","TRUE" +"8101","8101","imposte dell'esercizio ","8","account_type_p_l","other","TRUE" +"9","9","CONTI DI RISULTATO ","0","account_type_view","view","TRUE" +"9101","9101","conto di risultato economico ","9","account_type_p_l","other","TRUE" +"9102","9102","stato patrimoniale","9","account_type_p_l","other","TRUE" From 3feaa84beb11eb2b887fddcce6b82ec9df79aafe Mon Sep 17 00:00:00 2001 From: "Kunal Chavda (OpenERP)" Date: Tue, 4 Oct 2011 11:39:03 +0530 Subject: [PATCH 028/711] [IMP]edit node code at initial level modify by using widget. bzr revid: kch@tinyerp.com-20111004060903-0se42632vpjlk24u --- addons/web/static/src/js/view_editor.js | 51 +++++++++++++++++++------ addons/web/static/src/xml/base.xml | 7 ---- 2 files changed, 40 insertions(+), 18 deletions(-) diff --git a/addons/web/static/src/js/view_editor.js b/addons/web/static/src/js/view_editor.js index d0cc7d53eb3..7b68cdc3372 100644 --- a/addons/web/static/src/js/view_editor.js +++ b/addons/web/static/src/js/view_editor.js @@ -1,7 +1,6 @@ openerp.web.view_editor = function(openerp) { var _PROPERTIES = { - 'field' : ['name', 'string', 'required', 'readonly', 'select', 'domain', 'context', 'nolabel', 'completion', - 'colspan', 'widget', 'eval', 'ref', 'on_change', 'attrs', 'groups'], + 'field' : ['required', 'readonly'], 'form' : ['string', 'col', 'link'], 'notebook' : ['colspan', 'position', 'groups'], 'page' : ['string', 'states', 'attrs', 'groups'], @@ -31,6 +30,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ this.dataset = dataset; this.model = dataset.model; this.xml_id = 0; + this.property = openerp.web.ViewEditor.property_widget; }, start: function() { @@ -320,6 +320,17 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ case "side-remove": break; case "side-edit": + var tag, fld_name; + var tr = $(this).closest("tr[id^='viewedit-']").find('a').text(); + var tag_fld = tr.split(" "); + if (tag_fld.length > 3){ + tag = tag_fld[1].replace(/[^a-zA-Z 0-9]+/g,''); + fld_name = tag_fld[2].split("=")[1].replace(/[^a-zA-Z _ 0-9]+/g,''); + }else{ + tag = tag_fld[1].replace(/[^a-zA-Z 0-9]+/g,''); + } + var properties = _PROPERTIES[tag]; + self.on_edit_node(this,properties,fld_name); break; case "side-up": while(1){ @@ -406,7 +417,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ tr.show(); }); }, - on_edit_node:function(self,property,fld_name){ + on_edit_node:function(self,properties,fld_name){ var self = this; var result; this.dialog = new openerp.web.Dialog(this,{ @@ -427,17 +438,35 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ dataset.read_slice([],{domain : [['model','=',self.model]]},function (result) { db = new openerp.web.DataSetSearch(self,'ir.model.fields', null, null); db.read_slice([],{domain : [['model_id','=',result[0].id],['name','=',fld_name]]},function (res) { - var data = []; - _.each(property,function(record){ - var dict = {'key':record,'value':res[0][record]}; - data.push(dict); + _.each(properties,function(record){ + var type_widget = new (self.property.get_any(['undefined' , record, 'field'])) (false, false); + console.log("widget_view",type_widget); }); - console.log("check data+++",data); - /*self.dialog.$element.html(QWeb.render('Edit_Node_View',{ - 'res': res - }));*/ }); }); } }); +openerp.web.ViewEditor.FieldBoolean = openerp.web.form.FieldBoolean.extend({ + init: function(view, node) { + //this._super(view, node); + console.log("view++++",view); + console.log("nodoe+++++",node); + this.template = "FieldBoolean"; + }, + start: function() { + var self = this; + this._super.apply(this, arguments); + } +}); +openerp.web.ViewEditor.property_widget = new openerp.web.Registry({ + 'required' : 'openerp.web.ViewEditor.FieldBoolean', + 'readonly' : 'openerp.web.ViewEditor.FieldBoolean', + 'nolabel' : 'openerp.web.ViewEditor.FieldBoolean', + 'completion' : 'openerp.web.ViewEditor.FieldBoolean', + /*'widget' : '', + 'groups' : '', + 'position': '', + 'icon': '', + 'align': '' */ +}); }; \ No newline at end of file diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 957415c8043..04bd475fd1c 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -1325,13 +1325,6 @@ - - - - - -
-
Export From 02bbd4bd5c8b39cd3d5c60f49b79ed96f84a3012 Mon Sep 17 00:00:00 2001 From: "Kunal Chavda (OpenERP)" Date: Wed, 5 Oct 2011 17:32:12 +0530 Subject: [PATCH 029/711] [IMP]Render boolean field with static data using widget. bzr revid: kch@tinyerp.com-20111005120212-tj2jhlxwjmtp91z6 --- addons/web/static/src/js/view_editor.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/addons/web/static/src/js/view_editor.js b/addons/web/static/src/js/view_editor.js index 7b68cdc3372..4378ac4a0a9 100644 --- a/addons/web/static/src/js/view_editor.js +++ b/addons/web/static/src/js/view_editor.js @@ -330,7 +330,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ tag = tag_fld[1].replace(/[^a-zA-Z 0-9]+/g,''); } var properties = _PROPERTIES[tag]; - self.on_edit_node(this,properties,fld_name); + self.on_edit_node(properties,fld_name); break; case "side-up": while(1){ @@ -417,7 +417,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ tr.show(); }); }, - on_edit_node:function(self,properties,fld_name){ + on_edit_node:function(properties,fld_name){ var self = this; var result; this.dialog = new openerp.web.Dialog(this,{ @@ -438,9 +438,11 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ dataset.read_slice([],{domain : [['model','=',self.model]]},function (result) { db = new openerp.web.DataSetSearch(self,'ir.model.fields', null, null); db.read_slice([],{domain : [['model_id','=',result[0].id],['name','=',fld_name]]},function (res) { + // res will use for getting value of fields. + var k = {"attrs":{"modifiers":"{'readonly':true}","name":"name"},"children":[],"tag":"field"}; _.each(properties,function(record){ - var type_widget = new (self.property.get_any(['undefined' , record, 'field'])) (false, false); - console.log("widget_view",type_widget); + var type_widget = new (self.property.get_any(['undefined' , record, 'field'])) (self.dialog, k); + $("div[id='"+self.dialog.element_id+"']").append('
'+record+''+type_widget.render()+'
'); }); }); }); @@ -449,8 +451,6 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ openerp.web.ViewEditor.FieldBoolean = openerp.web.form.FieldBoolean.extend({ init: function(view, node) { //this._super(view, node); - console.log("view++++",view); - console.log("nodoe+++++",node); this.template = "FieldBoolean"; }, start: function() { @@ -458,6 +458,7 @@ openerp.web.ViewEditor.FieldBoolean = openerp.web.form.FieldBoolean.extend({ this._super.apply(this, arguments); } }); + openerp.web.ViewEditor.property_widget = new openerp.web.Registry({ 'required' : 'openerp.web.ViewEditor.FieldBoolean', 'readonly' : 'openerp.web.ViewEditor.FieldBoolean', From 3d82d827c854b63316fa1fba29187921c24f38d8 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Mon, 10 Oct 2011 18:56:22 +0530 Subject: [PATCH 030/711] [ADD, REF]: CRM: 1)Created new process folder and moved test_crm_lead.yml to process_crm_lead.yml, 2)Removed unused created user for crm (process_crm_lead.yml), 3)Changed Lead name New Customer to proper name, 4)Removed Cancle operation from process_crm_lead.yml bzr revid: ron@tinyerp.com-20111010132622-329w2fv0jbt0rc7y --- addons/crm/__openerp__.py | 3 +- .../process_crm_lead.yml} | 32 ++----------------- 2 files changed, 4 insertions(+), 31 deletions(-) rename addons/crm/test/{test_crm_lead.yml => process/process_crm_lead.yml} (81%) diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index a6f5f1630f7..27beb8e58ee 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -119,7 +119,8 @@ Creates a dashboard for CRM that includes: 'crm_phonecall_demo.xml', ], 'test': [ - 'test/test_crm_lead.yml', + 'test/process/process_crm_lead.yml', + 'test/process/cancle_crm_lead.yml', 'test/test_crm_meeting.yml', 'test/test_crm_opportunity.yml', 'test/test_crm_phonecall.yml', diff --git a/addons/crm/test/test_crm_lead.yml b/addons/crm/test/process/process_crm_lead.yml similarity index 81% rename from addons/crm/test/test_crm_lead.yml rename to addons/crm/test/process/process_crm_lead.yml index d5d3c6b933b..f35b03dcd4f 100644 --- a/addons/crm/test/test_crm_lead.yml +++ b/addons/crm/test/process/process_crm_lead.yml @@ -1,27 +1,10 @@ -- - In order to test the CRM in OpenERP, I will do a customer qualification - process that starts with a fist contact with a customer (a lead), which will - be converted to a business opportunity and a partner. -- - I create a two new users "user_crm" and I assign the group "salesman". -- - !record {model: res.users, id: res_users_usercrm0}: - company_id: base.main_company - context_lang: en_US - context_section_id: crm.section_sales_department - groups_id: - - base.group_sale_salesman - login: user_crm - name: user_crm - password: user_crm - - | - I start by creating a new lead "New Customer" and I provide an address to this + I start by creating a new lead "Steave Jon" and I provide an address to this new customer, as well as an email "info@mycustomer.com". - !record {model: crm.lead, id: crm_lead_newcustomer0}: email_from: info@mycustomer.com - name: New Customer + name: Steave Jon partner_name: Capegemini partner_id: base.res_partner_9 phone: (855) 924-4364 @@ -125,17 +108,6 @@ - !assert {model: crm.lead, id: crm_lead_newcustomer0, string: Lead in done state}: - state == "done" -- - I cancel lead by click on "cancel" button. -- - !python {model: crm.lead}: | - self.case_cancel(cr, uid, [ref("crm_lead_newcustomer0")]) -- | - I check that lead is now in 'cancel' state. -- - !assert {model: crm.lead, id: crm_lead_newcustomer0, string: Lead in cancel state}: - - state == "cancel" - #- # | # yaml is also not working with smtp server and send new email. From d202549512dea80767b844e2a7a732e58e1f29bc Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Tue, 11 Oct 2011 12:25:03 +0530 Subject: [PATCH 031/711] [ADD]: crm: 1) Add new yml on process folder cancle_crm_lead.yml 2) Checked for lead from any stage, It will be cancle or not 3) If Lead not handle by executive team so its need to Escalate lead from sales executive department to sales department and checked that 4) Checked for lead cancle from Escalate stage bzr revid: ron@tinyerp.com-20111011065503-x1o4pbhtkyaznuyp --- addons/crm/test/process/cancle_crm_lead.yml | 48 +++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 addons/crm/test/process/cancle_crm_lead.yml diff --git a/addons/crm/test/process/cancle_crm_lead.yml b/addons/crm/test/process/cancle_crm_lead.yml new file mode 100644 index 00000000000..c8d02c6414c --- /dev/null +++ b/addons/crm/test/process/cancle_crm_lead.yml @@ -0,0 +1,48 @@ +- + Cheking for lead from any stage, It will be cancle or not. +- + !python {model: crm.lead}: | + lead_on_draft=self.browse(cr, uid, ref("crm_case_itisatelesalescampaign0")) + assert lead_on_draft.state == 'draft', "Lead is not in draft state" + self.case_cancel(cr, uid, [ref("crm_case_itisatelesalescampaign0")]) + lead_on_cancel=self.browse(cr, uid, ref("crm_case_itisatelesalescampaign0")) + assert lead_on_cancel.state == 'cancel', "Lead is not in cancel state" + self.case_reset(cr, uid, [ref("crm_case_itisatelesalescampaign0")]) + lead_on_reset=self.browse(cr, uid, ref("crm_case_itisatelesalescampaign0")) + assert lead_on_reset.state == 'draft', "Lead is not in draft state" + self.case_pending(cr, uid, [ref("crm_case_itisatelesalescampaign0")]) + lead_on_pending=self.browse(cr, uid, ref("crm_case_itisatelesalescampaign0")) + assert lead_on_pending.state == 'pending', "Lead is not in pending state" + self.case_cancel(cr, uid, [ref("crm_case_itisatelesalescampaign0")]) + lead_pending_cancel=self.browse(cr, uid, ref("crm_case_itisatelesalescampaign0")) + assert lead_pending_cancel.state == 'cancel', "Lead is not in cancel state" + +- + For working on parent child relationship, we are creating sales executive department that will be work under + Sales Department. +- + !record {model: crm.case.section, id: section_sales_exe_department}: + name: "Sales Executive" + parent_id: crm.section_sales_department + +- + If Lead not handle by executive team so its need to Escalate lead from sales executive department to sales department, + for that purpose i Assign sales executive department on lead, after we will be process to escalate lead to sales department +- + !record {model: crm.lead, id: crm.crm_case_itisatelesalescampaign0}: + section_id: section_sales_exe_department +- + Processing on Lead escalate to sales Departemnt, we are checking for lead Escalate to sales Department from Executive + department or not. +- + !python {model: crm.lead}: | + lead_rec=self.browse(cr, uid, ref("crm_case_itisatelesalescampaign0")) + self.case_reset(cr, uid, [ref("crm_case_itisatelesalescampaign0")]) + lead_cancle_reset=self.browse(cr, uid, ref("crm_case_itisatelesalescampaign0")) + assert lead_cancle_reset.state == 'draft', "Lead is not in draft state" + self.case_escalate(cr, uid, [ref("crm_case_itisatelesalescampaign0")]) + lead_on_escalate=self.browse(cr, uid, ref("crm_case_itisatelesalescampaign0")) + assert lead_on_escalate.section_id.name == 'Sales Department', "Do not Escalate lead to on sales team from Executive team" + self.case_cancel(cr, uid, [ref("crm_case_itisatelesalescampaign0")]) + lead_escalate_cancel=self.browse(cr, uid, ref("crm_case_itisatelesalescampaign0")) + assert lead_escalate_cancel.state == 'cancel', "Lead is not in cancel state" From 618fc88e3336276cef93502677bbf465c67f3444 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Tue, 11 Oct 2011 15:36:49 +0530 Subject: [PATCH 032/711] [ADD, REF]: crm: 1) Moved test_crm_meeting.yml to process/process_crm_meeting.yml 2) Used demo data from xml file instead of created yml data, 3) Improved all string regarding to end user and remove all string like coder, 4) Added confirm state and done state of meeting and cheked its worked or not bzr revid: ron@tinyerp.com-20111011100649-wmokfc1tiknua2zz --- addons/crm/__openerp__.py | 2 +- .../crm/test/process/process_crm_meeting.yml | 72 ++++++++++++++ addons/crm/test/test_crm_meeting.yml | 97 ------------------- 3 files changed, 73 insertions(+), 98 deletions(-) create mode 100644 addons/crm/test/process/process_crm_meeting.yml delete mode 100644 addons/crm/test/test_crm_meeting.yml diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index 27beb8e58ee..36e8fdb4d1e 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -121,7 +121,7 @@ Creates a dashboard for CRM that includes: 'test': [ 'test/process/process_crm_lead.yml', 'test/process/cancle_crm_lead.yml', - 'test/test_crm_meeting.yml', + 'test/process/process_crm_meeting.yml', 'test/test_crm_opportunity.yml', 'test/test_crm_phonecall.yml', 'test/test_crm_recurrent_meeting.yml', diff --git a/addons/crm/test/process/process_crm_meeting.yml b/addons/crm/test/process/process_crm_meeting.yml new file mode 100644 index 00000000000..91535424964 --- /dev/null +++ b/addons/crm/test/process/process_crm_meeting.yml @@ -0,0 +1,72 @@ +- | + Customer want to do initial discussion with us so we will arrage meeting or + phonecalles or internal Meeting with them. +- + !assert {model: crm.meeting, id: crm.crm_case_initialdiscussion0}: + - state == "draft" +- | + For Remember purpose for meeting, i put reminder "30 minutes before" and assign + to meeting. +- + !python {model: crm.meeting}: | + self.write(cr, uid, [ref('crm_case_initialdiscussion0')], {'alarm_id': ref("base_calendar.alarm5")}) +- | + In order to check recurrence on meetings I will set Recurrency to Custom + and I set the fields so that the meeting will occur weekly on Monday to Friday 10 times. +- + !python {model: crm.meeting}: | + self.write(cr, uid, [ref("crm_case_initialdiscussion0")], {'fr': 1, 'mo': 1, 'th': 1, 'tu': 1, 'we':1, 'count':10, 'interval': 1, 'rrule_type': 'weekly'}) + +- | + The meeting is scheduled on Monday and Friday for 10 times so i can see from the calendar view +- + !python {model: crm.meeting}: | + self.fields_view_get(cr, uid, False, 'calendar', context) +- | + We can check for one of the recurrent event and count the number of meeting. +- + !python {model: crm.meeting}: | + import time + from datetime import datetime, date, timedelta + ids = self.search(cr, uid, [('date', '>=', time.strftime('%Y-%m-%d 00:00:00')), ('date', '<=', (datetime.now()+timedelta(31)).strftime('%Y-%m-%d 00:00:00')), ('name', '=', 'Initial discussion')], context={'virtual_id': True}) + assert len(ids) == 10 + +- | + If I want to edit meetings information for all occurrence I click on "Edit All" button. +- + !python {model: crm.meeting}: | + self.write(cr, uid, [ref('crm_case_initialdiscussion0')], {'edit_all':'True'},context) +- | + I can see that new meeting form is opened with same value. + I change some data for meeting and save it. + I can see from meeting's calendar view that all meeting occurrences are changed accordingly. +- + !record {model: crm.meeting, id: crm.crm_case_initialdiscussion0}: + alarm_id: base_calendar.alarm9 + rrule_type: weekly +- | + In order to invite people(internal user) for this meetings, Create record for + people will come on meeting. +- + !record {model: base_calendar.invite.attendee, id: base_calendar_invite_attendee_0}: + type: internal + send_mail: False + partner_id: base.res_partner_9 + user_ids: + - base.user_demo +- + Now inviting those people which we are registers. +- + !python {model: base_calendar.invite.attendee}: | + self.do_invite(cr, uid, [ref('base_calendar_invite_attendee_0')], {'active_id': ref('crm_case_initialdiscussion0'), 'model' : 'crm.meeting', 'attendee_field':'attendee_ids'}) +- | + All conformation is completed for meeting now going to confirm meeting + and we can check also after completion of meeting, it is done or not. +- + !python {model: crm.meeting}: | + self.case_open(cr, uid, [ref('crm_case_initialdiscussion0')]) + meeting_rec = self.browse(cr, uid, ref("crm_case_initialdiscussion0")) + assert meeting_rec.state == 'open', "Meeting is not in confirm state" + self.case_close(cr, uid, [ref('crm_case_initialdiscussion0')]) + meeting_rec_close = self.browse(cr, uid, ref("crm_case_initialdiscussion0")) + assert meeting_rec_close.state == 'done', "Meeting is not in done state" diff --git a/addons/crm/test/test_crm_meeting.yml b/addons/crm/test/test_crm_meeting.yml deleted file mode 100644 index 8d851dd58c7..00000000000 --- a/addons/crm/test/test_crm_meeting.yml +++ /dev/null @@ -1,97 +0,0 @@ -- | - I will test Meetings which may be customer meeting or phonecall meeting or - internal Meeting. -- | - I start by creating a new Meeting. -- - !record {model: crm.meeting, id: crm_meeting_regardingpresentation0}: - categ_id: crm.categ_meet2 - date: !eval time.strftime('%Y-%m-%d 16:04:00') - date_deadline: !eval "(datetime.now() + timedelta(1)).strftime('%Y-%m-%d 00:04:00')" - duration: 8.0 - email_from: info@balmerinc.be - location: Ahmedabad - name: Regarding Presentation - partner_address_id: base.res_partner_address_1 - partner_id: base.res_partner_9 - rrule_type: weekly - section_id: crm.section_sales_department -- | - I check that the Meetings is in 'UnConfirmed' state. -- - !assert {model: crm.meeting, id: crm_meeting_regardingpresentation0}: - - state == "draft" -- | - I can set reminder on meeting if I put reminder "40 minutes before" . -- | - For that, I first create alarm. -- - !record {model: res.alarm, id: res_alarm_minituesbefore0}: - name: 40 minutes before - trigger_duration: 40 - trigger_interval: minutes - trigger_occurs: before - trigger_related: start -- | - I will assign this reminder. - -- !python {model: crm.meeting}: | - self.write(cr, uid, [ref('crm_meeting_regardingpresentation0')], {'alarm_id': ref("res_alarm_minituesbefore0")}) -- | - In order to check recurrence on meetings I will set Recurrency to Custom - and I set the fields so that the meeting will occur weekly on Monday and Friday 10 times. -- - !python {model: crm.meeting}: | - self.write(cr, uid, [ref("crm_meeting_regardingpresentation0")], {'fr': 1, 'mo': 1, 'th': 1, 'tu': 1, 'we':1, 'count':10, 'interval': 1, 'rrule_type': 'weekly'}) - -- | - I can see from the calendar view that the meeting is scheduled on Monday and Friday - for 10 times. - -- - !python {model: crm.meeting}: | - self.fields_view_get(cr, uid, False, 'calendar', context) -- | - I will search for one of the recurrent event and count the number of meeting. -- - !python {model: crm.meeting}: | - import time - from datetime import datetime, date, timedelta - ids = self.search(cr, uid, [('date', '>=', time.strftime('%Y-%m-%d 00:00:00')), ('date', '<=', (datetime.now()+timedelta(31)).strftime('%Y-%m-%d 00:00:00')), ('name', '=', 'Regarding Presentation')], context={'virtual_id': True}) - assert len(ids) == 10 - -- | - If I want to edit meetings information for all occurrence I click on "Edit All" button. -- - !python {model: crm.meeting}: | - self.write(cr, uid, [ref('crm_meeting_regardingpresentation0')], {'edit_all':'True'},context) -- | - I can see that new meeting form is opened with same value. - I change some data for meeting and save it. - I can see from meeting's calendar view that all meeting occurrences are changed accordingly. -- - !record {model: crm.meeting, id: crm.crm_meeting_regardingpresentation0}: - alarm_id: base_calendar.alarm9 - rrule_type: weekly - -- | - In order to invite people for this meetings, I click on "Invite People" button - I can invite internal user. -- - !record {model: base_calendar.invite.attendee, id: base_calendar_invite_attendee_0}: - type: internal - send_mail: False - partner_id: base.res_partner_9 - user_ids: - - base.user_demo -- - I click on "Invite" button of "Invite attendee" wizard. -- - !python {model: base_calendar.invite.attendee}: | - self.do_invite(cr, uid, [ref('base_calendar_invite_attendee_0')], {'active_id': ref('crm_meeting_regardingpresentation0'), 'model' : 'crm.meeting', 'attendee_field':'attendee_ids'}) - -- | - After direct/indirect confirmation for meetings I can confirm meeting. -- - !python {model: crm.meeting}: | - self.case_open(cr, uid, [ref('crm_meeting_regardingpresentation0')]) From 7316a069b348634586c1f0f3864a60c98a3388f9 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Tue, 11 Oct 2011 15:42:57 +0530 Subject: [PATCH 033/711] [IMP] crm : user not assign properly on test_crm_lead_case2.yml bzr revid: ron@tinyerp.com-20111011101257-p8fiuov1xtjcfvdh --- addons/crm/test/test_crm_lead_case2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/crm/test/test_crm_lead_case2.yml b/addons/crm/test/test_crm_lead_case2.yml index 23a654d31a8..af1b7e7e07b 100644 --- a/addons/crm/test/test_crm_lead_case2.yml +++ b/addons/crm/test/test_crm_lead_case2.yml @@ -25,7 +25,7 @@ - I assign segmentation. - - !record {model: res.users, id: res_users_usercrm0}: + !record {model: res.users, id: base.user_root}: context_section_id: crm_case_section_demosalesteam - | I create a new lead "Test Customer" and I provide an address to this From da3aca4263643ca170dd395b81827a2e96dd4fd3 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Tue, 11 Oct 2011 18:30:50 +0530 Subject: [PATCH 034/711] [ADD, REF]: crm: 1) Moved test_crm_phonecall.yml to process/process_crm_phonecall.yml 2) Removed Phonecall by log seduling, 3) Improved varibles names and conversion, 4) changed string Interview call to interest with openerp, 5) Improved all string regarding to end user and remove all string like coder, 6) Added stage after completion of phonecall and cheked that working properly or not bzr revid: ron@tinyerp.com-20111011130050-vk24chpik6y4ijc4 --- addons/crm/__openerp__.py | 2 +- .../test/process/process_crm_phonecall.yml | 73 +++++++++++ addons/crm/test/test_crm_phonecall.yml | 116 ------------------ 3 files changed, 74 insertions(+), 117 deletions(-) create mode 100644 addons/crm/test/process/process_crm_phonecall.yml delete mode 100644 addons/crm/test/test_crm_phonecall.yml diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index 36e8fdb4d1e..05ed350bea1 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -123,7 +123,7 @@ Creates a dashboard for CRM that includes: 'test/process/cancle_crm_lead.yml', 'test/process/process_crm_meeting.yml', 'test/test_crm_opportunity.yml', - 'test/test_crm_phonecall.yml', + 'test/process/process_crm_phonecall.yml', 'test/test_crm_recurrent_meeting.yml', 'test/test_crm_stage_changes.yml', 'test/test_crm_recurrent_meeting_case2.yml', diff --git a/addons/crm/test/process/process_crm_phonecall.yml b/addons/crm/test/process/process_crm_phonecall.yml new file mode 100644 index 00000000000..25f3069fac6 --- /dev/null +++ b/addons/crm/test/process/process_crm_phonecall.yml @@ -0,0 +1,73 @@ +- | + For customer or partner purpose, I called to him/her for discussion about openerp. +- + !record {model: crm.phonecall, id: crm_phonecall_disc_openerp}: + date: !eval time.strftime('%Y-%m-%d 08:00:00') + name: Discussion About Openerp + duration: 2.0 + section_id: crm.section_sales_department +- + After called to Customer/partner, So creating record to merge with exiting partner +- + !record {model: crm.phonecall2partner, id: crm_phonecall2partner_existed}: + action: exist + partner_id: base.res_partner_9 + +- + We are going to create partner. +- + !python {model: crm.phonecall2partner}: | + + self._select_partner(cr, uid,{"active_ids": [ref("crm_phonecall_disc_openerp")]}) + self.open_create_partner(cr, uid, [ref("crm_phonecall2partner_existed")], {"active_ids": [ref("crm_phonecall_disc_openerp")]}) + self.make_partner(cr, uid, [ref("crm_phonecall2partner_existed")], {"active_ids": [ref("crm_phonecall_disc_openerp")]}) + +- | + As the success of phonecall seems to be a real business opportunity, It will convert + it to opportunity. +- + !record {model: crm.phonecall2opportunity, id: crm_phonecall2opportunity_disc_openerp}: + name: Discussion About Openerp + partner_id: base.res_partner_9 + planned_revenue: 0.0 + probability: 0.0 +- | + Business opportunity is now assigned to this phonecall. +- + !assert {model: crm.phonecall, id: crm_phonecall_disc_openerp}: + - opportunity_id != False +- + Succeed phonecall, it will be convert into on opportunity. +- + !python {model: crm.phonecall2opportunity}: | + self.action_apply(cr, uid, [ref("crm_phonecall2opportunity_disc_openerp")], {"active_id": ref("crm_phonecall_disc_openerp")}) +- | + For business And I check that the phonecall and the newly created business + opportunity is linked to same partner. +- + !python {model: crm.phonecall}: | + obj_phonecall = self.browse(cr, uid, ref('crm_phonecall_disc_openerp')) + ids = self.pool.get('crm.lead').search(cr, uid, [('name', '=', obj_phonecall.opportunity_id.name)]) + obj_opp = self.pool.get('crm.lead').browse(cr, uid, ids)[0] + assert obj_phonecall.partner_id == obj_opp.partner_id +- | + Customer/partner intested with our product, so we will call back to him/her +- + !record {model: crm.phonecall2phonecall, id: crm_phonecall2phonecall_disc_openerp}: + date: !eval "'%s-%s-%s 19:49:00' %(datetime.now().year,datetime.now().month,datetime.now().day)" + name: interest with openerp + section_id: crm.section_sales_department + user_id: base.user_root + action: schedule + categ_id: crm.categ_phone1 +- | + Create other sedular call which is interested customer/partner. +- + !python {model: crm.phonecall2phonecall}: | + self.action_apply(cr, uid, [ref('crm_phonecall2phonecall_disc_openerp')], {'active_id': ref('crm_phonecall_disc_openerp')}) +- | + Completion of phonecall, Cheking for phonecall summary is close or not. +- + !python {model: crm.phonecall}: | + phonecall_rec = self.browse(cr, uid, ref('crm_phonecall_disc_openerp')) + assert phonecall_rec.state == 'done', "Phonecall is not in done state" diff --git a/addons/crm/test/test_crm_phonecall.yml b/addons/crm/test/test_crm_phonecall.yml deleted file mode 100644 index 0754a5b9544..00000000000 --- a/addons/crm/test/test_crm_phonecall.yml +++ /dev/null @@ -1,116 +0,0 @@ -- | - I start by creating a new phonecall. -- - !record {model: crm.phonecall, id: crm_phonecall_interviewcall0}: - date: !eval time.strftime('%Y-%m-%d 08:00:00') - name: Interview call - duration: 2.0 - section_id: crm.section_sales_department -- - I select partner by click on "Create a Partner" button. -- - !record {model: crm.phonecall2partner, id: crm_phonecall2partner_1}: - action: exist - partner_id: base.res_partner_9 - -- - I click on "Continue" button of this wizard and make partner. -- - !python {model: crm.phonecall2partner}: | - - self._select_partner(cr, uid,{"active_ids": [ref("crm_phonecall_interviewcall0")]}) - self.open_create_partner(cr, uid, [ref("crm_phonecall2partner_1")], {"active_ids": [ref("crm_phonecall_interviewcall0")]}) - self.make_partner(cr, uid, [ref("crm_phonecall2partner_1")], {"active_ids": [ref("crm_phonecall_interviewcall0")]}) - -- | - As the success of phonecall seems to be a real business opportunity, I will convert - it to opportunity by clicking on the "Convert to Opportunity" button. -- - !record {model: crm.phonecall2opportunity, id: crm_phonecall2opportunity_interviewcall0}: - name: Interview call - partner_id: base.res_partner_9 - planned_revenue: 0.0 - probability: 0.0 -- | - I can see that a business opportunity is now assigned to this phonecall -- - !assert {model: crm.phonecall, id: crm_phonecall_interviewcall0}: - - opportunity_id != False -- - I click on "Convert" button of this wizard. -- - !python {model: crm.phonecall2opportunity}: | - self.action_apply(cr, uid, [ref("crm_phonecall2opportunity_interviewcall0")], {"active_id": ref("crm_phonecall_interviewcall0")}) -- | - And I check that the phonecall and the newly created business opportunity is linked - to same partner. -- - !python {model: crm.phonecall}: | - obj_phonecall = self.browse(cr, uid, ref('crm_phonecall_interviewcall0')) - ids = self.pool.get('crm.lead').search(cr, uid, [('name', '=', obj_phonecall.opportunity_id.name)]) - obj_opp = self.pool.get('crm.lead').browse(cr, uid, ids)[0] - assert obj_phonecall.partner_id == obj_opp.partner_id -- | - I schedule Meeting on this current phonecall by clicking on "schedule - Meeting". -- - !python {model: crm.phonecall}: | - self.action_make_meeting(cr, uid, [ref('crm_phonecall_interviewcall0')]) - -- | - I can see that Meeting's calendar view is shown. - then I click on the date on which I want schedule meeting. - I fill proper data for that meeting and save it. -- - !record {model: crm.meeting, id: crm_meeting_interviewcall0}: - alarm_id: base_calendar.alarm3 - date: !eval "'%s-%s-%s 09:00:00' %(datetime.now().year,datetime.now().month,datetime.now().day)" - date_deadline: !eval "'%s-%s-%s 17:00:00' %(datetime.now().year,datetime.now().month,datetime.now().day)" - duration: 8.0 - email_from: info@balmerinc.be - name: Interview call - partner_address_id: base.res_partner_address_1 - partner_id: base.res_partner_9 - phonecall_id: 'crm_phonecall_interviewcall0' - state: open - -- | - In order to schedule other phonecall to the partner - I click on "schedule other call" button. and plan for other call - I can see that it will open other phonecall view with some data same as current - phonecall. -- - !record {model: crm.phonecall2phonecall, id: crm_phonecall2phonecall_interviewcall0}: - date: !eval "'%s-%s-%s 19:49:00' %(datetime.now().year,datetime.now().month,datetime.now().day)" - name: Interview call - section_id: crm.section_sales_department - user_id: base.user_root - action: schedule - categ_id: crm.categ_phone1 -- - I click on "schedule other call" button. and plan for other call. -- - !record {model: crm.phonecall2phonecall, id: crm_phonecall2phonecall_interviewcall1}: - date: !eval "'%s-%s-%s 19:49:00' %(datetime.now().year,datetime.now().month,datetime.now().day)" - name: Interview call - section_id: crm.section_sales_department - user_id: base.user_root - action: log - categ_id: crm.categ_phone1 -- | - I click on "Schedule" button of this wizard. -- - !python {model: crm.phonecall2phonecall}: | - fields = { - 'name': 'Interview call', - 'section_id': ref('crm.section_sales_department'), - 'user_id': ref('base.user_root'), - 'categ_id': ref('crm.categ_phone1') - } - self.default_get(cr, uid, fields,{'active_id': ref('crm_phonecall_interviewcall0')}) - self.action_apply(cr, uid, [ref('crm_phonecall2phonecall_interviewcall0')], {'active_id': ref('crm_phonecall_interviewcall0')}) -- | - I click on "Schedule" button of this wizard with log option. -- - !python {model: crm.phonecall2phonecall}: | - self.action_apply(cr, uid, [ref('crm_phonecall2phonecall_interviewcall1')], {'active_id': ref('crm_phonecall_interviewcall0')}) From e85f8215237e5feb62311d70c2ed53b53f763a0b Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Tue, 11 Oct 2011 18:34:48 +0530 Subject: [PATCH 035/711] [IMP] crm: String improvement in process_crm_meeting.yml bzr revid: ron@tinyerp.com-20111011130448-vtijq1p0s83o3e4y --- addons/crm/test/process/process_crm_meeting.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/crm/test/process/process_crm_meeting.yml b/addons/crm/test/process/process_crm_meeting.yml index 91535424964..8f8ae2cd417 100644 --- a/addons/crm/test/process/process_crm_meeting.yml +++ b/addons/crm/test/process/process_crm_meeting.yml @@ -55,7 +55,7 @@ user_ids: - base.user_demo - - Now inviting those people which we are registers. + Now inviting those people which we are registered. - !python {model: base_calendar.invite.attendee}: | self.do_invite(cr, uid, [ref('base_calendar_invite_attendee_0')], {'active_id': ref('crm_case_initialdiscussion0'), 'model' : 'crm.meeting', 'attendee_field':'attendee_ids'}) From 9410a87c607b95114133455d0396c90467047067 Mon Sep 17 00:00:00 2001 From: eLBati Date: Tue, 11 Oct 2011 17:56:04 +0200 Subject: [PATCH 036/711] [IMP] partially ded VAT 21% bzr revid: lorenzo.battistini@agilebg.com-20111011155604-ta41k3dwb2ti2h7q --- addons/l10n_it/data/account.tax.code.template.csv | 10 ++++++++++ addons/l10n_it/data/account.tax.template.csv | 15 +++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/addons/l10n_it/data/account.tax.code.template.csv b/addons/l10n_it/data/account.tax.code.template.csv index 01699380f81..40f0545aff9 100644 --- a/addons/l10n_it/data/account.tax.code.template.csv +++ b/addons/l10n_it/data/account.tax.code.template.csv @@ -50,3 +50,13 @@ "IVD12I","template_impcode_riscossa_12","IVA a debito 12% (imponibile)","template_impcode_riscossa" "IVD2","template_ivacode_riscossa_2","IVA a debito 2%","template_ivacode_riscossa" "IVD2I","template_impcode_riscossa_2","IVA a debito 2% (imponibile)","template_impcode_riscossa" +"IVC21ind","template_ivacode_pagata_21ind","IVA a credito 21% indetraibile","template_ivacode_pagata" +"IVC21Iind","template_impcode_pagata_21ind","IVA a credito 21% indetraibile (imponibile)","template_impcode_pagata" +"IVC21det10","template_ivacode_pagata_21det10","IVA a credito 21% detraibile 10%","template_ivacode_pagata" +"IVC21Idet10","template_impcode_pagata_21det10","IVA a credito 21% detraibile 10% (imponibile)","template_impcode_pagata" +"IVC21det15","template_ivacode_pagata_21det15","IVA a credito 21% detraibile 15%","template_ivacode_pagata" +"IVC21Idet15","template_impcode_pagata_21det15","IVA a credito 21% detraibile 15% (imponibile)","template_impcode_pagata" +"IVC21det40","template_ivacode_pagata_21det40","IVA a credito 21% detraibile 40%","template_ivacode_pagata" +"IVC21Idet40","template_impcode_pagata_21det40","IVA a credito 21% detraibile 40% (imponibile)","template_impcode_pagata" +"IVC21det50","template_ivacode_pagata_21det50","IVA a credito 21% detraibile 50%","template_ivacode_pagata" +"IVC21Idet50","template_impcode_pagata_21det50","IVA a credito 21% detraibile 50% (imponibile)","template_impcode_pagata" diff --git a/addons/l10n_it/data/account.tax.template.csv b/addons/l10n_it/data/account.tax.template.csv index c0ce348693c..d0e9fe9c3f6 100644 --- a/addons/l10n_it/data/account.tax.template.csv +++ b/addons/l10n_it/data/account.tax.template.csv @@ -47,3 +47,18 @@ "22a INC","22a INC","l10n_it_chart_template_generic","Iva 2% (debito) INC",,"0.02",,"False","percent","l10n_it.2601","l10n_it.2601","sale","l10n_it.template_impcode_riscossa_2","l10n_it.template_ivacode_riscossa_2","l10n_it.template_impcode_riscossa_2","l10n_it.template_ivacode_riscossa_2","-1","-1","True" "4a INC","4a INC","l10n_it_chart_template_generic","Iva 4% (debito) INC",,"0.04",,"False","percent","l10n_it.2601","l10n_it.2601","sale","l10n_it.template_impcode_riscossa_4","l10n_it.template_ivacode_riscossa_4","l10n_it.template_impcode_riscossa_4","l10n_it.template_ivacode_riscossa_4","-1","-1","True" "00a INC","00a INC","l10n_it_chart_template_generic","Esente IVA (debito) INC",,"0",,"False","percent","l10n_it.2601","l10n_it.2601","sale","l10n_it.template_impcode_riscossa_0","l10n_it.template_ivacode_riscossa_0","l10n_it.template_impcode_riscossa_0","l10n_it.template_ivacode_riscossa_0","-1","-1","True" +"2110","2110","l10n_it_chart_template_generic","Iva al 21% detraibile 10%",,"0.21",,"True","percent",,,"purchase","template_impcode_pagata_21det10",,"template_impcode_pagata_21det10",,"-1",,"False" +"2110a","2110a","l10n_it_chart_template_generic","Iva al 21% detraibile 10% (D)","2","0","2110","False","balance","1601","1601","purchase",,"template_ivacode_pagata_21det10",,"template_ivacode_pagata_21det10",,"-1","False" +"2110b","2110b","l10n_it_chart_template_generic","Iva al 21% detraibile 10% (I)","1","0.9","2110","False","percent",,,"purchase",,,,,,,"False" +"2115","2115","l10n_it_chart_template_generic","Iva al 21% detraibile 15%",,"0.21",,"True","percent",,,"purchase","template_impcode_pagata_21det15",,"template_impcode_pagata_21det15",,"-1",,"False" +"2115a","2115a","l10n_it_chart_template_generic","Iva al 21% detraibile 15% (D)","2","0","2115","False","balance","1601","1601","purchase",,"template_ivacode_pagata_21det15",,"template_ivacode_pagata_21det15",,"-1","False" +"2115b","2115b","l10n_it_chart_template_generic","Iva al 21% detraibile 15% (I)","1","0.85","2115","False","percent",,,"purchase",,,,,,,"False" +"2140","2140","l10n_it_chart_template_generic","Iva al 21% detraibile 40%",,"0.21",,"True","percent",,,"purchase","template_impcode_pagata_21det40",,"template_impcode_pagata_21det40",,"-1",,"False" +"2140a","2140a","l10n_it_chart_template_generic","Iva al 21% detraibile 40% (D)","2","0","2140","False","balance","1601","1601","purchase",,"template_ivacode_pagata_21det40",,"template_ivacode_pagata_21det40",,"-1","False" +"2140b","2140b","l10n_it_chart_template_generic","Iva al 21% detraibile 40% (I)","1","0.6","2140","False","percent",,,"purchase",,,,,,,"False" +"21AO","21AO","l10n_it_chart_template_generic","Iva al 21% indetraibile",,"0.21",,"True","percent",,,"purchase","template_impcode_pagata_21ind",,"template_impcode_pagata_21ind",,"-1",,"False" +"21AOa","21AOa","l10n_it_chart_template_generic","Iva al 21% indetraibile (D)","2","0","21AO","False","balance","1601","1601","purchase",,"template_ivacode_pagata_21ind",,"template_ivacode_pagata_21ind",,"-1","False" +"21AOb","21AOb","l10n_it_chart_template_generic","Iva al 21% indetraibile (I)","1","1","21AO","False","percent",,,"purchase",,,,,,,"False" +"21I5","21I5","l10n_it_chart_template_generic","IVA al 21% detraibile al 50%",,"0.21",,"True","percent",,,"purchase","template_impcode_pagata_21det50",,"template_impcode_pagata_21det50",,"-1",,"False" +"21I5b","21I5b","l10n_it_chart_template_generic","IVA al 21% detraibile al 50% (I)","1","0.5","21I5","False","percent",,,"purchase",,,,,,,"False" +"21I5a","21I5a","l10n_it_chart_template_generic","IVA al 21% detraibile al 50% (D)","2","0","21I5","False","balance","1601","1601","purchase",,"template_ivacode_pagata_21det50",,"template_ivacode_pagata_21det50",,"-1","False" From cce4c999e1f0095cc6a20023a156341c548b0f59 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Wed, 12 Oct 2011 11:06:14 +0530 Subject: [PATCH 037/711] [IMP, REF]: crm: All Changes on process_crm_lead.yml, 1) Used demo data instead of yml creation data of lead, 2) Improved variables names and conversion, 3) Improved all string regarding to end user and remove all string like coder, 4) Removed mass wizard to convert lead to opportunity bzr revid: ron@tinyerp.com-20111012053614-4fddssqes817phtg --- addons/crm/test/process/process_crm_lead.yml | 100 +++++++------------ 1 file changed, 34 insertions(+), 66 deletions(-) diff --git a/addons/crm/test/process/process_crm_lead.yml b/addons/crm/test/process/process_crm_lead.yml index f35b03dcd4f..db1ffa4e753 100644 --- a/addons/crm/test/process/process_crm_lead.yml +++ b/addons/crm/test/process/process_crm_lead.yml @@ -1,112 +1,80 @@ -- | - I start by creating a new lead "Steave Jon" and I provide an address to this - new customer, as well as an email "info@mycustomer.com". - - !record {model: crm.lead, id: crm_lead_newcustomer0}: - email_from: info@mycustomer.com - name: Steave Jon - partner_name: Capegemini - partner_id: base.res_partner_9 - phone: (855) 924-4364 - mobile: (333) 715-1450 - section_id: crm.section_sales_department - referred: False -- | - I check that the lead is in 'draft' state. + Communication by phonecall or mail I got lead from Customer/partner, I test to created lead in initial stage. - - !assert {model: crm.lead, id: crm_lead_newcustomer0, string: Lead in Draft}: + !assert {model: crm.lead, id: crm.crm_case_qrecorp0, string: Lead in Draft}: - state == "draft" - - I open lead by click on "Open" button. + After some discussion about lead with customer/partner some possibillity to go ahead, so we are opening this lead. - !python {model: crm.lead}: | - self.case_open(cr, uid, [ref("crm_lead_newcustomer0")]) + self.case_open(cr, uid, [ref("crm_case_qrecorp0")]) fields={ 'day_open': 0.0, 'day_close': 0.0 } - self._compute_day(cr, uid, [ref("crm_lead_newcustomer0")], fields, context) + self._compute_day(cr, uid, [ref("crm_case_qrecorp0")], fields, context) - | - I check that lead is now in 'open' state. + In order to test lead, i will test lead is in open stage. - - !assert {model: crm.lead, id: crm_lead_newcustomer0, string: Lead in open state}: + !assert {model: crm.lead, id: crm.crm_case_qrecorp0, string: Lead in open state}: - state == "open" - - I search id for case object. -- - !python {model: crm.case.categ}: | - self._find_object_id(cr, uid, context) -- | - As the lead seems to be a real business opportunity, I will convert it to a - partner - and a business opportunity by clicking on the "Convert" button. + As the lead seems to be a real business opportunity, I will convert it to a partner + and a business opportunity. - !python {model: crm.lead}: | - lead = self.browse(cr, uid, ref('crm_lead_newcustomer0')) - action = self.convert_opportunity(cr, uid, [ref("crm_lead_newcustomer0")], {'active_ids': [ref("crm_lead_newcustomer0")]}) + lead = self.browse(cr, uid, ref('crm_case_qrecorp0')) + action = self.convert_opportunity(cr, uid, [ref("crm_case_qrecorp0")], {'active_ids': [ref("crm_case_qrecorp0")]}) assert action['res_model'] == 'crm.lead2opportunity.partner' - - | - I select "create a new partner" option. + In order to create partner, It is possible to check for partner is exiting or i will create new partner + according to this lead. so first i will create new partner. - !record {model: crm.lead2opportunity.partner, id: crm_lead2opportunity_partner_create_0}: action: 'create' name: 'convert' - - Then, Click on "Create Opportunity" button. + In order to create opportunity and its created by new partner. - !python {model: crm.lead2opportunity.partner}: | - self.action_apply(cr, uid, [ref("crm_lead2opportunity_partner_create_0")], {'active_ids': [ref("crm_lead_newcustomer0")], 'active_id': ref("crm_lead_newcustomer0")}) + self.action_apply(cr, uid, [ref("crm_lead2opportunity_partner_create_0")], {'active_ids': [ref("crm_case_qrecorp0")], 'active_id': ref("crm_case_qrecorp0")}) - - | - I select "Link to an existing partner" option. + In order to test with exiting partner, so i will test with exiting partner and create opportunities based + on exiting partner. - !record {model: crm.lead2opportunity.partner, id: crm_lead2opportunity_partner_create_1}: action: 'exist' - - Then, Click on "Create Opportunity" button. + Create opportunity based on exiting partner - !python {model: crm.lead2opportunity.partner}: | - self.action_apply(cr, uid, [ref("crm_lead2opportunity_partner_create_1")], {'active_ids': [ref("crm_lead_newcustomer0")], 'active_id': ref("crm_lead_newcustomer0")}) + self.action_apply(cr, uid, [ref("crm_lead2opportunity_partner_create_1")], {'active_ids': [ref("crm_case_qrecorp0")], 'active_id': ref("crm_case_qrecorp0")}) - - | - I select "Do not link to a partner" option. + In order to test with no link wih partner, so i will test create opportunities based + no link to any partner. - - !record {model: crm.lead2opportunity.partner, id: crm_lead2opportunity_partner_create_2}: - action: 'nothing' + !record {model: crm.lead2opportunity.partner, id: crm_lead2opportunity_partner_create_2}: + action: 'nothing' - - Then, Click on "Create Opportunity" button. + In order to test create opportunity based on no link to any partner. - - !python {model: crm.lead2opportunity.partner}: | - self.action_apply(cr, uid, [ref("crm_lead2opportunity_partner_create_2")], {'active_ids': [ref("crm_lead_newcustomer0")], 'active_id': ref("crm_lead_newcustomer0")}) -- | - In order to check the opportunity is created or not, I check type. + !python {model: crm.lead2opportunity.partner}: | + self.action_apply(cr, uid, [ref("crm_lead2opportunity_partner_create_2")], {'active_ids': [ref("crm_case_qrecorp0")], 'active_id': ref("crm_case_qrecorp0")}) +- + In order to test lead, i will test to lead is converted to opportunity. - !python {model: crm.lead}: | - lead = self.browse(cr, uid, ref("crm_lead_newcustomer0")) + lead = self.browse(cr, uid, ref("crm_case_qrecorp0")) assert lead.type == 'opportunity' - - - I create mass report of lead to opprtunity partner. + Finally, i won this lead and congratulation we have new partner so i will close this lead. - - !record {model: crm.lead2opportunity.partner.mass, id: crm_lead2opportunity_partner_mass0}: - user_ids: - - base.user_root - section_id: crm.section_sales_department + !python {model: crm.lead}: | + self.case_close(cr, uid, [ref("crm_case_qrecorp0")]) - - Then, execute that mass wizard. + In order to test lead, i will test its on close or not. - - !python {model: crm.lead2opportunity.partner.mass}: | - self.mass_convert(cr, uid, [ref("crm_lead2opportunity_partner_mass0")],{'active_ids': [ref("crm_lead_newcustomer0")], 'active_id': ref("crm_lead_newcustomer0")}) -- - I close lead by click on "close" button. -- - !python {model: crm.lead}: | - self.case_close(cr, uid, [ref("crm_lead_newcustomer0")]) -- | - I check that lead is now in 'done' state. -- - !assert {model: crm.lead, id: crm_lead_newcustomer0, string: Lead in done state}: + !assert {model: crm.lead, id: crm.crm_case_qrecorp0, string: Lead in done state}: - state == "done" #- # | From 7e237da6090533e7ea2f374719abef1592986eee Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Wed, 12 Oct 2011 12:00:36 +0530 Subject: [PATCH 038/711] [IMP] crm: Error generated by assigned wrong reference on test_crm_opportunity.yml bzr revid: ron@tinyerp.com-20111012063036-hlm825p2gut48o29 --- addons/crm/test/test_crm_opportunity.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/crm/test/test_crm_opportunity.yml b/addons/crm/test/test_crm_opportunity.yml index 734a1cae46c..8f171311b4d 100644 --- a/addons/crm/test/test_crm_opportunity.yml +++ b/addons/crm/test/test_crm_opportunity.yml @@ -109,5 +109,5 @@ !python {model: crm.merge.opportunity}: | op_list = [ref('crm_opportunity_1'),ref('crm_opportunity_2')] op_ids=self.pool.get('crm.lead').browse(cr,uid,op_list) - lead_ids = [ref('crm_lead_newcustomer0')] + lead_ids = [ref('crm_case_qrecorp0')] self.merge(cr, uid, op_ids, {'lead_ids': lead_ids}) From ac090c0b3ec42a5d458a7564338694166a717588 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Wed, 12 Oct 2011 14:45:33 +0530 Subject: [PATCH 039/711] [REF] crm: 1) rename file process_crm_lead.yml to crm_lead_open.yml and its have checked till qualified lead bzr revid: ron@tinyerp.com-20111012091533-bwxqz7t6f5dsni1s --- addons/crm/test/process/crm_lead_open.yml | 10 +++ addons/crm/test/process/process_crm_lead.yml | 94 -------------------- 2 files changed, 10 insertions(+), 94 deletions(-) create mode 100644 addons/crm/test/process/crm_lead_open.yml delete mode 100644 addons/crm/test/process/process_crm_lead.yml diff --git a/addons/crm/test/process/crm_lead_open.yml b/addons/crm/test/process/crm_lead_open.yml new file mode 100644 index 00000000000..d5c6bb2d101 --- /dev/null +++ b/addons/crm/test/process/crm_lead_open.yml @@ -0,0 +1,10 @@ +- + Communication by phonecall or mail I got lead from Customer/partner, I test to created lead in initial stage. +- + !python {model: crm.lead}: | + self.case_open(cr, uid, [ref("crm_case_qrecorp0")]) +- | + In order to test lead, i will test lead is in open stage. +- + !assert {model: crm.lead, id: crm.crm_case_qrecorp0, string: Lead in open state}: + - state == "open" diff --git a/addons/crm/test/process/process_crm_lead.yml b/addons/crm/test/process/process_crm_lead.yml deleted file mode 100644 index db1ffa4e753..00000000000 --- a/addons/crm/test/process/process_crm_lead.yml +++ /dev/null @@ -1,94 +0,0 @@ -- - Communication by phonecall or mail I got lead from Customer/partner, I test to created lead in initial stage. -- - !assert {model: crm.lead, id: crm.crm_case_qrecorp0, string: Lead in Draft}: - - state == "draft" -- - After some discussion about lead with customer/partner some possibillity to go ahead, so we are opening this lead. -- - !python {model: crm.lead}: | - self.case_open(cr, uid, [ref("crm_case_qrecorp0")]) - fields={ - 'day_open': 0.0, - 'day_close': 0.0 - } - self._compute_day(cr, uid, [ref("crm_case_qrecorp0")], fields, context) -- | - In order to test lead, i will test lead is in open stage. -- - !assert {model: crm.lead, id: crm.crm_case_qrecorp0, string: Lead in open state}: - - state == "open" -- - As the lead seems to be a real business opportunity, I will convert it to a partner - and a business opportunity. -- - !python {model: crm.lead}: | - lead = self.browse(cr, uid, ref('crm_case_qrecorp0')) - action = self.convert_opportunity(cr, uid, [ref("crm_case_qrecorp0")], {'active_ids': [ref("crm_case_qrecorp0")]}) - assert action['res_model'] == 'crm.lead2opportunity.partner' -- - In order to create partner, It is possible to check for partner is exiting or i will create new partner - according to this lead. so first i will create new partner. -- - !record {model: crm.lead2opportunity.partner, id: crm_lead2opportunity_partner_create_0}: - action: 'create' - name: 'convert' -- - In order to create opportunity and its created by new partner. -- - !python {model: crm.lead2opportunity.partner}: | - self.action_apply(cr, uid, [ref("crm_lead2opportunity_partner_create_0")], {'active_ids': [ref("crm_case_qrecorp0")], 'active_id': ref("crm_case_qrecorp0")}) -- - In order to test with exiting partner, so i will test with exiting partner and create opportunities based - on exiting partner. -- - !record {model: crm.lead2opportunity.partner, id: crm_lead2opportunity_partner_create_1}: - action: 'exist' -- - Create opportunity based on exiting partner -- - !python {model: crm.lead2opportunity.partner}: | - self.action_apply(cr, uid, [ref("crm_lead2opportunity_partner_create_1")], {'active_ids': [ref("crm_case_qrecorp0")], 'active_id': ref("crm_case_qrecorp0")}) -- - In order to test with no link wih partner, so i will test create opportunities based - no link to any partner. -- - !record {model: crm.lead2opportunity.partner, id: crm_lead2opportunity_partner_create_2}: - action: 'nothing' -- - In order to test create opportunity based on no link to any partner. -- - !python {model: crm.lead2opportunity.partner}: | - self.action_apply(cr, uid, [ref("crm_lead2opportunity_partner_create_2")], {'active_ids': [ref("crm_case_qrecorp0")], 'active_id': ref("crm_case_qrecorp0")}) -- - In order to test lead, i will test to lead is converted to opportunity. -- - !python {model: crm.lead}: | - lead = self.browse(cr, uid, ref("crm_case_qrecorp0")) - assert lead.type == 'opportunity' -- - Finally, i won this lead and congratulation we have new partner so i will close this lead. -- - !python {model: crm.lead}: | - self.case_close(cr, uid, [ref("crm_case_qrecorp0")]) -- - In order to test lead, i will test its on close or not. -- - !assert {model: crm.lead, id: crm.crm_case_qrecorp0, string: Lead in done state}: - - state == "done" -#- -# | -# yaml is also not working with smtp server and send new email. - -- | - I configure with smtp server. -- | - And I communicate with lead through send New mail to Lead using its email address from the user who is logged in. -- | - I check that communication history generated when send email to lead. -- | - Then, I add a cc which receive copy of future communication between partner and users by mail. - -- | - I Reply to last Email to lead with some document attached.and check that communication history generated or not. - From aef95be470d8b889fb4ede1131f000f30ad31abc Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Wed, 12 Oct 2011 15:31:34 +0530 Subject: [PATCH 040/711] [ADD] crm: 1) Added new crm_lead_to_opportunity.yml bzr revid: ron@tinyerp.com-20111012100134-gueog210ck07yhx6 --- addons/crm/__openerp__.py | 3 +- .../test/process/crm_lead_to_opportunity.yml | 36 +++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 addons/crm/test/process/crm_lead_to_opportunity.yml diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index 05ed350bea1..d7256360d40 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -119,7 +119,8 @@ Creates a dashboard for CRM that includes: 'crm_phonecall_demo.xml', ], 'test': [ - 'test/process/process_crm_lead.yml', + 'test/process/crm_lead_open.yml', + 'test/process/crm_lead_to_opportunity.yml', 'test/process/cancle_crm_lead.yml', 'test/process/process_crm_meeting.yml', 'test/test_crm_opportunity.yml', diff --git a/addons/crm/test/process/crm_lead_to_opportunity.yml b/addons/crm/test/process/crm_lead_to_opportunity.yml new file mode 100644 index 00000000000..2c1ccc65bfb --- /dev/null +++ b/addons/crm/test/process/crm_lead_to_opportunity.yml @@ -0,0 +1,36 @@ +- + As the lead seems to be a real business opportunity, I will convert it to a partner + and a business opportunity. +- + !record {model: crm.lead2opportunity.partner, id: crm_lead2opportunity_partner_create_1}: + action: 'exist' +- + Create opportunity based on exiting partner +- + !python {model: crm.lead2opportunity.partner}: | + self.action_apply(cr, uid, [ref("crm_lead2opportunity_partner_create_1")], {'active_ids': [ref("crm_case_qrecorp0")], 'active_id': ref("crm_case_qrecorp0")}) +- + In order to test lead, i will test to lead is converted to opportunity. +- + !assert {model: crm.lead, id: crm.crm_case_qrecorp0, string: Lead is not converted on opportunity}: + - type == 'opportunity' +- + Finally, i won this lead, so i will close this lead. +- + !python {model: crm.lead}: | + self.case_mark_won(cr, uid, [ref("crm_case_qrecorp0")]) +- + In order to test lead, it is close or not. +- + !assert {model: crm.lead, id: crm.crm_case_qrecorp0, string: Lead in done state}: + - state == "done" +- + After won this lead probability is 100. +- + !assert {model: crm.lead, id: crm.crm_case_qrecorp0, string: Probability is equal to 100}: + - probability == 100.0 +- + In order to test stage of opportunity after win, i will test stage of opportunity. +- + !assert {model: crm.lead, id: crm.crm_case_qrecorp0, string: stage of opportunity is win}: + - stage_id.name == "Won" From b864f6dbb749b093d2b2fb4e2b24155518b8082d Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Wed, 12 Oct 2011 16:03:09 +0530 Subject: [PATCH 041/711] [REF] crm: 1) Rename process_crm_meeting.yml to crm_meeting.yml 2) Covered from confirmatation to close meeting bzr revid: ron@tinyerp.com-20111012103309-j71jwxzn52xbsnma --- addons/crm/test/process/crm_meeting.yml | 12 ++++ .../crm/test/process/process_crm_meeting.yml | 72 ------------------- 2 files changed, 12 insertions(+), 72 deletions(-) create mode 100644 addons/crm/test/process/crm_meeting.yml delete mode 100644 addons/crm/test/process/process_crm_meeting.yml diff --git a/addons/crm/test/process/crm_meeting.yml b/addons/crm/test/process/crm_meeting.yml new file mode 100644 index 00000000000..508b1eaff59 --- /dev/null +++ b/addons/crm/test/process/crm_meeting.yml @@ -0,0 +1,12 @@ +- | + Customer want to do initial discussion with us so we will arrage meeting + with them and checked also confirm meeting and after cheked it will be + completed. +- + !python {model: crm.meeting}: | + self.case_open(cr, uid, [ref('crm_case_initialdiscussion0')]) + meeting_rec = self.browse(cr, uid, ref("crm_case_initialdiscussion0")) + assert meeting_rec.state == 'open', "Meeting is not in confirm state" + self.case_close(cr, uid, [ref('crm_case_initialdiscussion0')]) + meeting_rec_close = self.browse(cr, uid, ref("crm_case_initialdiscussion0")) + assert meeting_rec_close.state == 'done', "Meeting is not in done state" \ No newline at end of file diff --git a/addons/crm/test/process/process_crm_meeting.yml b/addons/crm/test/process/process_crm_meeting.yml deleted file mode 100644 index 8f8ae2cd417..00000000000 --- a/addons/crm/test/process/process_crm_meeting.yml +++ /dev/null @@ -1,72 +0,0 @@ -- | - Customer want to do initial discussion with us so we will arrage meeting or - phonecalles or internal Meeting with them. -- - !assert {model: crm.meeting, id: crm.crm_case_initialdiscussion0}: - - state == "draft" -- | - For Remember purpose for meeting, i put reminder "30 minutes before" and assign - to meeting. -- - !python {model: crm.meeting}: | - self.write(cr, uid, [ref('crm_case_initialdiscussion0')], {'alarm_id': ref("base_calendar.alarm5")}) -- | - In order to check recurrence on meetings I will set Recurrency to Custom - and I set the fields so that the meeting will occur weekly on Monday to Friday 10 times. -- - !python {model: crm.meeting}: | - self.write(cr, uid, [ref("crm_case_initialdiscussion0")], {'fr': 1, 'mo': 1, 'th': 1, 'tu': 1, 'we':1, 'count':10, 'interval': 1, 'rrule_type': 'weekly'}) - -- | - The meeting is scheduled on Monday and Friday for 10 times so i can see from the calendar view -- - !python {model: crm.meeting}: | - self.fields_view_get(cr, uid, False, 'calendar', context) -- | - We can check for one of the recurrent event and count the number of meeting. -- - !python {model: crm.meeting}: | - import time - from datetime import datetime, date, timedelta - ids = self.search(cr, uid, [('date', '>=', time.strftime('%Y-%m-%d 00:00:00')), ('date', '<=', (datetime.now()+timedelta(31)).strftime('%Y-%m-%d 00:00:00')), ('name', '=', 'Initial discussion')], context={'virtual_id': True}) - assert len(ids) == 10 - -- | - If I want to edit meetings information for all occurrence I click on "Edit All" button. -- - !python {model: crm.meeting}: | - self.write(cr, uid, [ref('crm_case_initialdiscussion0')], {'edit_all':'True'},context) -- | - I can see that new meeting form is opened with same value. - I change some data for meeting and save it. - I can see from meeting's calendar view that all meeting occurrences are changed accordingly. -- - !record {model: crm.meeting, id: crm.crm_case_initialdiscussion0}: - alarm_id: base_calendar.alarm9 - rrule_type: weekly -- | - In order to invite people(internal user) for this meetings, Create record for - people will come on meeting. -- - !record {model: base_calendar.invite.attendee, id: base_calendar_invite_attendee_0}: - type: internal - send_mail: False - partner_id: base.res_partner_9 - user_ids: - - base.user_demo -- - Now inviting those people which we are registered. -- - !python {model: base_calendar.invite.attendee}: | - self.do_invite(cr, uid, [ref('base_calendar_invite_attendee_0')], {'active_id': ref('crm_case_initialdiscussion0'), 'model' : 'crm.meeting', 'attendee_field':'attendee_ids'}) -- | - All conformation is completed for meeting now going to confirm meeting - and we can check also after completion of meeting, it is done or not. -- - !python {model: crm.meeting}: | - self.case_open(cr, uid, [ref('crm_case_initialdiscussion0')]) - meeting_rec = self.browse(cr, uid, ref("crm_case_initialdiscussion0")) - assert meeting_rec.state == 'open', "Meeting is not in confirm state" - self.case_close(cr, uid, [ref('crm_case_initialdiscussion0')]) - meeting_rec_close = self.browse(cr, uid, ref("crm_case_initialdiscussion0")) - assert meeting_rec_close.state == 'done', "Meeting is not in done state" From 6b19d9baa1d501d18a4dd1550ff50d88d6354faa Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Wed, 12 Oct 2011 16:22:21 +0530 Subject: [PATCH 042/711] [IMP] crm: 1) Improvement in openerp for correct path of crm_meeting.yml bzr revid: ron@tinyerp.com-20111012105221-mxlfnzeg16s93d7u --- addons/crm/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index d7256360d40..51489fd5aa4 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -122,7 +122,7 @@ Creates a dashboard for CRM that includes: 'test/process/crm_lead_open.yml', 'test/process/crm_lead_to_opportunity.yml', 'test/process/cancle_crm_lead.yml', - 'test/process/process_crm_meeting.yml', + 'test/process/crm_meeting.yml', 'test/test_crm_opportunity.yml', 'test/process/process_crm_phonecall.yml', 'test/test_crm_recurrent_meeting.yml', From e355b8b55d9995bb4533fac1f914a83908159f32 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Wed, 12 Oct 2011 17:26:44 +0530 Subject: [PATCH 043/711] [ADD] crm: 1) Added lead_form.yml, 2) Covered onchange_partner operation and unlink operation bzr revid: ron@tinyerp.com-20111012115644-q91ejya01c8k28m1 --- addons/crm/__openerp__.py | 1 + addons/crm/test/ui/lead_form.yml | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 addons/crm/test/ui/lead_form.yml diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index 51489fd5aa4..dee4a6766ed 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -123,6 +123,7 @@ Creates a dashboard for CRM that includes: 'test/process/crm_lead_to_opportunity.yml', 'test/process/cancle_crm_lead.yml', 'test/process/crm_meeting.yml', + 'test/ui/lead_form.yml', 'test/test_crm_opportunity.yml', 'test/process/process_crm_phonecall.yml', 'test/test_crm_recurrent_meeting.yml', diff --git a/addons/crm/test/ui/lead_form.yml b/addons/crm/test/ui/lead_form.yml new file mode 100644 index 00000000000..5ad241ca104 --- /dev/null +++ b/addons/crm/test/ui/lead_form.yml @@ -0,0 +1,20 @@ +- + In order to check for changes on partner, data will be change automatically according to partner, +- + !python {model: crm.lead}: | + action = self.onchange_partner_address_id(cr, uid, ref("crm_case_initialdiscussion0"), ref("base.res_partner_address_notsotinysarl0"), email=False) + assert action['value']['country_id'] == 20, "Country name not True" + assert action['value']['phone'] == '(+32).81.81.37.00', "phone number is wrong" +- + I try to Unlink the Lead I create new record of lead. +- + !record {model: crm.lead, id: crm_lead_intested_openerp}: + name: Interested in openerp +- + In order to test unlink lead, i will do unlink this lead +- + !python {model: crm.lead}: | + from tools.translate import _ + self.unlink(cr, uid, [ref("crm_lead_intested_openerp")]) + id = self.search(cr, uid, [('id', '=', ref("crm_lead_intested_openerp"))]) + assert len(id) < 1, _('Lead is not deleted') From 0df8ef1c6c7b3f0154efb8717617bf9d7b68b2ac Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Wed, 12 Oct 2011 17:51:41 +0530 Subject: [PATCH 044/711] [REF] crm: 1) Rename process_crm_phonecall.yml to crm_phonecall.yml, 2) Covered phonecall and its coverted to opportunity and close this phonecall bzr revid: ron@tinyerp.com-20111012122141-7slvyilesfbxq1cw --- addons/crm/test/process/crm_phonecall.yml | 34 +++++++++ .../test/process/process_crm_phonecall.yml | 73 ------------------- 2 files changed, 34 insertions(+), 73 deletions(-) create mode 100644 addons/crm/test/process/crm_phonecall.yml delete mode 100644 addons/crm/test/process/process_crm_phonecall.yml diff --git a/addons/crm/test/process/crm_phonecall.yml b/addons/crm/test/process/crm_phonecall.yml new file mode 100644 index 00000000000..541f92133fe --- /dev/null +++ b/addons/crm/test/process/crm_phonecall.yml @@ -0,0 +1,34 @@ +- | + For customer or partner purpose, I called to him/her for discussion about openerp. + As the success of phonecall seems to be a real business opportunity, It will convert + it to opportunity. +- + !record {model: crm.phonecall2opportunity, id: crm_phonecall2opportunity_disc_openerp}: + name: Discuss Review Process + partner_id: base.res_partner_tinyatwork + planned_revenue: 0.0 + probability: 0.0 +- | + Business opportunity is now assigned to this phonecall. +- + !assert {model: crm.phonecall, id: crm_case_phone04}: + - opportunity_id != False +- + Succeed phonecall, it will be convert into on opportunity. +- + !python {model: crm.phonecall2opportunity}: | + self.action_apply(cr, uid, [ref("crm_phonecall2opportunity_disc_openerp")], {"active_id": ref("crm_case_phone04")}) +- | + For business And I check that the phonecall and the newly created business + opportunity is linked to same partner. +- + !python {model: crm.phonecall}: | + obj_phonecall = self.browse(cr, uid, ref('crm_case_phone04')) + ids = self.pool.get('crm.lead').search(cr, uid, [('name', '=', obj_phonecall.opportunity_id.name)]) + obj_opp = self.pool.get('crm.lead').browse(cr, uid, ids)[0] + assert obj_phonecall.partner_id == obj_opp.partner_id, "created business opportunity is not linked to same partner" +- + Completion of phonecall, Cheking for phonecall summary is close or not. +- + !assert {model: crm.phonecall, id: crm.crm_case_phone04, string: phonecall is held}: + - state == 'done' diff --git a/addons/crm/test/process/process_crm_phonecall.yml b/addons/crm/test/process/process_crm_phonecall.yml deleted file mode 100644 index 25f3069fac6..00000000000 --- a/addons/crm/test/process/process_crm_phonecall.yml +++ /dev/null @@ -1,73 +0,0 @@ -- | - For customer or partner purpose, I called to him/her for discussion about openerp. -- - !record {model: crm.phonecall, id: crm_phonecall_disc_openerp}: - date: !eval time.strftime('%Y-%m-%d 08:00:00') - name: Discussion About Openerp - duration: 2.0 - section_id: crm.section_sales_department -- - After called to Customer/partner, So creating record to merge with exiting partner -- - !record {model: crm.phonecall2partner, id: crm_phonecall2partner_existed}: - action: exist - partner_id: base.res_partner_9 - -- - We are going to create partner. -- - !python {model: crm.phonecall2partner}: | - - self._select_partner(cr, uid,{"active_ids": [ref("crm_phonecall_disc_openerp")]}) - self.open_create_partner(cr, uid, [ref("crm_phonecall2partner_existed")], {"active_ids": [ref("crm_phonecall_disc_openerp")]}) - self.make_partner(cr, uid, [ref("crm_phonecall2partner_existed")], {"active_ids": [ref("crm_phonecall_disc_openerp")]}) - -- | - As the success of phonecall seems to be a real business opportunity, It will convert - it to opportunity. -- - !record {model: crm.phonecall2opportunity, id: crm_phonecall2opportunity_disc_openerp}: - name: Discussion About Openerp - partner_id: base.res_partner_9 - planned_revenue: 0.0 - probability: 0.0 -- | - Business opportunity is now assigned to this phonecall. -- - !assert {model: crm.phonecall, id: crm_phonecall_disc_openerp}: - - opportunity_id != False -- - Succeed phonecall, it will be convert into on opportunity. -- - !python {model: crm.phonecall2opportunity}: | - self.action_apply(cr, uid, [ref("crm_phonecall2opportunity_disc_openerp")], {"active_id": ref("crm_phonecall_disc_openerp")}) -- | - For business And I check that the phonecall and the newly created business - opportunity is linked to same partner. -- - !python {model: crm.phonecall}: | - obj_phonecall = self.browse(cr, uid, ref('crm_phonecall_disc_openerp')) - ids = self.pool.get('crm.lead').search(cr, uid, [('name', '=', obj_phonecall.opportunity_id.name)]) - obj_opp = self.pool.get('crm.lead').browse(cr, uid, ids)[0] - assert obj_phonecall.partner_id == obj_opp.partner_id -- | - Customer/partner intested with our product, so we will call back to him/her -- - !record {model: crm.phonecall2phonecall, id: crm_phonecall2phonecall_disc_openerp}: - date: !eval "'%s-%s-%s 19:49:00' %(datetime.now().year,datetime.now().month,datetime.now().day)" - name: interest with openerp - section_id: crm.section_sales_department - user_id: base.user_root - action: schedule - categ_id: crm.categ_phone1 -- | - Create other sedular call which is interested customer/partner. -- - !python {model: crm.phonecall2phonecall}: | - self.action_apply(cr, uid, [ref('crm_phonecall2phonecall_disc_openerp')], {'active_id': ref('crm_phonecall_disc_openerp')}) -- | - Completion of phonecall, Cheking for phonecall summary is close or not. -- - !python {model: crm.phonecall}: | - phonecall_rec = self.browse(cr, uid, ref('crm_phonecall_disc_openerp')) - assert phonecall_rec.state == 'done', "Phonecall is not in done state" From cbe30f479ebbfacaf2fd2f287a40efa759227b52 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Wed, 12 Oct 2011 18:07:50 +0530 Subject: [PATCH 045/711] [IMP] crm: 1) Improvement in openerp for correct path of crm_phonecall.yml bzr revid: ron@tinyerp.com-20111012123750-31997j4tkpx4odjt --- addons/crm/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index dee4a6766ed..ff9030cc2e8 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -125,7 +125,7 @@ Creates a dashboard for CRM that includes: 'test/process/crm_meeting.yml', 'test/ui/lead_form.yml', 'test/test_crm_opportunity.yml', - 'test/process/process_crm_phonecall.yml', + 'test/process/crm_phonecall.yml', 'test/test_crm_recurrent_meeting.yml', 'test/test_crm_stage_changes.yml', 'test/test_crm_recurrent_meeting_case2.yml', From 8e32600b09b62c0edd505c2c974c9fa99dad457d Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Wed, 12 Oct 2011 18:22:13 +0530 Subject: [PATCH 046/711] [IMP] crm: Add more assert cheking and remove initial checking on crm_phonecall.yml bzr revid: ron@tinyerp.com-20111012125213-yq4vhekyblxl7017 --- addons/crm/test/process/crm_phonecall.yml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/addons/crm/test/process/crm_phonecall.yml b/addons/crm/test/process/crm_phonecall.yml index 541f92133fe..7f81a7d86fc 100644 --- a/addons/crm/test/process/crm_phonecall.yml +++ b/addons/crm/test/process/crm_phonecall.yml @@ -8,11 +8,6 @@ partner_id: base.res_partner_tinyatwork planned_revenue: 0.0 probability: 0.0 -- | - Business opportunity is now assigned to this phonecall. -- - !assert {model: crm.phonecall, id: crm_case_phone04}: - - opportunity_id != False - Succeed phonecall, it will be convert into on opportunity. - @@ -20,15 +15,13 @@ self.action_apply(cr, uid, [ref("crm_phonecall2opportunity_disc_openerp")], {"active_id": ref("crm_case_phone04")}) - | For business And I check that the phonecall and the newly created business - opportunity is linked to same partner. + opportunity is linked to same partner and also check with phonecall close or not. - !python {model: crm.phonecall}: | obj_phonecall = self.browse(cr, uid, ref('crm_case_phone04')) ids = self.pool.get('crm.lead').search(cr, uid, [('name', '=', obj_phonecall.opportunity_id.name)]) obj_opp = self.pool.get('crm.lead').browse(cr, uid, ids)[0] assert obj_phonecall.partner_id == obj_opp.partner_id, "created business opportunity is not linked to same partner" -- - Completion of phonecall, Cheking for phonecall summary is close or not. -- - !assert {model: crm.phonecall, id: crm.crm_case_phone04, string: phonecall is held}: - - state == 'done' + assert obj_opp.stage_id.name == "New", "Converted opportunity is not in New stage" + assert obj_opp.stage_id.probability == 10.0, "Probability of opportunity is 10.0" + assert obj_phonecall.state == "done", "phonecall is held" From 371ad07f80ff9210a0f309c888392609029d312d Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Wed, 12 Oct 2011 18:54:02 +0530 Subject: [PATCH 047/711] [REF] crm : 1) Renamed cancle_crm_lead.yml to cancel_lead.yml, 2)Renamed crm_lead_to_opportunity.yml to lead2opportunity.yml, 3)Renamed crm_lead_open.yml to lead_open.yml 4)Renamed crm_meeting.yml to meeting.yml 5)Renamed crm_phonecall.yml to phonecall2opportunity.yml bzr revid: ron@tinyerp.com-20111012132402-9xichtqjqdwo5g8i --- addons/crm/test/process/{cancle_crm_lead.yml => cancel_lead.yml} | 0 .../process/{crm_lead_to_opportunity.yml => lead2opportunity.yml} | 0 addons/crm/test/process/{crm_lead_open.yml => lead_open.yml} | 0 addons/crm/test/process/{crm_meeting.yml => meeting.yml} | 0 .../test/process/{crm_phonecall.yml => phonecall2opportunity.yml} | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename addons/crm/test/process/{cancle_crm_lead.yml => cancel_lead.yml} (100%) rename addons/crm/test/process/{crm_lead_to_opportunity.yml => lead2opportunity.yml} (100%) rename addons/crm/test/process/{crm_lead_open.yml => lead_open.yml} (100%) rename addons/crm/test/process/{crm_meeting.yml => meeting.yml} (100%) rename addons/crm/test/process/{crm_phonecall.yml => phonecall2opportunity.yml} (100%) diff --git a/addons/crm/test/process/cancle_crm_lead.yml b/addons/crm/test/process/cancel_lead.yml similarity index 100% rename from addons/crm/test/process/cancle_crm_lead.yml rename to addons/crm/test/process/cancel_lead.yml diff --git a/addons/crm/test/process/crm_lead_to_opportunity.yml b/addons/crm/test/process/lead2opportunity.yml similarity index 100% rename from addons/crm/test/process/crm_lead_to_opportunity.yml rename to addons/crm/test/process/lead2opportunity.yml diff --git a/addons/crm/test/process/crm_lead_open.yml b/addons/crm/test/process/lead_open.yml similarity index 100% rename from addons/crm/test/process/crm_lead_open.yml rename to addons/crm/test/process/lead_open.yml diff --git a/addons/crm/test/process/crm_meeting.yml b/addons/crm/test/process/meeting.yml similarity index 100% rename from addons/crm/test/process/crm_meeting.yml rename to addons/crm/test/process/meeting.yml diff --git a/addons/crm/test/process/crm_phonecall.yml b/addons/crm/test/process/phonecall2opportunity.yml similarity index 100% rename from addons/crm/test/process/crm_phonecall.yml rename to addons/crm/test/process/phonecall2opportunity.yml From bb264832066b97c6f4ae97652aa4feaacf1f5bad Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Wed, 12 Oct 2011 16:48:58 +0200 Subject: [PATCH 048/711] [IMP] res.widget data: Do not try to instantiate twitter api if twitter lib was not successfully fetched. bzr revid: fme@openerp.com-20111012144858-keqaec4f3ru5jvml --- openerp/addons/base/res/res_widget_data.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openerp/addons/base/res/res_widget_data.xml b/openerp/addons/base/res/res_widget_data.xml index 8987e117396..48d53c7a021 100644 --- a/openerp/addons/base/res/res_widget_data.xml +++ b/openerp/addons/base/res/res_widget_data.xml @@ -6,6 +6,7 @@ ]]>
From 08a288eceabce77145d59d1775ef5e903912541c Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Thu, 13 Oct 2011 10:42:32 +0530 Subject: [PATCH 049/711] [IMP]: crm: All changes done on lead2opportunity.yml 1) string improved from lead to opportunity when lead has been qualified 2) checked probability after opportunity had won bzr revid: ron@tinyerp.com-20111013051232-k9oih94g1fvmdhbh --- addons/crm/test/process/lead2opportunity.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/addons/crm/test/process/lead2opportunity.yml b/addons/crm/test/process/lead2opportunity.yml index 2c1ccc65bfb..db85d634b21 100644 --- a/addons/crm/test/process/lead2opportunity.yml +++ b/addons/crm/test/process/lead2opportunity.yml @@ -15,22 +15,23 @@ !assert {model: crm.lead, id: crm.crm_case_qrecorp0, string: Lead is not converted on opportunity}: - type == 'opportunity' - - Finally, i won this lead, so i will close this lead. + Finally, i won this opportunity, so i will close this lead. - !python {model: crm.lead}: | self.case_mark_won(cr, uid, [ref("crm_case_qrecorp0")]) - - In order to test lead, it is close or not. + In order to test opportunity, it is close or not. - !assert {model: crm.lead, id: crm.crm_case_qrecorp0, string: Lead in done state}: - state == "done" -- - After won this lead probability is 100. -- - !assert {model: crm.lead, id: crm.crm_case_qrecorp0, string: Probability is equal to 100}: - - probability == 100.0 - In order to test stage of opportunity after win, i will test stage of opportunity. - !assert {model: crm.lead, id: crm.crm_case_qrecorp0, string: stage of opportunity is win}: - stage_id.name == "Won" +- + After won the opportunity, i will test probability is 100. +- + !assert {model: crm.lead, id: crm.crm_case_qrecorp0, string: Probability is equal to 100}: + - probability == 100.0 + \ No newline at end of file From 0d3652a60b657ad055634276c3de2519414d61e3 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Thu, 13 Oct 2011 11:06:51 +0530 Subject: [PATCH 050/711] [IMP] crm : All renamed file name Updated on __opnerp.py file bzr revid: ron@tinyerp.com-20111013053651-yfoku3auqg1s730i --- addons/crm/__openerp__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index ff9030cc2e8..54cc33c1dd9 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -119,13 +119,13 @@ Creates a dashboard for CRM that includes: 'crm_phonecall_demo.xml', ], 'test': [ - 'test/process/crm_lead_open.yml', - 'test/process/crm_lead_to_opportunity.yml', - 'test/process/cancle_crm_lead.yml', - 'test/process/crm_meeting.yml', + 'test/process/lead_open.yml', + 'test/process/lead2opportunity.yml', + 'test/process/cancel_lead.yml', + 'test/process/meeting.yml', 'test/ui/lead_form.yml', 'test/test_crm_opportunity.yml', - 'test/process/crm_phonecall.yml', + 'test/process/phonecall2opportunity.yml', 'test/test_crm_recurrent_meeting.yml', 'test/test_crm_stage_changes.yml', 'test/test_crm_recurrent_meeting_case2.yml', From 5cdcd1bf45ac8dee47c8fcba4adc44934456ace7 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Thu, 13 Oct 2011 11:22:09 +0530 Subject: [PATCH 051/711] [IMP]: crm: All changes done on phonecall2opportunity.yml 1) string improved because put more assert, 2) Removed code search by name Its done by id all bzr revid: ron@tinyerp.com-20111013055209-3e6741omkojcs9vm --- addons/crm/test/process/phonecall2opportunity.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/addons/crm/test/process/phonecall2opportunity.yml b/addons/crm/test/process/phonecall2opportunity.yml index 7f81a7d86fc..89b11a80f50 100644 --- a/addons/crm/test/process/phonecall2opportunity.yml +++ b/addons/crm/test/process/phonecall2opportunity.yml @@ -15,13 +15,11 @@ self.action_apply(cr, uid, [ref("crm_phonecall2opportunity_disc_openerp")], {"active_id": ref("crm_case_phone04")}) - | For business And I check that the phonecall and the newly created business - opportunity is linked to same partner and also check with phonecall close or not. + opportunity is linked to same partner and also check with phonecall closed and opportunity + is on intial stage or not. - !python {model: crm.phonecall}: | - obj_phonecall = self.browse(cr, uid, ref('crm_case_phone04')) - ids = self.pool.get('crm.lead').search(cr, uid, [('name', '=', obj_phonecall.opportunity_id.name)]) - obj_opp = self.pool.get('crm.lead').browse(cr, uid, ids)[0] - assert obj_phonecall.partner_id == obj_opp.partner_id, "created business opportunity is not linked to same partner" - assert obj_opp.stage_id.name == "New", "Converted opportunity is not in New stage" - assert obj_opp.stage_id.probability == 10.0, "Probability of opportunity is 10.0" - assert obj_phonecall.state == "done", "phonecall is held" + phonecall = self.browse(cr, uid, ref('crm_case_phone04')) + assert phonecall.partner_id.id == phonecall.opportunity_id.partner_id.id, "created business opportunity is not linked to same partner" + assert phonecall.opportunity_id.stage_id.id == ref("stage_lead1"), "Converted opportunity is not in Initial stage" + assert phonecall.state == "done", "phonecall is held" From f7da9553df2138294d98d5744a88b3cd4d6cb72c Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Thu, 13 Oct 2011 12:04:11 +0530 Subject: [PATCH 052/711] [REF, IMP]: crm: All changes done on cancel_lead.yml 1) Put more assert and done code more reliable, 2) checked all assert differently 3) Improved string bzr revid: ron@tinyerp.com-20111013063411-bestdccmzkqo8w4y --- addons/crm/test/process/cancel_lead.yml | 67 ++++++++++++++++++------- 1 file changed, 48 insertions(+), 19 deletions(-) diff --git a/addons/crm/test/process/cancel_lead.yml b/addons/crm/test/process/cancel_lead.yml index c8d02c6414c..3a3366c05e4 100644 --- a/addons/crm/test/process/cancel_lead.yml +++ b/addons/crm/test/process/cancel_lead.yml @@ -1,22 +1,43 @@ - - Cheking for lead from any stage, It will be cancle or not. + Cheking for lead from draft to cancel, I will cancelling this lead. - !python {model: crm.lead}: | - lead_on_draft=self.browse(cr, uid, ref("crm_case_itisatelesalescampaign0")) - assert lead_on_draft.state == 'draft', "Lead is not in draft state" self.case_cancel(cr, uid, [ref("crm_case_itisatelesalescampaign0")]) - lead_on_cancel=self.browse(cr, uid, ref("crm_case_itisatelesalescampaign0")) - assert lead_on_cancel.state == 'cancel', "Lead is not in cancel state" +- + In order to test for cancel lead , i will test lead is on cancel state. +- + !assert {model: crm.lead, id: crm.crm_case_itisatelesalescampaign0, string: Lead is in cancel state}: + - state == "cancel" +- + Cheking for lead from cancel to reset, I will reseting this lead. +- + !python {model: crm.lead}: | self.case_reset(cr, uid, [ref("crm_case_itisatelesalescampaign0")]) - lead_on_reset=self.browse(cr, uid, ref("crm_case_itisatelesalescampaign0")) - assert lead_on_reset.state == 'draft', "Lead is not in draft state" +- + In order to test for reset lead , i will test lead is on draft state. +- + !assert {model: crm.lead, id: crm.crm_case_itisatelesalescampaign0, string: Lead is in draft state}: + - state == "draft" +- + Cheking for lead from reset to pending, I will pending this lead. +- + !python {model: crm.lead}: | self.case_pending(cr, uid, [ref("crm_case_itisatelesalescampaign0")]) - lead_on_pending=self.browse(cr, uid, ref("crm_case_itisatelesalescampaign0")) - assert lead_on_pending.state == 'pending', "Lead is not in pending state" +- + In order to test for pending lead , i will test lead is on pending state. +- + !assert {model: crm.lead, id: crm.crm_case_itisatelesalescampaign0, string: Lead is in pending state}: + - state == "pending" +- + Cheking for lead from pending to cancel, I will cancelling this lead. +- + !python {model: crm.lead}: | self.case_cancel(cr, uid, [ref("crm_case_itisatelesalescampaign0")]) - lead_pending_cancel=self.browse(cr, uid, ref("crm_case_itisatelesalescampaign0")) - assert lead_pending_cancel.state == 'cancel', "Lead is not in cancel state" - +- + In order to test for cancel lead , i will test lead is on cancel state. +- + !assert {model: crm.lead, id: crm.crm_case_itisatelesalescampaign0, string: Lead is in cancel state}: + - state == "cancel" - For working on parent child relationship, we are creating sales executive department that will be work under Sales Department. @@ -36,13 +57,21 @@ department or not. - !python {model: crm.lead}: | - lead_rec=self.browse(cr, uid, ref("crm_case_itisatelesalescampaign0")) self.case_reset(cr, uid, [ref("crm_case_itisatelesalescampaign0")]) - lead_cancle_reset=self.browse(cr, uid, ref("crm_case_itisatelesalescampaign0")) - assert lead_cancle_reset.state == 'draft', "Lead is not in draft state" self.case_escalate(cr, uid, [ref("crm_case_itisatelesalescampaign0")]) - lead_on_escalate=self.browse(cr, uid, ref("crm_case_itisatelesalescampaign0")) - assert lead_on_escalate.section_id.name == 'Sales Department', "Do not Escalate lead to on sales team from Executive team" +- + In order to test for escalate lead , i will test lead Escalate from sales Department from Executive + department. +- + !assert {model: crm.lead, id: crm.crm_case_itisatelesalescampaign0, string: Escalate lead to on sales team from Executive teame}: + - section_id.name == "Sales Department" +- + Cheking for lead from escalate to cancel, I will cancelling this lead. +- + !python {model: crm.lead}: | self.case_cancel(cr, uid, [ref("crm_case_itisatelesalescampaign0")]) - lead_escalate_cancel=self.browse(cr, uid, ref("crm_case_itisatelesalescampaign0")) - assert lead_escalate_cancel.state == 'cancel', "Lead is not in cancel state" +- + In order to test for cancel lead , i will test lead is on cancel state. +- + !assert {model: crm.lead, id: crm.crm_case_itisatelesalescampaign0, string: Lead is in cancel state}: + - state == "cancel" From 57cc6f533c3ec69285922f68c5261457cdd81807 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Thu, 13 Oct 2011 12:40:53 +0530 Subject: [PATCH 053/711] [REF, IMP]: crm: default value removed from phonecall2opportunity.yml bzr revid: ron@tinyerp.com-20111013071053-nqzonf822815l3ey --- addons/crm/test/process/phonecall2opportunity.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/crm/test/process/phonecall2opportunity.yml b/addons/crm/test/process/phonecall2opportunity.yml index 89b11a80f50..2575daf8665 100644 --- a/addons/crm/test/process/phonecall2opportunity.yml +++ b/addons/crm/test/process/phonecall2opportunity.yml @@ -6,8 +6,6 @@ !record {model: crm.phonecall2opportunity, id: crm_phonecall2opportunity_disc_openerp}: name: Discuss Review Process partner_id: base.res_partner_tinyatwork - planned_revenue: 0.0 - probability: 0.0 - Succeed phonecall, it will be convert into on opportunity. - From 5fb61d943f311c81ed52572bbf60fa785c160035 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Thu, 13 Oct 2011 14:41:23 +0530 Subject: [PATCH 054/711] [REF, IMP]: crm: All changes done on lead_form.yml 1) Added lead on form for copy and delete function 2) Checked code according to delete lead bzr revid: ron@tinyerp.com-20111013091123-refu3d0l1b7g7swl --- addons/crm/test/ui/lead_form.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/addons/crm/test/ui/lead_form.yml b/addons/crm/test/ui/lead_form.yml index 5ad241ca104..2e73aa5766b 100644 --- a/addons/crm/test/ui/lead_form.yml +++ b/addons/crm/test/ui/lead_form.yml @@ -2,19 +2,20 @@ In order to check for changes on partner, data will be change automatically according to partner, - !python {model: crm.lead}: | - action = self.onchange_partner_address_id(cr, uid, ref("crm_case_initialdiscussion0"), ref("base.res_partner_address_notsotinysarl0"), email=False) + action = self.onchange_partner_address_id(cr, uid, ref("crm_case_qrecorp0"), ref("base.res_partner_address_notsotinysarl0"), email=False) assert action['value']['country_id'] == 20, "Country name not True" assert action['value']['phone'] == '(+32).81.81.37.00', "phone number is wrong" - I try to Unlink the Lead I create new record of lead. - - !record {model: crm.lead, id: crm_lead_intested_openerp}: - name: Interested in openerp + !record {model: crm.lead, id: crm_case_new_lead}: + name: Opnerp Trainning + state: cancel - In order to test unlink lead, i will do unlink this lead - !python {model: crm.lead}: | - from tools.translate import _ - self.unlink(cr, uid, [ref("crm_lead_intested_openerp")]) - id = self.search(cr, uid, [('id', '=', ref("crm_lead_intested_openerp"))]) - assert len(id) < 1, _('Lead is not deleted') + try: + self.unlink(cr, uid, [ref("crm_case_new_lead")]) + except: + pass From 213fa886f1603853779b17282caa77323f564c5c Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Thu, 13 Oct 2011 14:59:24 +0530 Subject: [PATCH 055/711] [REF, IMP]: crm: Added copy of lead and checked on lead_form.yml bzr revid: ron@tinyerp.com-20111013092924-oowazupgpnajrqpb --- addons/crm/test/ui/lead_form.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/crm/test/ui/lead_form.yml b/addons/crm/test/ui/lead_form.yml index 2e73aa5766b..c6cbbb3fcb2 100644 --- a/addons/crm/test/ui/lead_form.yml +++ b/addons/crm/test/ui/lead_form.yml @@ -9,12 +9,15 @@ I try to Unlink the Lead I create new record of lead. - !record {model: crm.lead, id: crm_case_new_lead}: - name: Opnerp Trainning + name: Openerp Trainning state: cancel - In order to test unlink lead, i will do unlink this lead - !python {model: crm.lead}: | + self.copy(cr, uid, ref("crm_case_new_lead")) + sid = self.search(cr, uid, [('name', '=', 'Openerp Trainning')]) + assert len(sid) == 2, 'Lead is not copied Successfully' try: self.unlink(cr, uid, [ref("crm_case_new_lead")]) except: From c5f5637e0992158734adda1782b725e24546dc6e Mon Sep 17 00:00:00 2001 From: "Kunal Chavda (OpenERP)" Date: Thu, 13 Oct 2011 16:30:39 +0530 Subject: [PATCH 056/711] [IMP]trying to setvalue into edit node data. bzr revid: kch@tinyerp.com-20111013110039-i92u5ghg9kjzxwe6 --- addons/web/static/src/js/view_editor.js | 50 ++++++++++++++++++++----- addons/web/static/src/js/view_form.js | 18 ++++----- addons/web/static/src/xml/base.xml | 6 +-- 3 files changed, 52 insertions(+), 22 deletions(-) diff --git a/addons/web/static/src/js/view_editor.js b/addons/web/static/src/js/view_editor.js index 4378ac4a0a9..87744825207 100644 --- a/addons/web/static/src/js/view_editor.js +++ b/addons/web/static/src/js/view_editor.js @@ -1,6 +1,7 @@ openerp.web.view_editor = function(openerp) { var _PROPERTIES = { - 'field' : ['required', 'readonly'], + 'field' : ['name', 'string', 'required', 'readonly', 'domain', 'context', 'nolabel', 'completion', + 'colspan', 'eval', 'ref', 'on_change', 'attrs'], 'form' : ['string', 'col', 'link'], 'notebook' : ['colspan', 'position', 'groups'], 'page' : ['string', 'states', 'attrs', 'groups'], @@ -22,7 +23,6 @@ var _PROPERTIES = { }; var QWeb = openerp.web.qweb; openerp.web.ViewEditor = openerp.web.Widget.extend({ - init: function(parent, element_id, dataset, view, options) { this._super(parent); this.element_id = element_id @@ -107,7 +107,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ render_name+= ">"; xml_tag+= ">"; }); - obj.main_xml = xml_tag; + obj.main_xml = xml; obj.name = render_name; return obj; }, @@ -287,7 +287,6 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ this.dialog.$element.html(QWeb.render('view_editor', { 'data': one_object['main_object'], })); - $("tr[id^='viewedit-']").click(function() { $("tr[id^='viewedit-']").removeClass('ui-selected'); $(this).addClass('ui-selected'); @@ -439,10 +438,18 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ db = new openerp.web.DataSetSearch(self,'ir.model.fields', null, null); db.read_slice([],{domain : [['model_id','=',result[0].id],['name','=',fld_name]]},function (res) { // res will use for getting value of fields. + var widget = ['readonly','required','nolable','completion','groups','position','icon','align']; var k = {"attrs":{"modifiers":"{'readonly':true}","name":"name"},"children":[],"tag":"field"}; _.each(properties,function(record){ - var type_widget = new (self.property.get_any(['undefined' , record, 'field'])) (self.dialog, k); - $("div[id='"+self.dialog.element_id+"']").append('
'+record+''+type_widget.render()+'
'); + if (_.include(widget,record)){ + var type_widget = new (self.property.get_any(['undefined' , record, 'field'])) (self.dialog, k); + $("div[id='"+self.dialog.element_id+"']").append('
'+record+''+type_widget.render()+'
'); + type_widget.set_value(res[0][record]); + }else{ + var type_widget = new openerp.web.ViewEditor.FieldChar (self.dialog, k); + $("div[id='"+self.dialog.element_id+"']").append('
'+record+''+type_widget.render()+'
'); + type_widget.set_value(res[0][record]); + } }); }); }); @@ -450,12 +457,36 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ }); openerp.web.ViewEditor.FieldBoolean = openerp.web.form.FieldBoolean.extend({ init: function(view, node) { - //this._super(view, node); - this.template = "FieldBoolean"; + this.$element = view.$element; }, start: function() { var self = this; this._super.apply(this, arguments); + }, + set_value: function(value) { + if (value === false || value === undefined) { + // As in GTK client, floats default to 0 + value = 0; + this.dirty = true; + } + this._super.apply(this, [value]); + } +}); +openerp.web.ViewEditor.FieldChar = openerp.web.form.FieldChar.extend({ + init: function(view, node) { + this.$element = view.$element; + }, + start: function() { + var self = this; + this._super.apply(this, arguments); + }, + set_value: function(value) { + if (value === false || value === undefined) { + // As in GTK client, floats default to 0 + value = 0; + this.dirty = true; + } + this._super.apply(this, [value]); } }); @@ -464,8 +495,7 @@ openerp.web.ViewEditor.property_widget = new openerp.web.Registry({ 'readonly' : 'openerp.web.ViewEditor.FieldBoolean', 'nolabel' : 'openerp.web.ViewEditor.FieldBoolean', 'completion' : 'openerp.web.ViewEditor.FieldBoolean', - /*'widget' : '', - 'groups' : '', + /*'groups' : 'openerp.web.ViewEditor.WidgetFrame', 'position': '', 'icon': '', 'align': '' */ diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 11ebad8d093..e184424fbd6 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -14,7 +14,7 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView# /** * @constructs openerp.web.FormView * @extends openerp.web.View - * + * * @param {openerp.web.Session} session the current openerp session * @param {openerp.web.DataSet} dataset the dataset this view will work with * @param {String} view_id the identifier of the OpenERP view object @@ -1042,7 +1042,7 @@ openerp.web.form.Field = openerp.web.form.Widget.extend(/** @lends openerp.web.f }, update_dom: function() { this._super.apply(this, arguments); - if (this.field.translate) { + /* if (this.field.translate) { this.$element.find('.oe_field_translate').toggle(!!this.view.datarecord.id); } if (!this.disable_utility_classes) { @@ -1051,7 +1051,7 @@ openerp.web.form.Field = openerp.web.form.Widget.extend(/** @lends openerp.web.f if (this.view.show_invalid) { this.$element.toggleClass('invalid', !this.is_valid()); } - } + }*/ }, on_ui_change: function() { this.dirty = this.view.dirty_for_user = true; @@ -2274,7 +2274,7 @@ openerp.web.form.SelectCreatePopup = openerp.web.OldWidget.extend(/** @lends ope }).pipe(function() { self.searchview.do_search(); }); - + }); this.searchview.appendTo($("#" + this.element_id + "_search")); }, @@ -2647,13 +2647,13 @@ openerp.web.form.FieldStatus = openerp.web.form.Field.extend({ start: function() { this._super(); this.selected_value = null; - + this.render_list(); }, set_value: function(value) { this._super(value); this.selected_value = value; - + this.render_list(); }, render_list: function() { @@ -2661,7 +2661,7 @@ openerp.web.form.FieldStatus = openerp.web.form.Field.extend({ var shown = _.map(((this.node.attrs || {}).statusbar_visible || "").split(","), function(x) { return x.trim(); }); shown = _.select(shown, function(x) { return x.length > 0; }); - + if (shown.length == 0) { this.to_show = this.field.selection; } else { @@ -2669,10 +2669,10 @@ openerp.web.form.FieldStatus = openerp.web.form.Field.extend({ return _.indexOf(shown, x[0]) !== -1 || x[0] === self.selected_value; }); } - + var content = openerp.web.qweb.render("FieldStatus.content", {widget: this, _:_}); this.$element.html(content); - + var colors = JSON.parse((this.node.attrs || {}).statusbar_colors || "{}"); var color = colors[this.selected_value]; if (color) { diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 04bd475fd1c..b8da6dcab78 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -773,13 +773,13 @@

- - +
Date: Thu, 13 Oct 2011 17:13:04 +0530 Subject: [PATCH 057/711] [REF]: crm: Added more checking after convert opportunity from lead and also added partner on existing record on lead2opportunity.yml bzr revid: ron@tinyerp.com-20111013114304-wuxvpnnmubtc9s8r --- addons/crm/test/process/lead2opportunity.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/addons/crm/test/process/lead2opportunity.yml b/addons/crm/test/process/lead2opportunity.yml index db85d634b21..5a9668adfd3 100644 --- a/addons/crm/test/process/lead2opportunity.yml +++ b/addons/crm/test/process/lead2opportunity.yml @@ -2,18 +2,24 @@ As the lead seems to be a real business opportunity, I will convert it to a partner and a business opportunity. - - !record {model: crm.lead2opportunity.partner, id: crm_lead2opportunity_partner_create_1}: - action: 'exist' + !record {model: crm.lead2opportunity.partner, id: crm_lead2opportunity_partner_create_1}: + action: 'exist' + partner_id: base.res_partner_agrolait - Create opportunity based on exiting partner - - !python {model: crm.lead2opportunity.partner}: | - self.action_apply(cr, uid, [ref("crm_lead2opportunity_partner_create_1")], {'active_ids': [ref("crm_case_qrecorp0")], 'active_id': ref("crm_case_qrecorp0")}) + !python {model: crm.lead2opportunity.partner}: | + self.action_apply(cr, uid, [ref("crm_lead2opportunity_partner_create_1")], {'active_ids': [ref("crm_case_qrecorp0")], 'active_id': ref("crm_case_qrecorp0")}) - In order to test lead, i will test to lead is converted to opportunity. - - !assert {model: crm.lead, id: crm.crm_case_qrecorp0, string: Lead is not converted on opportunity}: - - type == 'opportunity' + !python {model: crm.lead}: | + lead = self.browse(cr, uid, ref('crm_case_qrecorp0')) + assert lead.type == 'opportunity', 'Lead is not converted to opportunity!' + assert lead.planned_revenue == 0.0, 'Planned revenue should be 0!' + assert lead.probability == 0.0, 'probability revenue should be 0!' + assert lead.partner_id.id == ref("base.res_partner_agrolait"), 'Partner missmatch!' + assert lead.stage_id.id == ref("stage_lead1"), 'Stage of probability is incorrect!' - Finally, i won this opportunity, so i will close this lead. - @@ -34,4 +40,3 @@ - !assert {model: crm.lead, id: crm.crm_case_qrecorp0, string: Probability is equal to 100}: - probability == 100.0 - \ No newline at end of file From c8b4c07d9b5bbf256249e9c51d6d5e83cf8b60cd Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Thu, 13 Oct 2011 18:42:02 +0530 Subject: [PATCH 058/711] [ADD]: crm: Added new yml lead2_mass_convert_opportunity.yml 1) cheked convert two lead to opportunity. 2) Checked record according to lead bzr revid: ron@tinyerp.com-20111013131202-aku0tvzavpyz4efp --- addons/crm/__openerp__.py | 1 + .../lead2_mass_convert_opportunity.yml | 32 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 addons/crm/test/process/lead2_mass_convert_opportunity.yml diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index 54cc33c1dd9..508c7dff370 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -123,6 +123,7 @@ Creates a dashboard for CRM that includes: 'test/process/lead2opportunity.yml', 'test/process/cancel_lead.yml', 'test/process/meeting.yml', + 'test/process/lead2_mass_convert_opportunity.yml', 'test/ui/lead_form.yml', 'test/test_crm_opportunity.yml', 'test/process/phonecall2opportunity.yml', diff --git a/addons/crm/test/process/lead2_mass_convert_opportunity.yml b/addons/crm/test/process/lead2_mass_convert_opportunity.yml new file mode 100644 index 00000000000..22c22d7a376 --- /dev/null +++ b/addons/crm/test/process/lead2_mass_convert_opportunity.yml @@ -0,0 +1,32 @@ +- + Using mass wizard, convert two lead to opportunity. +- + !record {model: crm.lead2opportunity.partner.mass, id: crm_lead2opportunity_partner_mass0}: + user_ids: + - base.user_root + section_id: crm.section_sales_department +- + Leads coverts to mass opportunity. +- + !python {model: crm.lead2opportunity.partner.mass}: | + self.mass_convert(cr, uid, [ref("crm_lead2opportunity_partner_mass0")],{'active_ids': [ref("crm_case_employee0"), ref("crm_case_electonicgoodsdealer0")], 'active_id': ref("crm_case_qrecorp0")}) +- + First lead converted on opportunity.i test it. +- + !python {model: crm.lead}: | + lead = self.browse(cr, uid, ref('crm_case_employee0')) + assert lead.type == 'opportunity', 'Lead is not converted to opportunity!' + assert lead.planned_revenue == 0.0, 'Planned revenue should be 0!' + assert lead.probability == 0.0, 'probability revenue should be 0!' + assert lead.partner_id.name == "Agrolait", 'Partner missmatch!' + assert lead.stage_id.id == ref("stage_lead1"), 'Stage of probability is incorrect!' +- + Second lead converted on opportunity.i test it. +- + !python {model: crm.lead}: | + lead = self.browse(cr, uid, ref('crm_case_electonicgoodsdealer0')) + assert lead.type == 'opportunity', 'Lead is not converted to opportunity!' + assert lead.planned_revenue == 0.0, 'Planned revenue should be 0!' + assert lead.probability == 0.0, 'probability revenue should be 0!' + assert lead.partner_id.name == "Le Club SARL", 'Partner missmatch!' + assert lead.stage_id.id == ref("stage_lead1"), 'Stage of probability is incorrect!' From d0f70e9b29ee482c2ead91b04267c4c7e20afadd Mon Sep 17 00:00:00 2001 From: Dmitrijs Ledkovs Date: Thu, 13 Oct 2011 17:20:21 +0100 Subject: [PATCH 059/711] [IMP] allow to unset fields in yaml import lp bug: https://launchpad.net/bugs/873456 fixed bzr revid: dmitrijs.ledkovs@credativ.co.uk-20111013162021-225j5kl25bg9su3a --- openerp/tools/yaml_import.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openerp/tools/yaml_import.py b/openerp/tools/yaml_import.py index 91cdda1b896..0ec52a9bdf6 100644 --- a/openerp/tools/yaml_import.py +++ b/openerp/tools/yaml_import.py @@ -164,6 +164,8 @@ class YamlInterpreter(object): self.logger.log(logging.ERROR, 'id: %s is to long (max: 64)', id) def get_id(self, xml_id): + if xml_id == None: + return None if not xml_id: raise YamlImportException("The xml_id should be a non empty string.") if isinstance(xml_id, types.IntType): From a589f59ee9822e71020c4da02957852d5a223316 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Fri, 14 Oct 2011 11:54:32 +0530 Subject: [PATCH 060/711] [ADD]: crm: Added new yml merge2opportunity.yml 1) Merged two opportunity. 2) Checked Merged opportunity succeed bzr revid: ron@tinyerp.com-20111014062432-gywyd1nevu33wfwy --- addons/crm/__openerp__.py | 1 + addons/crm/test/process/merge2opportunity.yml | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 addons/crm/test/process/merge2opportunity.yml diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index 508c7dff370..7a30166b46d 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -122,6 +122,7 @@ Creates a dashboard for CRM that includes: 'test/process/lead_open.yml', 'test/process/lead2opportunity.yml', 'test/process/cancel_lead.yml', + 'test/process/merge2opportunity.yml', 'test/process/meeting.yml', 'test/process/lead2_mass_convert_opportunity.yml', 'test/ui/lead_form.yml', diff --git a/addons/crm/test/process/merge2opportunity.yml b/addons/crm/test/process/merge2opportunity.yml new file mode 100644 index 00000000000..2161e191a81 --- /dev/null +++ b/addons/crm/test/process/merge2opportunity.yml @@ -0,0 +1,17 @@ +- + I Merge two Opportunities. +- + !python {model: crm.merge.opportunity}: | + op_ids=self.pool.get('crm.lead').browse(cr, uid, [ref('crm_case_bankwealthy2'), ref('crm_case_unifliege')]) + self.merge(cr, uid, op_ids) + +- + I will test merged two opportunity. +- + !python {model: crm.lead}: | + lead = self.browse(cr, uid, ref('crm_case_bankwealthy2')) + merge = 'Merged opportunities' in lead.message_ids[0].subject + assert merge,'Fail to create Merge opportunity' + assert lead.type == 'opportunity', 'Merged opportunity type not change!' + assert lead.partner_id.id == ref("base.res_partner_accent"), 'Partner missmatch!' + assert lead.stage_id.id == ref("stage_lead2"), 'Stage of probability is incorrect!' From 2e897842ff538499e679d424789772124154740f Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Fri, 14 Oct 2011 12:50:00 +0530 Subject: [PATCH 061/711] [REM]: crm: 1)Removed test_crm_opportunity.yml, 2)Removed test_crm_lead_case2.yml, 3)Removed test_crm_opportunity_case2.yml bzr revid: ron@tinyerp.com-20111014072000-yl3q15mdimss6fri --- addons/crm/__openerp__.py | 3 - addons/crm/test/test_crm_lead_case2.yml | 151 ------------------ addons/crm/test/test_crm_opportunity.yml | 113 ------------- .../crm/test/test_crm_opportunity_case2.yml | 45 ------ 4 files changed, 312 deletions(-) delete mode 100644 addons/crm/test/test_crm_lead_case2.yml delete mode 100644 addons/crm/test/test_crm_opportunity.yml delete mode 100644 addons/crm/test/test_crm_opportunity_case2.yml diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index 7a30166b46d..e3bd172d4e1 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -126,13 +126,10 @@ Creates a dashboard for CRM that includes: 'test/process/meeting.yml', 'test/process/lead2_mass_convert_opportunity.yml', 'test/ui/lead_form.yml', - 'test/test_crm_opportunity.yml', 'test/process/phonecall2opportunity.yml', 'test/test_crm_recurrent_meeting.yml', 'test/test_crm_stage_changes.yml', 'test/test_crm_recurrent_meeting_case2.yml', - 'test/test_crm_lead_case2.yml', - 'test/test_crm_opportunity_case2.yml', 'test/test_crm_phonecall_case2.yml', 'test/test_crm_partner2opportunity.yml', 'test/test_crm_segmentation.yml', diff --git a/addons/crm/test/test_crm_lead_case2.yml b/addons/crm/test/test_crm_lead_case2.yml deleted file mode 100644 index af1b7e7e07b..00000000000 --- a/addons/crm/test/test_crm_lead_case2.yml +++ /dev/null @@ -1,151 +0,0 @@ -- - In order to do complete test the CRM in OpenERP, - I will create new full configured record and carry test on it. -- | - I Start by creating "Test Sales Team" with No Unlink. - I create a crm.case.section record. -- - !record {model: crm.case.section, id: crm_case_section_demosalesteam}: - code: DEMO - complete_name: Test Sales Team - name: Test Sales Team - allow_unlink: False - member_ids: - - base.user_admin - stage_ids: - - crm.stage_lead1 - - crm.stage_lead2 - - crm.stage_lead3 - - crm.stage_lead4 - - crm.stage_lead5 - - crm.stage_lead6 - working_hours: 0.0 - resource_calendar_id: resource.timesheet_group1 - parent_id: crm.section_sales_department -- - I assign segmentation. -- - !record {model: res.users, id: base.user_root}: - context_section_id: crm_case_section_demosalesteam -- | - I create a new lead "Test Customer" and I provide an address to this - demo customer and email "info@democustomer.com" and Also "Test Sales Team". -- - !record {model: crm.lead, id: crm_lead_democustomer}: - email_from: info@democustomer.com - name: Test Customer - partner_name: NotSoTinySARL - phone: (+32).81.81.37.00 - mobile: (+32).81.81.37.00 - section_id: crm_case_section_demosalesteam - referred: False - type: lead -- - I check that the lead is in 'draft' state. -- - !assert {model: crm.lead, id: crm_lead_democustomer, string: Lead in Draft}: - - state == "draft" -- - I create categories. -- - !record {model: crm.case.categ, id: crm_case_categ0}: - name: crm_case_section_demosalesteam - section_id: crm_case_section_demosalesteam -- - I assigning contact detail to the Lead "Test Customer" without address. -- - !python {model: crm.lead}: | - self.onchange_partner_address_id(cr, uid, ref("crm_lead_democustomer"), None, email=False) - -- - I assigning contact detail to the Lead "Test Customer" with address. -- - !python {model: crm.lead}: | - self.onchange_partner_address_id(cr, uid, ref("crm_lead_democustomer"), ref("base.res_partner_address_notsotinysarl0"), email=False) - -- - I selecting email "Opt-out" option for the "Test Customer" Lead. -- - !python {model: crm.lead}: | - self.on_change_optout(cr, uid, ref("crm_lead_democustomer"), True) - -- - I change the Opt-out to Opt-in to show email receive preference. -- - !python {model: crm.lead}: | - self.on_change_optin(cr, uid, ref("crm_lead_democustomer"), True) -- - I open lead by click on "Open" button. -- - !python {model: crm.lead}: | - self.case_open(cr, uid, [ref("crm_lead_democustomer")]) -- - I check that lead "Test Customer" is now in 'open' state. -- - !assert {model: crm.lead, id: crm_lead_democustomer, string: Lead in open state}: - - state == "open" -- - I reset the lead "Test Customer". -- - !python {model: crm.lead}: | - self.case_reset(cr, uid, [ref("crm_lead_democustomer")]) -- - I again opening lead by click on "Open" button. -- - !python {model: crm.lead}: | - self.case_open(cr, uid, [ref("crm_lead_democustomer")]) -- - I setting stage "New" for the lead "Test Customer". -- - !python {model: crm.lead}: | - self.stage_next(cr, uid, [ref("crm_lead_democustomer")], context={'stage_type': 'lead'}) -- - I try to Unlink the Lead "Test Customer" demo Lead. -- - !python {model: crm.lead}: | - try: - self.unlink(cr, uid, [ref("crm_lead_democustomer")]) - except: - pass -- - I setting Lead "Test Customer" to Pending State. -- - !python {model: crm.lead}: | - self.case_pending(cr, uid, [ref("crm_lead_democustomer")]) -- - I check that lead "Test Customer" is now in 'Pending' state. -- - !assert {model: crm.lead, id: crm_lead_democustomer, string: Lead in Pending state}: - - state == "pending" -- - I Escalate the Lead "Test Customer" Parent "Sales Team". -- - !python {model: crm.lead}: | - self.case_escalate(cr, uid, [ref("crm_lead_democustomer")]) -- - I add Internal Note Saying Escalated Reason. -- - !record {model: crm.add.note, id: crm_add_note_0}: - body: Sales Lead Has Been Escalated Due to Some Technical reason to the parent 'Sales - Team' - state: unchanged -- - I click a note button to attach the record. -- - !python {model: crm.add.note}: | - context['active_model'] = "crm.lead" - context['active_ids'] = [ref("crm_lead_democustomer")] - self.action_add(cr, uid, [ref("crm_add_note_0")], context=context) - -- - I Copying this lead "Test Customer" to New Lead. -- - !python {model: crm.lead}: | - self.copy(cr, uid, ref("crm_lead_democustomer")) -- - I checking the Lead Copied or Not. -- - !python {model: crm.lead}: | - sid = self.search(cr, uid, [('name', '=', 'Test Customer'),('state', '=', 'draft')]) - if not sid: - raise AssertionError("Lead is not copied Successfully") diff --git a/addons/crm/test/test_crm_opportunity.yml b/addons/crm/test/test_crm_opportunity.yml deleted file mode 100644 index 8f171311b4d..00000000000 --- a/addons/crm/test/test_crm_opportunity.yml +++ /dev/null @@ -1,113 +0,0 @@ -- | - I start by creating a new Opportunity. And I select partner for opportunity. - I can see that after selecting partner his contact and email is automatically filled. -- - !record {model: crm.lead, id: crm_opportunity_abcfuelcounits0}: - email_from: info@balmerinc.be - name: 'ABC FUEL CO 829264 - 10002 units' - partner_address_id: base.res_partner_address_1 - partner_id: base.res_partner_9 - probability: 1.0 - stage_id: crm.stage_lead1 - categ_id: crm.categ_oppor2 - section_id: crm.section_sales_department -- | - I check that the opportunity is in 'New' state. -- - !assert {model: crm.lead, id: crm_opportunity_abcfuelcounits0}: - - state == "draft" - -- | - I check that phonecall record is created for that opportunity. -- - !python {model: crm.phonecall}: | - phone_obj = self.pool.get('crm.phonecall') -- | - I schedule Meeting on this current opportunity by clicking on "schedule - Meeting". -- - !python {model: crm.lead}: | - self.action_makeMeeting(cr, uid, [ref("crm_opportunity_abcfuelcounits0")]) - -- | - I can see that Meeting's calendar view is shown. - then I click on the date on which I want to schedule meeting. - I fill proper data for that meeting and save it. -- - !record {model: crm.meeting, id: crm_meeting_abcfuelcounits0}: - date: !eval time.strftime('%Y-%m-%d 00:00:00') - date_deadline: !eval time.strftime('%Y-%m-%d 08:00:00') - duration: 8.0 - email_from: info@balmerinc.be - name: 'ABC FUEL CO 829264 - 10002 units' - opportunity_id: 'crm_opportunity_abcfuelcounits0' - partner_address_id: base.res_partner_address_1 - partner_id: base.res_partner_9 - section_id: crm.section_sales_department - state: open -- | - In order to schedule a phonecall to the partner - I click on "schedule call" button and select planned date for the call. -- - !record {model: crm.opportunity2phonecall, id: crm_opportunity2phonecall_abcfuelcounits0}: - date: !eval "(datetime.now() + timedelta(1)).strftime('%Y-%m-%d 11:15:00')" - name: 'ABC FUEL CO 829264 - 10002 units' - section_id: crm.section_sales_department - user_id: base.user_demo - categ_id: crm.categ_phone1 -- | - schedule phonecall by opportunity2phoncall wizard. -- - !python {model: crm.opportunity2phonecall}: | - self.action_apply(cr, uid, [ref('crm_opportunity2phonecall_abcfuelcounits0')], {'active_ids': [ref("crm_opportunity_abcfuelcounits0")]}) -- | - I check that phonecall record is created for that opportunity. -- - !python {model: crm.phonecall}: | - phone_obj = self.pool.get('crm.phonecall') - ids = phone_obj.search(cr, uid, [('name', '=', 'ABC FUEL CO 829264 - 10002 units')]) - assert len(ids) -- | - I can see phonecall record after click on "Schedule call" wizard. -- - !record {model: crm.phonecall, id: crm_phonecall_abcfuelcounits0}: - date: !eval "(datetime.now() + timedelta(1)).strftime('%Y-%m-%d 11:15:00')" - duration: 3.0 - name: 'ABC FUEL CO 829264 - 10002 units' - partner_address_id: base.res_partner_address_1 - partner_id: base.res_partner_9 - section_id: crm.section_sales_department -- | - I Merge the opportunities. -- - for that create two opportunities first opportunity 'Test FUEL CO'. -- - !record {model: crm.lead, id: crm_opportunity_1}: - email_from: info@balmerinc.be - name: 'Test FUEL CO 829264 - 10002 units' - partner_address_id: base.res_partner_address_1 - partner_id: base.res_partner_9 - probability: 1.0 - stage_id: crm.stage_lead1 - categ_id: crm.categ_oppor2 - section_id: crm.section_sales_department -- - I create the opportunity 'FUEL CO'. -- - !record {model: crm.lead, id: crm_opportunity_2}: - email_from: info@balmerinc.be - name: 'FUEL CO 829264 - 10002 units' - partner_address_id: base.res_partner_address_1 - partner_id: base.res_partner_9 - probability: 1.0 - stage_id: crm.stage_lead1 - categ_id: crm.categ_oppor2 - section_id: crm.section_sales_department -- | - I Merge two Opportunities. -- - !python {model: crm.merge.opportunity}: | - op_list = [ref('crm_opportunity_1'),ref('crm_opportunity_2')] - op_ids=self.pool.get('crm.lead').browse(cr,uid,op_list) - lead_ids = [ref('crm_case_qrecorp0')] - self.merge(cr, uid, op_ids, {'lead_ids': lead_ids}) diff --git a/addons/crm/test/test_crm_opportunity_case2.yml b/addons/crm/test/test_crm_opportunity_case2.yml deleted file mode 100644 index dc0dbe517f1..00000000000 --- a/addons/crm/test/test_crm_opportunity_case2.yml +++ /dev/null @@ -1,45 +0,0 @@ -- | - I start by creating a new Opportunity. And I select partner for opportunity. - I can see that after selecting partner his contact and email is automatically filled. -- - !record {model: crm.lead, id: crm_opportunity_demotestopportunity}: - email_from: info@balmerinc.be - name: 'Demo Test Opportunity' - partner_address_id: base.res_partner_address_1 - partner_id: base.res_partner_9 - probability: 1.0 - categ_id: crm.categ_oppor2 - section_id: crm.section_sales_department - type: opportunity -- - I check that the opportunity is in 'New' state. -- - !assert {model: crm.lead, id: crm_opportunity_demotestopportunity, string: Opportunity in Draft}: - - state == "draft" -- - I open opportunity by click on "Open" button. -- - !python {model: crm.lead}: | - self.case_open(cr, uid, [ref("crm_opportunity_demotestopportunity")]) -- - I change partner of the opportunity. -- - !python {model: crm.lead}: | - self.onchange_partner_id(cr, uid, [ref("crm_opportunity_demotestopportunity")], ref("base.res_partner_agrolait")) - -- - I change Contact Detail of the opportunity. -- - !python {model: crm.lead}: | - self.onchange_partner_address_id(cr, uid,[ref("crm_opportunity_demotestopportunity")], ref("base.res_partner_address_8invoice")) - -- - I change Opportunity to Won State. -- - !python {model: crm.lead}: | - self.case_mark_won(cr, uid, [ref("crm_opportunity_demotestopportunity")]) -- - I check that the opportunity is in 'Done' state. -- - !assert {model: crm.lead, id: crm_opportunity_demotestopportunity, string: Opportunity is Won}: - - state == "done" From 7ed74f873e9caebbd0de77f099dfb95ba7df95f4 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Fri, 14 Oct 2011 14:24:06 +0530 Subject: [PATCH 062/711] [REM, IMP]: crm: 1)Removed merge2opportunity.yml, 2)Merged two Opportunities code moved to lead2opportunity.yml bzr revid: ron@tinyerp.com-20111014085406-fg8javdjiohh6ojh --- addons/crm/__openerp__.py | 1 - addons/crm/test/process/lead2opportunity.yml | 18 ++++++++++++++++++ addons/crm/test/process/merge2opportunity.yml | 17 ----------------- 3 files changed, 18 insertions(+), 18 deletions(-) delete mode 100644 addons/crm/test/process/merge2opportunity.yml diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index e3bd172d4e1..6d05d3edd3d 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -122,7 +122,6 @@ Creates a dashboard for CRM that includes: 'test/process/lead_open.yml', 'test/process/lead2opportunity.yml', 'test/process/cancel_lead.yml', - 'test/process/merge2opportunity.yml', 'test/process/meeting.yml', 'test/process/lead2_mass_convert_opportunity.yml', 'test/ui/lead_form.yml', diff --git a/addons/crm/test/process/lead2opportunity.yml b/addons/crm/test/process/lead2opportunity.yml index 5a9668adfd3..75026ccfb3e 100644 --- a/addons/crm/test/process/lead2opportunity.yml +++ b/addons/crm/test/process/lead2opportunity.yml @@ -40,3 +40,21 @@ - !assert {model: crm.lead, id: crm.crm_case_qrecorp0, string: Probability is equal to 100}: - probability == 100.0 +- + I have two opportunity ,so i will merge this two Opportunities. +- + !python {model: crm.merge.opportunity}: | + op_ids=self.pool.get('crm.lead').browse(cr, uid, [ref('crm_case_bankwealthy2'), ref('crm_case_unifliege')]) + self.merge(cr, uid, op_ids) + +- + I will test which two opportunity merged . +- + !python {model: crm.lead}: | + lead = self.browse(cr, uid, ref('crm_case_bankwealthy2')) + merge = 'Merged opportunities' in lead.message_ids[0].subject + assert merge,'Fail to create Merge opportunity' + assert lead.type == 'opportunity', 'Merged opportunity type not change!' + assert lead.partner_id.id == ref("base.res_partner_accent"), 'Partner missmatch!' + assert lead.stage_id.id == ref("stage_lead2"), 'Stage of probability is incorrect!' + \ No newline at end of file diff --git a/addons/crm/test/process/merge2opportunity.yml b/addons/crm/test/process/merge2opportunity.yml deleted file mode 100644 index 2161e191a81..00000000000 --- a/addons/crm/test/process/merge2opportunity.yml +++ /dev/null @@ -1,17 +0,0 @@ -- - I Merge two Opportunities. -- - !python {model: crm.merge.opportunity}: | - op_ids=self.pool.get('crm.lead').browse(cr, uid, [ref('crm_case_bankwealthy2'), ref('crm_case_unifliege')]) - self.merge(cr, uid, op_ids) - -- - I will test merged two opportunity. -- - !python {model: crm.lead}: | - lead = self.browse(cr, uid, ref('crm_case_bankwealthy2')) - merge = 'Merged opportunities' in lead.message_ids[0].subject - assert merge,'Fail to create Merge opportunity' - assert lead.type == 'opportunity', 'Merged opportunity type not change!' - assert lead.partner_id.id == ref("base.res_partner_accent"), 'Partner missmatch!' - assert lead.stage_id.id == ref("stage_lead2"), 'Stage of probability is incorrect!' From 86e0aa5cc26e643cf04d1c4b6b4b32aaa758bafc Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Fri, 14 Oct 2011 14:29:03 +0530 Subject: [PATCH 063/711] [REM]: crm: 1)Removed test_crm_partner2opportunity.yml bzr revid: ron@tinyerp.com-20111014085903-b2i8gk93nuo5ckd5 --- addons/crm/__openerp__.py | 1 - .../crm/test/test_crm_partner2opportunity.yml | 25 ------------------- 2 files changed, 26 deletions(-) delete mode 100644 addons/crm/test/test_crm_partner2opportunity.yml diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index 6d05d3edd3d..58342283bbc 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -130,7 +130,6 @@ Creates a dashboard for CRM that includes: 'test/test_crm_stage_changes.yml', 'test/test_crm_recurrent_meeting_case2.yml', 'test/test_crm_phonecall_case2.yml', - 'test/test_crm_partner2opportunity.yml', 'test/test_crm_segmentation.yml', ], 'installable': True, diff --git a/addons/crm/test/test_crm_partner2opportunity.yml b/addons/crm/test/test_crm_partner2opportunity.yml deleted file mode 100644 index fe026074f4f..00000000000 --- a/addons/crm/test/test_crm_partner2opportunity.yml +++ /dev/null @@ -1,25 +0,0 @@ -- | - I start by creating a new opportunity from partner. -- - !record {model: crm.partner2opportunity, id: crm_partner2opportunity_id_0}: - name: test - planned_revenue: 0.0 - partner_id: base.res_partner_9 - probability: 0.0 -- - I click on "Create Opportunity" button of this wizard. -- - !python {model: crm.partner2opportunity}: | - fields = { - 'name': 'test', - 'planned_revenue': '0.0', - 'partner_id': ref('base.res_partner_9'), - 'probability': '0.0' - } - self.default_get(cr, uid, fields, {"active_ids": [ref("crm_partner2opportunity_id_0")]}) -- | - In order to check the opportunity is created or not, I check type. -- - !python {model: crm.partner2opportunity}: | - opportunity = self.make_opportunity(cr, uid, [ref("crm_partner2opportunity_id_0")], {"active_ids": [ref("crm_partner2opportunity_id_0")]}) - assert True From daeeef945d05e9b7a60c22f9e127f53f9c1f6314 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Fri, 14 Oct 2011 14:36:23 +0530 Subject: [PATCH 064/711] [REM]: crm: 1)Removed test_crm_phonecall_case2.yml 2) Updated __opeperp__.py bzr revid: ron@tinyerp.com-20111014090623-jf5atbxze6e9w8iv --- addons/crm/__openerp__.py | 1 - addons/crm/test/test_crm_phonecall_case2.yml | 26 -------------------- 2 files changed, 27 deletions(-) delete mode 100644 addons/crm/test/test_crm_phonecall_case2.yml diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index 58342283bbc..a4416ca8add 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -129,7 +129,6 @@ Creates a dashboard for CRM that includes: 'test/test_crm_recurrent_meeting.yml', 'test/test_crm_stage_changes.yml', 'test/test_crm_recurrent_meeting_case2.yml', - 'test/test_crm_phonecall_case2.yml', 'test/test_crm_segmentation.yml', ], 'installable': True, diff --git a/addons/crm/test/test_crm_phonecall_case2.yml b/addons/crm/test/test_crm_phonecall_case2.yml deleted file mode 100644 index 1b07121183c..00000000000 --- a/addons/crm/test/test_crm_phonecall_case2.yml +++ /dev/null @@ -1,26 +0,0 @@ -- | - I start by creating a new phonecall. -- - !record {model: crm.phonecall, id: crm_phonecall_dummycall}: - date: !eval time.strftime('%Y-%m-%d 08:00:00') - name: Dummy call - duration: 0.0 - section_id: crm.section_sales_department - partner_id: base.res_partner_agrolait - state: open -- - I change Contact Detail of the Partner. -- - !python {model: crm.phonecall}: | - self.onchange_partner_address_id(cr, uid,[ref("crm_phonecall_dummycall")], ref("base.res_partner_address_8invoice")) - -- - I setting Phone call to Held (Done). -- - !python {model: crm.phonecall}: | - self.case_close(cr, uid, [ref("crm_phonecall_dummycall")]) -- - I check that the hone call is in 'Held' state. -- - !assert {model: crm.phonecall, id: crm_phonecall_dummycall, string: Phone call Helded}: - - state == "done" From ff842dde4de206ac504120c59d6e9c3ae385b535 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Fri, 14 Oct 2011 15:06:28 +0530 Subject: [PATCH 065/711] [IMP]: crm: 1)All changes done in lead2opportunity.yml 2) Added scenario of when opportunity has been lost bzr revid: ron@tinyerp.com-20111014093628-j3o0m4ji3javmapb --- addons/crm/test/process/lead2opportunity.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/addons/crm/test/process/lead2opportunity.yml b/addons/crm/test/process/lead2opportunity.yml index 75026ccfb3e..108a0a74dbf 100644 --- a/addons/crm/test/process/lead2opportunity.yml +++ b/addons/crm/test/process/lead2opportunity.yml @@ -36,10 +36,24 @@ !assert {model: crm.lead, id: crm.crm_case_qrecorp0, string: stage of opportunity is win}: - stage_id.name == "Won" - - After won the opportunity, i will test probability is 100. + After winning the opportunity, i will test probability is 100. - !assert {model: crm.lead, id: crm.crm_case_qrecorp0, string: Probability is equal to 100}: - probability == 100.0 +- + Suppose i have opportinity in initial stage, i will check after loss my `opportunity` , probability of that opportunity is 0 +- + !python {model: crm.lead}: | + self.case_open(cr, uid, [ref("crm_case_rdroundfundingunits0")]) + self.case_mark_lost(cr, uid, [ref("crm_case_rdroundfundingunits0")]) +- + I check after loss the opportunity, probability set to 0.0 and lost stage set accordingly. +- + !python {model: crm.lead}: | + opportunity = self.browse(cr, uid, ref('crm_case_rdroundfundingunits0')) + assert opportunity.stage_id.id == ref('crm.stage_lead6'), 'Stage is not changed!' + assert opportunity.probability == 0.0, 'Probability is wrong!' + - I have two opportunity ,so i will merge this two Opportunities. - From 81c8f80edc17b6a8f904d5124d42e5fb454defd1 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Fri, 14 Oct 2011 15:12:57 +0530 Subject: [PATCH 066/711] [REM]: crm: Removed test_crm_stage_changes.yml bzr revid: ron@tinyerp.com-20111014094257-qmch5458436ibis4 --- addons/crm/__openerp__.py | 1 - addons/crm/test/test_crm_stage_changes.yml | 96 ---------------------- 2 files changed, 97 deletions(-) delete mode 100644 addons/crm/test/test_crm_stage_changes.yml diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index a4416ca8add..fdd841c2534 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -127,7 +127,6 @@ Creates a dashboard for CRM that includes: 'test/ui/lead_form.yml', 'test/process/phonecall2opportunity.yml', 'test/test_crm_recurrent_meeting.yml', - 'test/test_crm_stage_changes.yml', 'test/test_crm_recurrent_meeting_case2.yml', 'test/test_crm_segmentation.yml', ], diff --git a/addons/crm/test/test_crm_stage_changes.yml b/addons/crm/test/test_crm_stage_changes.yml deleted file mode 100644 index 391a328bffe..00000000000 --- a/addons/crm/test/test_crm_stage_changes.yml +++ /dev/null @@ -1,96 +0,0 @@ -- - In order to test the changes on stage of a lead or an opportunity with OpenERP, - I create some leads and test the stage changes. -- - I want to change the probability to 0.0 when the opportunity is marked as lost. - So I set its Change probability automatically true. -- - !record {model: crm.case.stage, id: crm.stage_lead6}: - name: Lost - on_change: true - probability: 0.0 - section_ids: - - crm.section_sales_department - sequence: 0 -- - I create a lead 'Test Lead1'. -- - !record {model: crm.lead, id: crm_lead_openerppresentation0}: - categ_id: crm.categ_oppor4 - day_close: 0.0 - day_open: 0.0 - name: Test Lead1 - planned_revenue: 0.0 - probability: 10.0 - section_id: crm.section_sales_department -- - I open the lead. -- - !python {model: crm.lead}: | - self.case_open(cr, uid, [ref('crm_lead_openerppresentation0')]) -- - I assigning stage. -- - !python {model: crm.lead}: | - self.onchange_stage_id(cr, uid, [ref('crm_lead_openerppresentation0')], [], context) -- - I assigning percent. -- - !python {model: crm.lead}: | - self.stage_find_percent(cr, uid, 10.0, []) -- - I find that this lead can be converted to opportunity. -- - !record {model: crm.lead2opportunity.partner, id: crm_lead2opportunity_partner0}: - action: 'create' - name: 'convert' -- - So I convert the lead to opportunity. -- - !python {model: crm.lead2opportunity.partner}: | - self.action_apply(cr, uid, [ref('crm_lead2opportunity_partner0')], context={'active_ids': [ref('crm_lead_openerppresentation0')]}) -- - I check that lead is now converted to opportunity. -- - !python {model: crm.lead}: | - lead = self.browse(cr, uid, ref('crm_lead_openerppresentation0')) - assert lead.type == 'opportunity', 'Lead is not converted to opportunity!' -- - I mark this opportunity as lost. -- - !python {model: crm.lead}: | - self.case_mark_lost(cr, uid, [ref('crm_lead_openerppresentation0')]) -- - I check whether the probability is set according to stage change or not. -- - !python {model: crm.lead}: | - opportunity = self.browse(cr, uid, ref('crm_lead_openerppresentation0')) - assert opportunity.stage_id.id == ref('crm.stage_lead6'), 'Stage is not changed!' - assert opportunity.probability == 0.0, 'Probability is wrong!' -- - I create one more opportunity. -- - !record {model: crm.lead, id: crm_lead_test2}: - name: Partner Demo - type: opportunity - categ_id: crm.categ_oppor3 - planned_revenue: 50000.0 - probability: 100.0 - section_id: crm.section_sales_department -- - I open this opportunity. -- - !python {model: crm.lead}: | - self.case_open(cr, uid, [ref('crm_lead_test2')]) -- - I mark this opportunity as won. -- - !python {model: crm.lead}: | - self.case_mark_won(cr, uid, [ref('crm_lead_test2')]) -- - I check whether the stage is changed to 'Won' and probability is 100.0 or not. -- - !python {model: crm.lead}: | - opportunity = self.browse(cr, uid, ref('crm_lead_test2')) - assert opportunity.stage_id.id == ref('crm.stage_lead5'), 'Stage is not changed!' - assert opportunity.probability == 100.0, 'Probability is wrong!' From 7c8c006beb6fe137035edaa933b85a8903b02bca Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Fri, 14 Oct 2011 16:17:29 +0530 Subject: [PATCH 067/711] [IMP]: crm: Added internal note after wining the opportunity in lead2opportunity.yml bzr revid: ron@tinyerp.com-20111014104729-1la21n3mxpzb0qz7 --- addons/crm/test/process/lead2opportunity.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/addons/crm/test/process/lead2opportunity.yml b/addons/crm/test/process/lead2opportunity.yml index 108a0a74dbf..bb6ecef5327 100644 --- a/addons/crm/test/process/lead2opportunity.yml +++ b/addons/crm/test/process/lead2opportunity.yml @@ -35,6 +35,23 @@ - !assert {model: crm.lead, id: crm.crm_case_qrecorp0, string: stage of opportunity is win}: - stage_id.name == "Won" +- + I want to add internal note to this opportunity, so i create note. +- + !record {model: crm.add.note, id: crm_add_note_won_opportunity}: + body: 'I won this Opportunity' +- + Apply this note to opportunity. +- + !python {model: crm.add.note}: | + self.action_add(cr, uid, [ref("crm_add_note_won_opportunity")], {"active_model": "crm.lead","active_ids": [ref("crm_case_qrecorp0")]}) +- + I will test Internal note added on opportunity . +- + !python {model: crm.lead}: | + lead = self.browse(cr, uid, ref('crm_case_qrecorp0')) + message = 'I won this Opportunity' in lead.message_ids[-1].subject + assert message,'Fail to Added interal note on opportunity' - After winning the opportunity, i will test probability is 100. - From f1c236c3aed7732a685e03a7c042f72b6b839641 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Fri, 14 Oct 2011 16:22:56 +0530 Subject: [PATCH 068/711] [REF]: crm: Removed code of cheking probability and planned_revenue in lead2opportunity.yml bzr revid: ron@tinyerp.com-20111014105256-anhbcrgqvtpgm1n6 --- addons/crm/test/process/lead2opportunity.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/crm/test/process/lead2opportunity.yml b/addons/crm/test/process/lead2opportunity.yml index bb6ecef5327..b09ed397fe0 100644 --- a/addons/crm/test/process/lead2opportunity.yml +++ b/addons/crm/test/process/lead2opportunity.yml @@ -16,8 +16,6 @@ !python {model: crm.lead}: | lead = self.browse(cr, uid, ref('crm_case_qrecorp0')) assert lead.type == 'opportunity', 'Lead is not converted to opportunity!' - assert lead.planned_revenue == 0.0, 'Planned revenue should be 0!' - assert lead.probability == 0.0, 'probability revenue should be 0!' assert lead.partner_id.id == ref("base.res_partner_agrolait"), 'Partner missmatch!' assert lead.stage_id.id == ref("stage_lead1"), 'Stage of probability is incorrect!' - From 12c7d62a53f1b561f105900ff7cc810473eae0c7 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Fri, 14 Oct 2011 16:45:44 +0530 Subject: [PATCH 069/711] [REM]: crm: Removed test_crm_recurrent_meeting.yml because its have only demo data created bzr revid: ron@tinyerp.com-20111014111544-shi3hshjja7yxpw5 --- addons/crm/__openerp__.py | 1 - .../crm/test/test_crm_recurrent_meeting.yml | 106 ------------------ 2 files changed, 107 deletions(-) delete mode 100644 addons/crm/test/test_crm_recurrent_meeting.yml diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index fdd841c2534..2ad30af3c85 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -126,7 +126,6 @@ Creates a dashboard for CRM that includes: 'test/process/lead2_mass_convert_opportunity.yml', 'test/ui/lead_form.yml', 'test/process/phonecall2opportunity.yml', - 'test/test_crm_recurrent_meeting.yml', 'test/test_crm_recurrent_meeting_case2.yml', 'test/test_crm_segmentation.yml', ], diff --git a/addons/crm/test/test_crm_recurrent_meeting.yml b/addons/crm/test/test_crm_recurrent_meeting.yml deleted file mode 100644 index 297ca8d5e4e..00000000000 --- a/addons/crm/test/test_crm_recurrent_meeting.yml +++ /dev/null @@ -1,106 +0,0 @@ -- - In order to test recurrent meetings in OpenERP, I create meetings with different recurrency. -- - I create a customer meeting record with daily recurrency. -- - !record {model: crm.meeting, id: crm_meeting_pricelistdiscussion0}: - categ_id: crm.categ_meet1 - count: 0.0 - date: '2011-01-05 00:00:00' - date_deadline: '2011-01-05 01:00:00' - day: 0.0 - duration: 1.0 - end_date: '2011-01-12' - end_type: end_date - name: Pricelist Discussion - recurrency: true - recurrent_uid: 0.0 - rrule: FREQ=DAILY;INTERVAL=1;UNTIL=20110112T235959Z - rrule_type: daily - sequence: 0.0 -- - I create another meeting record with weekly recurrency. -- - !record {model: crm.meeting, id: crm_meeting_changesindesigning0}: - categ_id: crm.categ_meet2 - count: 15 - date: '2011-01-22 11:05:05' - date_deadline: '2011-01-22 16:05:05' - day: 0.0 - duration: 5.0 - email_from: info@opensides.be - end_type: count - fr: true - mo: true - name: Changes in Designing - partner_address_id: base.res_partner_address_1 - partner_id: base.res_partner_9 - recurrency: true - recurrent_uid: 0.0 - rrule: FREQ=WEEKLY;BYDAY=FR,TU,TH,WE,MO;INTERVAL=1;COUNT=15 - rrule_type: weekly - section_id: crm.section_sales_department - sequence: 0.0 - th: true - tu: true - user_id: base.user_demo - we: true -- - I create a meeting record with monthly recurrency. -- - !record {model: crm.meeting, id: crm_meeting_reviewneeds0}: - categ_id: crm.categ_meet3 - count: 0.0 - date: '2011-01-20 10:02:02' - date_deadline: '2011-01-20 16:02:02' - day: 15 - duration: 6.0 - end_date: '2011-05-31' - end_type: end_date - name: Review needs - partner_address_id: base.res_partner_address_15 - partner_id: base.res_partner_11 - recurrency: true - recurrent_uid: 0.0 - rrule: FREQ=MONTHLY;INTERVAL=1;UNTIL=20110531T235959Z;BYMONTHDAY=15 - rrule_type: monthly - section_id: crm.section_sales_department - sequence: 0.0 - user_id: base.user_demo -- - I create a record for daily scrum meeting. -- - !record {model: crm.meeting, id: crm_meeting_scrummeeting0}: - categ_id: crm.categ_meet2 - count: 0.0 - date: '2011-01-06 00:00:00' - date_deadline: '2011-01-06 01:00:00' - day: 0.0 - duration: 1.0 - name: Scrum meeting - recurrency: true - recurrent_uid: 0.0 - rrule: FREQ=DAILY;INTERVAL=1 - rrule_type: daily - sequence: 0.0 -- - I create a meeting record for yearly recurrency. -- - !record {model: crm.meeting, id: crm_meeting_updatethedata0}: - categ_id: crm.categ_meet2 - count: 0.0 - date: '2011-01-18 13:12:49' - date_deadline: '2011-01-19 02:30:49' - day: 0.0 - duration: 13.300000000000001 - end_date: '2015-01-06' - end_type: end_date - name: Update the data - partner_address_id: base.res_partner_address_7 - partner_id: base.res_partner_4 - recurrency: true - recurrent_uid: 0.0 - rrule: FREQ=YEARLY;INTERVAL=1;UNTIL=20150106T235959Z - rrule_type: yearly - section_id: crm.section_sales_department - sequence: 0.0 From 0625ab16fc4f46e70b226f908e1064a79e15804f Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Fri, 14 Oct 2011 17:26:12 +0530 Subject: [PATCH 070/711] [REF, MV]: Todo code in lead2opportunity.yml and move test_crm_segmentation.yml to crm_profile bzr revid: ron@tinyerp.com-20111014115612-wze2p8dcnh6gvopg --- addons/crm/__openerp__.py | 1 - addons/crm/test/process/lead2opportunity.yml | 17 +++++++++-------- addons/crm_profiling/__openerp__.py | 3 ++- .../test/test_crm_segmentation.yml | 0 4 files changed, 11 insertions(+), 10 deletions(-) rename addons/{crm => crm_profiling}/test/test_crm_segmentation.yml (100%) diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index 2ad30af3c85..9c45d9237b6 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -127,7 +127,6 @@ Creates a dashboard for CRM that includes: 'test/ui/lead_form.yml', 'test/process/phonecall2opportunity.yml', 'test/test_crm_recurrent_meeting_case2.yml', - 'test/test_crm_segmentation.yml', ], 'installable': True, 'active': False, diff --git a/addons/crm/test/process/lead2opportunity.yml b/addons/crm/test/process/lead2opportunity.yml index b09ed397fe0..ef8d20fc602 100644 --- a/addons/crm/test/process/lead2opportunity.yml +++ b/addons/crm/test/process/lead2opportunity.yml @@ -34,7 +34,7 @@ !assert {model: crm.lead, id: crm.crm_case_qrecorp0, string: stage of opportunity is win}: - stage_id.name == "Won" - - I want to add internal note to this opportunity, so i create note. + I add internal note to this opportunity, so i create note. - !record {model: crm.add.note, id: crm_add_note_won_opportunity}: body: 'I won this Opportunity' @@ -43,13 +43,14 @@ - !python {model: crm.add.note}: | self.action_add(cr, uid, [ref("crm_add_note_won_opportunity")], {"active_model": "crm.lead","active_ids": [ref("crm_case_qrecorp0")]}) -- - I will test Internal note added on opportunity . -- - !python {model: crm.lead}: | - lead = self.browse(cr, uid, ref('crm_case_qrecorp0')) - message = 'I won this Opportunity' in lead.message_ids[-1].subject - assert message,'Fail to Added interal note on opportunity' + +# TODO: cheked For ordering of history of message +#- +# I test Internal latest note added on opportunity . +#- +# !python {model: crm.lead}: | +# lead = self.browse(cr, uid, ref('crm_case_qrecorp0')) +# assert lead.message_ids[0].subject == 'I won this Opportunity', 'Fail to Added interal note on opportunity' - After winning the opportunity, i will test probability is 100. - diff --git a/addons/crm_profiling/__openerp__.py b/addons/crm_profiling/__openerp__.py index 656f8360f0b..71b4e2f126e 100644 --- a/addons/crm_profiling/__openerp__.py +++ b/addons/crm_profiling/__openerp__.py @@ -41,7 +41,8 @@ It also has been merged with the earlier CRM & SRM segmentation tool because the 'init_xml': [], 'update_xml': ['security/ir.model.access.csv', 'crm_profiling_view.xml'], 'demo_xml': ['crm_profiling_demo.xml'], - 'test': ['test/test_crm_profiling.yml'], + 'test': ['test/test_crm_profiling.yml', + 'test/test_crm_segmentation.yml',], 'installable': True, 'active': False, 'certificate': '0033984979005', diff --git a/addons/crm/test/test_crm_segmentation.yml b/addons/crm_profiling/test/test_crm_segmentation.yml similarity index 100% rename from addons/crm/test/test_crm_segmentation.yml rename to addons/crm_profiling/test/test_crm_segmentation.yml From c656f53e81f7940bfd7cfc80d62d667ed5d57de0 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Mon, 17 Oct 2011 15:16:17 +0530 Subject: [PATCH 071/711] [ADD] crm: 1) Added yml partner2opportunity.yml, 2) Covered partner to opportunity scenario bzr revid: ron@tinyerp.com-20111017094617-9ctr8c7liedjo2fh --- addons/crm/__openerp__.py | 1 + .../crm/test/process/partner2opportunity.yml | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 addons/crm/test/process/partner2opportunity.yml diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index 9c45d9237b6..b1fdfd3ff62 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -121,6 +121,7 @@ Creates a dashboard for CRM that includes: 'test': [ 'test/process/lead_open.yml', 'test/process/lead2opportunity.yml', + 'test/process/partner2opportunity.yml', 'test/process/cancel_lead.yml', 'test/process/meeting.yml', 'test/process/lead2_mass_convert_opportunity.yml', diff --git a/addons/crm/test/process/partner2opportunity.yml b/addons/crm/test/process/partner2opportunity.yml new file mode 100644 index 00000000000..542056f0f9b --- /dev/null +++ b/addons/crm/test/process/partner2opportunity.yml @@ -0,0 +1,20 @@ +- | + I will create opportunity by partner. +- + !record {model: crm.partner2opportunity, id: crm_partner2opportunity_id_0}: + name: BalmerInc S.A. + planned_revenue: 200.0 + partner_id: base.res_partner_9 + probability: 150.0 + +- + Convert partner to opportunity, i will test to convert opportunity is correct. +- + !python {model: crm.partner2opportunity}: | + opportunity = self.make_opportunity(cr, uid, [ref("crm_partner2opportunity_id_0")]) + opportunity_rec = self.pool.get('crm.lead').browse(cr, uid, opportunity['res_id']) + assert opportunity_rec.type == 'opportunity', 'Lead is not converted to opportunity!' + assert opportunity_rec.planned_revenue == 200.0, 'Planned revenue should be 200!' + assert opportunity_rec.probability == 150.0, 'probability revenue should be 150!' + assert opportunity_rec.partner_id.id == ref("base.res_partner_9"), 'Partner missmatch!' + assert opportunity_rec.state == 'draft', 'Opportunity stage not in draft state' From b147d8a4c113530430d1e8ae77d89209ec8a3952 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Mon, 17 Oct 2011 15:19:55 +0530 Subject: [PATCH 072/711] [ADD] crm: Added phonecall2meeting.yml bzr revid: ron@tinyerp.com-20111017094955-dgeazzmitmq3jf4v --- addons/crm/__openerp__.py | 1 + addons/crm/test/process/phonecall2meeting.yml | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 addons/crm/test/process/phonecall2meeting.yml diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index b1fdfd3ff62..853c9f85568 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -127,6 +127,7 @@ Creates a dashboard for CRM that includes: 'test/process/lead2_mass_convert_opportunity.yml', 'test/ui/lead_form.yml', 'test/process/phonecall2opportunity.yml', + 'test/process/phonecall2meeting.yml', 'test/test_crm_recurrent_meeting_case2.yml', ], 'installable': True, diff --git a/addons/crm/test/process/phonecall2meeting.yml b/addons/crm/test/process/phonecall2meeting.yml new file mode 100644 index 00000000000..c0579157494 --- /dev/null +++ b/addons/crm/test/process/phonecall2meeting.yml @@ -0,0 +1,6 @@ +- + I test to arrage meeting from Phonecall, so i convert and check phonecall to meeting. +- + !python {model: crm.phonecall}: | + res = self.action_make_meeting(cr, uid, [ref('crm_case_phone06')]) + assert res, "No create Meeting from phonecall" From 1fa0e18c2b72f98d202307644338cccbe76ef6c5 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Mon, 17 Oct 2011 15:26:01 +0530 Subject: [PATCH 073/711] [MOVE] crm, base_calander: Move test_crm_recurrent_meeting_case2.yml to base_calender bzr revid: ron@tinyerp.com-20111017095601-akmk2nmkn955inbi --- .../test/test_crm_recurrent_meeting_case2.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename addons/{crm => base_calendar}/test/test_crm_recurrent_meeting_case2.yml (100%) diff --git a/addons/crm/test/test_crm_recurrent_meeting_case2.yml b/addons/base_calendar/test/test_crm_recurrent_meeting_case2.yml similarity index 100% rename from addons/crm/test/test_crm_recurrent_meeting_case2.yml rename to addons/base_calendar/test/test_crm_recurrent_meeting_case2.yml From 87727d9b541bd54fbd5bb87681a7d215d4764ea1 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Mon, 17 Oct 2011 15:28:12 +0530 Subject: [PATCH 074/711] [IMP] crm: delete from __openerp__.py, test_crm_recurrent_meeting_case2.yml bzr revid: ron@tinyerp.com-20111017095812-ybn537b37hap94sg --- addons/crm/__openerp__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index 853c9f85568..49fc12f9747 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -128,7 +128,6 @@ Creates a dashboard for CRM that includes: 'test/ui/lead_form.yml', 'test/process/phonecall2opportunity.yml', 'test/process/phonecall2meeting.yml', - 'test/test_crm_recurrent_meeting_case2.yml', ], 'installable': True, 'active': False, From dc95f95342cf360e74ae9332cc5b0b52dd045a83 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Mon, 17 Oct 2011 16:55:25 +0530 Subject: [PATCH 075/711] [ADD] crm: 1) Added schedule_other_phonecall.yml, 2) checked schedule call created bzr revid: ron@tinyerp.com-20111017112525-8fhqb8iuclh9hdkp --- addons/crm/__openerp__.py | 1 + .../test/process/schedule_other_phonecall.yml | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 addons/crm/test/process/schedule_other_phonecall.yml diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index 49fc12f9747..cbcaa774c05 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -128,6 +128,7 @@ Creates a dashboard for CRM that includes: 'test/ui/lead_form.yml', 'test/process/phonecall2opportunity.yml', 'test/process/phonecall2meeting.yml', + 'test/process/schedule_other_phonecall.yml' ], 'installable': True, 'active': False, diff --git a/addons/crm/test/process/schedule_other_phonecall.yml b/addons/crm/test/process/schedule_other_phonecall.yml new file mode 100644 index 00000000000..a92496dc265 --- /dev/null +++ b/addons/crm/test/process/schedule_other_phonecall.yml @@ -0,0 +1,23 @@ +- + I schedule phonecall to another phonecall, so first i create record of schedule call. +- + !record {model: crm.phonecall2phonecall, id: crm_schedule_phonecall}: + name: 'Test Discuss Review Process' + categ_id: crm.categ_phone1 + date: !eval time.strftime('%Y-%m-%d') +- + I Convert schedule phonecall. +- + !python {model: crm.phonecall2phonecall}: | + self.action_apply(cr, uid, [ref('crm_schedule_phonecall')], {'active_id': ref('crm_case_phone04')}) +- + I check for another schedule call. +- + !python {model: crm.phonecall}: | + phonecall = self.search(cr, uid, [('name', '=', 'Test Discuss Review Process')]) + assert phonecall, "Do not create another schedule call" + schedule_phonecall = self.browse(cr, uid, phonecall)[0] + assert schedule_phonecall.user_id.id == ref("base.user_root"), "Responsible person not assign" + assert schedule_phonecall.section_id.id == ref("crm.section_sales_department"), "Do not assign proper section" + assert schedule_phonecall.categ_id.id == ref("crm.categ_phone1"), "Category of phonecall is not apply" + assert schedule_phonecall.partner_id.id == ref("base.res_partner_tinyatwork"), "Partner missmatch" \ No newline at end of file From 3f26dce9f8ec2fc80adb1b9d424a734318140af1 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Mon, 17 Oct 2011 18:06:01 +0530 Subject: [PATCH 076/711] [IMP, REF] crm: 1) Renamed lead2opportunity.yml to lead2opportunity_win_lost.yml, 2) Removed code of Merge2opportunity 3)Improved string bzr revid: ron@tinyerp.com-20111017123601-vnyfiekpupjkxgf1 --- addons/crm/__openerp__.py | 2 +- ...nity.yml => lead2opportunity_win_lost.yml} | 32 ++++--------------- 2 files changed, 7 insertions(+), 27 deletions(-) rename addons/crm/test/process/{lead2opportunity.yml => lead2opportunity_win_lost.yml} (68%) diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index cbcaa774c05..7b11d12cede 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -120,7 +120,7 @@ Creates a dashboard for CRM that includes: ], 'test': [ 'test/process/lead_open.yml', - 'test/process/lead2opportunity.yml', + 'test/process/lead2opportunity_win_lost.yml', 'test/process/partner2opportunity.yml', 'test/process/cancel_lead.yml', 'test/process/meeting.yml', diff --git a/addons/crm/test/process/lead2opportunity.yml b/addons/crm/test/process/lead2opportunity_win_lost.yml similarity index 68% rename from addons/crm/test/process/lead2opportunity.yml rename to addons/crm/test/process/lead2opportunity_win_lost.yml index ef8d20fc602..e5103c48ef0 100644 --- a/addons/crm/test/process/lead2opportunity.yml +++ b/addons/crm/test/process/lead2opportunity_win_lost.yml @@ -1,17 +1,16 @@ - - As the lead seems to be a real business opportunity, I will convert it to a partner - and a business opportunity. + I test to convert lead to real business opportunity, so first i create existing partner attached with lead. - !record {model: crm.lead2opportunity.partner, id: crm_lead2opportunity_partner_create_1}: action: 'exist' partner_id: base.res_partner_agrolait - - Create opportunity based on exiting partner + Create opportunity based on exiting partner. - !python {model: crm.lead2opportunity.partner}: | self.action_apply(cr, uid, [ref("crm_lead2opportunity_partner_create_1")], {'active_ids': [ref("crm_case_qrecorp0")], 'active_id': ref("crm_case_qrecorp0")}) - - In order to test lead, i will test to lead is converted to opportunity. + After converted in opportunity, i test to lead is converted to opportunity. - !python {model: crm.lead}: | lead = self.browse(cr, uid, ref('crm_case_qrecorp0')) @@ -19,12 +18,12 @@ assert lead.partner_id.id == ref("base.res_partner_agrolait"), 'Partner missmatch!' assert lead.stage_id.id == ref("stage_lead1"), 'Stage of probability is incorrect!' - - Finally, i won this opportunity, so i will close this lead. + Finally, i won this opportunity, so i close this opportunity. - !python {model: crm.lead}: | self.case_mark_won(cr, uid, [ref("crm_case_qrecorp0")]) - - In order to test opportunity, it is close or not. + I check lead is close or not. - !assert {model: crm.lead, id: crm.crm_case_qrecorp0, string: Lead in done state}: - state == "done" @@ -52,7 +51,7 @@ # lead = self.browse(cr, uid, ref('crm_case_qrecorp0')) # assert lead.message_ids[0].subject == 'I won this Opportunity', 'Fail to Added interal note on opportunity' - - After winning the opportunity, i will test probability is 100. + After winning the opportunity, i test probability is 100. - !assert {model: crm.lead, id: crm.crm_case_qrecorp0, string: Probability is equal to 100}: - probability == 100.0 @@ -69,22 +68,3 @@ opportunity = self.browse(cr, uid, ref('crm_case_rdroundfundingunits0')) assert opportunity.stage_id.id == ref('crm.stage_lead6'), 'Stage is not changed!' assert opportunity.probability == 0.0, 'Probability is wrong!' - -- - I have two opportunity ,so i will merge this two Opportunities. -- - !python {model: crm.merge.opportunity}: | - op_ids=self.pool.get('crm.lead').browse(cr, uid, [ref('crm_case_bankwealthy2'), ref('crm_case_unifliege')]) - self.merge(cr, uid, op_ids) - -- - I will test which two opportunity merged . -- - !python {model: crm.lead}: | - lead = self.browse(cr, uid, ref('crm_case_bankwealthy2')) - merge = 'Merged opportunities' in lead.message_ids[0].subject - assert merge,'Fail to create Merge opportunity' - assert lead.type == 'opportunity', 'Merged opportunity type not change!' - assert lead.partner_id.id == ref("base.res_partner_accent"), 'Partner missmatch!' - assert lead.stage_id.id == ref("stage_lead2"), 'Stage of probability is incorrect!' - \ No newline at end of file From 4ffbf5fc8583e04852a69ab4f61b487f6e1e6848 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Mon, 17 Oct 2011 18:14:33 +0530 Subject: [PATCH 077/711] [ADD] crm: Added new yml merge_opportunity.yml and also updated __openerp__.py bzr revid: ron@tinyerp.com-20111017124433-21wwyc3yvs4qs2ca --- addons/crm/__openerp__.py | 1 + addons/crm/test/process/merge_opportunity.yml | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 addons/crm/test/process/merge_opportunity.yml diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index 7b11d12cede..965222976aa 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -121,6 +121,7 @@ Creates a dashboard for CRM that includes: 'test': [ 'test/process/lead_open.yml', 'test/process/lead2opportunity_win_lost.yml', + 'test/process/merge_opportunity.yml', 'test/process/partner2opportunity.yml', 'test/process/cancel_lead.yml', 'test/process/meeting.yml', diff --git a/addons/crm/test/process/merge_opportunity.yml b/addons/crm/test/process/merge_opportunity.yml new file mode 100644 index 00000000000..2028c304276 --- /dev/null +++ b/addons/crm/test/process/merge_opportunity.yml @@ -0,0 +1,17 @@ +- + I have two opportunity ,so i merge this two Opportunities. +- + !python {model: crm.merge.opportunity}: | + op_ids=self.pool.get('crm.lead').browse(cr, uid, [ref('crm_case_bankwealthy2'), ref('crm_case_unifliege')]) + self.merge(cr, uid, op_ids) + +- + I test which two opportunity has been merged . +- + !python {model: crm.lead}: | + lead = self.browse(cr, uid, ref('crm_case_bankwealthy2')) + merge = 'Merged opportunities' in lead.message_ids[0].subject + assert merge,'Fail to create Merge opportunity' + assert lead.type == 'opportunity', 'Merged opportunity type not change!' + assert lead.partner_id.id == ref("base.res_partner_accent"), 'Partner missmatch!' + assert lead.stage_id.id == ref("stage_lead2"), 'Stage of probability is incorrect!' From 845828efe96014453542819003a377882b7a38a5 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Mon, 17 Oct 2011 18:22:34 +0530 Subject: [PATCH 078/711] [IMP, REF] crm: 1) Renamed lead2_mass_convert_opportunity.yml to mass_leads2opportunity.yml, 2) Improved string value, 3) Updated __openerp__.py bzr revid: ron@tinyerp.com-20111017125234-6clvbte3zc7l0ivf --- addons/crm/__openerp__.py | 2 +- ...ss_convert_opportunity.yml => mass_leads2opportunity.yml} | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) rename addons/crm/test/process/{lead2_mass_convert_opportunity.yml => mass_leads2opportunity.yml} (90%) diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index 965222976aa..66115e97e30 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -125,7 +125,7 @@ Creates a dashboard for CRM that includes: 'test/process/partner2opportunity.yml', 'test/process/cancel_lead.yml', 'test/process/meeting.yml', - 'test/process/lead2_mass_convert_opportunity.yml', + 'test/process/mass_leads2opportunity.yml', 'test/ui/lead_form.yml', 'test/process/phonecall2opportunity.yml', 'test/process/phonecall2meeting.yml', diff --git a/addons/crm/test/process/lead2_mass_convert_opportunity.yml b/addons/crm/test/process/mass_leads2opportunity.yml similarity index 90% rename from addons/crm/test/process/lead2_mass_convert_opportunity.yml rename to addons/crm/test/process/mass_leads2opportunity.yml index 22c22d7a376..4286eac1848 100644 --- a/addons/crm/test/process/lead2_mass_convert_opportunity.yml +++ b/addons/crm/test/process/mass_leads2opportunity.yml @@ -1,12 +1,13 @@ - - Using mass wizard, convert two lead to opportunity. + Using mass wizard convert two lead to opportunity ,so first i create mass record for + converting in opportunity. - !record {model: crm.lead2opportunity.partner.mass, id: crm_lead2opportunity_partner_mass0}: user_ids: - base.user_root section_id: crm.section_sales_department - - Leads coverts to mass opportunity. + Convert mass Leads to opportunity. - !python {model: crm.lead2opportunity.partner.mass}: | self.mass_convert(cr, uid, [ref("crm_lead2opportunity_partner_mass0")],{'active_ids': [ref("crm_case_employee0"), ref("crm_case_electonicgoodsdealer0")], 'active_id': ref("crm_case_qrecorp0")}) From d756ccfb55bf349096029c6b7bf2fed094f6f99f Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Mon, 17 Oct 2011 18:36:51 +0530 Subject: [PATCH 079/711] [IMP, REF] crm: 1) Renamed lead_open.yml to draft2open_lead.yml, 2) Improved string value, 3) Updated __openerp__.py bzr revid: ron@tinyerp.com-20111017130651-kbsl9j33jui7at98 --- addons/crm/__openerp__.py | 2 +- .../crm/test/process/{lead_open.yml => draft2open_lead.yml} | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename addons/crm/test/process/{lead_open.yml => draft2open_lead.yml} (54%) diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index 66115e97e30..b7d4332d319 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -119,7 +119,7 @@ Creates a dashboard for CRM that includes: 'crm_phonecall_demo.xml', ], 'test': [ - 'test/process/lead_open.yml', + 'test/process/draft2open_lead.yml', 'test/process/lead2opportunity_win_lost.yml', 'test/process/merge_opportunity.yml', 'test/process/partner2opportunity.yml', diff --git a/addons/crm/test/process/lead_open.yml b/addons/crm/test/process/draft2open_lead.yml similarity index 54% rename from addons/crm/test/process/lead_open.yml rename to addons/crm/test/process/draft2open_lead.yml index d5c6bb2d101..97947b5846b 100644 --- a/addons/crm/test/process/lead_open.yml +++ b/addons/crm/test/process/draft2open_lead.yml @@ -1,10 +1,10 @@ - - Communication by phonecall or mail I got lead from Customer/partner, I test to created lead in initial stage. + I got lead from Customer, I open this lead. - !python {model: crm.lead}: | self.case_open(cr, uid, [ref("crm_case_qrecorp0")]) - | - In order to test lead, i will test lead is in open stage. + In order to test lead, i test lead is in open stage. - !assert {model: crm.lead, id: crm.crm_case_qrecorp0, string: Lead in open state}: - state == "open" From a5e50a5a272bcadd8b4d092152113cd8486b99c5 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Tue, 18 Oct 2011 10:30:09 +0530 Subject: [PATCH 080/711] [IMP] crm: Improved string on cancel_lead.yml bzr revid: ron@tinyerp.com-20111018050009-drdg39ws1w9gnj5d --- addons/crm/test/process/cancel_lead.yml | 32 ++++++++++++------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/addons/crm/test/process/cancel_lead.yml b/addons/crm/test/process/cancel_lead.yml index 3a3366c05e4..abd966b5e9d 100644 --- a/addons/crm/test/process/cancel_lead.yml +++ b/addons/crm/test/process/cancel_lead.yml @@ -1,45 +1,45 @@ - - Cheking for lead from draft to cancel, I will cancelling this lead. + Cheking for lead from draft to cancel, I cancel this lead. - !python {model: crm.lead}: | self.case_cancel(cr, uid, [ref("crm_case_itisatelesalescampaign0")]) - - In order to test for cancel lead , i will test lead is on cancel state. + I test lead is on cancel state. - !assert {model: crm.lead, id: crm.crm_case_itisatelesalescampaign0, string: Lead is in cancel state}: - state == "cancel" - - Cheking for lead from cancel to reset, I will reseting this lead. + Checking for lead from cancel to reset, I reset this lead. - !python {model: crm.lead}: | self.case_reset(cr, uid, [ref("crm_case_itisatelesalescampaign0")]) - - In order to test for reset lead , i will test lead is on draft state. + I test lead is on draft state. - !assert {model: crm.lead, id: crm.crm_case_itisatelesalescampaign0, string: Lead is in draft state}: - state == "draft" - - Cheking for lead from reset to pending, I will pending this lead. + Cheking for lead from reset to pending, I pending this lead. - !python {model: crm.lead}: | self.case_pending(cr, uid, [ref("crm_case_itisatelesalescampaign0")]) - - In order to test for pending lead , i will test lead is on pending state. + I test lead is on pending state. - !assert {model: crm.lead, id: crm.crm_case_itisatelesalescampaign0, string: Lead is in pending state}: - state == "pending" - - Cheking for lead from pending to cancel, I will cancelling this lead. + Cheking for lead from pending to cancel, I cancel this lead. - !python {model: crm.lead}: | self.case_cancel(cr, uid, [ref("crm_case_itisatelesalescampaign0")]) - - In order to test for cancel lead , i will test lead is on cancel state. + I test lead is on cancel state. - !assert {model: crm.lead, id: crm.crm_case_itisatelesalescampaign0, string: Lead is in cancel state}: - state == "cancel" - - For working on parent child relationship, we are creating sales executive department that will be work under + For working on parent child relationship, I create sales executive department that will be work under Sales Department. - !record {model: crm.case.section, id: section_sales_exe_department}: @@ -47,31 +47,31 @@ parent_id: crm.section_sales_department - - If Lead not handle by executive team so its need to Escalate lead from sales executive department to sales department, - for that purpose i Assign sales executive department on lead, after we will be process to escalate lead to sales department + Escalate lead from sales executive department to sales department, + for that purpose i assign sales executive department on lead, + after i will be process to escalate lead to sales department - !record {model: crm.lead, id: crm.crm_case_itisatelesalescampaign0}: section_id: section_sales_exe_department - - Processing on Lead escalate to sales Departemnt, we are checking for lead Escalate to sales Department from Executive + Processing on Lead escalate to sales departemnt, i check for lead escalate to sales Department from Executive department or not. - !python {model: crm.lead}: | self.case_reset(cr, uid, [ref("crm_case_itisatelesalescampaign0")]) self.case_escalate(cr, uid, [ref("crm_case_itisatelesalescampaign0")]) - - In order to test for escalate lead , i will test lead Escalate from sales Department from Executive - department. + I test lead escalate from sales department from Executive department. - !assert {model: crm.lead, id: crm.crm_case_itisatelesalescampaign0, string: Escalate lead to on sales team from Executive teame}: - section_id.name == "Sales Department" - - Cheking for lead from escalate to cancel, I will cancelling this lead. + Cheking for lead from escalate to cancel, I cancel this lead. - !python {model: crm.lead}: | self.case_cancel(cr, uid, [ref("crm_case_itisatelesalescampaign0")]) - - In order to test for cancel lead , i will test lead is on cancel state. + I test lead is on cancel state. - !assert {model: crm.lead, id: crm.crm_case_itisatelesalescampaign0, string: Lead is in cancel state}: - state == "cancel" From d61ea7b209e023681ae1a78cf818a15af8af31a1 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Tue, 18 Oct 2011 10:32:08 +0530 Subject: [PATCH 081/711] [IMP] crm: removed one string on cancel_lead.yml bzr revid: ron@tinyerp.com-20111018050208-jocyosbhswo08gw5 --- addons/crm/test/process/cancel_lead.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/crm/test/process/cancel_lead.yml b/addons/crm/test/process/cancel_lead.yml index abd966b5e9d..75afa71c1d9 100644 --- a/addons/crm/test/process/cancel_lead.yml +++ b/addons/crm/test/process/cancel_lead.yml @@ -39,8 +39,7 @@ !assert {model: crm.lead, id: crm.crm_case_itisatelesalescampaign0, string: Lead is in cancel state}: - state == "cancel" - - For working on parent child relationship, I create sales executive department that will be work under - Sales Department. + I create sales executive department that will be work under Sales Department. - !record {model: crm.case.section, id: section_sales_exe_department}: name: "Sales Executive" From f43ab4b01e35945bccd04302d57a4113d76d3939 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Tue, 18 Oct 2011 10:37:16 +0530 Subject: [PATCH 082/711] [IMP] crm: Improved string on lead_form.yml(onchange event, copy and unlink the record) bzr revid: ron@tinyerp.com-20111018050716-xn8015acnwwvitb4 --- addons/crm/test/ui/lead_form.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/crm/test/ui/lead_form.yml b/addons/crm/test/ui/lead_form.yml index c6cbbb3fcb2..8cfc96283b0 100644 --- a/addons/crm/test/ui/lead_form.yml +++ b/addons/crm/test/ui/lead_form.yml @@ -1,18 +1,18 @@ - - In order to check for changes on partner, data will be change automatically according to partner, + In order to check for changes on partner, country and phone number change automatically according to partner, - !python {model: crm.lead}: | action = self.onchange_partner_address_id(cr, uid, ref("crm_case_qrecorp0"), ref("base.res_partner_address_notsotinysarl0"), email=False) assert action['value']['country_id'] == 20, "Country name not True" assert action['value']['phone'] == '(+32).81.81.37.00', "phone number is wrong" - - I try to Unlink the Lead I create new record of lead. + I try to Unlink the lead, so I create new record of lead on cancel stage. - !record {model: crm.lead, id: crm_case_new_lead}: name: Openerp Trainning state: cancel - - In order to test unlink lead, i will do unlink this lead + I test copy and unlink this lead. - !python {model: crm.lead}: | self.copy(cr, uid, ref("crm_case_new_lead")) From faea3fa2130fa2cb7f178d986add1606fe580809 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Tue, 18 Oct 2011 10:46:39 +0530 Subject: [PATCH 083/711] [IMP] crm: Improved string on lead2opportunity_win_lost.yml bzr revid: ron@tinyerp.com-20111018051639-kdy5pvaqeg3witvr --- addons/crm/test/process/lead2opportunity_win_lost.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/crm/test/process/lead2opportunity_win_lost.yml b/addons/crm/test/process/lead2opportunity_win_lost.yml index e5103c48ef0..eacb919c3eb 100644 --- a/addons/crm/test/process/lead2opportunity_win_lost.yml +++ b/addons/crm/test/process/lead2opportunity_win_lost.yml @@ -16,16 +16,16 @@ lead = self.browse(cr, uid, ref('crm_case_qrecorp0')) assert lead.type == 'opportunity', 'Lead is not converted to opportunity!' assert lead.partner_id.id == ref("base.res_partner_agrolait"), 'Partner missmatch!' - assert lead.stage_id.id == ref("stage_lead1"), 'Stage of probability is incorrect!' + assert lead.stage_id.id == ref("stage_lead1"), 'Stage of opportunity is incorrect!' - Finally, i won this opportunity, so i close this opportunity. - !python {model: crm.lead}: | self.case_mark_won(cr, uid, [ref("crm_case_qrecorp0")]) - - I check lead is close or not. + I check opportunity is close or not. - - !assert {model: crm.lead, id: crm.crm_case_qrecorp0, string: Lead in done state}: + !assert {model: crm.lead, id: crm.crm_case_qrecorp0, string: Opportunity in done state}: - state == "done" - In order to test stage of opportunity after win, i will test stage of opportunity. From a1ab9fdfe6aca1faba3a0919ca2014eb4eaf6fa1 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Tue, 18 Oct 2011 11:00:37 +0530 Subject: [PATCH 084/711] [IMP] crm: Improved string on phonecall2opportunity.yml bzr revid: ron@tinyerp.com-20111018053037-u9s24ffbjusg8cfj --- .../crm/test/process/phonecall2opportunity.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/crm/test/process/phonecall2opportunity.yml b/addons/crm/test/process/phonecall2opportunity.yml index 2575daf8665..03671d6df3b 100644 --- a/addons/crm/test/process/phonecall2opportunity.yml +++ b/addons/crm/test/process/phonecall2opportunity.yml @@ -1,19 +1,19 @@ -- | - For customer or partner purpose, I called to him/her for discussion about openerp. - As the success of phonecall seems to be a real business opportunity, It will convert - it to opportunity. +- + For customer purpose, I called to him/her for discussion about openerp. + As the success of phonecall seems to be a real business opportunity, so first i + create record of phonecall. - !record {model: crm.phonecall2opportunity, id: crm_phonecall2opportunity_disc_openerp}: name: Discuss Review Process partner_id: base.res_partner_tinyatwork - - Succeed phonecall, it will be convert into on opportunity. + Succeed phonecall, it's convert into on opportunity. - !python {model: crm.phonecall2opportunity}: | self.action_apply(cr, uid, [ref("crm_phonecall2opportunity_disc_openerp")], {"active_id": ref("crm_case_phone04")}) -- | - For business And I check that the phonecall and the newly created business - opportunity is linked to same partner and also check with phonecall closed and opportunity +- + I check that the phonecall and the newly created business opportunity is + linked to same partner and also check with phonecall closed and opportunity is on intial stage or not. - !python {model: crm.phonecall}: | From 570c0fabc53191d7d7706dc75f70240def1885d7 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Tue, 18 Oct 2011 11:15:30 +0530 Subject: [PATCH 085/711] [REN]: crm: 1) Renamed from phonecall2opportunity.yml to phone-call2meeting.yml, 2) Renamed from phonecall2opportunity.yml to phone-call2opportunity.yml, 3) Renamed from schedule_other_phonecall.yml to schedule_other_phone-call.yml, 4) Updated __openerp__.py bzr revid: ron@tinyerp.com-20111018054530-b06brnnspgalkjmb --- addons/crm/__openerp__.py | 6 +++--- .../{phonecall2meeting.yml => phone-call2meeting.yml} | 0 ...phonecall2opportunity.yml => phone-call2opportunity.yml} | 0 ...le_other_phonecall.yml => schedule_other_phone-call.yml} | 0 4 files changed, 3 insertions(+), 3 deletions(-) rename addons/crm/test/process/{phonecall2meeting.yml => phone-call2meeting.yml} (100%) rename addons/crm/test/process/{phonecall2opportunity.yml => phone-call2opportunity.yml} (100%) rename addons/crm/test/process/{schedule_other_phonecall.yml => schedule_other_phone-call.yml} (100%) diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index b7d4332d319..fb2aa8679d4 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -127,9 +127,9 @@ Creates a dashboard for CRM that includes: 'test/process/meeting.yml', 'test/process/mass_leads2opportunity.yml', 'test/ui/lead_form.yml', - 'test/process/phonecall2opportunity.yml', - 'test/process/phonecall2meeting.yml', - 'test/process/schedule_other_phonecall.yml' + 'test/process/phone-call2opportunity.yml', + 'test/process/phone-call2meeting.yml', + 'test/process/schedule_other_phone-call.yml' ], 'installable': True, 'active': False, diff --git a/addons/crm/test/process/phonecall2meeting.yml b/addons/crm/test/process/phone-call2meeting.yml similarity index 100% rename from addons/crm/test/process/phonecall2meeting.yml rename to addons/crm/test/process/phone-call2meeting.yml diff --git a/addons/crm/test/process/phonecall2opportunity.yml b/addons/crm/test/process/phone-call2opportunity.yml similarity index 100% rename from addons/crm/test/process/phonecall2opportunity.yml rename to addons/crm/test/process/phone-call2opportunity.yml diff --git a/addons/crm/test/process/schedule_other_phonecall.yml b/addons/crm/test/process/schedule_other_phone-call.yml similarity index 100% rename from addons/crm/test/process/schedule_other_phonecall.yml rename to addons/crm/test/process/schedule_other_phone-call.yml From cc262bbd1ea9384aa5904b0bd0fc43142c1619ee Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Tue, 18 Oct 2011 12:00:30 +0530 Subject: [PATCH 086/711] [ADD, MOVE] crm_claim: 1)Added process directory: crm_claim/test/process, 2) Move and renamed file from crm_claim/test/test_crm_claim.yml => crm_claim/test/process/claim.yml bzr revid: ron@tinyerp.com-20111018063030-4dp0jkjbmpu0csml --- addons/crm_claim/test/{test_crm_claim.yml => process/claim.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename addons/crm_claim/test/{test_crm_claim.yml => process/claim.yml} (100%) diff --git a/addons/crm_claim/test/test_crm_claim.yml b/addons/crm_claim/test/process/claim.yml similarity index 100% rename from addons/crm_claim/test/test_crm_claim.yml rename to addons/crm_claim/test/process/claim.yml From b7641ab3d213426e34cc2fdf7c423f4880aa415b Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Tue, 18 Oct 2011 12:43:58 +0530 Subject: [PATCH 087/711] [IMP, REM] crm_claim: All changes done in claim.yml 1) Removed code of onchange_partner_id, onchange_partner_address_id, stage_change 2) Updated code only claim is open to close process 3) updated __openerp__.py bzr revid: ron@tinyerp.com-20111018071358-l5424dpckx7327n1 --- addons/crm_claim/__openerp__.py | 2 +- addons/crm_claim/test/process/claim.yml | 48 ++++++------------------- 2 files changed, 12 insertions(+), 38 deletions(-) diff --git a/addons/crm_claim/__openerp__.py b/addons/crm_claim/__openerp__.py index ae493c5dac2..2fabcd4b100 100644 --- a/addons/crm_claim/__openerp__.py +++ b/addons/crm_claim/__openerp__.py @@ -48,7 +48,7 @@ automatically new claims based on incoming emails. 'demo_xml': [ 'crm_claim_demo.xml', ], - 'test': ['test/test_crm_claim.yml'], + 'test': ['test/process/claim.yml'], 'installable': True, 'active': False, 'certificate' : '00612027414703404749', diff --git a/addons/crm_claim/test/process/claim.yml b/addons/crm_claim/test/process/claim.yml index 9ee130329a7..b12698797cb 100644 --- a/addons/crm_claim/test/process/claim.yml +++ b/addons/crm_claim/test/process/claim.yml @@ -1,44 +1,18 @@ -- | - I check claims which contain customer claim information about document - related problem, product related problem. -- | - I start by creating new claims for Damaged product as Value Claims with priority High and specify - date of claim at which claim is created. - - !record {model: crm.claim, id: crm_claim_damagedproduct0}: - categ_id: crm_claim.categ_claim2 - date: !eval time.strftime('%Y-%m-%d %H:%M:%S') - email_from: info@balmerinc.be - name: 'Damaged product ' - partner_address_id: base.res_partner_address_1 - partner_id: base.res_partner_9 - priority: '2' - section_id: crm.section_sales_department - -- | - I check that the claims is in 'draft' state. + I check claim which contain customer claim information about + product related problem. - - !assert {model: crm.claim, id: crm_claim_damagedproduct0}: - - state == 'draft' -- | - I can change that stage by next button right on it. -- - !python {model: crm.claim}: | - self.stage_next(cr, uid, [ref('crm_claim_damagedproduct0')]) -- | I make this claim as Open. - !python {model: crm.claim}: | - self.case_open(cr, uid, [ref('crm_claim_damagedproduct0')]) -- | - I am changing partner Assigned to the Claim. + self.case_open(cr, uid, [ref('crm_case_claim04')]) + claim = self.browse(cr, uid, ref('crm_case_claim04')) + assert claim.state == "open", "Claim is not in Open state" + assert claim.stage_id.id == ref("crm.stage_lead1"), "Claim is not in New stage" +- + After complete all service from our side i close this claim. - !python {model: crm.claim}: | - self.onchange_partner_id(cr, uid, [ref('crm_claim_damagedproduct0')], []) - self.onchange_partner_id(cr, uid, [ref('crm_claim_damagedproduct0')], ref('base.res_partner_10')) -- | - I am changing partner Address to the Claim. -- - !python {model: crm.claim}: | - self.onchange_partner_address_id(cr, uid, [ref('crm_claim_damagedproduct0')], [], email = False) - + self.case_close(cr, uid, [ref('crm_case_claim04')]) + claim = self.browse(cr, uid, ref('crm_case_claim04')) + assert claim.state == "done", "Claim is not in close state" From 83b5a42efce56ac25f007f476587d554736b49b4 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Tue, 18 Oct 2011 15:26:22 +0530 Subject: [PATCH 088/711] [ADD] crm_claim: 1) Added directory =>crm_claim/test/ui, 1) Added file crm_claim/test/ui/claim_form.yml, 2) covered partner_onchange_id and checked data bzr revid: ron@tinyerp.com-20111018095622-ceg2nur0nlt93pjp --- addons/crm_claim/__openerp__.py | 3 ++- addons/crm_claim/test/ui/claim_form.yml | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 addons/crm_claim/test/ui/claim_form.yml diff --git a/addons/crm_claim/__openerp__.py b/addons/crm_claim/__openerp__.py index 2fabcd4b100..8f0aef1bf37 100644 --- a/addons/crm_claim/__openerp__.py +++ b/addons/crm_claim/__openerp__.py @@ -48,7 +48,8 @@ automatically new claims based on incoming emails. 'demo_xml': [ 'crm_claim_demo.xml', ], - 'test': ['test/process/claim.yml'], + 'test': ['test/process/claim.yml', + 'test/ui/claim_form.yml'], 'installable': True, 'active': False, 'certificate' : '00612027414703404749', diff --git a/addons/crm_claim/test/ui/claim_form.yml b/addons/crm_claim/test/ui/claim_form.yml new file mode 100644 index 00000000000..bbf37688ed6 --- /dev/null +++ b/addons/crm_claim/test/ui/claim_form.yml @@ -0,0 +1,8 @@ +- + In order to test for changes on partner, data change automatically according to partner. +- + !python {model: crm.claim}: | + partner_onchange = self.onchange_partner_id(cr, uid, [ref('crm_case_claim04')], ref('base.res_partner_10')) + assert partner_onchange['value']['partner_phone'] == "+33-658-256545" ,"Phone number is wrong" + assert partner_onchange['value']['partner_address_id'] == 20 ,"Address is wrong" + assert partner_onchange['value']['email_from'] == 'l.dupont@tecsas.fr' ,"Email address is wrong" From fe454d5d26707e527f3b2d42c259d62bb2c1e895 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Tue, 18 Oct 2011 16:31:39 +0530 Subject: [PATCH 089/711] [ADD, MOVE] crm_helpdesk: 1) added directory =>crm_helpdesk/test/process, 2) renamed file crm_helpdesk/test/test_crm_helpdesk.yml => crm_helpdesk/test/process/help-desk.yml bzr revid: ron@tinyerp.com-20111018110139-i88q4i1nf17t1h4y --- .../test/{test_crm_helpdesk.yml => process/help-desk.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename addons/crm_helpdesk/test/{test_crm_helpdesk.yml => process/help-desk.yml} (100%) diff --git a/addons/crm_helpdesk/test/test_crm_helpdesk.yml b/addons/crm_helpdesk/test/process/help-desk.yml similarity index 100% rename from addons/crm_helpdesk/test/test_crm_helpdesk.yml rename to addons/crm_helpdesk/test/process/help-desk.yml From 7724dda7bb570f5abccbcbf4eaa8bbf65c404eee Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Wed, 19 Oct 2011 11:50:35 +0530 Subject: [PATCH 090/711] [IMP] crm_helpdesk: Improved help-desk.yml, first create message manually regarding functional question for helpdesk and test it, open this helpdesk and update that message accordingly, after i complete this helpdesk then close it bzr revid: ron@tinyerp.com-20111019062035-mxa0kdia4tfhxf2w --- addons/crm_helpdesk/__openerp__.py | 2 +- .../crm_helpdesk/test/process/help-desk.yml | 68 ++++--------------- 2 files changed, 15 insertions(+), 55 deletions(-) diff --git a/addons/crm_helpdesk/__openerp__.py b/addons/crm_helpdesk/__openerp__.py index 5124c3c5817..2adf7d26dcc 100644 --- a/addons/crm_helpdesk/__openerp__.py +++ b/addons/crm_helpdesk/__openerp__.py @@ -49,7 +49,7 @@ and categorize your interventions with a channel and a priority level. 'demo_xml': [ 'crm_helpdesk_demo.xml', ], - 'test': ['test/test_crm_helpdesk.yml'], + 'test': ['test/process/help-desk.yml'], 'installable': True, 'active': False, 'certificate' : '00830691522781519309', diff --git a/addons/crm_helpdesk/test/process/help-desk.yml b/addons/crm_helpdesk/test/process/help-desk.yml index eb0a25d2110..687238ab269 100644 --- a/addons/crm_helpdesk/test/process/help-desk.yml +++ b/addons/crm_helpdesk/test/process/help-desk.yml @@ -1,57 +1,17 @@ - - | - I start by creating New helpdesk request regarding some functional questions. - I select Date at which helpdesk request is created. -- - !record {model: crm.helpdesk, id: crm_helpdesk_somefunctionalquestion0}: - date: !eval time.strftime('%Y-%m-%d %H:%M:%S') - email_from: info@balmerinc.be - name: Some functional question. - partner_address_id: base.res_partner_address_1 - partner_id: base.res_partner_9 - section_id: crm.section_sales_department -- - I create the message. + I start by create helpdesk request regarding some functional questions, + so first create message manually regarding functional question for helpdesk + and test it, open this helpdesk and update that message accordingly, after + i complete this helpdesk then close it. - !python {model: crm.helpdesk}: | - msg = { - 'subject': 'test_email', - 'body_text': 'Testing', - 'from': 'Administrator ', - } - context = None - self.message_new(cr, uid,msg,context) - -- | - I check that the Helpdesk request is in 'Draft' state. -- - !assert {model: crm.helpdesk, id: crm_helpdesk_somefunctionalquestion0}: - - state == 'draft' -- | - I make it "Open". -- - !python {model: crm.helpdesk}: | - self.case_open(cr, uid, [ref('crm_helpdesk_somefunctionalquestion0')]) -- - Update the created message. -- - !python {model: crm.helpdesk}: | - vals = {} - msg = { - 'subject': 'test_email', - 'body_text': 'Testing', - 'from': 'Administrator ', - 'priority': 'done' - } - context = None - default_act = 'pending' - try: - self.message_update(cr, uid,[ref('crm_helpdesk_somefunctionalquestion0')], msg,context) - except: - pass -- | - After a proper communication for the request via email I make sure that the request is fulfilled and - I close this HelpDesk Request by clicking on "Close" button. -- - !python {model: crm.helpdesk}: | - self.case_close(cr, uid, [ref('crm_helpdesk_somefunctionalquestion0')]) + msg = {'subject': 'Functional questions', 'body_text': 'How the CRM working?', 'from': 'admin@openerp.com'} + helpdesk_id = self.message_new(cr, uid, msg, context=None) + data = self.browse(cr, uid ,helpdesk_id) + assert data.name == "Functional questions", "Subject name is incorrect" + assert data.email_from == "admin@openerp.com","Email Id incorrect" + assert data.description == "How the CRM working?", "Description is incorrect" + self.case_open(cr, uid, [helpdesk_id]) + msg = {'subject': 'Email regarding to CRM', 'body_text': 'Details of CRM Documentation', 'from': 'admin@openerp.com'} + self.message_update(cr, uid,[helpdesk_id], msg, default_act = 'pending',context=None) + self.case_close(cr, uid, [helpdesk_id]) \ No newline at end of file From ba3e68b09243cf14006fe3c055e455463099a621 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Wed, 19 Oct 2011 12:43:25 +0530 Subject: [PATCH 091/711] [FIX]: crm_partner_assign: Cannot find field body in the following view parts composing the view of object model crm.lead.forward.to.partner bzr revid: ron@tinyerp.com-20111019071325-vwxdwdtmk42bia48 --- .../crm_partner_assign/wizard/crm_forward_to_partner_view.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/crm_partner_assign/wizard/crm_forward_to_partner_view.xml b/addons/crm_partner_assign/wizard/crm_forward_to_partner_view.xml index 8bdb03cf962..aa2c45ea1c9 100644 --- a/addons/crm_partner_assign/wizard/crm_forward_to_partner_view.xml +++ b/addons/crm_partner_assign/wizard/crm_forward_to_partner_view.xml @@ -35,7 +35,7 @@ - +
- @@ -114,7 +113,6 @@ - @@ -126,7 +124,6 @@ - @@ -159,7 +156,6 @@ - @@ -343,8 +339,5 @@ - - - \ No newline at end of file From b0ece86d7cf44cdccfd563ce9d547bd72c79dbba Mon Sep 17 00:00:00 2001 From: "Vaibhav (OpenERP)" Date: Wed, 16 Nov 2011 19:08:44 +0530 Subject: [PATCH 220/711] [FIX] Create node. bzr revid: vda@tinyerp.com-20111116133844-qp4fp3pkruqpgobr --- addons/web_gantt/static/src/js/gantt.js | 59 ++++++++----------- addons/web_gantt/static/src/xml/web_gantt.xml | 1 + 2 files changed, 25 insertions(+), 35 deletions(-) diff --git a/addons/web_gantt/static/src/js/gantt.js b/addons/web_gantt/static/src/js/gantt.js index effaf17dfe3..ec212c7007d 100644 --- a/addons/web_gantt/static/src/js/gantt.js +++ b/addons/web_gantt/static/src/js/gantt.js @@ -65,7 +65,9 @@ init: function(parent, dataset, view_id) { var name = started_projects[0][self.parent]; self.name = name instanceof Array? name[name.length - 1] : name; } - + this.$element.find('#add_task').click(function(){ + self.editTask(); + }); $.when(this.project_starting_date(), this.get_project_duration(), this.calculate_difference()) .then(function() { if(self.ganttChartControl) { @@ -83,30 +85,23 @@ init: function(parent, dataset, view_id) { var def = $.Deferred(), self = this, projects = this.database_projects; - - if (!this.group_by.length) return def.resolve().promise(); - this.GroupProject = _.map(this.group_by, function(grp) { - return _.groupBy(projects, function(prj) { - if(!prj[grp]) prj[grp] = 'Undefined'; - return prj[grp]; - }) + if (!this.group_by.length) return def.resolve().promise(); + this.data_groups = _.groupBy(projects, function(project, index) { + return _.map(self.group_by, function(group, index) { + if(!project[group]) project[group] = 'Undefined'; + else if(project[group] instanceof Array) project[group] = project[group][1]; + return project[group]; }); + }); return def.resolve().promise(); }, - generate_projects : function() { var projects = this.database_projects, self = this; this.GanttTasks = []; if(this.group_by.length) { - _.each(this.GroupProject, function(grp, index) { - var name = _.keys(grp)[0]; - name = name.split(','); -// index > 0 ? "" + (index - 1) - self.GanttTasks.push(new GanttTaskInfo(index, name[name.length - 1], self.project_start_date, self.total_duration, 100, index > 0 ? (index - 1) : "")); - }); } else { this.GanttTasks.push(new GanttTaskInfo(0, self.name, self.project_start_date, self.total_duration, 100, "")); } @@ -118,11 +113,7 @@ init: function(parent, dataset, view_id) { var self = this, tasks = this.database_projects; if (this.group_by.length) { - _.each(_.values(_.last(this.GroupProject))[0], function(task, index) { - var name = task[self.text]; - _.last(self.GanttTasks) - .addChildTask(new GanttTaskInfo(task.id, name, self.format_date(task[self.date_start]), self.project_duration[index], 100, "")) - }); + } else { _.each(tasks, function(task, index){ @@ -207,9 +198,7 @@ init: function(parent, dataset, view_id) { var self = this; if (this.group_by.length) { - _.each(self.GanttTasks, function(tasks, index) { - self.GanttProjects.addTask(tasks); - }); + } else { _.each(this.GanttTasks, function(tsk, index){ @@ -293,13 +282,16 @@ init: function(parent, dataset, view_id) { }, editTask: function(task) { - - var self = this; - var event_id = task.getId(); - if(!event_id || !task.parentTask) - return false; + var self = this, + event_id; + if (!task) + event_id = null; + else { + event_id = task.getId(); + if(!event_id || !task.parentTask) + return false; + } if(event_id) event_id = parseInt(event_id, 10); - var action_manager = new openerp.web.ActionManager(this); var dialog = new openerp.web.Dialog(this, { @@ -337,7 +329,7 @@ init: function(parent, dataset, view_id) { }, reloadView: function() { - self.on_project_loaded(self.database_projects); + this.on_project_loaded(this.database_projects); }, do_show: function () { @@ -352,16 +344,13 @@ init: function(parent, dataset, view_id) { var self = this; this.group_by = groupbys; $.when(this.has_been_loaded).then(function() { - self.dataset - .read_slice([], { + self.dataset.read_slice([], { domain: domains, context: contexts - }) - .done(function(projects) { + }).done(function(projects){ self.on_project_loaded(projects); }); }) - } }); diff --git a/addons/web_gantt/static/src/xml/web_gantt.xml b/addons/web_gantt/static/src/xml/web_gantt.xml index 48a1a1025dd..35cab76b452 100644 --- a/addons/web_gantt/static/src/xml/web_gantt.xml +++ b/addons/web_gantt/static/src/xml/web_gantt.xml @@ -1,5 +1,6 @@ From a2bc7dc12c7824299881dd1ccfb7613c849e81e0 Mon Sep 17 00:00:00 2001 From: "Yogesh (OpenERP)" Date: Thu, 17 Nov 2011 11:24:36 +0530 Subject: [PATCH 221/711] [FIX] Vieweditor :- fix some merge problem like change _.sprintf to _.str.sprintf. bzr revid: ysa@tinyerp.com-20111117055436-3pqgbd7exh4h18sm --- addons/web/static/src/js/view_editor.js | 43 +++++++++++++------------ 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/addons/web/static/src/js/view_editor.js b/addons/web/static/src/js/view_editor.js index e2f818870ec..d2e9cb84dc0 100644 --- a/addons/web/static/src/js/view_editor.js +++ b/addons/web/static/src/js/view_editor.js @@ -17,7 +17,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ init_view_editor: function() { var self = this; var action = { - name: _.sprintf("Manage Views (%s)", this.model), + name: _.str.sprintf("Manage Views (%s)", this.model), context: this.session.user_context, domain: [["model", "=", this.model]], res_model: 'ir.ui.view', @@ -77,7 +77,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ var self = this; this.create_view_dialog = new openerp.web.Dialog(this, { modal: true, - title: _.sprintf("Create a view (%s)", self.model), + title: _.str.sprintf("Create a view (%s)", self.model), width: 500, height: 400, buttons: { @@ -147,7 +147,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ if (field_name) { model_dataset.read_slice(['name','field_id'], {"domain": [['model','=',self.model]]}, function(records) { if (records) {view_string = records[0].name;} - var arch = _.sprintf("\n<%s string='%s'>\n\t\n", values.view_type, view_string, field_name, values.view_type); + var arch = _.str.sprintf("\n<%s string='%s'>\n\t\n", values.view_type, view_string, field_name, values.view_type); var vals = {'model': self.model, 'name': values.view_name, 'priority': values.priority, 'type': values.view_type, 'arch': arch}; self.dataset.create(vals, function(suc) { def.resolve(); @@ -170,16 +170,16 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ add_node_name : function(node) { if(node.tagName.toLowerCase() == "button" || node.tagName.toLowerCase() == "field"){ return (node.getAttribute('name'))? - _.sprintf( "<%s name='%s'>",node.tagName.toLowerCase(), node.getAttribute('name')): - _.sprintf( "<%s>",node.tagName.toLowerCase()); + _.str.sprintf( "<%s name='%s'>",node.tagName.toLowerCase(), node.getAttribute('name')): + _.str.sprintf( "<%s>",node.tagName.toLowerCase()); }else if(node.tagName.toLowerCase() == "group"){ return (node.getAttribute('string'))? - _.sprintf( "<%s>",node.getAttribute('string')): - _.sprintf( "<%s>",node.tagName.toLowerCase()); + _.str.sprintf( "<%s>",node.getAttribute('string')): + _.str.sprintf( "<%s>",node.tagName.toLowerCase()); }else{ return (node.getAttribute('string'))? - _.sprintf( "<%s string='%s'>",node.tagName.toLowerCase(), node.getAttribute('string')): - _.sprintf( "<%s>",node.tagName.toLowerCase()); + _.str.sprintf( "<%s string='%s'>",node.tagName.toLowerCase(), node.getAttribute('string')): + _.str.sprintf( "<%s>",node.tagName.toLowerCase()); } }, do_delete_view: function() { @@ -241,7 +241,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ 'level': 0, 'id': this.xml_element_id +=1, 'att_list': [], - 'name': _.sprintf("", view_id), + 'name': _.str.sprintf("", view_id), 'child_id': [] }; var xml_arch = QWeb.load_xml(arch); @@ -298,7 +298,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ expr_to_list.push(_.without($.trim(part.replace(/[^a-zA-Z 0-9 _]+/g,'!')).split("!"), "")); }); }else{ - var temp = _.reject(xpath_arch_object[0].child_id[0].att_list, function(list) { + var temp = _.str.reject(xpath_arch_object[0].child_id[0].att_list, function(list) { return _.include(list, "position") }); expr_to_list = [_.flatten(temp)]; @@ -371,7 +371,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ var self = this; this.edit_xml_dialog = new openerp.web.Dialog(this, { modal: true, - title: _.sprintf("View Editor %d - %s", self.main_view_id, self.model), + title: _.str.sprintf("View Editor %d - %s", self.main_view_id, self.model), width: 750, height: 500, buttons: { @@ -450,12 +450,12 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ case "side-remove": break; case "side-edit": - var tr = $(this).closest("tr[id^='viewedit-']").find('a').text(); - var tag = _.detect(_.keys(_PROPERTIES),function(res){ - return _.include(tr, res); - }); - var properties = _PROPERTIES[tag]; - self.on_edit_node(properties, clicked_tr_id, one_object, view_id, view_xml_id, clicked_tr_level); + var row_id = $(this).closest("tr[id^='viewedit-']").attr('id').split("-")[1]; + var result = self.get_object_by_id(row_id, one_object['main_object'], []); + if (result.length && result[0] && result[0].att_list) { + var properties = _PROPERTIES[result[0].att_list[0]]; + self.on_edit_node(properties, clicked_tr_id, one_object, view_id, view_xml_id, clicked_tr_level); + } break; case "side-up": while (1) { @@ -712,7 +712,10 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ _.each(properties, function(property) { var type_widget = new (self.property.get_any([_PROPERTIES_ATTRIBUTES[property].type])) (self.edit_node_dialog, property); var value = _.detect(arch_val[0]['att_list'],function(res) { - return _.include(res, property); + if (res instanceof Array) { + return _.include(res, property); + } + return false; }); type_widget.selection = _PROPERTIES_ATTRIBUTES[property].selection type_widget.type = _PROPERTIES_ATTRIBUTES[property].type @@ -788,7 +791,7 @@ openerp.web.ViewEditor.Field = openerp.web.Class.extend({ } }, render: function() { - return _.sprintf("%s", this.name, QWeb.render(this.template, {widget: this})) + return _.str.sprintf("%s", this.name, QWeb.render(this.template, {widget: this})) }, }); openerp.web.ViewEditor.FieldBoolean = openerp.web.ViewEditor.Field.extend({ From 1d76679c4ac1cf2130c589346d87670be877d231 Mon Sep 17 00:00:00 2001 From: "Yogesh (OpenERP)" Date: Thu, 17 Nov 2011 11:35:20 +0530 Subject: [PATCH 222/711] [IMP] vieweditor :- used setAttribute and removeAttribute instead of attr. bzr revid: ysa@tinyerp.com-20111117060520-x0z8xvb4q5s8s1yt --- addons/web/static/src/js/view_editor.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_editor.js b/addons/web/static/src/js/view_editor.js index d2e9cb84dc0..8747e597b79 100644 --- a/addons/web/static/src/js/view_editor.js +++ b/addons/web/static/src/js/view_editor.js @@ -583,7 +583,8 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ child_list.splice(index-1, 0, re_insert_obj[0]); } else if (move_direct == "update_node") { _.each(update_values, function(val){ - $(arch1).attr(val[0],val[1]); + if (val[1]) $(arch1)[0].setAttribute(val[0], val[1]); + else $(arch1)[0].removeAttribute(val[0]); }); var new_obj = self.create_View_Node(arch1); new_obj.id = obj.id,new_obj.child_id = obj.child_id; From 7a71c2c821fd0548edc4e819d91b1b07a4ead8db Mon Sep 17 00:00:00 2001 From: "Yogesh (OpenERP)" Date: Thu, 17 Nov 2011 11:41:36 +0530 Subject: [PATCH 223/711] [IMP] vieweditor :- improve some small issue. bzr revid: ysa@tinyerp.com-20111117061136-h4eh9ksi2kydqaz5 --- addons/web/static/src/js/view_editor.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/addons/web/static/src/js/view_editor.js b/addons/web/static/src/js/view_editor.js index 8747e597b79..ae1d8e9c2ed 100644 --- a/addons/web/static/src/js/view_editor.js +++ b/addons/web/static/src/js/view_editor.js @@ -569,7 +569,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ var list_obj_xml = _.zip(children_list, obj.child_id); if (id) { if (obj.id == id) { - var id; + var id = false;; var index = _.indexOf(child_list, obj); if (move_direct == "down") { var next = $(arch1).next(); @@ -594,10 +594,8 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ var parent = $(arch1).parents(); var convert_to_utf = QWeb.tools.xml_node_to_string(parent[parent.length-1]); convert_to_utf = convert_to_utf.replace('xmlns="http://www.w3.org/1999/xhtml"', ""); - convert_to_utf = '' + convert_to_utf; - arch.arch = convert_to_utf; - this.dataset.write(parseInt(view_id),{"arch":convert_to_utf}, function(r) { - }); + arch.arch = '' + convert_to_utf; + this.dataset.write(parseInt(view_id), {"arch":convert_to_utf}); } if (obj.level <= level) { _.each(list_obj_xml, function(child_node) { From 7e7cb6c131347f2d4a232c009ae966c1ae6b4a7f Mon Sep 17 00:00:00 2001 From: "Kuldeep Joshi (OpenERP)" Date: Thu, 17 Nov 2011 11:45:03 +0530 Subject: [PATCH 224/711] [FIX]project: add resource_calendar_id field in project.project lp bug: https://launchpad.net/bugs/884208 fixed bzr revid: kjo@tinyerp.com-20111117061503-4bos5thfpdfubkp0 --- addons/project/project_view.xml | 1 + addons/project_issue/project_issue.py | 1 - addons/project_issue/project_issue_view.xml | 14 -------------- .../project_long_term/project_long_term_view.xml | 16 ---------------- 4 files changed, 1 insertion(+), 31 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index d85481a6e5e..b21e7d270d0 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -34,6 +34,7 @@ + diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index 0833cab7441..595c9bd7b0c 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -480,7 +480,6 @@ project_issue() class project(osv.osv): _inherit = "project.project" _columns = { - 'resource_calendar_id' : fields.many2one('resource.calendar', 'Working Time', help="Timetable working hours to adjust the gantt diagram report", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}), 'project_escalation_id' : fields.many2one('project.project','Project Escalation', help='If any issue is escalated from the current Project, it will be listed under the project selected here.', states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}), 'reply_to' : fields.char('Reply-To Email Address', size=256) } diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index a54ae14737d..03e1ee44b7e 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -396,20 +396,6 @@ # ------------------------------------------------------ # Project # ------------------------------------------------------ - - - Project Resource Calendar View - project.project - form - - - - - - - - - project.project.form.inherited project.project diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml index cdeb0a0d63d..277efe0f31c 100644 --- a/addons/project_long_term/project_long_term_view.xml +++ b/addons/project_long_term/project_long_term_view.xml @@ -273,22 +273,6 @@ - # ------------------------------------------------------ - # Project - # ------------------------------------------------------ - - - Project Resource Calendar View - project.project - form - - - - - - - - # ------------------------------------------------------ # Project Task From d272f9d03b03049da42378fce434c4713f613eb6 Mon Sep 17 00:00:00 2001 From: "Vidhin Mehta (OpenERP)" Date: Thu, 17 Nov 2011 12:25:25 +0530 Subject: [PATCH 225/711] [IMP] implement functionlity of new field add. bzr revid: vme@tinyerp.com-20111117065525-60ooggze1xh38v63 --- addons/web/static/src/js/view_editor.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/addons/web/static/src/js/view_editor.js b/addons/web/static/src/js/view_editor.js index 77d61a2d228..8ebd617e0c2 100644 --- a/addons/web/static/src/js/view_editor.js +++ b/addons/web/static/src/js/view_editor.js @@ -847,6 +847,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ }); }, render_new_field :function(id){ + var self = this; var action = { context: {'default_model_id':id, 'manual':true}, res_model: "ir.model.fields", @@ -858,14 +859,21 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ } } var action_manager = new openerp.web.ActionManager(self); - action_manager.do_action(action); $.when(action_manager.do_action(action)).then(function() { - var add_controller = action_manager.dialog_viewmanager.views['form'].controller; - add_controller.do_set_readonly.add_last(function(){ - var aa = controller; + var controller = action_manager.dialog_viewmanager.views['form'].controller; + controller.do_set_readonly.add_last(function(){ + action_manager.stop(); + new_fields_name = new openerp.web.DataSetSearch(self,'ir.model.fields', null, null); + new_fields_name.read_ids([controller.datarecord.id], ['name'], function(result) { + self.add_node_dialog.$element. + find('select[id=field_value]'). append($(""). + attr("value",result[0].name).text(result[0].name)); + _.detect(self.add_widget,function(widget){ + (widget.name == "field_value")?widget.selection.push(result[0].name):false; + }); + }); }); }); - } }); openerp.web.ViewEditor.Field = openerp.web.Class.extend({ From 3da3b4873a486df35fb6a315757eda260a71b7b7 Mon Sep 17 00:00:00 2001 From: "Yogesh (OpenERP)" Date: Thu, 17 Nov 2011 12:38:40 +0530 Subject: [PATCH 226/711] [IMP] Vieweditor :- improve widget. bzr revid: ysa@tinyerp.com-20111117070840-obtnw5c98e7ywncz --- addons/web/static/src/js/view_editor.js | 103 +++++++++++------------- 1 file changed, 47 insertions(+), 56 deletions(-) diff --git a/addons/web/static/src/js/view_editor.js b/addons/web/static/src/js/view_editor.js index ae1d8e9c2ed..8051aa8f7cd 100644 --- a/addons/web/static/src/js/view_editor.js +++ b/addons/web/static/src/js/view_editor.js @@ -115,12 +115,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ this.create_view_dialog.$element.append('
'); this.create_view_widget = []; _.each(view_widget, function(widget) { - var type_widget = new (self.property.get_any([widget.type])) (self.create_view_dialog, widget.name); - if (widget.selection) { - type_widget.selection = widget.selection; - } - type_widget.required = widget.required; - type_widget.type = widget.type; + var type_widget = new (self.property.get_any([widget.type])) (self.create_view_dialog, widget); self.create_view_dialog.$element.find('table[id=create_view]').append('' + widget.string + ':' + type_widget.render()+''); var value = null; if (widget.value) { @@ -450,8 +445,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ case "side-remove": break; case "side-edit": - var row_id = $(this).closest("tr[id^='viewedit-']").attr('id').split("-")[1]; - var result = self.get_object_by_id(row_id, one_object['main_object'], []); + var result = self.get_object_by_id(clicked_tr_id, one_object['main_object'], []); if (result.length && result[0] && result[0].att_list) { var properties = _PROPERTIES[result[0].att_list[0]]; self.on_edit_node(properties, clicked_tr_id, one_object, view_id, view_xml_id, clicked_tr_level); @@ -661,43 +655,43 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ }); this.edit_node_dialog.start().open(); var _PROPERTIES_ATTRIBUTES = { - 'name' : {'string': 'Name', 'type': 'char'}, - 'string' : {'string': 'String', 'type': 'char'}, - 'required' : {'string': 'Required', 'type': 'boolean'}, - 'readonly' : {'string': 'Readonly', 'type': 'boolean'}, - 'domain' : {'string': 'Domain', 'type': 'char'}, - 'context' : {'string': 'Context', 'type': 'char'}, - 'limit' : {'string': 'Limit', 'type': 'float'}, - 'min_rows' : {'string': 'Minimum rows', 'type': 'float'}, - 'date_start' : {'string': 'Start date', 'type': 'char'}, - 'date_delay' : {'string': 'Delay date', 'type': 'char'}, - 'day_length' : {'string': 'Day length', 'type': 'char'}, - 'mode' : {'string': 'Mode', 'type': 'char'}, - 'align' : {'string': 'Alignment ', 'type': 'selection', 'selection': [['', ''], ['0.0', 'Left'], ['0.5', 'Center'], ['1.0', 'Right']]}, - 'icon' : {'string': 'Icon', 'type': 'selection', 'selection': _ICONS}, - 'type' : {'string': 'Type', 'type': 'selection', 'selection': [['', ''], ['action', 'Action'], ['object', 'Object'], ['workflow', 'Workflow'], ['server_action', 'Server Action']]}, - 'special' : {'string': 'Special', 'type': 'selection', 'selection': [['',''],['save', 'Save Button'], ['cancel', 'Cancel Button'], ['open', 'Open Button']]}, - 'target' : {'string': 'Target', 'type': 'selection', 'selection': [['', ''], ['new', 'New Window']]}, - 'confirm' : {'string': 'Confirm', 'type': 'char'}, - 'style' : {'string': 'Style', 'type': 'selection', 'selection':[["",""],["1", "1"],["1-1", "1-1"],["1-2", "1-2"],["2-1", "2-1"],["1-1-1", "1-1-1"]]}, - 'filename' : {'string': 'File Name', 'type': 'char'}, - 'width' : {'string': 'Width', 'type': 'float'}, - 'height' : {'string': 'Height', 'type': 'float'}, - 'attrs' : {'string': 'Attrs', 'type': 'char'}, - 'col' : {'string': 'col', 'type': 'float'}, - 'link' : {'string': 'Link', 'type': 'char'}, - 'position' : {'string': 'Position', 'type': 'selection', 'selection': [['',''],['after', 'After'],['before', 'Before'],['inside', 'Inside'],['replace', 'Replace']]}, - 'states' : {'string': 'states', 'type': 'char'}, - 'eval' : {'string': 'Eval', 'type': 'char'}, - 'ref' : {'string': 'Ref', 'type': 'char'}, - 'on_change' : {'string': 'On change', 'type': 'char'}, - 'nolabel' : {'string': 'No label', 'type': 'boolean'}, - 'completion' : {'string': 'Completion', 'type': 'boolean'}, - 'colspan' : {'string': 'Colspan', 'type': 'float'}, - 'widget' : {'string': 'widget', 'type': 'selection'}, - 'colors' : {'string': 'Colors', 'type': 'char'}, - 'editable' : {'string': 'Editable', 'type': 'selection', 'selection': [["",""],["top","Top"],["bottom", "Bottom"]]}, - 'groups' : {'string': 'Groups', 'type': 'seleciton_multi'}, + 'name' : {'name':'name', 'string': 'Name', 'type': 'char'}, + 'string' : {'name':'string', 'string': 'String', 'type': 'char'}, + 'required' : {'name':'required', 'string': 'Required', 'type': 'boolean'}, + 'readonly' : {'name':'readonly', 'string': 'Readonly', 'type': 'boolean'}, + 'domain' : {'name':'domain', 'string': 'Domain', 'type': 'char'}, + 'context' : {'name':'context', 'string': 'Context', 'type': 'char'}, + 'limit' : {'name':'limit', 'string': 'Limit', 'type': 'float'}, + 'min_rows' : {'name':'min_rows', 'string': 'Minimum rows', 'type': 'float'}, + 'date_start' : {'name':'date_start', 'string': 'Start date', 'type': 'char'}, + 'date_delay' : {'name':'date_delay', 'string': 'Delay date', 'type': 'char'}, + 'day_length' : {'name':'day_length', 'string': 'Day length', 'type': 'char'}, + 'mode' : {'name':'mode', 'string': 'Mode', 'type': 'char'}, + 'align' : {'name':'align', 'string': 'Alignment ', 'type': 'selection', 'selection': [['', ''], ['0.0', 'Left'], ['0.5', 'Center'], ['1.0', 'Right']]}, + 'icon' : {'name':'icon', 'string': 'Icon', 'type': 'selection', 'selection': _ICONS}, + 'type' : {'name':'type', 'string': 'Type', 'type': 'selection', 'selection': [['', ''], ['action', 'Action'], ['object', 'Object'], ['workflow', 'Workflow'], ['server_action', 'Server Action']]}, + 'special' : {'name':'special', 'string': 'Special', 'type': 'selection', 'selection': [['',''],['save', 'Save Button'], ['cancel', 'Cancel Button'], ['open', 'Open Button']]}, + 'target' : {'name':'target', 'string': 'Target', 'type': 'selection', 'selection': [['', ''], ['new', 'New Window']]}, + 'confirm' : {'name':'confirm', 'string': 'Confirm', 'type': 'char'}, + 'style' : {'name':'style', 'string': 'Style', 'type': 'selection', 'selection':[["",""],["1", "1"],["1-1", "1-1"],["1-2", "1-2"],["2-1", "2-1"],["1-1-1", "1-1-1"]]}, + 'filename' : {'name':'filename', 'string': 'File Name', 'type': 'char'}, + 'width' : {'name':'width', 'string': 'Width', 'type': 'float'}, + 'height' : {'name':'height', 'string': 'Height', 'type': 'float'}, + 'attrs' : {'name':'attrs', 'string': 'Attrs', 'type': 'char'}, + 'col' : {'name':'col', 'string': 'col', 'type': 'float'}, + 'link' : {'name':'link', 'string': 'Link', 'type': 'char'}, + 'position' : {'name':'position', 'string': 'Position', 'type': 'selection', 'selection': [['',''],['after', 'After'],['before', 'Before'],['inside', 'Inside'],['replace', 'Replace']]}, + 'states' : {'name':'states', 'string': 'states', 'type': 'char'}, + 'eval' : {'name':'eval', 'string': 'Eval', 'type': 'char'}, + 'ref' : {'name':'ref', 'string': 'Ref', 'type': 'char'}, + 'on_change' : {'name':'on_change', 'string': 'On change', 'type': 'char'}, + 'nolabel' : {'name':'nolabel', 'string': 'No label', 'type': 'boolean'}, + 'completion' : {'name':'completion', 'string': 'Completion', 'type': 'boolean'}, + 'colspan' : {'name':'colspan', 'string': 'Colspan', 'type': 'float'}, + 'widget' : {'name':'widget', 'string': 'widget', 'type': 'selection'}, + 'colors' : {'name':'colors', 'string': 'Colors', 'type': 'char'}, + 'editable' : {'name':'editable', 'string': 'Editable', 'type': 'selection', 'selection': [["",""],["top","Top"],["bottom", "Bottom"]]}, + 'groups' : {'name':'groups', 'string': 'Groups', 'type': 'seleciton_multi'}, }; var arch_val = self.get_object_by_id(clicked_tr_id,obj['main_object'], []); this.edit_node_dialog.$element.append('
'); @@ -709,15 +703,13 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ values.sort(); _PROPERTIES_ATTRIBUTES['widget']['selection'] = values; _.each(properties, function(property) { - var type_widget = new (self.property.get_any([_PROPERTIES_ATTRIBUTES[property].type])) (self.edit_node_dialog, property); + var type_widget = new (self.property.get_any([_PROPERTIES_ATTRIBUTES[property].type])) (self.edit_node_dialog, _PROPERTIES_ATTRIBUTES[property]); var value = _.detect(arch_val[0]['att_list'],function(res) { if (res instanceof Array) { return _.include(res, property); } return false; }); - type_widget.selection = _PROPERTIES_ATTRIBUTES[property].selection - type_widget.type = _PROPERTIES_ATTRIBUTES[property].type value = value instanceof Array ? value[1] : value; self.edit_node_dialog.$element.find('table[id=rec_table]').append('' + _PROPERTIES_ATTRIBUTES[property].string + ':' + type_widget.render() + ''); type_widget.start(); @@ -761,11 +753,14 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ } }); openerp.web.ViewEditor.Field = openerp.web.Class.extend({ - init: function(view, name) { + init: function(view, widget) { this.$element = view.$element; this.dirty = false; - this.name = name; - this.required = false; + this.name = widget.name; + this.selection = widget.selection || []; + this.required = widget.required || false; + this.string = widget.string || ""; + this.type = widget.type; this.is_invalid = false; }, start: function () { @@ -830,10 +825,6 @@ openerp.web.ViewEditor.FieldChar = openerp.web.ViewEditor.Field.extend({ }); openerp.web.ViewEditor.FieldSelect = openerp.web.ViewEditor.Field.extend({ template : "vieweditor_selection", - init: function(view, name) { - this._super(view, name); - this.selection = false; - }, start: function () { var self = this; this._super(); @@ -883,7 +874,7 @@ var _PROPERTIES = { 'image' : ['filename', 'width', 'height', 'groups'], 'separator' : ['string', 'colspan', 'groups'], 'label': ['string', 'align', 'colspan', 'groups'], - 'button': ['name', 'string', 'icon', 'type', 'states', 'readonly', 'special', 'target', 'confirm', 'context', 'attrs', 'groups','colspan'], + 'button': ['name', 'string', 'icon', 'type', 'states', 'readonly', 'special', 'target', 'confirm', 'context', 'attrs', 'colspan', 'groups'], 'newline' : [], 'board': ['style'], 'column' : [], From 5dff2820493ac820191d54c71284d63ac9c56018 Mon Sep 17 00:00:00 2001 From: "Kuldeep Joshi (OpenERP)" Date: Thu, 17 Nov 2011 12:56:51 +0530 Subject: [PATCH 227/711] [FIX]project_long_term: remove dependency of resource module bzr revid: kjo@tinyerp.com-20111117072651-74x5v5jh27g1g4ms --- addons/project_long_term/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project_long_term/__openerp__.py b/addons/project_long_term/__openerp__.py index 31522d63ea2..f4b8ce34ad0 100644 --- a/addons/project_long_term/__openerp__.py +++ b/addons/project_long_term/__openerp__.py @@ -26,7 +26,7 @@ "website": "http://www.openerp.com", "category": "Project Management", "images": ["images/project_phase_form.jpeg","images/project_phases.jpeg", "images/resources_allocation.jpeg"], - "depends": ["resource", "project"], + "depends": ["project"], "description": """ Long Term Project management module that tracks planning, scheduling, resources allocation. =========================================================================================== From fa3998b7440cc8a3a17f85c6fb0de9e5102db9ba Mon Sep 17 00:00:00 2001 From: "Yogesh (OpenERP)" Date: Thu, 17 Nov 2011 14:17:39 +0530 Subject: [PATCH 228/711] [IMP] Vieweditor :- improve edit field dialog box. bzr revid: ysa@tinyerp.com-20111117084739-lzj2jw8woj984054 --- addons/web/static/src/js/view_editor.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/addons/web/static/src/js/view_editor.js b/addons/web/static/src/js/view_editor.js index 8051aa8f7cd..e3f78968d86 100644 --- a/addons/web/static/src/js/view_editor.js +++ b/addons/web/static/src/js/view_editor.js @@ -702,16 +702,15 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ values.push(''); values.sort(); _PROPERTIES_ATTRIBUTES['widget']['selection'] = values; - _.each(properties, function(property) { - var type_widget = new (self.property.get_any([_PROPERTIES_ATTRIBUTES[property].type])) (self.edit_node_dialog, _PROPERTIES_ATTRIBUTES[property]); + var widgets = _.filter(_PROPERTIES_ATTRIBUTES, function(property){ return _.include(properties, property.name)}) + _.each(widgets, function(widget) { + var type_widget = new (self.property.get_any([widget.type])) (self.edit_node_dialog, widget); var value = _.detect(arch_val[0]['att_list'],function(res) { - if (res instanceof Array) { - return _.include(res, property); - } - return false; + if (res instanceof Array) return _.include(res, widget.name); + else return false; }); value = value instanceof Array ? value[1] : value; - self.edit_node_dialog.$element.find('table[id=rec_table]').append('' + _PROPERTIES_ATTRIBUTES[property].string + ':' + type_widget.render() + ''); + self.edit_node_dialog.$element.find('table[id=rec_table]').append('' + widget.string + ':' + type_widget.render() + ''); type_widget.start(); type_widget.set_value(value) self.edit_widget.push(type_widget); From b18c2321c3e4ce6d4160b786854d66a220b5cd7b Mon Sep 17 00:00:00 2001 From: "Kuldeep Joshi (OpenERP)" Date: Thu, 17 Nov 2011 15:27:27 +0530 Subject: [PATCH 229/711] [FIX]project_issue: add right model_crm_case_section to project user lp bug: https://launchpad.net/bugs/890968 fixed bzr revid: kjo@tinyerp.com-20111117095727-lz4ti74gifroauog --- addons/project_issue/security/ir.model.access.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/project_issue/security/ir.model.access.csv b/addons/project_issue/security/ir.model.access.csv index 01afcb73b09..b15c0e3537a 100644 --- a/addons/project_issue/security/ir.model.access.csv +++ b/addons/project_issue/security/ir.model.access.csv @@ -9,3 +9,4 @@ "access_resource_calendar_project_manager","resource.calendar.project.manager","resource.model_resource_calendar","project.group_project_manager",1,1,1,1 "access_project_issue_report_user","project.issue.report user","model_project_issue_report","project.group_project_user",1,0,0,0 "access_mail_message_issue_project_user","mail.message.user","mail.model_mail_message","project.group_project_user",1,1,1,0 +"access_crm_case_section","crm.case.section","crm.model_crm_case_section","project.group_project_user",1,0,0,0 \ No newline at end of file From fa079e79f5108dec64d30bd4dce52071874b0d48 Mon Sep 17 00:00:00 2001 From: "Yogesh (OpenERP)" Date: Thu, 17 Nov 2011 15:28:54 +0530 Subject: [PATCH 230/711] [FIX] bzr revid: ysa@tinyerp.com-20111117095854-w7ivkrucm32g5ug9 --- addons/web/static/src/js/view_editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_editor.js b/addons/web/static/src/js/view_editor.js index e3f78968d86..f4bb3b99f63 100644 --- a/addons/web/static/src/js/view_editor.js +++ b/addons/web/static/src/js/view_editor.js @@ -293,7 +293,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ expr_to_list.push(_.without($.trim(part.replace(/[^a-zA-Z 0-9 _]+/g,'!')).split("!"), "")); }); }else{ - var temp = _.str.reject(xpath_arch_object[0].child_id[0].att_list, function(list) { + var temp = _.reject(xpath_arch_object[0].child_id[0].att_list, function(list) { return _.include(list, "position") }); expr_to_list = [_.flatten(temp)]; From 7c2cb8d6593775330560641edd2de302da3913a6 Mon Sep 17 00:00:00 2001 From: "Kirti Savalia (OpenERP)" Date: Thu, 17 Nov 2011 15:37:52 +0530 Subject: [PATCH 231/711] [FIX]:in stock real time accounting wrong values for stock moves with purchase unit lp bug: https://launchpad.net/bugs/889093 fixed bzr revid: ksa@tinyerp.com-20111117100752-774f7kkcfr1wtajg --- addons/purchase/stock.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/addons/purchase/stock.py b/addons/purchase/stock.py index 42d9c40d7e5..c212a171b21 100644 --- a/addons/purchase/stock.py +++ b/addons/purchase/stock.py @@ -35,16 +35,12 @@ class stock_move(osv.osv): on the purchase order in case the valuation data was not directly specified during picking confirmation. """ - product_uom_obj = self.pool.get('product.uom') - reference_amount, reference_currency_id = super(stock_move, self)._get_reference_accounting_values_for_valuation(cr, uid, move, context=context) - default_uom = move.product_id.uom_id.id - qty = product_uom_obj._compute_qty(cr, uid, move.product_uom.id, move.product_qty, default_uom) if move.product_id.cost_method != 'average' or not move.price_unit: # no average price costing or cost not specified during picking validation, we will # plug the purchase line values if they are found. if move.purchase_line_id and move.picking_id.purchase_id.pricelist_id: - reference_amount, reference_currency_id = move.purchase_line_id.price_unit * qty, move.picking_id.purchase_id.pricelist_id.currency_id.id + reference_amount, reference_currency_id = move.purchase_line_id.price_unit * move.product_qty, move.picking_id.purchase_id.pricelist_id.currency_id.id return reference_amount, reference_currency_id stock_move() From aa08bb9368d96e260e5416130be2b491e4546c04 Mon Sep 17 00:00:00 2001 From: "Yogesh (OpenERP)" Date: Thu, 17 Nov 2011 15:43:16 +0530 Subject: [PATCH 232/711] [FIX] Vieweditor :- if type is tree then pass list view in action. bzr revid: ysa@tinyerp.com-20111117101316-9t8saf6t9wfgr9yz --- addons/web/static/src/js/view_editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_editor.js b/addons/web/static/src/js/view_editor.js index f4bb3b99f63..825b8f6f689 100644 --- a/addons/web/static/src/js/view_editor.js +++ b/addons/web/static/src/js/view_editor.js @@ -248,7 +248,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ this.dataset.read_ids([parseInt(self.main_view_id)], ['arch', 'type'], function(arch) { if (arch.length) { var arch_object = self.parse_xml(arch[0].arch, self.main_view_id); - self.main_view_type = arch[0].type + self.main_view_type = arch[0].type == 'tree'? 'list': arch[0].type; view_arch_list.push({"view_id": self.main_view_id, "arch": arch[0].arch}); self.dataset.read_slice([], {domain: [['inherit_id','=', parseInt(self.main_view_id)]]}, function(result) { _.each(result, function(res) { From 235ae1d6a2a89119a3f49e0ba5d08fd3e5950764 Mon Sep 17 00:00:00 2001 From: "Tejas (OpenERP)" Date: Thu, 17 Nov 2011 17:30:23 +0530 Subject: [PATCH 233/711] demo data: set a stage in a maximum of record in order to display a good view in kanban (all column diplayed) bzr revid: tta@openerp.com-20111117120023-4rrsjok67ksyox1v --- addons/project_issue/project_issue_demo.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/addons/project_issue/project_issue_demo.xml b/addons/project_issue/project_issue_demo.xml index 12ff265b1e9..f1c7dd5eb4d 100644 --- a/addons/project_issue/project_issue_demo.xml +++ b/addons/project_issue/project_issue_demo.xml @@ -16,6 +16,7 @@ +
@@ -31,6 +32,7 @@ + @@ -45,6 +47,7 @@ + @@ -60,6 +63,7 @@ + @@ -74,6 +78,7 @@ + @@ -89,6 +94,7 @@ + @@ -104,6 +110,7 @@ + @@ -119,6 +126,7 @@ + @@ -133,6 +141,7 @@ + @@ -148,6 +157,7 @@ + @@ -163,6 +173,7 @@ + @@ -179,6 +190,7 @@ + @@ -195,6 +207,7 @@ + @@ -210,6 +223,7 @@ + @@ -225,6 +239,7 @@ + @@ -240,6 +255,7 @@ + From 8a2f152dabee779c90a9af804f943f9cf42faef8 Mon Sep 17 00:00:00 2001 From: "Kuldeep Joshi (OpenERP)" Date: Thu, 17 Nov 2011 18:27:54 +0530 Subject: [PATCH 234/711] [FIX]project_issue: change in csv file bzr revid: kjo@tinyerp.com-20111117125754-ixvdmq4wmyi47xoa --- addons/project_issue/security/ir.model.access.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project_issue/security/ir.model.access.csv b/addons/project_issue/security/ir.model.access.csv index b15c0e3537a..f5c39be7713 100644 --- a/addons/project_issue/security/ir.model.access.csv +++ b/addons/project_issue/security/ir.model.access.csv @@ -9,4 +9,4 @@ "access_resource_calendar_project_manager","resource.calendar.project.manager","resource.model_resource_calendar","project.group_project_manager",1,1,1,1 "access_project_issue_report_user","project.issue.report user","model_project_issue_report","project.group_project_user",1,0,0,0 "access_mail_message_issue_project_user","mail.message.user","mail.model_mail_message","project.group_project_user",1,1,1,0 -"access_crm_case_section","crm.case.section","crm.model_crm_case_section","project.group_project_user",1,0,0,0 \ No newline at end of file +"access_crm_case_section","crm.case.section","crm.model_crm_case_section","project.group_project_user",1,0,0,0 From aca8c57f94b3eb19291f347e946eb8d9ade22575 Mon Sep 17 00:00:00 2001 From: "Kuldeep Joshi (OpenERP)" Date: Thu, 17 Nov 2011 19:09:29 +0530 Subject: [PATCH 235/711] [FIX]crm: change the context lp bug: https://launchpad.net/bugs/889056 fixed bzr revid: kjo@tinyerp.com-20111117133929-9yi8lmpaurj3rhsa --- addons/crm/crm_lead.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 91c8a453cd6..5b92a49a5a5 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -432,6 +432,8 @@ class crm_lead(crm_case, osv.osv): This opens Meeting's calendar view to schedule meeting on current Opportunity @return : Dictionary value for created Meeting view """ + if context is None: + context = {} value = {} for opp in self.browse(cr, uid, ids, context=context): data_obj = self.pool.get('ir.model.data') @@ -449,7 +451,7 @@ class crm_lead(crm_case, osv.osv): if id3: id3 = data_obj.browse(cr, uid, id3, context=context).res_id - context = { + context .update( { 'default_opportunity_id': opp.id, 'default_partner_id': opp.partner_id and opp.partner_id.id or False, 'default_user_id': uid, @@ -457,7 +459,7 @@ class crm_lead(crm_case, osv.osv): 'default_email_from': opp.email_from, 'default_state': 'open', 'default_name': opp.name - } + }) value = { 'name': _('Meetings'), 'context': context, From 379c9fab24836c91b42e216afa7371f2533785e3 Mon Sep 17 00:00:00 2001 From: "Vidhin Mehta (OpenERP)" Date: Fri, 18 Nov 2011 11:29:03 +0530 Subject: [PATCH 236/711] [IMP]code refactor. bzr revid: vme@tinyerp.com-20111118055903-llouzhuhdw5j64mh --- addons/web/static/src/js/view_editor.js | 74 ++++++++++++++++++------- 1 file changed, 55 insertions(+), 19 deletions(-) diff --git a/addons/web/static/src/js/view_editor.js b/addons/web/static/src/js/view_editor.js index 8ebd617e0c2..af73b3c31fa 100644 --- a/addons/web/static/src/js/view_editor.js +++ b/addons/web/static/src/js/view_editor.js @@ -10,6 +10,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ this.model = dataset.model; this.xml_element_id = 0; this.property = openerp.web.ViewEditor.property_widget; + this.one_object; }, start: function() { this.init_view_editor(); @@ -402,6 +403,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ this.edit_xml_dialog.$element.find("tr[id^='viewedit-']").click(function() { self.edit_xml_dialog.$element.find("tr[id^='viewedit-']").removeClass('ui-selected'); $(this).addClass('ui-selected'); + console.log(self); }); this.edit_xml_dialog.$element.find("img[id^='parentimg-']").click(function() { if ($(this).attr('src') == '/web/static/src/img/collapse.gif') { @@ -414,6 +416,11 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ } }); this.edit_xml_dialog.$element.find("img[id^='side-']").click(function() { + + }); + }, + what_to_do: function(){ + var self = this; var side = $(this).closest("tr[id^='viewedit-']"); var clicked_tr_id = parseInt((side.attr('id')).split('-')[1]); var img = side.find("img[id='parentimg-" + clicked_tr_id + "']").attr('src'); @@ -468,6 +475,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ break; case "side-remove": if (confirm(_t("Do you really want to remove this node?"))) { + self.do_save_update_arch (one_object, view_id, view_xml_id, clicked_tr_id, clicked_tr_level, "remove_node"); } @@ -478,6 +486,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ return _.includes(tr, res); }); var properties = _PROPERTIES[tag]; + console.log("properties",properties); self.on_edit_node(properties, clicked_tr_id, one_object, view_id, view_xml_id, clicked_tr_level); break; case "side-up": @@ -508,7 +517,8 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ _.each(tr_to_move, function(rec) { $(last_tr).before(rec); }); - self.do_save_update_arch(one_object, view_id, view_xml_id, clicked_tr_id, clicked_tr_level, "up"); + self.do_save_update_arch + (one_object, view_id, view_xml_id, clicked_tr_id, clicked_tr_level, "up"); } break; case "side-down": @@ -551,8 +561,9 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ } break; } - }); - }, + } + + do_save_update_arch: function(one_object, view_id, view_xml_id, clicked_tr_id, clicked_tr_level, move_direct, update_values) { var self = this; var arch = _.detect(one_object['arch'], function(element) {return element.view_id == view_id;}); @@ -625,7 +636,16 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ child_list.splice(index, 1, new_obj); var parent = $(arch1).parents(); }else if(move_direct == "add_node"){ - switch (update_values[1]) { + //not working + var clone = self.edit_xml_dialog.$element.find("tr[id='viewedit-"+id+"']").clone(); + self.edit_xml_dialog.$element.find("tr[id='viewedit-"+id+"']").after(clone); + clone.find("img[id^='side-']").click(function(){ + console.log("this",this); + }); + clone.bind("click", function(){ + console.log("thissss",this); + }); + switch (update_values[1]) { case "After": $(arch1).after(update_values[0]); break; @@ -639,6 +659,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ var parent = $(arch1).parents(); }else if(move_direct == "remove_node"){ var parent = $(arch1).parents(); + console.log("vidhin",obj); if(parent.length == 0 || (parent[0].tagName.toLowerCase() == "data")){ id = id -1; level = level - 1; @@ -665,10 +686,11 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ }); } if(move_direct == "add_node"){ - self.add_node_dialog.close(); - self.edit_xml_dialog.close(); - self.xml_element_id = 0; - self.get_arch();} + //self.add_node_dialog.close(); + //self.edit_xml_dialog.close(); + //self.xml_element_id = 0; + //self.get_arch(id); + } } if (obj.level <= level) { _.each(list_obj_xml, function(child_node) { @@ -793,14 +815,14 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ var render_list = []; var render_list =[{'name': 'node_type','selection': _.keys(_CHILDREN).sort(), 'value': 'field', 'string': 'Node Type'}, - {'name': 'position','selection': positions, 'value': false, 'string': 'Position'}, - {'name': 'field_value','selection': fields, 'value': false, 'string': ''}]; + {'name': 'field_value','selection': fields, 'value': false, 'string': ''}, + {'name': 'position','selection': positions, 'value': false, 'string': 'Position'}]; this.add_widget = []; this.add_node_dialog = new openerp.web.Dialog(this,{ modal: true, title: 'Properties', - width: 500, - height: 300, + width: 430, + height: 190, buttons: { "Update": function(){ var check_add_node = true; @@ -828,17 +850,27 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ } }).start().open(); this.add_node_dialog.$element. - append('
'); - var table_selector = self.add_node_dialog.$element.find('table[id=rec_table]'); + append('
'); + var table_selector = self.add_node_dialog.$element.find('table[id=rec_table] tbody'); _.each(render_list,function(node){ type_widget = new openerp.web.ViewEditor.FieldSelect (self.add_node_dialog, node.name); type_widget.selection = node.selection; - table_selector.append('' + node.string + ':' + type_widget.render() + ''); + if(node.name == "position"){ + table_selector.append + ('' + node.string + ':' + type_widget.render() + ''); + }else{ + table_selector.append + ('' + node.string + '' + type_widget.render()); + if(node.name == "field_value"){ + table_selector.append + (' '); + } + } type_widget.start(); type_widget.set_value(node.value); self.add_widget.push(type_widget); }); - table_selector.append(' '); + table_selector.find("td").attr("width","100px"); self.add_node_dialog.$element.find('#new_field').click(function() { model_data = new openerp.web.DataSetSearch(self,'ir.model', null, null); model_data.read_slice([], {domain: [['model','=', self.model]]}, function(result) { @@ -953,9 +985,13 @@ openerp.web.ViewEditor.FieldSelect = openerp.web.ViewEditor.Field.extend({ this.$element.find("select[id=" + this.name + "]").css('width', '100%').change(function() { self.on_ui_change(); if(self.name == "node_type"){ - (self.get_value() == "field")? - self.$element.find("select[id=field_value]").show(): - self.$element.find("select[id=field_value]").hide(); + if(self.get_value() == "field"){ + self.$element.find('#new_field').show(); + self.$element.find("select[id=field_value]").show(); + }else{ + self.$element.find('#new_field').hide(); + self.$element.find("select[id=field_value]").hide(); + } } }); From ab599f36463c2d8cc58cc5bd3878979eb7466bb9 Mon Sep 17 00:00:00 2001 From: "Jiten (OpenERP)" Date: Fri, 18 Nov 2011 12:11:38 +0530 Subject: [PATCH 237/711] [IMP] Some Changes to show Maximum 80 records in listview. bzr revid: jra@tinyerp.com-20111118064138-d9idrs8brq943r2r --- addons/web_mobile/static/src/js/form_mobile.js | 4 ++-- addons/web_mobile/static/src/js/list_mobile.js | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/addons/web_mobile/static/src/js/form_mobile.js b/addons/web_mobile/static/src/js/form_mobile.js index 32d1c39f133..6f50bb6760d 100644 --- a/addons/web_mobile/static/src/js/form_mobile.js +++ b/addons/web_mobile/static/src/js/form_mobile.js @@ -117,10 +117,10 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({ var head = $.trim($(this).text()); var dataset = new openerp.web.DataSetSearch(self, result.fields[relational].relation, result.fields[relational].context); dataset.domain=[['id', 'in', self.datarecord[relational]]]; - dataset.read_slice([], {}, function(result1,ids){ + dataset.read_slice([], {limit:80}, function(result1,ids){ _.extend(self.action.context,{"html_name_get" : true}); var dataset1 = new openerp.web.DataSet(self, result.fields[relational].relation,result.fields[relational].context); - dataset1.name_get(dataset.ids,function(res){ + dataset1.name_get(result1,function(res){ var additional = ""; if(res['html_name_get']){ additional = res['display']; diff --git a/addons/web_mobile/static/src/js/list_mobile.js b/addons/web_mobile/static/src/js/list_mobile.js index c7b77737e6d..5813b9c216e 100644 --- a/addons/web_mobile/static/src/js/list_mobile.js +++ b/addons/web_mobile/static/src/js/list_mobile.js @@ -32,11 +32,10 @@ openerp.web_mobile.ListView = openerp.web.Widget.extend({ var self = this; var dataset = new openerp.web.DataSetSearch(this, this.action.res_model,this.action.context); dataset.domain = self.action.domain; - dataset.read_slice([], {}, function(result,ids){ + dataset.read_slice([], {limit:80}, function(result,ids){ _.extend(self.action.context,{"html_name_get" : true}); - var dataset1 = new openerp.web.DataSet(self, self.action.res_model,self.action.context); - dataset1.name_get(dataset.ids,function(res){ + dataset1.name_get(result,function(res){ var additional = ""; if(res['html_name_get']){ additional = res['display']; From 8acda908e9e80c0b09fd308f3871ea22b79960d2 Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Fri, 18 Nov 2011 12:18:30 +0530 Subject: [PATCH 238/711] [IMP] added yml files for Project_scrum module bzr revid: tpa@tinyerp.com-20111118064830-mg28ugws5ylrdupm --- addons/project_scrum/__openerp__.py | 7 ++- addons/project_scrum/project_scrum.py | 6 +- addons/project_scrum/project_scrum_demo.xml | 4 +- addons/project_scrum/project_scrum_view.xml | 4 +- addons/project_scrum/test/cancel_backlog.yml | 52 +++++++++++++++++ .../test/draft2open2close_backlog.yml | 41 +++++++++++++ .../test/draft2open2close_sprint.yml | 57 +++++++++++++++++++ .../project_scrum/test/project_scrum_test.yml | 8 +++ 8 files changed, 173 insertions(+), 6 deletions(-) create mode 100644 addons/project_scrum/test/cancel_backlog.yml create mode 100644 addons/project_scrum/test/draft2open2close_backlog.yml create mode 100644 addons/project_scrum/test/draft2open2close_sprint.yml create mode 100644 addons/project_scrum/test/project_scrum_test.yml diff --git a/addons/project_scrum/__openerp__.py b/addons/project_scrum/__openerp__.py index fb08b8432be..eb84a6bc52b 100644 --- a/addons/project_scrum/__openerp__.py +++ b/addons/project_scrum/__openerp__.py @@ -65,7 +65,12 @@ More information on the methodology: "board_project_scrum_view.xml", ], 'demo_xml': ['project_scrum_demo.xml'], - 'test': ['test/project_scrum_report.yml'], + 'test': ['test/project_scrum_report.yml', + 'test/draft2open2close_sprint.yml', + 'test/draft2open2close_backlog.yml', + 'test/cancel_backlog.yml', + 'test/project_scrum_test.yml' + ], 'installable': True, 'active': False, 'certificate' : '00736750152003010781', diff --git a/addons/project_scrum/project_scrum.py b/addons/project_scrum/project_scrum.py index f0db98294e7..b378b1a02b2 100644 --- a/addons/project_scrum/project_scrum.py +++ b/addons/project_scrum/project_scrum.py @@ -262,7 +262,7 @@ class project_scrum_task(osv.osv): 'project.scrum.product.backlog': (_get_task, ['sprint_id'], 10) }), } - + #dead code def onchange_backlog_id(self, cr, uid, backlog_id=False): if not backlog_id: return {} @@ -292,7 +292,7 @@ class project_scrum_meeting(osv.osv): _defaults = { 'date' : lambda *a: time.strftime('%Y-%m-%d'), } - + # dead code def button_send_to_master(self, cr, uid, ids, context=None): meeting_id = self.browse(cr, uid, ids, context=context)[0] if meeting_id and meeting_id.sprint_id.scrum_master_id.user_email: @@ -303,6 +303,7 @@ class project_scrum_meeting(osv.osv): raise osv.except_osv(_('Error !'), _('Please provide email address for scrum master defined on sprint.')) return True + #dead code def button_send_product_owner(self, cr, uid, ids, context=None): if context is None: context = {} @@ -316,6 +317,7 @@ class project_scrum_meeting(osv.osv): raise osv.except_osv(_('Error !'), _('Please provide email address for product owner defined on sprint.')) return True + #dead code def email_send(self, cr, uid, ids, email, context=None): mail_message_obj = self.pool.get('mail.message') meeting_id = self.browse(cr, uid, ids, context=context)[0] diff --git a/addons/project_scrum/project_scrum_demo.xml b/addons/project_scrum/project_scrum_demo.xml index 76f2846c76f..687fb9c734f 100644 --- a/addons/project_scrum/project_scrum_demo.xml +++ b/addons/project_scrum/project_scrum_demo.xml @@ -10,7 +10,6 @@ - open
@@ -387,6 +386,9 @@ open + + + Admin: Worked on the Automatic migration system diff --git a/addons/project_scrum/project_scrum_view.xml b/addons/project_scrum/project_scrum_view.xml index ddf74eb2e93..2ce12c70e1d 100644 --- a/addons/project_scrum/project_scrum_view.xml +++ b/addons/project_scrum/project_scrum_view.xml @@ -263,6 +263,8 @@ + '); - } - } + table_selector.append('' + node.string + ':' + type_widget.render() + ''); type_widget.start(); type_widget.set_value(node.value); self.add_widget.push(type_widget); }); - table_selector.find("td").attr("width","100px"); + table_selector.append(' '); self.add_node_dialog.$element.find('#new_field').click(function() { model_data = new openerp.web.DataSetSearch(self,'ir.model', null, null); model_data.read_slice([], {domain: [['model','=', self.model]]}, function(result) { @@ -985,13 +1012,9 @@ openerp.web.ViewEditor.FieldSelect = openerp.web.ViewEditor.Field.extend({ this.$element.find("select[id=" + this.name + "]").css('width', '100%').change(function() { self.on_ui_change(); if(self.name == "node_type"){ - if(self.get_value() == "field"){ - self.$element.find('#new_field').show(); - self.$element.find("select[id=field_value]").show(); - }else{ - self.$element.find('#new_field').hide(); - self.$element.find("select[id=field_value]").hide(); - } + (self.get_value() == "field")? + self.$element.find("select[id=field_value]").show(): + self.$element.find("select[id=field_value]").hide(); } }); From 9aa0edb19d548afef93156477a6d532a501eed90 Mon Sep 17 00:00:00 2001 From: "Tejas (OpenERP)" Date: Mon, 21 Nov 2011 11:05:52 +0530 Subject: [PATCH 249/711] board_purchase_view.xml file is added bzr revid: tta@openerp.com-20111121053552-pc3ekmvb1nhfvfv5 --- .../board_purchase_view.xml | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 addons/purchase_double_validation/board_purchase_view.xml diff --git a/addons/purchase_double_validation/board_purchase_view.xml b/addons/purchase_double_validation/board_purchase_view.xml new file mode 100644 index 00000000000..d093dcc6937 --- /dev/null +++ b/addons/purchase_double_validation/board_purchase_view.xml @@ -0,0 +1,27 @@ + + + + + + Purchase Order Waiting Approval + ir.actions.act_window + purchase.order + form + tree,form + [('date_order','>',time.strftime('%Y-01-01 00:00:00')),('date_order','<',time.strftime('%Y-12-31 23:59:59')), ('state','in',('wait','confirmed'))] + + + + board.purchase.form + board.board + form + + + + + + + + + + From c95adf2c8a8530ad433d0de27781b22af093cfa3 Mon Sep 17 00:00:00 2001 From: "Vaibhav (OpenERP)" Date: Mon, 21 Nov 2011 14:45:12 +0530 Subject: [PATCH 250/711] [FIX] Reload and update record on Resize. bzr revid: vda@tinyerp.com-20111121091512-8o5wxtid0cky2on8 --- addons/web_gantt/static/src/js/gantt.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/addons/web_gantt/static/src/js/gantt.js b/addons/web_gantt/static/src/js/gantt.js index ec212c7007d..77170d103ff 100644 --- a/addons/web_gantt/static/src/js/gantt.js +++ b/addons/web_gantt/static/src/js/gantt.js @@ -87,13 +87,17 @@ init: function(parent, dataset, view_id) { projects = this.database_projects; if (!this.group_by.length) return def.resolve().promise(); - this.data_groups = _.groupBy(projects, function(project, index) { - return _.map(self.group_by, function(group, index) { + this.data_groups = _.groupBy(projects, function(project) { + return _.map(self.group_by, function(group) { if(!project[group]) project[group] = 'Undefined'; else if(project[group] instanceof Array) project[group] = project[group][1]; return project[group]; }); }); + + this.group_keys = _.map(this.group_by, function(group, index) { + return _.map(projects, function(project){return project[group]}); + }); return def.resolve().promise(); }, generate_projects : function() { @@ -102,6 +106,7 @@ init: function(parent, dataset, view_id) { this.GanttTasks = []; if(this.group_by.length) { + } else { this.GanttTasks.push(new GanttTaskInfo(0, self.name, self.project_start_date, self.total_duration, 100, "")); } @@ -198,10 +203,9 @@ init: function(parent, dataset, view_id) { var self = this; if (this.group_by.length) { - } else { - _.each(this.GanttTasks, function(tsk, index){ + _.each(this.GanttTasks, function(tsk, index) { self.GanttProjects.addTask(tsk); }); } @@ -238,7 +242,6 @@ init: function(parent, dataset, view_id) { ganttChartControl.attachEvent("onTaskEndResize", function(task) {return self.ResizeTask(task);}); ganttChartControl.attachEvent("onTaskEndDrag", function(task) {return self.ResizeTask(task);}); - ganttChartControl.attachEvent("onTaskClick", function(task) { return self.editTask(task);}); }, format_date : function(date) { @@ -257,7 +260,6 @@ init: function(parent, dataset, view_id) { }, ResizeTask: function(task) { - var self = this, event_id = task.getId(); @@ -277,6 +279,8 @@ init: function(parent, dataset, view_id) { this.dataset .write(event_id, data, {}) .done(function() { + var get_project = _.find(self.database_projects, function(project){ return project.id == event_id}); + _.extend(get_project,data); self.reloadView(); }); }, @@ -350,7 +354,7 @@ init: function(parent, dataset, view_id) { }).done(function(projects){ self.on_project_loaded(projects); }); - }) + }); } }); From fee0a8a8f5993d65266f9f55275169b58632ee0c Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Mon, 21 Nov 2011 15:16:35 +0530 Subject: [PATCH 251/711] [REF] crm: Organized view of crm.phonecall and add remain fields on sedule onether call(contact_name, phone, note) bzr revid: ron@tinyerp.com-20111121094635-7z9rrig0xfcup7uj --- addons/crm/wizard/crm_opportunity_to_phonecall_view.xml | 3 ++- addons/crm/wizard/crm_phonecall_to_phonecall.py | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/crm/wizard/crm_opportunity_to_phonecall_view.xml b/addons/crm/wizard/crm_opportunity_to_phonecall_view.xml index 338f35810fd..5527e82c2e9 100644 --- a/addons/crm/wizard/crm_opportunity_to_phonecall_view.xml +++ b/addons/crm/wizard/crm_opportunity_to_phonecall_view.xml @@ -26,8 +26,9 @@ + - + diff --git a/addons/crm/wizard/crm_phonecall_to_phonecall.py b/addons/crm/wizard/crm_phonecall_to_phonecall.py index 5b505b3d852..d68591ab0b7 100644 --- a/addons/crm/wizard/crm_phonecall_to_phonecall.py +++ b/addons/crm/wizard/crm_phonecall_to_phonecall.py @@ -31,6 +31,8 @@ class crm_phonecall2phonecall(osv.osv_memory): _columns = { 'name' : fields.char('Call summary', size=64, required=True, select=1), 'user_id' : fields.many2one('res.users',"Assign To"), + 'contact_name':fields.char('Contact', size=64), + 'phone':fields.char('Phone', size=64), 'categ_id': fields.many2one('crm.case.categ', 'Category', \ domain="['|',('section_id','=',False),('section_id','=',section_id),\ ('object_id.model', '=', 'crm.phonecall')]"), @@ -38,6 +40,7 @@ class crm_phonecall2phonecall(osv.osv_memory): 'section_id':fields.many2one('crm.case.section','Sales Team'), 'action': fields.selection([('schedule','Schedule a call'), ('log','Log a call')], 'Action', required=True), 'partner_id' : fields.many2one('res.partner', "Partner"), + 'note':fields.text('Note') } From 96212584c4a1e07aee66b5dfb0e64fa5fbafcaca Mon Sep 17 00:00:00 2001 From: "Vidhin Mehta (OpenERP)" Date: Mon, 21 Nov 2011 15:43:26 +0530 Subject: [PATCH 252/711] [IMP]make sequence for add node and edit node dialog box. bzr revid: vme@tinyerp.com-20111121101326-xyhlum8idixqgkhr --- addons/web/static/src/js/view_editor.js | 139 +++++++++++++----------- addons/web/static/src/xml/base.xml | 2 +- 2 files changed, 77 insertions(+), 64 deletions(-) diff --git a/addons/web/static/src/js/view_editor.js b/addons/web/static/src/js/view_editor.js index 547b6e582f5..f578d9da006 100644 --- a/addons/web/static/src/js/view_editor.js +++ b/addons/web/static/src/js/view_editor.js @@ -432,6 +432,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ on_select_img: function(element_img){ var self = this; + console.log("kooooo",element_img); var side = $(element_img).closest("tr[id^='viewedit-']"); this.one_object.clicked_tr_id = parseInt((side.attr('id')).split('-')[1]); this.one_object.clicked_tr_level = parseInt(side.attr('level')); @@ -453,7 +454,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ (self.edit_xml_dialog.$element.find(view_find).find('a').text()).search("view_id") != -1 && parseInt(view_find.attr('level')) < min_level ) { view_id = parseInt(($(view_find).find('a').text()).replace(/[^0-9]+/g, '')); - view_xml_id = (view_find.attr('id')).split('-')[1]; + view_xml_id = parseInt((view_find.attr('id')).split('-')[1]); break; } if(view_find.attr('level') < min_level){ @@ -468,8 +469,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ break; case "side-remove": if (confirm(_t("Do you really want to remove this node?"))) { - self.do_save_update_arch - (one_object, view_id, view_xml_id, clicked_tr_id, clicked_tr_level, "remove_node"); + self.do_save_update_arch("remove_node"); } break; case "side-edit": @@ -498,9 +498,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ return _.includes(element, res); })); }); - console.log(property_to_check,fields); - //self.on_add_node(property_to_check, fields , - // clicked_tr_id, one_object, view_id, view_xml_id, clicked_tr_level); + self.on_add_node(property_to_check, fields); }); }, do_node_edit: function(side){ @@ -510,8 +508,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ return _.includes(tr, res); }); var properties = _PROPERTIES[tag]; - console.log(properties); - //self.on_edit_node(properties, clicked_tr_id, one_object, view_id, view_xml_id, clicked_tr_level); + self.on_edit_node(properties); }, do_node_down: function(cur_tr, img){ var self = this; @@ -553,7 +550,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ _.each(tr_to_move, function(rec) { $(last_tr).after(rec); }); - // self.do_save_update_arch(one_object, view_id, view_xml_id, clicked_tr_id, clicked_tr_level, "down"); + self.do_save_update_arch("down"); } }, do_node_up: function(cur_tr, img){ @@ -588,13 +585,14 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ _.each(tr_to_move, function(rec) { $(last_tr).before(rec); }); - //self.do_save_update_arch(one_object, view_id, view_xml_id, clicked_tr_id, clicked_tr_level, "up"); + self.do_save_update_arch("up"); } }, - do_save_update_arch: function(one_object, view_id, view_xml_id, clicked_tr_id, clicked_tr_level, move_direct, update_values) { + do_save_update_arch: function(move_direct, update_values) { var self = this; - var arch = _.detect(one_object['arch'], function(element) {return element.view_id == view_id;}); - var obj = self.get_object_by_id(view_xml_id, one_object['main_object'], []); + var arch = _.detect(self.one_object['arch'], function(element) + {return element.view_id == self.one_object.clicked_tr_view[0]}); + var obj = self.get_object_by_id(this.one_object.clicked_tr_view[1],this.one_object['main_object'], []); //for finding xpath tag from inherit view var xml_arch = QWeb.load_xml(arch.arch); if (xml_arch.childNodes[0].tagName == "data") { @@ -612,44 +610,63 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ return child.nodeType == 1; }); - return self.do_save_xml(arch_to_pass[0], obj[0].child_id[0], - parseInt(clicked_tr_id), [], parseInt(clicked_tr_level), - parseInt(view_id), arch, move_direct, update_values); + return self.do_save_xml(arch_to_pass[0], obj[0].child_id[0],[], move_direct, update_values,arch); }, - get_object_by_id: function(view_xml_id, one_object, result) { + get_object_by_id: function(id ,one_object, result) { var self = this; if (result.length == 0 ) { var check = _.detect(one_object , function(obj) { - return view_xml_id == obj.id; + return self.one_object.clicked_tr_view[1] == obj.id; }); if (check) {result.push(check);}; _.each(one_object, function(obj) { - self.get_object_by_id(view_xml_id, obj.child_id, result); + self.get_object_by_id(id,obj.child_id, result); }); } return result; }, - do_save_xml: function(arch1, obj, id, child_list, level, view_id, arch, move_direct, update_values){ + create_clone: function(clone, new_node_obj){ + var self = this; + clone.find('a').text(new_node_obj.name); + clone.attr("id","viewedit-" + new_node_obj.id); + clone.attr("level",new_node_obj.level); + clone.find("img[id^='parentimg-']").remove(); + clone.bind("click",function(){ + self.do_select_row(this.id.split('-')[1]); + }); + clone.find("img[id^='side-']").click(function() { + self.on_select_img(this); + }); + clone.find("img[id^='parentimg-']").click(function() { + self.do_parent_img_hide_show(this); + }); + return clone; + }, + do_save_xml: function(arch1, obj, child_list, move_direct, update_values, arch){ var self = this; var children_list = $(arch1).children(); var list_obj_xml = _.zip(children_list, obj.child_id); - if (id) { - if (obj.id == id) { - var id; + if (this.one_object.clicked_tr_id) { + if (obj.id == this.one_object.clicked_tr_id) { + var parent; var index = _.indexOf(child_list, obj); if (move_direct == "down") { var next = $(arch1).next(); $(next).after(arch1); var re_insert_obj = child_list.splice(index, 1); child_list.splice(index+1, 0, re_insert_obj[0]); - var parent = $(arch1).parents(); + parent = $(arch1).parents(); + } else if (move_direct == "up") { + var prev = $(arch1).prev(); $(prev).before(arch1); var re_insert_obj = child_list.splice(index, 1); child_list.splice(index-1, 0, re_insert_obj[0]); - var parent = $(arch1).parents(); + parent = $(arch1).parents(); + } else if (move_direct == "update_node") { + _.each(update_values, function(val){ if(val[0] == "required"){ $(arch1).attr("required", "true"); @@ -659,45 +676,40 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ }); var new_obj = self.create_View_Node(arch1); new_obj.id = obj.id,new_obj.child_id = obj.child_id; - self.edit_xml_dialog.$element.find("tr[id='viewedit-"+id+"']").find('a').text(new_obj.name); + self.edit_xml_dialog.$element.find("tr[id='viewedit-"+self.one_object.clicked_tr_id+"']") + .find('a').text(new_obj.name); child_list.splice(index, 1, new_obj); - var parent = $(arch1).parents(); + parent = $(arch1).parents(); + }else if(move_direct == "add_node"){ var temp_xml = QWeb.load_xml(update_values[0]); var object_xml = self.create_View_Node(temp_xml.childNodes[0]); - var clone = self.edit_xml_dialog.$element.find("tr[id='viewedit-"+id+"']").clone(); - clone.find('a').text(object_xml.name); - clone.attr("id","viewedit-" + object_xml.id ); - clone.bind("click",function(){ - self.do_select_row(object_xml.id); - }); - clone.find("img[id^='side-']").click(function() { - self.on_select_img(this); - }); - clone.find("img[id^='parentimg-']").click(function() { - self.do_parent_img_hide_show(this); - }); + (update_values[1] == "Inside")? object_xml.level = obj.level + 1:object_xml.level = obj.level; + var clone = self.create_clone(self.edit_xml_dialog.$element. + find("tr[id='viewedit-"+self.one_object.clicked_tr_id+"']").clone(),object_xml); switch (update_values[1]) { case "After": - object_xml.level = obj.level; $(arch1).after(update_values[0]); child_list.splice(index + 1, 0, object_xml); break; case "Before": - object_xml.level = obj.level; $(arch1).before(update_values[0]); child_list.splice(index - 1, 0, object_xml); break; case "Inside": - object_xml.level = obj.level + 1; $(arch1).append(update_values[0]); obj.child_id.push(object_xml); break; } - self.edit_xml_dialog.$element.find("tr[id='viewedit-"+id+"']").after(clone); - var parent = $(arch1).parents(); + self.edit_xml_dialog.$element. + find("tr[id='viewedit-"+self.one_object.clicked_tr_id+"']").after(clone); + self.edit_xml_dialog.$element. + find("tr[id='viewedit-" + object_xml.id + "']").removeClass('ui-selected'); + parent = $(arch1).parents(); + }else if(move_direct == "remove_node"){ - var parent = $(arch1).parents(); + + parent = $(arch1).parents(); if(parent.length == 0 || (parent[0].tagName.toLowerCase() == "data")){ id = id -1; level = level - 1; @@ -705,33 +717,35 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ } $(arch1).remove(); child_list.splice(index,1); - var cur_tr = self.edit_xml_dialog.$element.find("tr[id='viewedit-"+id +"']"); - _.each(self.get_list_tr(cur_tr,level), function(tr_element){ + var cur_tr = self.edit_xml_dialog.$element. + find("tr[id='viewedit-" + self.one_object.clicked_tr_id + "']"); + _.each(self.get_list_tr(cur_tr,self.one_object.clicked_tr_level), function(tr_element){ tr_element.remove(); }); cur_tr.remove(); } + var convert_to_utf = (parent.length != 0)?parent[parent.length-1]:arch1; - /*if(convert_to_utf != "remove_view"){ + if(convert_to_utf != "remove_view"){ convert_to_utf = QWeb.tools.xml_node_to_string(convert_to_utf); convert_to_utf = convert_to_utf.replace('xmlns="http://www.w3.org/1999/xhtml"', ""); convert_to_utf = '' + convert_to_utf; arch.arch = convert_to_utf; - this.dataset.write(parseInt(view_id),{"arch":convert_to_utf}, function(r) { - }); + /*this.dataset.write(this.one_object.clicked_tr_view[0] ,{"arch":convert_to_utf}, function(r) { + });*/ }else{ - this.dataset.unlink([parseInt(view_id)],function(res) { - }); + //this.dataset.unlink([this.one_object.clicked_tr_view[0]],function(res) { + //}); } if(move_direct == "add_node"){ self.add_node_dialog.close(); - self.edit_xml_dialog.close(); - self.xml_element_id = 0; - self.get_arch();}*/ + self.on_select_img(clone.find("img[id='side-edit']")[0]); + } } - if (obj.level <= level) { + if (obj.level <= this.one_object.clicked_tr_level) { _.each(list_obj_xml, function(child_node) { - self.do_save_xml(child_node[0], child_node[1], id, obj.child_id, level, view_id, arch, move_direct, update_values); + self.do_save_xml(child_node[0], child_node[1], obj.child_id, + move_direct, update_values, arch); }); } } @@ -765,7 +779,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ tr.show(); }); }, - on_edit_node:function(properties, clicked_tr_id, obj, view_id, view_xml_id, clicked_tr_level){ + on_edit_node:function(properties){ var self = this; this.edit_node_dialog = new openerp.web.Dialog(this,{ modal: true, @@ -780,7 +794,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ update_values.push([widget.name, widget.get_value()]); } }); - self.do_save_update_arch(obj, view_id, view_xml_id, clicked_tr_id, clicked_tr_level, "update_node", update_values); + self.do_save_update_arch("update_node", update_values); self.edit_node_dialog.close(); }, "Cancel": function(){ @@ -790,7 +804,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ }); this.edit_node_dialog.start().open(); var widget = _.keys(self.property.map); - var arch_val = self.get_object_by_id(clicked_tr_id,obj['main_object'], []); + var arch_val = self.get_object_by_id(this.one_object.clicked_tr_id,this.one_object['main_object'], []); this.edit_node_dialog.$element.append('
'); this.edit_widget = []; _.each(properties, function(property) { @@ -846,7 +860,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ }) return def.promise(); }, - on_add_node: function(properties,fields,clicked_tr_id, one_object, view_id, view_xml_id, clicked_tr_level){ + on_add_node: function(properties, fields){ var self = this; var positions = ['After','Before','Inside']; var render_list = []; @@ -877,8 +891,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ var tag = (values.node_type == "field")? _.sprintf("<%s name='%s'> ",values.node_type,values.field_value,values.node_type): _.sprintf("<%s> ",values.node_type,values.node_type); - self.do_save_update_arch(one_object, view_id, view_xml_id, - clicked_tr_id, clicked_tr_level, "add_node", [tag, values.position]); + self.do_save_update_arch("add_node", [tag, values.position]); }else{alert("Can't Update View");} }, "Cancel": function(){ diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 9b1c5175571..25cfaee1232 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -1692,4 +1692,4 @@
- \ No newline at end of file + From c8793e98f6b4d771481e431302f6b165ea2d07d6 Mon Sep 17 00:00:00 2001 From: "Amit (OpenERP)" Date: Mon, 21 Nov 2011 15:50:39 +0530 Subject: [PATCH 253/711] [IMP]:hr_holidays:rename Allocation Type to Mode and Allocation Category to Allocation Mode. bzr revid: apa@tinyerp.com-20111121102039-clb8zx538ttkmegr --- addons/hr_holidays/hr_holidays_view.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/hr_holidays/hr_holidays_view.xml b/addons/hr_holidays/hr_holidays_view.xml index a43378b1c95..6bb614779da 100644 --- a/addons/hr_holidays/hr_holidays_view.xml +++ b/addons/hr_holidays/hr_holidays_view.xml @@ -59,7 +59,7 @@ - + @@ -104,7 +104,7 @@ - + From 6f8d47b8bb2f41ab3692c387be9828d9a7ef110c Mon Sep 17 00:00:00 2001 From: "Tejas (OpenERP)" Date: Mon, 21 Nov 2011 16:18:21 +0530 Subject: [PATCH 254/711] removed misplaced bracket bzr revid: tta@openerp.com-20111121104821-q1c99r7gy3y69hiq --- 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 8a57e4f4016..458a07380ea 100644 --- a/addons/purchase/purchase_view.xml +++ b/addons/purchase/purchase_view.xml @@ -172,7 +172,7 @@ - + From ef3c7d9c3b51e4ae30de02c74517df3e7307a93d Mon Sep 17 00:00:00 2001 From: "Vaibhav (OpenERP)" Date: Mon, 21 Nov 2011 16:49:31 +0530 Subject: [PATCH 255/711] [FIX] Done for level 1 group. todo for multi level. bzr revid: vda@tinyerp.com-20111121111931-f149p9vau10vsx60 --- addons/web_gantt/static/src/js/gantt.js | 42 ++++++++++++++++++++----- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/addons/web_gantt/static/src/js/gantt.js b/addons/web_gantt/static/src/js/gantt.js index 77170d103ff..63845361b7b 100644 --- a/addons/web_gantt/static/src/js/gantt.js +++ b/addons/web_gantt/static/src/js/gantt.js @@ -106,7 +106,13 @@ init: function(parent, dataset, view_id) { this.GanttTasks = []; if(this.group_by.length) { - + if(this.group_by.length > 1) { + + } else { + _.each(_.uniq(this.group_keys[0]), function(group, index) { + self.GanttTasks.push(new GanttTaskInfo(index, group, self.project_start_date, self.total_duration, 100,"")); + }); + } } else { this.GanttTasks.push(new GanttTaskInfo(0, self.name, self.project_start_date, self.total_duration, 100, "")); } @@ -118,7 +124,21 @@ init: function(parent, dataset, view_id) { var self = this, tasks = this.database_projects; if (this.group_by.length) { - + if (this.group_by.length > 1) { + } else { + _.each(_.values(this.data_groups), function(child_tasks, index) { + _.each(child_tasks, function(chld) { + var name = chld[self.text]; + if (chld[self.text] instanceof Array) { + name = chld[self.text][1]; + } + var duration = _.keys(self.group_project_duration).indexOf(""+chld.id); + duration = _.values(self.group_project_duration)[duration]; + self.GanttTasks[index].addChildTask(new GanttTaskInfo(chld.id, name, self.format_date(chld[self.date_start]), duration, 100, "")) + }); + + }); + } } else { _.each(tasks, function(task, index){ @@ -138,15 +158,19 @@ init: function(parent, dataset, view_id) { projects = this.database_projects; this.project_duration = []; - + this.group_project_duration = {}; _.each(projects, function(project, index) { + var duration = 0, + id = project.id; if (self.date_stop && project[self.date_stop]) { - self.project_duration.push(self.duration_difference(project[self.date_start], project[self.date_stop])); + duration = self.duration_difference(project[self.date_start], project[self.date_stop]); +// self.project_duration.push(self.duration_difference(project[self.date_start], project[self.date_stop])); } else if(self.date_delay && project[self.date_delay]) { - self.project_duration.push(project[self.date_delay]); - } else { - self.project_duration.push(0); + duration = project[self.date_delay]; +// self.project_duration.push(project[self.date_delay]); } + self.project_duration.push(duration); + self.group_project_duration[id] = duration; }); this.max_project_duration = _.max(this.project_duration); @@ -203,6 +227,9 @@ init: function(parent, dataset, view_id) { var self = this; if (this.group_by.length) { + _.each(this.GanttTasks, function(tsk, index) { + self.GanttProjects.addTask(tsk); + }); } else { _.each(this.GanttTasks, function(tsk, index) { @@ -239,7 +266,6 @@ init: function(parent, dataset, view_id) { } } }); - ganttChartControl.attachEvent("onTaskEndResize", function(task) {return self.ResizeTask(task);}); ganttChartControl.attachEvent("onTaskEndDrag", function(task) {return self.ResizeTask(task);}); }, From ca95467befbd2ad6d940f8d9dfc4f9e2e14fcd5d Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 21 Nov 2011 13:04:13 +0100 Subject: [PATCH 256/711] [IMP] extract parsing of onchange specs into a separate method bzr revid: xmo@openerp.com-20111121120413-xw2aanwbte79y8cr --- addons/web/static/src/js/view_form.js | 130 ++++++++++++++------------ 1 file changed, 72 insertions(+), 58 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index d833b7471c6..26dc2c03572 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -242,69 +242,83 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView# $pager.find('span.oe_pager_index').html(index); $pager.find('span.oe_pager_count').html(this.dataset.ids.length); }, + parse_on_change: function (on_change, widget) { + var self = this; + var onchange = _.str.trim(on_change); + var call = onchange.match(/^\s?(.*?)\((.*?)\)\s?$/); + if (!call) { + return null; + } + + var method = call[1], args = []; + var context_index = null; + var argument_replacement = { + 'False': function () {return false;}, + 'True': function () {return true;}, + 'None': function () {return null;}, + 'context': function (i) { + context_index = i; + var ctx = widget.build_context ? widget.build_context() : {}; + return ctx; + } + }; + var parent_fields = null; + _.each(call[2].split(','), function (a, i) { + var field = _.str.trim(a); + if (field in argument_replacement) { + args.push(argument_replacement[field](i)); + return; + } else if (self.fields[field]) { + var value = self.fields[field].get_on_change_value(); + args.push(value == null ? false : value); + return; + } else { + var splitted = field.split('.'); + if (splitted.length > 1 && _.str.trim(splitted[0]) === "parent" && self.dataset.parent_view) { + if (parent_fields === null) { + parent_fields = self.dataset.parent_view.get_fields_values(); + } + var p_val = parent_fields[_.str.trim(splitted[1])]; + if (p_val !== undefined) { + args.push(p_val == null ? false : p_val); + return; + } + } + } + throw "Could not get field with name '" + field + "' for onchange '" + onchange + "'"; + }); + + return { + method: method, + args: args, + context_index: context_index + }; + }, do_onchange: function(widget, processed) { var self = this; var act = function() { try { - processed = processed || []; - if (widget.node.attrs.on_change) { - var onchange = _.str.trim(widget.node.attrs.on_change); - var call = onchange.match(/^\s?(.*?)\((.*?)\)\s?$/); - if (call) { - var method = call[1], args = []; - var context_index = null; - var argument_replacement = { - 'False' : function() {return false;}, - 'True' : function() {return true;}, - 'None' : function() {return null;}, - 'context': function(i) { - context_index = i; - var ctx = widget.build_context ? widget.build_context() : {}; - return ctx; - } - }; - var parent_fields = null; - _.each(call[2].split(','), function(a, i) { - var field = _.str.trim(a); - if (field in argument_replacement) { - args.push(argument_replacement[field](i)); - return; - } else if (self.fields[field]) { - var value = self.fields[field].get_on_change_value(); - args.push(value == null ? false : value); - return; - } else { - var splitted = field.split('.'); - if (splitted.length > 1 && _.str.trim(splitted[0]) === "parent" && self.dataset.parent_view) { - if (parent_fields === null) { - parent_fields = self.dataset.parent_view.get_fields_values(); - } - var p_val = parent_fields[_.str.trim(splitted[1])]; - if (p_val !== undefined) { - args.push(p_val == null ? false : p_val); - return; - } - } - } - throw "Could not get field with name '" + field + - "' for onchange '" + onchange + "'"; - }); - var ajax = { - url: '/web/dataset/call', - async: false - }; - return self.rpc(ajax, { - model: self.dataset.model, - method: method, - args: [(self.datarecord.id == null ? [] : [self.datarecord.id])].concat(args), - context_id: context_index === null ? null : context_index + 1 - }).pipe(function(response) { - return self.on_processed_onchange(response, processed); - }); - } else { - console.warn("Wrong on_change format", on_change); + processed = processed || []; + var on_change = widget.node.attrs.on_change; + if (on_change) { + var change_spec = self.parse_on_change(on_change, widget); + if (change_spec) { + var ajax = { + url: '/web/dataset/call', + async: false + }; + return self.rpc(ajax, { + model: self.dataset.model, + method: change_spec.method, + args: [(self.datarecord.id == null ? [] : [self.datarecord.id])].concat(change_spec.args), + context_id: change_spec.context_index == undefined ? null : change_spec.context_index + 1 + }).pipe(function(response) { + return self.on_processed_onchange(response, processed); + }); + } else { + console.warn("Wrong on_change format", on_change); + } } - } } catch(e) { console.error(e); return $.Deferred().reject(); From e3a84ed7b6c08c79c94e96446a4e2497c4e15daa Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 21 Nov 2011 13:05:09 +0100 Subject: [PATCH 257/711] [IMP] throw actual error objects to improve debugging experience bzr revid: xmo@openerp.com-20111121120509-fa0rqj50w3zombs1 --- addons/web/static/src/js/view_form.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 26dc2c03572..1bb43a0e4b8 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -285,7 +285,8 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView# } } } - throw "Could not get field with name '" + field + "' for onchange '" + onchange + "'"; + throw new Error("Could not get field with name '" + field + + "' for onchange '" + onchange + "'"); }); return { From aad7d22763beb1774218bd7f041a918a56237964 Mon Sep 17 00:00:00 2001 From: "Jiten (OpenERP)" Date: Mon, 21 Nov 2011 17:47:26 +0530 Subject: [PATCH 258/711] [IMP] Improve m2o field to remove image for open related form and make it as o2m. bzr revid: jra@tinyerp.com-20111121121726-pat4r2ypa3o93tr9 --- .../web_mobile/static/src/js/form_mobile.js | 69 ++++--------------- .../web_mobile/static/src/xml/web_mobile.xml | 26 ++----- 2 files changed, 22 insertions(+), 73 deletions(-) diff --git a/addons/web_mobile/static/src/js/form_mobile.js b/addons/web_mobile/static/src/js/form_mobile.js index 6f50bb6760d..cc816b75a21 100644 --- a/addons/web_mobile/static/src/js/form_mobile.js +++ b/addons/web_mobile/static/src/js/form_mobile.js @@ -52,20 +52,6 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({ self.$element.find("[data-role=header]").find('#home').click(function(){ $.mobile.changePage("#oe_menu", "slide", false, true); }); - self.$element.find('#formbutton').click(function(){ - var head = $(this).prev().find('select').find("option:selected").text(); - var selected_id = $(this).prev().find('select').val(); - var select_model = $(this).prev().find('select').attr('for'); - if(selected_id!="false"){ - if(!$('[id^="oe_form_'+selected_id+select_model+'"]').html()){ - $('
').appendTo('#moe'); - this.formview = new openerp.web_mobile.FormView(self, "oe_form_"+selected_id+select_model, selected_id, '', head, select_model, false); - this.formview.start(); - }else{ - $.mobile.changePage('#oe_form_'+selected_id+select_model, "slide", false, true); - } - } - }); self.$element.find('[data-role=collapsible-set]').find('[data-role=collapsible]').each(function(i){ for (var k = 0; k < notebooks.children.length; k++) { if (notebooks.children[k].attrs.string == $(this).attr('id')) { @@ -83,21 +69,6 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({ $(this).find('div#page_content').html(self.render({'get_fields': get_fields,'fields' : result.fields, 'values' : self.datarecord})); } self.formatdata(get_fields, fields, result, self.datarecord,'page_content','element'); - - $(this).find('div#page_content').find('#formbutton').click(function(){ - var head = $(this).prev().find('select').find("option:selected").text(); - var selected_id = $(this).prev().find('select').val(); - var select_model = $(this).prev().find('select').attr('for'); - if(selected_id!="false"){ - if(!$('[id^="oe_form_'+selected_id+select_model+'"]').html()){ - $('
').appendTo('#moe'); - this.formview = new openerp.web_mobile.FormView(self, "oe_form_"+selected_id+select_model, selected_id, '', head, select_model, false); - this.formview.start(); - }else{ - $.mobile.changePage('#oe_form_'+selected_id+select_model, "slide", false, true); - } - } - }); } }); self.$element.find('[data-role=collapsible-set]').find('[data-role=collapsible]').find('div#page_content').find('[data-role=content]').find('ul').find('li').click(function(ev){ @@ -146,7 +117,6 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({ } if(!$('[id^="oe_form_'+listid+result.fields[relational].relation+'"]').html()){ $('
').appendTo('#moe'); - for (var k = 0; k < notebooks.children.length; k++) { if (notebooks.children[k].attrs.string == lastid) { get_fields = self.get_fields(notebooks.children[k].children); @@ -171,20 +141,6 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({ $('[id^="oe_form_'+listid+result.fields[relational].relation+'"]').find("[data-role=header]").find('#home').click(function(){ $.mobile.changePage("#oe_menu", "slide", false, true); }); - $('[id^="oe_form_'+listid+result.fields[relational].relation+'"]').find('#formbutton').click(function(){ - var head = $(this).prev().find('select').find("option:selected").text(); - var selected_id = $(this).prev().find('select').val(); - var select_model = $(this).prev().find('select').attr('for'); - if(selected_id!="false"){ - if(!$('[id^="oe_form_'+selected_id+select_model+'"]').html()){ - $('
').appendTo('#moe'); - this.formview = new openerp.web_mobile.FormView(self, "oe_form_"+selected_id+select_model, selected_id, '', head, select_model, false); - this.formview.start(); - }else{ - $.mobile.changePage('#oe_form_'+selected_id+select_model, "slide", false, true); - } - } - }); if(notebook){ self.formatdata(get_fields_test, fields_test, result, data_relational,'oe_form_'+listid+result.fields[relational].relation,'element'); }else{ @@ -205,9 +161,24 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({ }); } }); + self.$element.find('#m2o_btn').click(this.open_m2o_form); $.mobile.changePage("#"+self.element_id, "slide", false, true); self.formatdata('', '', '', '',self.element_id,'slider'); }, + open_m2o_form : function(ev) { + var head = $(this).find('a').attr('name'); + var selected_id = $(this).find('a').attr('value'); + var select_model = $(this).attr('for'); + if(selected_id!="false"){ + if(!$('[id^="oe_form_'+selected_id+select_model+'"]').html()){ + $('
').appendTo('#moe'); + this.formview = new openerp.web_mobile.FormView(self, "oe_form_"+selected_id+select_model, selected_id, '', head, select_model, false); + this.formview.start(); + }else{ + $.mobile.changePage('#oe_form_'+selected_id+select_model, "slide", false, true); + } + } + }, get_fields: function(view_fields, fields) { this.fields = fields || []; for (var i=0; i < view_fields.length; i++){ @@ -276,16 +247,6 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({ $(this).css('left', '-9999px'); }); }); - // image displayed with m2o field - $('[id^="'+id+'"]').find('div[class=ui-select]').each(function(){ - $(this).next().each(function(){ - if($(this).attr('id')=="formbutton"){ - $(this).prev().css('display','inline-table'); - $(this).prev().find('a').find('.ui-btn-inner').removeClass('ui-btn-inner'); - $(this).prev().find('a').find('span:first').css('padding-right','150px'); - } - }); - }); } } }); diff --git a/addons/web_mobile/static/src/xml/web_mobile.xml b/addons/web_mobile/static/src/xml/web_mobile.xml index 898d86c1735..1d6f81404d2 100644 --- a/addons/web_mobile/static/src/xml/web_mobile.xml +++ b/addons/web_mobile/static/src/xml/web_mobile.xml @@ -288,25 +288,13 @@ : - - - - +
    From 95e2fcf8845f39a15b366135b2a12c42580aa9f2 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 21 Nov 2011 13:26:22 +0100 Subject: [PATCH 259/711] [ADD] sanity tests for basic checking of onchange parsing bzr revid: xmo@openerp.com-20111121122622-g6jzo74ctgc6r1hk --- addons/web/static/test/onchange.js | 58 ++++++++++++++++++++++++++++++ addons/web/static/test/test.html | 1 + 2 files changed, 59 insertions(+) create mode 100644 addons/web/static/test/onchange.js diff --git a/addons/web/static/test/onchange.js b/addons/web/static/test/onchange.js new file mode 100644 index 00000000000..07eb6c1bc2c --- /dev/null +++ b/addons/web/static/test/onchange.js @@ -0,0 +1,58 @@ +$(document).ready(function () { + var openerp, + make_form = function (default_values) { + var fields = {}; + _(default_values).each(function (value, name) { + fields[name] = value instanceof Function ? value : { + get_on_change_value: function () { return value; } + }; + }); + return _.extend(new openerp.web.FormView(null, {}), + {fields: fields}); + }; + module("form.onchange", { + setup: function () { + openerp = window.openerp.init(true); + window.openerp.web.core(openerp); + window.openerp.web.chrome(openerp); + // views loader stuff + window.openerp.web.data(openerp); + window.openerp.web.views(openerp); + window.openerp.web.list(openerp); + window.openerp.web.form(openerp); + } + }); +// test('Parse args-less onchange', function () { +// var f = new openerp.web.FormView(null, {}); +// var result = f.parse_on_change('on_change_foo()', {}); +// equal(result.method, 'on_change_foo'); +// deepEqual(result.args, []); +// }); + test('Parse 1-arg onchange', function () { + var f = make_form({foo: 3}); + var result = f.parse_on_change('on_change_foo(foo)', {}); + equal(result.method, 'on_change_foo'); + deepEqual(result.args, [3]); + }); + test('Parse 2-args onchange', function () { + var f = make_form({foo: 3, bar: 'qux'}); + var result = f.parse_on_change('on_change_foo(bar, foo)', {}); + equal(result.method, 'on_change_foo'); + deepEqual(result.args, ['qux', 3]); + }); + test('Literal null', function () { + var f = make_form(); + var result = f.parse_on_change('on_null(None)', {}); + deepEqual(result.args, [null]); + }); + test('Literal true', function () { + var f = make_form(); + var result = f.parse_on_change('on_null(True)', {}); + deepEqual(result.args, [true]); + }); + test('Literal false', function () { + var f = make_form(); + var result = f.parse_on_change('on_null(False)', {}); + deepEqual(result.args, [false]); + }); +}); diff --git a/addons/web/static/test/test.html b/addons/web/static/test/test.html index d182ce18707..9bbfff168fd 100644 --- a/addons/web/static/test/test.html +++ b/addons/web/static/test/test.html @@ -49,4 +49,5 @@ + From 9d09c570aefc8c96a026a4316937c7a42ff6cf3d Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 21 Nov 2011 13:28:45 +0100 Subject: [PATCH 260/711] [ADD] support for arguments-less onchange (why the hell not) bzr revid: xmo@openerp.com-20111121122845-98lctm470ncttz74 --- addons/web/static/src/js/view_form.js | 7 +++++-- addons/web/static/test/onchange.js | 12 ++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 1bb43a0e4b8..1f35c0e1dc3 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -250,8 +250,11 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView# return null; } - var method = call[1], args = []; - var context_index = null; + var method = call[1], args = [], context_index = null; + if (!_.str.trim(call[2])) { + return {method: method, args: args, context_index: context_index} + } + var argument_replacement = { 'False': function () {return false;}, 'True': function () {return true;}, diff --git a/addons/web/static/test/onchange.js b/addons/web/static/test/onchange.js index 07eb6c1bc2c..c606915f31a 100644 --- a/addons/web/static/test/onchange.js +++ b/addons/web/static/test/onchange.js @@ -22,12 +22,12 @@ $(document).ready(function () { window.openerp.web.form(openerp); } }); -// test('Parse args-less onchange', function () { -// var f = new openerp.web.FormView(null, {}); -// var result = f.parse_on_change('on_change_foo()', {}); -// equal(result.method, 'on_change_foo'); -// deepEqual(result.args, []); -// }); + test('Parse args-less onchange', function () { + var f = new openerp.web.FormView(null, {}); + var result = f.parse_on_change('on_change_foo()', {}); + equal(result.method, 'on_change_foo'); + deepEqual(result.args, []); + }); test('Parse 1-arg onchange', function () { var f = make_form({foo: 3}); var result = f.parse_on_change('on_change_foo(foo)', {}); From 205c8f6ea7e451354fade7a83c54ed64382ec9e6 Mon Sep 17 00:00:00 2001 From: "Ujjvala Collins (OpenERP)" Date: Mon, 21 Nov 2011 18:01:15 +0530 Subject: [PATCH 261/711] [IMP] mrp_operations: Improved work orders to initialize the workflow for demo data and existing records. bzr revid: uco@tinyerp.com-20111121123115-3plhb42u04ye9ipj --- addons/mrp_operations/mrp_operation_data.xml | 3 +++ addons/mrp_operations/mrp_operations.py | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/addons/mrp_operations/mrp_operation_data.xml b/addons/mrp_operations/mrp_operation_data.xml index 7ce25b6d250..2d0694f12ac 100644 --- a/addons/mrp_operations/mrp_operation_data.xml +++ b/addons/mrp_operations/mrp_operation_data.xml @@ -30,5 +30,8 @@ done + + + diff --git a/addons/mrp_operations/mrp_operations.py b/addons/mrp_operations/mrp_operations.py index 7dc93731b03..e4815fee4c6 100644 --- a/addons/mrp_operations/mrp_operations.py +++ b/addons/mrp_operations/mrp_operations.py @@ -552,6 +552,17 @@ class mrp_operations_operation(osv.osv): return super(mrp_operations_operation, self).create(cr, uid, vals, context=context) + def initialize_workflow_instance(self, cr, uid, context=None): + wf_service = netsvc.LocalService("workflow") + wc_line_obj = self.pool.get('mrp.production.workcenter.line') + prod_obj = self.pool.get('mrp.production') + production_ids = prod_obj.search(cr, uid, [], context=context) + for op in prod_obj.browse(cr, uid, production_ids, context=context): + wc_lines = wc_line_obj.search(cr, uid, [('production_id','=',op.id)], context=context) + for line_id in wc_lines: + wf_service.trg_create(uid, 'mrp.production.workcenter.line', line_id, cr) + return True + _columns={ 'production_id':fields.many2one('mrp.production','Production',required=True), 'workcenter_id':fields.many2one('mrp.workcenter','Work Center',required=True), From 49bc0be0692e8ab8278e3a7fb30280d2e91cd082 Mon Sep 17 00:00:00 2001 From: "Bharat (OpenERP)" Date: Mon, 21 Nov 2011 18:05:30 +0530 Subject: [PATCH 262/711] [IMP] improved label name of UOM and UOS Qty bzr revid: bde@tinyerp.com-20111121123530-lymdqxbrt92qzi33 --- addons/sale/sale_view.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml index 3976abb5d05..72c231071ca 100644 --- a/addons/sale/sale_view.xml +++ b/addons/sale/sale_view.xml @@ -178,8 +178,10 @@ - + + + From 8f67c5c367a2653918f5e0473c3d0f8e031f3aaf Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 21 Nov 2011 13:41:45 +0100 Subject: [PATCH 263/711] [ADD] support for string literals in form @on_change lp bug: https://launchpad.net/bugs/889741 fixed bzr revid: xmo@openerp.com-20111121124145-6i2kvesyc689g3ez --- addons/web/static/src/js/view_form.js | 36 ++++++++++++++++++--------- addons/web/static/test/onchange.js | 7 ++++++ 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 1f35c0e1dc3..bd9cf27e0ed 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -268,26 +268,38 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView# var parent_fields = null; _.each(call[2].split(','), function (a, i) { var field = _.str.trim(a); + + // literal constant or context if (field in argument_replacement) { args.push(argument_replacement[field](i)); return; - } else if (self.fields[field]) { + } + // form field + if (self.fields[field]) { var value = self.fields[field].get_on_change_value(); args.push(value == null ? false : value); return; - } else { - var splitted = field.split('.'); - if (splitted.length > 1 && _.str.trim(splitted[0]) === "parent" && self.dataset.parent_view) { - if (parent_fields === null) { - parent_fields = self.dataset.parent_view.get_fields_values(); - } - var p_val = parent_fields[_.str.trim(splitted[1])]; - if (p_val !== undefined) { - args.push(p_val == null ? false : p_val); - return; - } + } + // parent field + var splitted = field.split('.'); + if (splitted.length > 1 && _.str.trim(splitted[0]) === "parent" && self.dataset.parent_view) { + if (parent_fields === null) { + parent_fields = self.dataset.parent_view.get_fields_values(); + } + var p_val = parent_fields[_.str.trim(splitted[1])]; + if (p_val !== undefined) { + args.push(p_val == null ? false : p_val); + return; } } + // string literal + var first_char = field[0], last_char = field[field.length-1]; + if ((first_char === '"' && last_char === '"') + || (first_char === "'" && last_char === "'")) { + args.push(field.slice(1, -1)); + return; + } + throw new Error("Could not get field with name '" + field + "' for onchange '" + onchange + "'"); }); diff --git a/addons/web/static/test/onchange.js b/addons/web/static/test/onchange.js index c606915f31a..9f047f33d93 100644 --- a/addons/web/static/test/onchange.js +++ b/addons/web/static/test/onchange.js @@ -55,4 +55,11 @@ $(document).ready(function () { var result = f.parse_on_change('on_null(False)', {}); deepEqual(result.args, [false]); }); + test('Literal string', function () { + var f = make_form(); + var result = f.parse_on_change('on_str("foo")', {}); + deepEqual(result.args, ['foo']); + var result2 = f.parse_on_change("on_str('foo')", {}); + deepEqual(result2.args, ['foo']); + }); }); From b40b60e27828c105deb3a68bc7b912b5400c50ce Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 21 Nov 2011 13:45:32 +0100 Subject: [PATCH 264/711] [IMP] use _.map to extract values from onchange parameter names, instead of doing it indirectly via _.each bzr revid: xmo@openerp.com-20111121124532-ndo2me1ehos7mu0m --- addons/web/static/src/js/view_form.js | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index bd9cf27e0ed..69106434799 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -250,9 +250,9 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView# return null; } - var method = call[1], args = [], context_index = null; + var method = call[1]; if (!_.str.trim(call[2])) { - return {method: method, args: args, context_index: context_index} + return {method: method, args: [], context_index: null} } var argument_replacement = { @@ -265,20 +265,18 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView# return ctx; } }; - var parent_fields = null; - _.each(call[2].split(','), function (a, i) { + var parent_fields = null, context_index = null; + var args = _.map(call[2].split(','), function (a, i) { var field = _.str.trim(a); // literal constant or context if (field in argument_replacement) { - args.push(argument_replacement[field](i)); - return; + return argument_replacement[field](i); } // form field if (self.fields[field]) { var value = self.fields[field].get_on_change_value(); - args.push(value == null ? false : value); - return; + return value == null ? false : value; } // parent field var splitted = field.split('.'); @@ -288,16 +286,14 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView# } var p_val = parent_fields[_.str.trim(splitted[1])]; if (p_val !== undefined) { - args.push(p_val == null ? false : p_val); - return; + return p_val == null ? false : p_val; } } // string literal var first_char = field[0], last_char = field[field.length-1]; if ((first_char === '"' && last_char === '"') || (first_char === "'" && last_char === "'")) { - args.push(field.slice(1, -1)); - return; + return field.slice(1, -1); } throw new Error("Could not get field with name '" + field + From 7bce46254462c353a75b8ed3d6a7b025261de786 Mon Sep 17 00:00:00 2001 From: "Hardik Ansodariy (OpenERP)" Date: Mon, 21 Nov 2011 18:22:39 +0530 Subject: [PATCH 265/711] [imp] made dashboard working in web-client bzr revid: han@tinyerp.com-20111121125239-buqve72s07s2a7nn --- addons/procurement/board_mrp_procurement_view.xml | 2 +- addons/stock/board_warehouse_view.xml | 4 ++-- addons/stock/wizard/stock_partial_picking_view.xml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/procurement/board_mrp_procurement_view.xml b/addons/procurement/board_mrp_procurement_view.xml index b45edd3cbdd..01745e7acff 100644 --- a/addons/procurement/board_mrp_procurement_view.xml +++ b/addons/procurement/board_mrp_procurement_view.xml @@ -16,7 +16,7 @@ form - + diff --git a/addons/stock/board_warehouse_view.xml b/addons/stock/board_warehouse_view.xml index b171515a8db..86cf62d5a03 100644 --- a/addons/stock/board_warehouse_view.xml +++ b/addons/stock/board_warehouse_view.xml @@ -28,7 +28,7 @@ graph,tree [('type','=','in'),('day','<=', time.strftime('%Y-%m-%d')),('day','>',(datetime.date.today()-datetime.timedelta(days=15)).strftime('%Y-%m-%d'))] - {'search_default_month-1':1,'search_default_in':1,'group_by':['day'], 'group_by_no_leaf':1} + {'search_default_in':1} Outgoing Products Delay @@ -37,7 +37,7 @@ graph,tree [('type','=','out'),('day','<=', time.strftime('%Y-%m-%d')),('day','>',(datetime.date.today()-datetime.timedelta(days=15)).strftime('%Y-%m-%d'))] - {'search_default_month-1':1,'search_default_out':1,'group_by':['day'], 'group_by_no_leaf':1} + {'search_default_out':1} board.warehouse.form diff --git a/addons/stock/wizard/stock_partial_picking_view.xml b/addons/stock/wizard/stock_partial_picking_view.xml index f3be24b786f..39b993b7d7d 100644 --- a/addons/stock/wizard/stock_partial_picking_view.xml +++ b/addons/stock/wizard/stock_partial_picking_view.xml @@ -36,7 +36,7 @@ - + @@ -51,7 +51,7 @@ - + From eaebfd814d76a4767040d49e819a959fb89379f3 Mon Sep 17 00:00:00 2001 From: "Ujjvala Collins (OpenERP)" Date: Mon, 21 Nov 2011 18:31:53 +0530 Subject: [PATCH 266/711] [IMP] mrp_operations: Some usability improvements mentioned on pad. bzr revid: uco@tinyerp.com-20111121130153-re5blfwujjwjvqy6 --- addons/mrp_operations/mrp_operations.py | 4 ++-- addons/mrp_operations/mrp_operations_view.xml | 13 +++++-------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/addons/mrp_operations/mrp_operations.py b/addons/mrp_operations/mrp_operations.py index e4815fee4c6..74d4ee3cf8a 100644 --- a/addons/mrp_operations/mrp_operations.py +++ b/addons/mrp_operations/mrp_operations.py @@ -86,10 +86,10 @@ class mrp_production_workcenter_line(osv.osv): _order = "sequence, date_planned" _columns = { - 'state': fields.selection([('draft','Draft'),('startworking', 'In Progress'),('pause','Pause'),('cancel','Cancelled'),('done','Finished')],'State', readonly=True, + 'state': fields.selection([('draft','Draft'),('startworking', 'In Progress'),('pause','Pending'),('cancel','Cancelled'),('done','Finished')],'State', readonly=True, help="* When a work order is created it is set in 'Draft' state.\n" \ "* When user sets work order in start mode that time it will be set in 'In Progress' state.\n" \ - "* When work order is in running mode, during that time if user wants to stop or to make changes in order then can set in 'Pause' state.\n" \ + "* When work order is in running mode, during that time if user wants to stop or to make changes in order then can set in 'Pending' state.\n" \ "* When the user cancels the work order it will be set in 'Canceled' state.\n" \ "* When order is completely processed that time it is set in 'Finished' state."), 'date_start_date': fields.function(_get_date_date, string='Start Date', type='date'), diff --git a/addons/mrp_operations/mrp_operations_view.xml b/addons/mrp_operations/mrp_operations_view.xml index 377a57d6121..e7decebbf4b 100644 --- a/addons/mrp_operations/mrp_operations_view.xml +++ b/addons/mrp_operations/mrp_operations_view.xml @@ -16,7 +16,7 @@ '); + } + } type_widget.start(); type_widget.set_value(node.value); self.add_widget.push(type_widget); }); - table_selector.append(' '); + console.log("table_selector.find", table_selector.find("td[id^=]")); + table_selector.find("td[id^=]").attr("width","100px"); self.add_node_dialog.$element.find('#new_field').click(function() { model_data = new openerp.web.DataSetSearch(self,'ir.model', null, null); model_data.read_slice([], {domain: [['model','=', self.model]]}, function(result) { @@ -1001,7 +1006,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ new_fields_name = new openerp.web.DataSetSearch(self,'ir.model.fields', null, null); new_fields_name.read_ids([controller.datarecord.id], ['name'], function(result) { self.add_node_dialog.$element. - find('select[id=field_value]'). append($(""). + find('select[id=field_value]').append($(""). attr("value",result[0].name).text(result[0].name)); _.detect(self.add_widget,function(widget){ (widget.name == "field_value")?widget.selection.push(result[0].name):false; @@ -1090,9 +1095,13 @@ openerp.web.ViewEditor.FieldSelect = openerp.web.ViewEditor.Field.extend({ this.$element.find("select[id=" + this.name + "]").css('width', '100%').change(function() { self.on_ui_change(); if(self.name == "node_type"){ - (self.get_value() == "field")? - self.$element.find("select[id=field_value]").show(): - self.$element.find("select[id=field_value]").hide(); + if(self.get_value() == "field"){ + self.$element.find('#new_field').show(); + self.$element.find("select[id=field_value]").show(); + }else{ + self.$element.find('#new_field').hide(); + self.$element.find("select[id=field_value]").hide(); + } } }); From 37f2f7cd4ca1817f3bcc61ff073f547a11b7ce91 Mon Sep 17 00:00:00 2001 From: "Vidhin Mehta (OpenERP)" Date: Tue, 22 Nov 2011 14:14:47 +0530 Subject: [PATCH 283/711] [IMP]improvement in code. bzr revid: vme@tinyerp.com-20111122084447-jny55ehsiksd3v0d --- addons/web/static/src/js/view_editor.js | 39 +++++++++++++------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/addons/web/static/src/js/view_editor.js b/addons/web/static/src/js/view_editor.js index bb0ffba5b73..173b3bfc4f0 100644 --- a/addons/web/static/src/js/view_editor.js +++ b/addons/web/static/src/js/view_editor.js @@ -486,19 +486,21 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ var self = this; var tr = $(side).find('a').text(); var parent_tr = ($(side).prevAll("tr[level="+String(this.one_object.clicked_tr_level - 1)+"]"))[0]; + var field_dataset = new openerp.web.DataSetSearch(this, this.model, null, null); parent_tr = $(parent_tr).find('a').text(); - self.rpc("/web/searchview/fields_get", {model:self.model}, function(result) { - var fields = _.keys(result.fields); - fields.push(" "),fields.sort(); - var property_to_check = []; - _.each([tr,parent_tr],function(element){ - property_to_check.push( - _.detect(_.keys(_CHILDREN),function(res){ - return _.str.include(element, res); - })); - }); - self.on_add_node(property_to_check, fields); + field_dataset.call( 'fields_get', [], function(result) { + var fields = _.keys(result); + fields.push(" "),fields.sort(); + var property_to_check = []; + _.each([tr,parent_tr],function(element){ + property_to_check.push( + _.detect(_.keys(_CHILDREN),function(res){ + return _.str.include(element, res); + })); }); + self.on_add_node(property_to_check, fields); + }); + }, do_node_edit: function(side){ var self = this; @@ -681,9 +683,15 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ var object_xml = self.create_View_Node(temp_xml.childNodes[0]); (update_values[1] == "Inside")? object_xml.level = obj.level + 1:object_xml.level = obj.level; var clone = self.create_clone(tr_click.clone(),object_xml); + var after_append = _.detect(self.one_object['parent_child_id'],function(ele){ + return self.one_object.clicked_tr_id == ele.key; + }); + after_append = (after_append)?_.last(after_append.value):self.one_object.clicked_tr_id; + switch (update_values[1]) { case "After": - tr_click.after(clone); + self.edit_xml_dialog.$element. + find("tr[id='viewedit-"+after_append+"']").after(clone); $(arch1).after(update_values[0]); child_list.splice(index + 1, 0, object_xml); break; @@ -693,10 +701,6 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ child_list.splice(index - 1, 0, object_xml); break; case "Inside": - var after_append = _.detect(self.one_object['parent_child_id'],function(ele){ - return self.one_object.clicked_tr_id == ele.key; - }); - after_append = (after_append)?_.last(after_append.value):self.one_object.clicked_tr_id; if(tr_click.find("img[id^='parentimg-']").length == 0){ ($(tr_click.find('a').parent()).siblings('td')) .append($(''). @@ -706,9 +710,9 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ self.do_parent_img_hide_show(this); })); } + $(arch1).append(update_values[0]); self.edit_xml_dialog.$element. find("tr[id='viewedit-"+after_append+"']").after(clone); - $(arch1).append(update_values[0]); obj.child_id.push(object_xml); break; } @@ -977,7 +981,6 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ type_widget.set_value(node.value); self.add_widget.push(type_widget); }); - console.log("table_selector.find", table_selector.find("td[id^=]")); table_selector.find("td[id^=]").attr("width","100px"); self.add_node_dialog.$element.find('#new_field').click(function() { model_data = new openerp.web.DataSetSearch(self,'ir.model', null, null); From 779fa653c16e56612523eb25d0f6930e492e5ab5 Mon Sep 17 00:00:00 2001 From: Numerigraphe - Lionel Sausin Date: Tue, 22 Nov 2011 09:51:38 +0100 Subject: [PATCH 284/711] [IMP] Added missing vim mode lines lp bug: https://launchpad.net/bugs/524279 fixed bzr revid: ls@numerigraphe.fr-20111122085138-x6u2lcl6vrpyybp9 --- addons/account/account_bank.py | 2 ++ addons/account/edi/__init__.py | 2 ++ addons/account/edi/invoice.py | 2 ++ addons/account/report/account_analytic_entries_report.py | 2 ++ addons/account/report/account_entries_report.py | 2 ++ addons/account/report/account_financial_report.py | 2 ++ addons/account/report/account_treasury_report.py | 2 ++ addons/account/report/common_report_header.py | 2 ++ addons/account/test/test_parent_structure.py | 2 ++ addons/account/wizard/account_report_central_journal.py | 2 ++ addons/account/wizard/account_report_common_account.py | 2 ++ addons/account/wizard/account_report_common_journal.py | 3 ++- addons/account/wizard/account_report_common_partner.py | 3 ++- addons/account/wizard/account_report_general_journal.py | 2 ++ addons/account/wizard/account_report_print_journal.py | 2 ++ addons/account/wizard/account_vat.py | 3 ++- .../account_analytic_analysis/cron_account_analytic_account.py | 2 ++ addons/account_anglo_saxon/purchase.py | 2 ++ addons/analytic_user_function/analytic_user_function.py | 2 ++ addons/anonymization/__init__.py | 2 ++ addons/anonymization/__openerp__.py | 2 ++ addons/anonymization/anonymization.py | 2 ++ addons/auction/report/report_auction.py | 2 ++ addons/auction/wizard/auction_lots_able.py | 2 ++ addons/auction/wizard/auction_lots_cancel.py | 3 ++- addons/auction/wizard/auction_lots_enable.py | 2 ++ addons/auction/wizard/auction_lots_make_invoice.py | 2 ++ addons/auction/wizard/auction_lots_make_invoice_buyer.py | 2 ++ addons/auction/wizard/auction_pay_sel.py | 2 ++ addons/auction/wizard/auction_taken.py | 2 ++ addons/auction/wizard/auction_transfer_unsold_object.py | 3 ++- addons/audittrail/wizard/audittrail_view_log.py | 2 ++ addons/auth_openid/controllers/__init__.py | 2 ++ addons/auth_openid/controllers/main.py | 2 ++ addons/auth_openid/res_users.py | 2 ++ addons/auth_openid/utils.py | 2 ++ addons/base_crypt/__init__.py | 2 ++ addons/base_crypt/__openerp__.py | 2 ++ addons/base_module_doc_rst/__init__.py | 2 ++ addons/base_module_doc_rst/__openerp__.py | 2 ++ addons/base_module_doc_rst/report/report_proximity_graph.py | 3 ++- addons/base_module_doc_rst/wizard/__init__.py | 2 ++ addons/base_module_doc_rst/wizard/wizard_tech_guide_rst.py | 2 ++ .../plugin/openerp_report_designer/bin/script/About.py | 2 ++ .../plugin/openerp_report_designer/bin/script/AddAttachment.py | 2 ++ .../plugin/openerp_report_designer/bin/script/Change.py | 2 ++ .../openerp_report_designer/bin/script/ConvertBracesToField.py | 2 ++ .../bin/script/ConvertFieldsToBraces.py | 2 ++ .../plugin/openerp_report_designer/bin/script/ExportToRML.py | 2 ++ .../plugin/openerp_report_designer/bin/script/Expression.py | 2 ++ .../plugin/openerp_report_designer/bin/script/Fields.py | 2 ++ .../plugin/openerp_report_designer/bin/script/LoginTest.py | 2 ++ .../openerp_report_designer/bin/script/ModifyExistingReport.py | 2 ++ .../plugin/openerp_report_designer/bin/script/NewReport.py | 2 ++ .../plugin/openerp_report_designer/bin/script/Repeatln.py | 2 ++ .../plugin/openerp_report_designer/bin/script/SendToServer.py | 2 ++ .../openerp_report_designer/bin/script/ServerParameter.py | 2 ++ .../plugin/openerp_report_designer/bin/script/Translation.py | 2 ++ .../plugin/openerp_report_designer/bin/script/__init__.py | 2 ++ .../plugin/openerp_report_designer/bin/script/compile_all.py | 2 ++ .../plugin/openerp_report_designer/bin/script/lib/__init__.py | 2 ++ .../plugin/openerp_report_designer/bin/script/lib/actions.py | 2 ++ .../plugin/openerp_report_designer/bin/script/lib/error.py | 2 ++ .../plugin/openerp_report_designer/bin/script/lib/functions.py | 2 ++ .../plugin/openerp_report_designer/bin/script/lib/gui.py | 2 ++ .../plugin/openerp_report_designer/bin/script/lib/logreport.py | 2 ++ .../plugin/openerp_report_designer/bin/script/lib/rpc.py | 2 ++ .../openerp_report_designer/bin/script/lib/tiny_socket.py | 2 ++ .../plugin/openerp_report_designer/bin/script/lib/tools.py | 2 ++ .../plugin/openerp_report_designer/bin/script/modify.py | 2 ++ .../plugin/openerp_report_designer/test/test_fields.py | 2 ++ .../base_report_designer/wizard/base_report_designer_modify.py | 2 ++ addons/base_tools/__init__.py | 2 ++ addons/base_tools/__openerp__.py | 2 ++ addons/caldav/caldav.py | 2 ++ addons/caldav/calendar_collection.py | 2 ++ addons/caldav/orm_utils.py | 2 ++ addons/caldav/wizard/caldav_browse.py | 2 ++ addons/crm/crm.py | 2 ++ addons/crm/report/crm_phonecall_report.py | 2 ++ addons/crm/wizard/crm_add_note.py | 2 ++ addons/crm/wizard/crm_phonecall_to_opportunity.py | 2 ++ addons/crm_fundraising/crm_fundraising.py | 2 ++ addons/crm_partner_assign/__init__.py | 2 ++ addons/crm_partner_assign/__openerp__.py | 2 ++ addons/crm_partner_assign/partner_geo_assign.py | 2 ++ addons/crm_partner_assign/report/__init__.py | 2 ++ addons/crm_partner_assign/report/crm_partner_report.py | 2 ++ addons/crm_partner_assign/wizard/__init__.py | 2 ++ addons/crm_partner_assign/wizard/crm_merge_opportunity.py | 2 ++ addons/crm_todo/__init__.py | 2 ++ addons/crm_todo/__openerp__.py | 2 ++ addons/crm_todo/crm_todo.py | 2 ++ addons/decimal_precision/__init__.py | 2 ++ addons/decimal_precision/__openerp__.py | 2 ++ addons/document/dict_tools.py | 2 ++ addons/document/directory_content.py | 3 ++- addons/document/directory_report.py | 2 ++ addons/document/document.py | 2 ++ addons/document/document_directory.py | 2 ++ addons/document/document_storage.py | 2 ++ addons/document/nodes.py | 3 ++- addons/document/report/__init__.py | 3 ++- addons/document/std_index.py | 2 ++ addons/document/test_cindex.py | 2 ++ addons/document/wizard/__init__.py | 2 ++ addons/document/wizard/document_configuration.py | 2 ++ addons/document_ftp/test_easyftp.py | 2 ++ addons/document_ftp/wizard/ftp_browse.py | 2 ++ addons/document_ftp/wizard/ftp_configuration.py | 2 ++ addons/document_webdav/__init__.py | 3 ++- addons/document_webdav/__openerp__.py | 2 ++ addons/document_webdav/cache.py | 2 ++ addons/document_webdav/dav_fs.py | 2 ++ addons/document_webdav/document_webdav.py | 3 ++- addons/document_webdav/nodes.py | 2 ++ addons/document_webdav/redirect.py | 2 ++ addons/document_webdav/test_davclient.py | 3 ++- addons/document_webdav/webdav.py | 2 ++ addons/document_webdav/webdav_server.py | 2 ++ addons/edi/__init__.py | 2 ++ addons/edi/controllers/__init__.py | 2 ++ addons/edi/controllers/main.py | 2 ++ addons/edi/edi_service.py | 3 ++- addons/edi/models/__init__.py | 3 ++- addons/edi/models/res_company.py | 2 ++ addons/edi/models/res_currency.py | 3 ++- addons/edi/models/res_partner.py | 3 ++- addons/email_template/html2text.py | 2 ++ addons/email_template/res_partner.py | 3 ++- addons/email_template/wizard/__init__.py | 2 ++ addons/fetchmail/__init__.py | 2 ++ addons/fetchmail/__openerp__.py | 2 ++ addons/fetchmail_crm/__init__.py | 2 ++ addons/fetchmail_crm/__openerp__.py | 2 ++ addons/fetchmail_crm_claim/__init__.py | 2 ++ addons/fetchmail_crm_claim/__openerp__.py | 2 ++ addons/fetchmail_hr_recruitment/__init__.py | 2 ++ addons/fetchmail_hr_recruitment/__openerp__.py | 2 ++ addons/fetchmail_project_issue/__init__.py | 2 ++ addons/fetchmail_project_issue/__openerp__.py | 2 ++ addons/hr_holidays/report/available_holidays.py | 2 ++ addons/hr_timesheet/report/__init__.py | 2 ++ addons/hr_timesheet/report/user_timesheet.py | 2 ++ .../hr_timesheet_invoice/report/hr_timesheet_invoice_report.py | 2 ++ addons/hr_timesheet_sheet/report/hr_timesheet_report.py | 2 ++ addons/hr_timesheet_sheet/report/timesheet_report.py | 2 ++ addons/html_view/__init__.py | 3 ++- addons/html_view/html_view.py | 3 ++- addons/import_base/__init__.py | 3 ++- addons/import_base/__openerp__.py | 2 ++ addons/import_base/import_framework.py | 2 ++ addons/import_base/mapper.py | 2 ++ addons/import_google/wizard/google_import_message.py | 2 ++ addons/import_google/wizard/import_google.py | 2 ++ addons/import_sugarcrm/__init__.py | 2 ++ addons/import_sugarcrm/import_sugarcrm.py | 2 ++ addons/import_sugarcrm/sugar.py | 2 ++ addons/import_sugarcrm/sugarsoap_services.py | 2 ++ addons/import_sugarcrm/sugarsoap_services_types.py | 2 ++ addons/import_sugarcrm/wizard/__init__.py | 2 ++ addons/import_sugarcrm/wizard/import_message.py | 2 ++ addons/l10n_at/__init__.py | 3 ++- addons/l10n_at/__openerp__.py | 2 ++ addons/l10n_at/account_wizard.py | 2 ++ addons/l10n_be_invoice_bba/__init__.py | 2 ++ addons/l10n_be_invoice_bba/__openerp__.py | 2 ++ addons/l10n_be_invoice_bba/invoice.py | 2 ++ addons/l10n_be_invoice_bba/partner.py | 2 ++ addons/l10n_br/account.py | 3 ++- addons/l10n_ch/account_wizard.py | 2 ++ addons/l10n_ch/bank.py | 2 ++ addons/l10n_ch/report/__init__.py | 3 ++- addons/l10n_ch/report/report_webkit_html.py | 2 ++ addons/l10n_ch/wizard/unicode2ascii.py | 2 ++ addons/l10n_cr/__init__.py | 2 ++ addons/l10n_de/__openerp__.py | 2 ++ addons/l10n_ec/__init__.py | 2 ++ addons/l10n_ec/__openerp__.py | 2 ++ addons/l10n_es/__init__.py | 2 ++ addons/l10n_es/__openerp__.py | 2 ++ addons/l10n_it/__init__.py | 2 ++ addons/l10n_it/__openerp__.py | 2 ++ addons/l10n_it/libroIVA.py | 2 ++ addons/l10n_it/report/__init__.py | 3 ++- addons/l10n_it/report/libroIVA_credito.py | 2 ++ addons/l10n_it/report/libroIVA_debito.py | 2 ++ addons/l10n_ma/__init__.py | 2 ++ addons/l10n_ro/res_partner.py | 2 ++ addons/l10n_th/__init__.py | 2 ++ addons/l10n_th/__openerp__.py | 2 ++ addons/lunch/report/report_lunch_order.py | 2 ++ addons/marketing_campaign/marketing_campaign.py | 2 ++ addons/marketing_campaign/report/campaign_analysis.py | 2 ++ addons/marketing_campaign_crm_demo/__init__.py | 2 ++ addons/mrp/product.py | 2 ++ addons/mrp/report/mrp_production_order.py | 2 ++ addons/mrp/report/price.py | 2 ++ addons/outlook/__init__.py | 2 ++ addons/outlook/installer.py | 2 ++ addons/outlook/plugin/openerp-outlook-plugin/addin.py | 2 ++ addons/outlook/plugin/openerp-outlook-plugin/chilkat.py | 2 ++ .../outlook/plugin/openerp-outlook-plugin/dialogs/__init__.py | 2 ++ .../plugin/openerp-outlook-plugin/dialogs/dialog_map.py | 2 ++ .../outlook/plugin/openerp-outlook-plugin/dialogs/dlgcore.py | 2 ++ .../outlook/plugin/openerp-outlook-plugin/dialogs/dlgutils.py | 2 ++ .../plugin/openerp-outlook-plugin/dialogs/opt_processors.py | 2 ++ .../plugin/openerp-outlook-plugin/dialogs/processors.py | 2 ++ .../openerp-outlook-plugin/dialogs/resources/__init__.py | 2 ++ .../plugin/openerp-outlook-plugin/dialogs/resources/dialogs.py | 2 ++ .../plugin/openerp-outlook-plugin/dialogs/resources/rc2py.py | 2 ++ .../openerp-outlook-plugin/dialogs/resources/rcparser.py | 2 ++ addons/outlook/plugin/openerp-outlook-plugin/eml.py | 3 ++- addons/outlook/plugin/openerp-outlook-plugin/manager.py | 2 ++ addons/outlook/plugin/openerp-outlook-plugin/tiny_xmlrpc.py | 2 ++ addons/pad/__init__.py | 2 ++ addons/pad/__openerp__.py | 2 ++ addons/pad/ir_attachment.py | 2 ++ addons/pad/res_company.py | 2 ++ addons/point_of_sale/point_of_sale.py | 2 ++ addons/point_of_sale/wizard/pos_box_entries.py | 2 ++ addons/point_of_sale/wizard/pos_box_out.py | 2 ++ addons/point_of_sale/wizard/pos_payment.py | 2 ++ addons/point_of_sale/wizard/pos_payment_report_user.py | 2 ++ addons/point_of_sale/wizard/pos_receipt.py | 2 ++ addons/portal/__init__.py | 2 ++ addons/portal/ir_ui_menu.py | 2 ++ addons/portal/portal.py | 2 ++ addons/portal/res_user.py | 2 ++ addons/portal/wizard/__init__.py | 2 ++ addons/portal/wizard/portal_wizard.py | 2 ++ addons/portal/wizard/share_wizard.py | 2 ++ addons/procurement/__init__.py | 3 ++- addons/project/company.py | 2 ++ addons/project/wizard/project_task_delegate.py | 2 ++ addons/project/wizard/project_task_reevaluate.py | 2 ++ addons/project_caldav/__openerp__.py | 2 ++ addons/project_long_term/project_long_term.py | 2 ++ addons/project_long_term/wizard/project_compute_phases.py | 2 ++ addons/project_mrp/__init__.py | 2 ++ addons/project_scrum/project_scrum.py | 2 ++ addons/project_scrum/wizard/project_scrum_email.py | 2 ++ addons/purchase/edi/__init__.py | 3 ++- addons/purchase/report/purchase_report.py | 2 ++ addons/purchase_double_validation/__openerp__.py | 2 ++ addons/report_intrastat/report_intrastat.py | 2 ++ addons/report_webkit/__init__.py | 3 ++- addons/report_webkit/__openerp__.py | 2 ++ addons/report_webkit/company.py | 2 ++ addons/report_webkit/header.py | 2 ++ addons/report_webkit/ir_report.py | 2 ++ addons/report_webkit/report_helper.py | 3 ++- addons/report_webkit/webkit_report.py | 2 ++ addons/report_webkit/wizard/__init__.py | 3 ++- addons/report_webkit/wizard/report_webkit_actions.py | 2 ++ addons/report_webkit_sample/__init__.py | 3 ++- addons/report_webkit_sample/__openerp__.py | 2 ++ addons/report_webkit_sample/report/__init__.py | 3 ++- addons/report_webkit_sample/report/report_webkit_html.py | 2 ++ addons/resource/faces/observer.py | 2 ++ addons/resource/faces/pcalendar.py | 2 ++ addons/resource/faces/plocale.py | 2 ++ addons/resource/faces/resource.py | 2 ++ addons/resource/faces/task.py | 2 ++ addons/resource/faces/timescale.py | 2 ++ addons/resource/faces/utils.py | 2 ++ addons/sale/edi/__init__.py | 3 ++- addons/sale/stock.py | 2 ++ addons/sale_crm/wizard/crm_make_sale.py | 2 ++ addons/sale_journal/__init__.py | 2 ++ addons/sale_journal/sale_journal.py | 2 ++ addons/share/__init__.py | 2 ++ addons/share/ir_model.py | 3 ++- addons/share/res_users.py | 2 ++ addons/share/wizard/__init__.py | 2 ++ addons/share/wizard/share_wizard.py | 2 ++ addons/stock/__openerp__.py | 2 ++ addons/stock/report/__init__.py | 2 ++ addons/stock/report/report_stock_move.py | 2 ++ addons/stock/wizard/stock_change_standard_price.py | 2 ++ addons/stock/wizard/stock_move.py | 2 ++ addons/stock/wizard/stock_splitinto.py | 2 ++ addons/stock_location/__openerp__.py | 2 ++ addons/stock_location/procurement_pull.py | 3 ++- addons/stock_planning/wizard/__init__.py | 2 ++ addons/thunderbird/__init__.py | 2 ++ addons/thunderbird/__openerp__.py | 2 ++ addons/thunderbird/installer.py | 2 ++ addons/thunderbird/partner/__init__.py | 2 ++ addons/thunderbird/partner/partner.py | 2 ++ addons/web_livechat/__init__.py | 2 ++ addons/web_livechat/__openerp__.py | 2 ++ addons/web_livechat/publisher_warranty.py | 2 ++ addons/web_uservoice/__init__.py | 2 ++ addons/web_uservoice/__openerp__.py | 2 ++ addons/wiki/web/__init__.py | 2 ++ addons/wiki/web/controllers/__init__.py | 2 ++ addons/wiki/web/controllers/wiki.py | 2 ++ addons/wiki/web/widgets/__init__.py | 2 ++ addons/wiki/web/widgets/rss/__init__.py | 3 ++- addons/wiki/web/widgets/rss/feedparser.py | 2 ++ addons/wiki/web/widgets/wiki.py | 2 ++ addons/wiki/web/widgets/wikimarkup/__init__.py | 2 ++ 303 files changed, 606 insertions(+), 36 deletions(-) diff --git a/addons/account/account_bank.py b/addons/account/account_bank.py index acf070a3ad7..01eab2fbb01 100644 --- a/addons/account/account_bank.py +++ b/addons/account/account_bank.py @@ -108,3 +108,5 @@ class bank(osv.osv): self.write(cr, uid, [bank.id], {'journal_id': journal_id}, context=context) return True + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/edi/__init__.py b/addons/account/edi/__init__.py index d86e8a91bf3..a5bf0bbfa2d 100644 --- a/addons/account/edi/__init__.py +++ b/addons/account/edi/__init__.py @@ -20,3 +20,5 @@ ############################################################################## import invoice + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/edi/invoice.py b/addons/account/edi/invoice.py index 061bf8ee97d..d36e9163ba9 100644 --- a/addons/account/edi/invoice.py +++ b/addons/account/edi/invoice.py @@ -271,3 +271,5 @@ class account_invoice_tax(osv.osv, EDIMixin): _inherit = "account.invoice.tax" + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/report/account_analytic_entries_report.py b/addons/account/report/account_analytic_entries_report.py index f6dfe7cbdb5..1b7e7f9a84b 100644 --- a/addons/account/report/account_analytic_entries_report.py +++ b/addons/account/report/account_analytic_entries_report.py @@ -82,3 +82,5 @@ class analytic_entries_report(osv.osv): ) """) analytic_entries_report() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/report/account_entries_report.py b/addons/account/report/account_entries_report.py index 266b4a056d7..29e40c7d5ad 100644 --- a/addons/account/report/account_entries_report.py +++ b/addons/account/report/account_entries_report.py @@ -153,3 +153,5 @@ class account_entries_report(osv.osv): ) """) account_entries_report() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/report/account_financial_report.py b/addons/account/report/account_financial_report.py index 6b42bb1875d..e9da0a1cd7b 100644 --- a/addons/account/report/account_financial_report.py +++ b/addons/account/report/account_financial_report.py @@ -92,3 +92,5 @@ class report_account_common(report_sxw.rml_parse, common_report_header): report_sxw.report_sxw('report.account.financial.report', 'account.financial.report', 'addons/account/report/account_financial_report.rml', parser=report_account_common, header='internal') + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/report/account_treasury_report.py b/addons/account/report/account_treasury_report.py index fce3661b4c4..40d9364981f 100644 --- a/addons/account/report/account_treasury_report.py +++ b/addons/account/report/account_treasury_report.py @@ -79,3 +79,5 @@ class account_treasury_report(osv.osv): ) """) account_treasury_report() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/report/common_report_header.py b/addons/account/report/common_report_header.py index 5769248405f..c0365875bdc 100644 --- a/addons/account/report/common_report_header.py +++ b/addons/account/report/common_report_header.py @@ -141,3 +141,5 @@ class common_report_header(object): return '' #vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/test/test_parent_structure.py b/addons/account/test/test_parent_structure.py index 9c3dd2b4c47..99795af311a 100644 --- a/addons/account/test/test_parent_structure.py +++ b/addons/account/test/test_parent_structure.py @@ -47,3 +47,5 @@ for a in account_lists: (a2['parent_right']a['parent_left']) and (a2['parent_right']"package" and __name__=="__main__": elif __name__=="package": g_ImplementationHelper.addImplementation( About, "org.openoffice.openerp.report.about", ("com.sun.star.task.Job",),) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/AddAttachment.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/AddAttachment.py index 4dbb28a30c0..c65ba32e6bf 100644 --- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/AddAttachment.py +++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/AddAttachment.py @@ -275,3 +275,5 @@ if __name__<>"package" and __name__=="__main__": AddAttachment(None) elif __name__=="package": g_ImplementationHelper.addImplementation( AddAttachment, "org.openoffice.openerp.report.addattachment", ("com.sun.star.task.Job",),) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Change.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Change.py index 0b68ab10b01..cdc5c7553b1 100644 --- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Change.py +++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Change.py @@ -137,3 +137,5 @@ if __name__<>"package" and __name__=="__main__": elif __name__=="package": g_ImplementationHelper.addImplementation( Change, "org.openoffice.openerp.report.change", ("com.sun.star.task.Job",),) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ConvertBracesToField.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ConvertBracesToField.py index 59b7d32b529..bb80c3ecd61 100644 --- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ConvertBracesToField.py +++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ConvertBracesToField.py @@ -283,3 +283,5 @@ if __name__<>"package": else: g_ImplementationHelper.addImplementation( ConvertBracesToField, "org.openoffice.openerp.report.convertBF", ("com.sun.star.task.Job",),) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ConvertFieldsToBraces.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ConvertFieldsToBraces.py index d804405c990..892061c56b4 100644 --- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ConvertFieldsToBraces.py +++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ConvertFieldsToBraces.py @@ -83,3 +83,5 @@ if __name__<>"package": else: g_ImplementationHelper.addImplementation( ConvertFieldsToBraces, "org.openoffice.openerp.report.convertFB", ("com.sun.star.task.Job",),) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ExportToRML.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ExportToRML.py index e2720c1e803..dd00f1719e1 100644 --- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ExportToRML.py +++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ExportToRML.py @@ -130,3 +130,5 @@ if __name__<>"package" and __name__=="__main__": ExportToRML(None) elif __name__=="package": g_ImplementationHelper.addImplementation( ExportToRML, "org.openoffice.openerp.report.exporttorml", ("com.sun.star.task.Job",),) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Expression.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Expression.py index 074a3bd020e..ecdf13454dc 100644 --- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Expression.py +++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Expression.py @@ -113,3 +113,5 @@ if __name__<>"package" and __name__=="__main__": elif __name__=="package": g_ImplementationHelper.addImplementation( Expression, "org.openoffice.openerp.report.expression", ("com.sun.star.task.Job",),) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Fields.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Fields.py index cfe65d61022..92044f78fe1 100644 --- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Fields.py +++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Fields.py @@ -289,3 +289,5 @@ if __name__<>"package" and __name__=="__main__": elif __name__=="package": g_ImplementationHelper.addImplementation( Fields, "org.openoffice.openerp.report.fields", ("com.sun.star.task.Job",),) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/LoginTest.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/LoginTest.py index 012c6f896a2..85059d7712c 100644 --- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/LoginTest.py +++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/LoginTest.py @@ -53,3 +53,5 @@ class LoginTest: if not loginstatus: Change(None) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ModifyExistingReport.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ModifyExistingReport.py index 138513475bb..2ccd8358c97 100644 --- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ModifyExistingReport.py +++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ModifyExistingReport.py @@ -211,3 +211,5 @@ if __name__<>"package" and __name__=="__main__": elif __name__=="package": g_ImplementationHelper.addImplementation( ModifyExistingReport, "org.openoffice.openerp.report.modifyreport", ("com.sun.star.task.Job",),) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/NewReport.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/NewReport.py index 0e4a18c3b10..6022e44df7a 100644 --- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/NewReport.py +++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/NewReport.py @@ -117,3 +117,5 @@ elif __name__=="package": NewReport, "org.openoffice.openerp.report.opennewreport", ("com.sun.star.task.Job",),) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Repeatln.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Repeatln.py index d8458be027d..0eab6d1710c 100644 --- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Repeatln.py +++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Repeatln.py @@ -298,3 +298,5 @@ if __name__<>"package" and __name__=="__main__": elif __name__=="package": g_ImplementationHelper = unohelper.ImplementationHelper() g_ImplementationHelper.addImplementation( RepeatIn, "org.openoffice.openerp.report.repeatln", ("com.sun.star.task.Job",),) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/SendToServer.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/SendToServer.py index 896f3cfcac2..3a6d799f8a5 100644 --- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/SendToServer.py +++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/SendToServer.py @@ -239,3 +239,5 @@ if __name__<>"package" and __name__=="__main__": SendtoServer(None) elif __name__=="package": g_ImplementationHelper.addImplementation( SendtoServer, "org.openoffice.openerp.report.sendtoserver", ("com.sun.star.task.Job",),) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ServerParameter.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ServerParameter.py index 245cd1dc7ce..9b69e4a5c15 100644 --- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ServerParameter.py +++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ServerParameter.py @@ -172,3 +172,5 @@ if __name__<>"package" and __name__=="__main__": elif __name__=="package": g_ImplementationHelper.addImplementation( ServerParameter, "org.openoffice.openerp.report.serverparam", ("com.sun.star.task.Job",),) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Translation.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Translation.py index 54343d02d7f..73146f1b68a 100644 --- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Translation.py +++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Translation.py @@ -272,3 +272,5 @@ if __name__<>"package" and __name__=="__main__": elif __name__=="package": g_ImplementationHelper.addImplementation( AddLang, "org.openoffice.openerp.report.langtag", ("com.sun.star.task.Job",),) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/__init__.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/__init__.py index d2192cd5ddd..0ccd1c9d011 100644 --- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/__init__.py +++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/__init__.py @@ -59,3 +59,5 @@ import ConvertBracesToField import ConvertFieldsToBraces import ExportToRML import SendtoServer + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/compile_all.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/compile_all.py index acafd5f549e..4740c61b178 100644 --- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/compile_all.py +++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/compile_all.py @@ -47,3 +47,5 @@ import compileall compileall.compile_dir('package') + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/__init__.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/__init__.py index 2a732da8226..a60ae586303 100644 --- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/__init__.py +++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/__init__.py @@ -26,3 +26,5 @@ import gui import logreport import rpc import tiny_socket + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/actions.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/actions.py index 56a83159e4a..8511bb8343d 100644 --- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/actions.py +++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/actions.py @@ -109,3 +109,5 @@ class TextListenerProcAdapter( unohelper.Base, XTextListener ): apply( self.oProcToCall, (oTextEvent,) + self.tParams ) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/error.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/error.py index a6cfe9215a3..c0a3e5b5d63 100644 --- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/error.py +++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/error.py @@ -58,3 +58,5 @@ class ErrorDialog: def btnOkOrCancel_clicked( self, oActionEvent ): self.win.endExecute() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/functions.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/functions.py index db1f15b1fc5..29f1cd87e46 100644 --- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/functions.py +++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/functions.py @@ -262,3 +262,5 @@ def GetAFileName(): return sPath + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/gui.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/gui.py index 79f2ae370de..975aa387193 100644 --- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/gui.py +++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/gui.py @@ -820,3 +820,5 @@ class DBModalDialog: """ self.oDialogControl.endExecute() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/logreport.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/logreport.py index dfcc78374c9..2aab8596862 100644 --- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/logreport.py +++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/logreport.py @@ -46,3 +46,5 @@ class Logger(object): def shutdown(self): logging.shutdown() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/rpc.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/rpc.py index f211c6309f4..f7c7f636485 100644 --- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/rpc.py +++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/rpc.py @@ -202,3 +202,5 @@ class NETRPCGateway(RPCGateway): info = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback)) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/tiny_socket.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/tiny_socket.py index 415e4b3c91e..30a2079433a 100644 --- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/tiny_socket.py +++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/tiny_socket.py @@ -91,3 +91,5 @@ class mysocket: + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/tools.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/tools.py index 8c9a8c9a1a8..ef22a3a0d51 100644 --- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/tools.py +++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/tools.py @@ -38,3 +38,5 @@ def write_data_to_file( filename, data ): fp.write( data ) fp.close() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/modify.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/modify.py index fa7874cff45..fc3d6672b79 100644 --- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/modify.py +++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/modify.py @@ -136,3 +136,5 @@ if __name__<>"package": else: g_ImplementationHelper.addImplementation( modify, "org.openoffice.openerp.report.modify", ("com.sun.star.task.Job",),) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_designer/plugin/openerp_report_designer/test/test_fields.py b/addons/base_report_designer/plugin/openerp_report_designer/test/test_fields.py index 8afd773b3fb..8954aa8d7a8 100644 --- a/addons/base_report_designer/plugin/openerp_report_designer/test/test_fields.py +++ b/addons/base_report_designer/plugin/openerp_report_designer/test/test_fields.py @@ -30,3 +30,5 @@ print print 'Field selection for a repeatIn', '='*40 get('account.invoice', level=0, ending=['one2many','many2many'], recur=['many2one']) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_designer/wizard/base_report_designer_modify.py b/addons/base_report_designer/wizard/base_report_designer_modify.py index d0790cdc0ad..03d1ac19d7e 100644 --- a/addons/base_report_designer/wizard/base_report_designer_modify.py +++ b/addons/base_report_designer/wizard/base_report_designer_modify.py @@ -148,3 +148,5 @@ class base_report_rml_save(osv.osv_memory): } base_report_rml_save() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_tools/__init__.py b/addons/base_tools/__init__.py index 50a14119520..4c241b72be9 100644 --- a/addons/base_tools/__init__.py +++ b/addons/base_tools/__init__.py @@ -1 +1,3 @@ # Debian packaging removes blank files, so this comment is added. + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_tools/__openerp__.py b/addons/base_tools/__openerp__.py index ec32805533e..6fff6c3c207 100644 --- a/addons/base_tools/__openerp__.py +++ b/addons/base_tools/__openerp__.py @@ -19,3 +19,5 @@ Creates menu link for Tools from where tools like survey, lunch, idea, etc. are "installable": True, "certificate" : "00571588675379342237" } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/caldav/caldav.py b/addons/caldav/caldav.py index 2517f88f789..0f0f5ddd762 100644 --- a/addons/caldav/caldav.py +++ b/addons/caldav/caldav.py @@ -25,3 +25,5 @@ urlparse.uses_netloc.append('caldav') urlparse.uses_netloc.append('caldavs') #EOF + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/caldav/calendar_collection.py b/addons/caldav/calendar_collection.py index 1258ba5bf18..1abbf573ef0 100644 --- a/addons/caldav/calendar_collection.py +++ b/addons/caldav/calendar_collection.py @@ -86,3 +86,5 @@ class calendar_collection(osv.osv): return self.get_schedule_inbox_URL(cr, uid, ids, context=context) calendar_collection() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/caldav/orm_utils.py b/addons/caldav/orm_utils.py index 00521831e0f..b154d54d1aa 100644 --- a/addons/caldav/orm_utils.py +++ b/addons/caldav/orm_utils.py @@ -46,3 +46,5 @@ if True: # we need this indentation level ;) return res[0][0] #eof + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/caldav/wizard/caldav_browse.py b/addons/caldav/wizard/caldav_browse.py index 5b78c480d07..f4bb8aeaabc 100644 --- a/addons/caldav/wizard/caldav_browse.py +++ b/addons/caldav/wizard/caldav_browse.py @@ -275,3 +275,5 @@ class user_preference(osv.osv_memory): } user_preference() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm/crm.py b/addons/crm/crm.py index 1c1784e961d..03cdb31832d 100644 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -578,3 +578,5 @@ class users(osv.osv): return res users() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm/report/crm_phonecall_report.py b/addons/crm/report/crm_phonecall_report.py index f68bea03880..ef3bcccdc9a 100644 --- a/addons/crm/report/crm_phonecall_report.py +++ b/addons/crm/report/crm_phonecall_report.py @@ -99,3 +99,5 @@ class crm_phonecall_report(osv.osv): crm_phonecall c )""") crm_phonecall_report() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm/wizard/crm_add_note.py b/addons/crm/wizard/crm_add_note.py index 478f051fe58..6bd84bda21d 100644 --- a/addons/crm/wizard/crm_add_note.py +++ b/addons/crm/wizard/crm_add_note.py @@ -49,3 +49,5 @@ class crm_add_note(osv.osv_memory): return {'type': 'ir.actions.act_window_close'} crm_add_note() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm/wizard/crm_phonecall_to_opportunity.py b/addons/crm/wizard/crm_phonecall_to_opportunity.py index 549afa0559b..ffab1867ebb 100644 --- a/addons/crm/wizard/crm_phonecall_to_opportunity.py +++ b/addons/crm/wizard/crm_phonecall_to_opportunity.py @@ -127,3 +127,5 @@ class crm_phonecall2opportunity(osv.osv_memory): return res crm_phonecall2opportunity() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm_fundraising/crm_fundraising.py b/addons/crm_fundraising/crm_fundraising.py index 07ba7460dec..37c5bb8ccee 100644 --- a/addons/crm_fundraising/crm_fundraising.py +++ b/addons/crm_fundraising/crm_fundraising.py @@ -112,3 +112,5 @@ class crm_fundraising(crm.crm_case, osv.osv): } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm_partner_assign/__init__.py b/addons/crm_partner_assign/__init__.py index 3bb196d3193..8d4bf993aff 100644 --- a/addons/crm_partner_assign/__init__.py +++ b/addons/crm_partner_assign/__init__.py @@ -22,3 +22,5 @@ import partner_geo_assign import wizard import report + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm_partner_assign/__openerp__.py b/addons/crm_partner_assign/__openerp__.py index 9e72204e31d..a38da8a665a 100644 --- a/addons/crm_partner_assign/__openerp__.py +++ b/addons/crm_partner_assign/__openerp__.py @@ -52,3 +52,5 @@ You can also use the geolocalization without using the GPS coordinates. 'certificate': '00503409558942442061', 'images': ['images/partner_geo_localization.jpeg','images/partner_grade.jpeg'], } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm_partner_assign/partner_geo_assign.py b/addons/crm_partner_assign/partner_geo_assign.py index 2b67f80c066..401d09146ae 100644 --- a/addons/crm_partner_assign/partner_geo_assign.py +++ b/addons/crm_partner_assign/partner_geo_assign.py @@ -181,3 +181,5 @@ class crm_lead(osv.osv): return ok crm_lead() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm_partner_assign/report/__init__.py b/addons/crm_partner_assign/report/__init__.py index a211aeede1e..45065314b25 100644 --- a/addons/crm_partner_assign/report/__init__.py +++ b/addons/crm_partner_assign/report/__init__.py @@ -22,3 +22,5 @@ import crm_lead_report import crm_partner_report + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm_partner_assign/report/crm_partner_report.py b/addons/crm_partner_assign/report/crm_partner_report.py index 10e74a34b76..c5afe9b5b82 100644 --- a/addons/crm_partner_assign/report/crm_partner_report.py +++ b/addons/crm_partner_assign/report/crm_partner_report.py @@ -61,3 +61,5 @@ class crm_partner_report_assign(osv.osv): )""") crm_partner_report_assign() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm_partner_assign/wizard/__init__.py b/addons/crm_partner_assign/wizard/__init__.py index be6c1533722..b6bda71deaf 100644 --- a/addons/crm_partner_assign/wizard/__init__.py +++ b/addons/crm_partner_assign/wizard/__init__.py @@ -21,3 +21,5 @@ import crm_forward_to_partner import crm_merge_opportunity + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm_partner_assign/wizard/crm_merge_opportunity.py b/addons/crm_partner_assign/wizard/crm_merge_opportunity.py index 3993a5df066..3c56fada5a1 100644 --- a/addons/crm_partner_assign/wizard/crm_merge_opportunity.py +++ b/addons/crm_partner_assign/wizard/crm_merge_opportunity.py @@ -40,3 +40,5 @@ class crm_merge_opportunity_assign_partner(osv.osv_memory): return data crm_merge_opportunity_assign_partner() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm_todo/__init__.py b/addons/crm_todo/__init__.py index 891c71db7ff..528f4b2d439 100644 --- a/addons/crm_todo/__init__.py +++ b/addons/crm_todo/__init__.py @@ -20,3 +20,5 @@ ############################################################################## import crm_todo + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm_todo/__openerp__.py b/addons/crm_todo/__openerp__.py index 9a57a24cf27..3b870153347 100644 --- a/addons/crm_todo/__openerp__.py +++ b/addons/crm_todo/__openerp__.py @@ -39,3 +39,5 @@ Todo list for CRM leads and opportunities. 'installable': True, 'active': False, } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm_todo/crm_todo.py b/addons/crm_todo/crm_todo.py index ba7445ecef1..b1f6aa05af0 100644 --- a/addons/crm_todo/crm_todo.py +++ b/addons/crm_todo/crm_todo.py @@ -35,3 +35,5 @@ class crm_todo(osv.osv): + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/decimal_precision/__init__.py b/addons/decimal_precision/__init__.py index 708ad26bbe1..ea6c1b4d1ca 100644 --- a/addons/decimal_precision/__init__.py +++ b/addons/decimal_precision/__init__.py @@ -22,3 +22,5 @@ #import decimal_precision from decimal_precision import get_precision + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/decimal_precision/__openerp__.py b/addons/decimal_precision/__openerp__.py index b8ac25eb379..91e7ce57029 100644 --- a/addons/decimal_precision/__openerp__.py +++ b/addons/decimal_precision/__openerp__.py @@ -44,3 +44,5 @@ The decimal precision is configured per company. } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document/dict_tools.py b/addons/document/dict_tools.py index 10d2fdc69f3..e117b429f83 100644 --- a/addons/document/dict_tools.py +++ b/addons/document/dict_tools.py @@ -55,3 +55,5 @@ def dict_filter(srcdic, keys, res=None): return res #eof + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document/directory_content.py b/addons/document/directory_content.py index e690e50d4b4..5b8ec3ddd93 100644 --- a/addons/document/directory_content.py +++ b/addons/document/directory_content.py @@ -120,4 +120,5 @@ class document_directory_content(osv.osv): return pdf document_directory_content() -#eof \ No newline at end of file +#eof +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document/directory_report.py b/addons/document/directory_report.py index 2726fcd5462..202725a1d3f 100644 --- a/addons/document/directory_report.py +++ b/addons/document/directory_report.py @@ -60,3 +60,5 @@ class ir_action_report_xml(osv.osv): } ir_action_report_xml() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document/document.py b/addons/document/document.py index 774c4e53a80..1bf177f50e6 100644 --- a/addons/document/document.py +++ b/addons/document/document.py @@ -349,3 +349,5 @@ class document_file(osv.osv): document_file() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document/document_directory.py b/addons/document/document_directory.py index 2a3f54f53ba..d09d2cc86d5 100644 --- a/addons/document/document_directory.py +++ b/addons/document/document_directory.py @@ -307,3 +307,5 @@ class document_directory_node(osv.osv): 'directory_id': fields.many2one('document.directory', 'Document directory', ondelete="set null"), } document_directory_node() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document/document_storage.py b/addons/document/document_storage.py index b61b7fd65fc..fe757e7876d 100644 --- a/addons/document/document_storage.py +++ b/addons/document/document_storage.py @@ -786,3 +786,5 @@ document_storage() #eof + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document/nodes.py b/addons/document/nodes.py index 0c4194847c1..ee89f3d4c6c 100644 --- a/addons/document/nodes.py +++ b/addons/document/nodes.py @@ -1557,4 +1557,5 @@ class nodefd_static(StringIO, node_descriptor): cr.close() StringIO.close(self) -#eof \ No newline at end of file +#eof +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document/report/__init__.py b/addons/document/report/__init__.py index bfdeacdaae8..6fa6327414b 100644 --- a/addons/document/report/__init__.py +++ b/addons/document/report/__init__.py @@ -18,4 +18,5 @@ # along with this program. If not, see . # ############################################################################## -import document_report \ No newline at end of file +import document_report +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document/std_index.py b/addons/document/std_index.py index 4f939aab4df..fe42cfb1795 100644 --- a/addons/document/std_index.py +++ b/addons/document/std_index.py @@ -209,3 +209,5 @@ cntIndex.register(OpenDoc()) #eof + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document/test_cindex.py b/addons/document/test_cindex.py index 05101a7a491..a257c2c43a5 100755 --- a/addons/document/test_cindex.py +++ b/addons/document/test_cindex.py @@ -51,3 +51,5 @@ for fname in args: print "Keyboard interrupt" #eof + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document/wizard/__init__.py b/addons/document/wizard/__init__.py index b143b583426..c4decc58fba 100644 --- a/addons/document/wizard/__init__.py +++ b/addons/document/wizard/__init__.py @@ -19,3 +19,5 @@ # ############################################################################## import document_configuration + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document/wizard/document_configuration.py b/addons/document/wizard/document_configuration.py index 97eda4e2d62..6a69e638b4e 100644 --- a/addons/document/wizard/document_configuration.py +++ b/addons/document/wizard/document_configuration.py @@ -110,3 +110,5 @@ class document_configuration(osv.osv_memory): 'ressource_tree': 1 }) document_configuration() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document_ftp/test_easyftp.py b/addons/document_ftp/test_easyftp.py index 74890b1a333..16bace4b167 100644 --- a/addons/document_ftp/test_easyftp.py +++ b/addons/document_ftp/test_easyftp.py @@ -68,3 +68,5 @@ def get_ftp_fulldata(ftp, fname, limit=8192): return ''.join(data) #eof + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document_ftp/wizard/ftp_browse.py b/addons/document_ftp/wizard/ftp_browse.py index 6e182082aeb..e8f127c3c3b 100644 --- a/addons/document_ftp/wizard/ftp_browse.py +++ b/addons/document_ftp/wizard/ftp_browse.py @@ -61,3 +61,5 @@ class document_ftp_browse(osv.osv_memory): } document_ftp_browse() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document_ftp/wizard/ftp_configuration.py b/addons/document_ftp/wizard/ftp_configuration.py index 0ae133bb92a..5da2ddf11e8 100644 --- a/addons/document_ftp/wizard/ftp_configuration.py +++ b/addons/document_ftp/wizard/ftp_configuration.py @@ -48,3 +48,5 @@ class document_ftp_configuration(osv.osv_memory): {'url': 'ftp://'+(conf.host or 'localhost:8021')+'/' + cr.dbname+'/'}) document_ftp_configuration() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document_webdav/__init__.py b/addons/document_webdav/__init__.py index ac417e18087..7cd1a38fc80 100644 --- a/addons/document_webdav/__init__.py +++ b/addons/document_webdav/__init__.py @@ -24,4 +24,5 @@ import webdav_server import document_webdav -#eof \ No newline at end of file +#eof +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document_webdav/__openerp__.py b/addons/document_webdav/__openerp__.py index 5576c17ba64..303f5c70e2c 100644 --- a/addons/document_webdav/__openerp__.py +++ b/addons/document_webdav/__openerp__.py @@ -72,3 +72,5 @@ which needs explicit configuration in openerp-server.conf, too. "certificate" : "001236490750845657973", 'images': ['images/dav_properties.jpeg','images/directories_structure_principals.jpeg'], } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document_webdav/cache.py b/addons/document_webdav/cache.py index 7f03aa6da13..95ff9d31f62 100644 --- a/addons/document_webdav/cache.py +++ b/addons/document_webdav/cache.py @@ -37,3 +37,5 @@ def memoize(maxsize): return wrapper return decorating_function + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document_webdav/dav_fs.py b/addons/document_webdav/dav_fs.py index c167d90ba42..772b7600f20 100644 --- a/addons/document_webdav/dav_fs.py +++ b/addons/document_webdav/dav_fs.py @@ -1023,3 +1023,5 @@ class openerp_dav_handler(dav_interface): if cr: cr.close() #eof + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document_webdav/document_webdav.py b/addons/document_webdav/document_webdav.py index f5fa7b591d8..da463c9eb1b 100644 --- a/addons/document_webdav/document_webdav.py +++ b/addons/document_webdav/document_webdav.py @@ -127,4 +127,5 @@ class dav_file_property(osv.osv): dav_file_property() -#eof \ No newline at end of file +#eof +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document_webdav/nodes.py b/addons/document_webdav/nodes.py index 5927eade899..d6ceca458cd 100644 --- a/addons/document_webdav/nodes.py +++ b/addons/document_webdav/nodes.py @@ -400,3 +400,5 @@ node_descriptor = nodes.node_descriptor #eof + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document_webdav/redirect.py b/addons/document_webdav/redirect.py index 71af3271ab7..7bc0883f9e8 100644 --- a/addons/document_webdav/redirect.py +++ b/addons/document_webdav/redirect.py @@ -106,3 +106,5 @@ class RedirectHTTPHandler(HttpLogHandler, FixSendError, HttpOptions, HTTPHandler #eof + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document_webdav/test_davclient.py b/addons/document_webdav/test_davclient.py index b4317282c6a..3c20cfed5b8 100755 --- a/addons/document_webdav/test_davclient.py +++ b/addons/document_webdav/test_davclient.py @@ -704,4 +704,5 @@ class DAVClient(object): etag = m.getheader('ETag') return etag or True -#eof \ No newline at end of file +#eof +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document_webdav/webdav.py b/addons/document_webdav/webdav.py index 3a68fb04fed..baa394e94a1 100644 --- a/addons/document_webdav/webdav.py +++ b/addons/document_webdav/webdav.py @@ -341,3 +341,5 @@ def create_prop(self): REPORT.create_prop = create_prop #eof + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document_webdav/webdav_server.py b/addons/document_webdav/webdav_server.py index aeff0a23f25..81435a72137 100644 --- a/addons/document_webdav/webdav_server.py +++ b/addons/document_webdav/webdav_server.py @@ -649,3 +649,5 @@ init_principals_redirect() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/edi/__init__.py b/addons/edi/__init__.py index f0f96a936ec..b4a80c0f1dd 100644 --- a/addons/edi/__init__.py +++ b/addons/edi/__init__.py @@ -32,3 +32,5 @@ except ImportError: """Could not load openerp-web section of EDI, EDI will not behave correctly To fix, launch openerp-web in embedded mode""") + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/edi/controllers/__init__.py b/addons/edi/controllers/__init__.py index 8ee9bae18d9..9f828025b8e 100644 --- a/addons/edi/controllers/__init__.py +++ b/addons/edi/controllers/__init__.py @@ -1 +1,3 @@ import main + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/edi/controllers/main.py b/addons/edi/controllers/main.py index 00787cdc374..83c3a1608e9 100644 --- a/addons/edi/controllers/main.py +++ b/addons/edi/controllers/main.py @@ -82,3 +82,5 @@ class EDI(openerpweb.Controller): return True # + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/edi/edi_service.py b/addons/edi/edi_service.py index 296b3006525..074720a03e9 100644 --- a/addons/edi/edi_service.py +++ b/addons/edi/edi_service.py @@ -67,4 +67,5 @@ class edi(netsvc.ExportService): fn = getattr(self, 'exp_'+method) return fn(*params) -edi() \ No newline at end of file +edi() +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/edi/models/__init__.py b/addons/edi/models/__init__.py index cf8c0ff2eb0..88259611c6c 100644 --- a/addons/edi/models/__init__.py +++ b/addons/edi/models/__init__.py @@ -22,4 +22,5 @@ import edi import res_partner import res_company -import res_currency \ No newline at end of file +import res_currency +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/edi/models/res_company.py b/addons/edi/models/res_company.py index 665dfb9487d..cf5efe997e0 100644 --- a/addons/edi/models/res_company.py +++ b/addons/edi/models/res_company.py @@ -56,3 +56,5 @@ class res_company(osv.osv): res_partner_bank.browse(cr, uid, bank_ids, context=context), context=context) return result + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/edi/models/res_currency.py b/addons/edi/models/res_currency.py index d057f4e5bbc..4c16150a3a7 100644 --- a/addons/edi/models/res_currency.py +++ b/addons/edi/models/res_currency.py @@ -61,4 +61,5 @@ class res_currency(osv.osv, EDIMixin): if rate: self.pool.get('res.currency.rate').create(cr, SUPERUSER_ID, {'currency_id': currency_id, 'rate': rate}, context=context) - return currency_id \ No newline at end of file + return currency_id +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/edi/models/res_partner.py b/addons/edi/models/res_partner.py index 18ec01eb765..7c40a5c7354 100644 --- a/addons/edi/models/res_partner.py +++ b/addons/edi/models/res_partner.py @@ -101,4 +101,5 @@ class res_partner_address(osv.osv, EDIMixin): logging.getLogger('edi.res_partner').warning('Failed to import bank account using' 'bank type: %s, ignoring', import_ctx['default_state'], exc_info=True) - return address_id \ No newline at end of file + return address_id +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/email_template/html2text.py b/addons/email_template/html2text.py index 2479843777a..745381850e3 100755 --- a/addons/email_template/html2text.py +++ b/addons/email_template/html2text.py @@ -453,3 +453,5 @@ if __name__ == "__main__": data = sys.stdin.read().decode('utf8') wrapwrite(html2text(data, baseurl)) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/email_template/res_partner.py b/addons/email_template/res_partner.py index 74d8b4e0693..a175323cf3e 100644 --- a/addons/email_template/res_partner.py +++ b/addons/email_template/res_partner.py @@ -34,4 +34,5 @@ class res_partner(osv.osv): _defaults = { 'opt_out': False, - } \ No newline at end of file + } +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/email_template/wizard/__init__.py b/addons/email_template/wizard/__init__.py index b9ac29ec4c2..c979c90acd0 100644 --- a/addons/email_template/wizard/__init__.py +++ b/addons/email_template/wizard/__init__.py @@ -22,3 +22,5 @@ import email_template_preview import mail_compose_message + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/fetchmail/__init__.py b/addons/fetchmail/__init__.py index f9c384ce103..934df9846dd 100644 --- a/addons/fetchmail/__init__.py +++ b/addons/fetchmail/__init__.py @@ -21,3 +21,5 @@ ############################################################################## import fetchmail + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/fetchmail/__openerp__.py b/addons/fetchmail/__openerp__.py index ae082aacacd..b50c33b2394 100644 --- a/addons/fetchmail/__openerp__.py +++ b/addons/fetchmail/__openerp__.py @@ -74,3 +74,5 @@ mail. 'certificate' : '00692978332890137453', 'images': ['images/1_email_servers.jpeg'], } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/fetchmail_crm/__init__.py b/addons/fetchmail_crm/__init__.py index 5831b3284bb..b5b36afb7e9 100644 --- a/addons/fetchmail_crm/__init__.py +++ b/addons/fetchmail_crm/__init__.py @@ -18,3 +18,5 @@ # along with this program. If not, see . # ############################################################################## + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/fetchmail_crm/__openerp__.py b/addons/fetchmail_crm/__openerp__.py index 66cff346d0a..671aad4a871 100644 --- a/addons/fetchmail_crm/__openerp__.py +++ b/addons/fetchmail_crm/__openerp__.py @@ -37,3 +37,5 @@ 'installable': True, 'active': False, } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/fetchmail_crm_claim/__init__.py b/addons/fetchmail_crm_claim/__init__.py index 5831b3284bb..b5b36afb7e9 100644 --- a/addons/fetchmail_crm_claim/__init__.py +++ b/addons/fetchmail_crm_claim/__init__.py @@ -18,3 +18,5 @@ # along with this program. If not, see . # ############################################################################## + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/fetchmail_crm_claim/__openerp__.py b/addons/fetchmail_crm_claim/__openerp__.py index cfe6a675d20..6b4a346ed51 100644 --- a/addons/fetchmail_crm_claim/__openerp__.py +++ b/addons/fetchmail_crm_claim/__openerp__.py @@ -37,3 +37,5 @@ 'installable': True, 'active': False, } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/fetchmail_hr_recruitment/__init__.py b/addons/fetchmail_hr_recruitment/__init__.py index 5831b3284bb..b5b36afb7e9 100644 --- a/addons/fetchmail_hr_recruitment/__init__.py +++ b/addons/fetchmail_hr_recruitment/__init__.py @@ -18,3 +18,5 @@ # along with this program. If not, see . # ############################################################################## + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/fetchmail_hr_recruitment/__openerp__.py b/addons/fetchmail_hr_recruitment/__openerp__.py index 75531097645..0925f2cbcc9 100644 --- a/addons/fetchmail_hr_recruitment/__openerp__.py +++ b/addons/fetchmail_hr_recruitment/__openerp__.py @@ -37,3 +37,5 @@ 'installable': True, 'active': False, } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/fetchmail_project_issue/__init__.py b/addons/fetchmail_project_issue/__init__.py index 5831b3284bb..b5b36afb7e9 100644 --- a/addons/fetchmail_project_issue/__init__.py +++ b/addons/fetchmail_project_issue/__init__.py @@ -18,3 +18,5 @@ # along with this program. If not, see . # ############################################################################## + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/fetchmail_project_issue/__openerp__.py b/addons/fetchmail_project_issue/__openerp__.py index 1165949108a..ca42ed6faaf 100644 --- a/addons/fetchmail_project_issue/__openerp__.py +++ b/addons/fetchmail_project_issue/__openerp__.py @@ -37,3 +37,5 @@ 'installable': True, 'active': False, } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_holidays/report/available_holidays.py b/addons/hr_holidays/report/available_holidays.py index 26c654db9dd..cb3a89eeb3e 100644 --- a/addons/hr_holidays/report/available_holidays.py +++ b/addons/hr_holidays/report/available_holidays.py @@ -19,3 +19,5 @@ # ############################################################################## + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_timesheet/report/__init__.py b/addons/hr_timesheet/report/__init__.py index 98e34ed92d4..8304c90421d 100644 --- a/addons/hr_timesheet/report/__init__.py +++ b/addons/hr_timesheet/report/__init__.py @@ -22,3 +22,5 @@ import user_timesheet import users_timesheet + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_timesheet/report/user_timesheet.py b/addons/hr_timesheet/report/user_timesheet.py index 533989210d6..7699f94f41b 100644 --- a/addons/hr_timesheet/report/user_timesheet.py +++ b/addons/hr_timesheet/report/user_timesheet.py @@ -118,3 +118,5 @@ class report_custom(report_rml): report_custom('report.hr.analytical.timesheet', 'hr.employee', '', 'addons/hr_timesheet/report/user_timesheet.xsl') + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report.py b/addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report.py index eb1437534d4..6b6dd9f6e52 100644 --- a/addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report.py +++ b/addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report.py @@ -217,3 +217,5 @@ class report_timesheet_invoice(osv.osv): """) report_timesheet_invoice() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_timesheet_sheet/report/hr_timesheet_report.py b/addons/hr_timesheet_sheet/report/hr_timesheet_report.py index d20ad3a5f4c..49b18f75e4b 100644 --- a/addons/hr_timesheet_sheet/report/hr_timesheet_report.py +++ b/addons/hr_timesheet_sheet/report/hr_timesheet_report.py @@ -80,3 +80,5 @@ class hr_timesheet_report(osv.osv): ) """) hr_timesheet_report() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_timesheet_sheet/report/timesheet_report.py b/addons/hr_timesheet_sheet/report/timesheet_report.py index a8c0440a053..986beb453eb 100644 --- a/addons/hr_timesheet_sheet/report/timesheet_report.py +++ b/addons/hr_timesheet_sheet/report/timesheet_report.py @@ -120,3 +120,5 @@ class timesheet_report(osv.osv): ) """) timesheet_report() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/html_view/__init__.py b/addons/html_view/__init__.py index 465ad75ffe0..e6e7c0728d4 100644 --- a/addons/html_view/__init__.py +++ b/addons/html_view/__init__.py @@ -1 +1,2 @@ -import html_view \ No newline at end of file +import html_view +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/html_view/html_view.py b/addons/html_view/html_view.py index 79f4bd7d0b9..0c89b36f5b5 100644 --- a/addons/html_view/html_view.py +++ b/addons/html_view/html_view.py @@ -10,4 +10,5 @@ class html_view(osv.osv): 'bank_ids': fields.one2many('res.partner.bank', 'partner_id', 'Banks'), } -html_view() \ No newline at end of file +html_view() +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/import_base/__init__.py b/addons/import_base/__init__.py index 0a5d7fb20b7..6df3448e787 100644 --- a/addons/import_base/__init__.py +++ b/addons/import_base/__init__.py @@ -20,4 +20,5 @@ ############################################################################## import import_framework -import mapper \ No newline at end of file +import mapper +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/import_base/__openerp__.py b/addons/import_base/__openerp__.py index 6d4f4374dfe..0f65cf166b6 100644 --- a/addons/import_base/__openerp__.py +++ b/addons/import_base/__openerp__.py @@ -37,3 +37,5 @@ 'installable': True, 'active': False, } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/import_base/import_framework.py b/addons/import_base/import_framework.py index 1f627d2ad58..ecc5f54e461 100644 --- a/addons/import_base/import_framework.py +++ b/addons/import_base/import_framework.py @@ -498,3 +498,5 @@ class import_framework(Thread): def intialize_test(self): pass + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/import_base/mapper.py b/addons/import_base/mapper.py index 0827509ffab..d68447ad3dd 100644 --- a/addons/import_base/mapper.py +++ b/addons/import_base/mapper.py @@ -167,3 +167,5 @@ class call(mapper): else: args.append(arg) return self.fun(external_values, *args) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/import_google/wizard/google_import_message.py b/addons/import_google/wizard/google_import_message.py index 5e2b2b6f4b1..bba58cd2250 100644 --- a/addons/import_google/wizard/google_import_message.py +++ b/addons/import_google/wizard/google_import_message.py @@ -40,3 +40,5 @@ class google_import_message(osv.osv): return res google_import_message() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/import_google/wizard/import_google.py b/addons/import_google/wizard/import_google.py index 87155c806c6..936a6d17649 100644 --- a/addons/import_google/wizard/import_google.py +++ b/addons/import_google/wizard/import_google.py @@ -353,3 +353,5 @@ class google_import(import_framework): } } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/import_sugarcrm/__init__.py b/addons/import_sugarcrm/__init__.py index 250589105b0..8fdd9aec302 100644 --- a/addons/import_sugarcrm/__init__.py +++ b/addons/import_sugarcrm/__init__.py @@ -23,3 +23,5 @@ import import_sugarcrm import sugar import wizard + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/import_sugarcrm/import_sugarcrm.py b/addons/import_sugarcrm/import_sugarcrm.py index d5f487c5377..b3908be0050 100644 --- a/addons/import_sugarcrm/import_sugarcrm.py +++ b/addons/import_sugarcrm/import_sugarcrm.py @@ -1147,3 +1147,5 @@ class import_sugarcrm(osv.osv): } import_sugarcrm() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/import_sugarcrm/sugar.py b/addons/import_sugarcrm/sugar.py index 4ce5e0048ea..35103a41173 100644 --- a/addons/import_sugarcrm/sugar.py +++ b/addons/import_sugarcrm/sugar.py @@ -176,3 +176,5 @@ def search(portType, sessionid, module_name, offset, max_results, query=None, or ans_list.append(ans_dir) #end for return ans_list + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/import_sugarcrm/sugarsoap_services.py b/addons/import_sugarcrm/sugarsoap_services.py index a80102e5081..b42eb4041c1 100644 --- a/addons/import_sugarcrm/sugarsoap_services.py +++ b/addons/import_sugarcrm/sugarsoap_services.py @@ -1418,3 +1418,5 @@ class get_attendee_listResponse: self._return = None return get_attendee_listResponse.typecode.pyclass = get_attendee_listResponse + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/import_sugarcrm/sugarsoap_services_types.py b/addons/import_sugarcrm/sugarsoap_services_types.py index acd22bbb97f..182e9ce4c37 100644 --- a/addons/import_sugarcrm/sugarsoap_services_types.py +++ b/addons/import_sugarcrm/sugarsoap_services_types.py @@ -644,3 +644,5 @@ class ns0: self.pyclass = Holder # end class ns0 (tns: http://www.sugarcrm.com/sugarcrm) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/import_sugarcrm/wizard/__init__.py b/addons/import_sugarcrm/wizard/__init__.py index 6910c3981bd..08b611401b1 100644 --- a/addons/import_sugarcrm/wizard/__init__.py +++ b/addons/import_sugarcrm/wizard/__init__.py @@ -20,3 +20,5 @@ ############################################################################## import import_message + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/import_sugarcrm/wizard/import_message.py b/addons/import_sugarcrm/wizard/import_message.py index 7c9f1703282..1d2e765580b 100644 --- a/addons/import_sugarcrm/wizard/import_message.py +++ b/addons/import_sugarcrm/wizard/import_message.py @@ -27,3 +27,5 @@ class import_message(osv.osv): _description = __doc__ import_message() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_at/__init__.py b/addons/l10n_at/__init__.py index b3516a699d9..329606c4f82 100644 --- a/addons/l10n_at/__init__.py +++ b/addons/l10n_at/__init__.py @@ -19,4 +19,5 @@ # ############################################################################## -import account_wizard \ No newline at end of file +import account_wizard +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_at/__openerp__.py b/addons/l10n_at/__openerp__.py index d28598c1ed2..570841374d8 100644 --- a/addons/l10n_at/__openerp__.py +++ b/addons/l10n_at/__openerp__.py @@ -33,3 +33,5 @@ "installable": True } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_at/account_wizard.py b/addons/l10n_at/account_wizard.py index cf63b2c5dc3..15b0735b9ca 100644 --- a/addons/l10n_at/account_wizard.py +++ b/addons/l10n_at/account_wizard.py @@ -32,3 +32,5 @@ class AccountWizard_cd(osv.osv_memory): AccountWizard_cd() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_be_invoice_bba/__init__.py b/addons/l10n_be_invoice_bba/__init__.py index 176d1b9a904..48cd4bc0347 100644 --- a/addons/l10n_be_invoice_bba/__init__.py +++ b/addons/l10n_be_invoice_bba/__init__.py @@ -22,3 +22,5 @@ import partner import invoice + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_be_invoice_bba/__openerp__.py b/addons/l10n_be_invoice_bba/__openerp__.py index e4b209317d0..c18f49817b5 100644 --- a/addons/l10n_be_invoice_bba/__openerp__.py +++ b/addons/l10n_be_invoice_bba/__openerp__.py @@ -53,3 +53,5 @@ A 'random' Structured Communication will generated if no algorithm is specified ], 'active': False, 'installable': True,} + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_be_invoice_bba/invoice.py b/addons/l10n_be_invoice_bba/invoice.py index 947ccb6f71c..997036c0cec 100644 --- a/addons/l10n_be_invoice_bba/invoice.py +++ b/addons/l10n_be_invoice_bba/invoice.py @@ -215,3 +215,5 @@ class account_invoice(osv.osv): ] account_invoice() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_be_invoice_bba/partner.py b/addons/l10n_be_invoice_bba/partner.py index 194ae39ed86..04a51c3a6ab 100644 --- a/addons/l10n_be_invoice_bba/partner.py +++ b/addons/l10n_be_invoice_bba/partner.py @@ -50,3 +50,5 @@ class res_partner(osv.osv): 'out_inv_comm_type': 'none', } res_partner() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_br/account.py b/addons/l10n_br/account.py index 965ff500829..a2c9f7d75f8 100644 --- a/addons/l10n_br/account.py +++ b/addons/l10n_br/account.py @@ -174,4 +174,5 @@ class wizard_multi_charts_accounts(osv.osv_memory): if tax.tax_code_id: obj_acc_tax.write(cr, uid, tax.id, {'domain': tax.tax_code_id.domain,'tax_discount': tax.tax_code_id.tax_discount}) -wizard_multi_charts_accounts() \ No newline at end of file +wizard_multi_charts_accounts() +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_ch/account_wizard.py b/addons/l10n_ch/account_wizard.py index f9b2600adca..7b80e3697ee 100644 --- a/addons/l10n_ch/account_wizard.py +++ b/addons/l10n_ch/account_wizard.py @@ -42,3 +42,5 @@ class WizardMultiChartsAccounts(osv.osv_memory): WizardMultiChartsAccounts() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_ch/bank.py b/addons/l10n_ch/bank.py index 6b9294bea13..fd69dec625f 100644 --- a/addons/l10n_ch/bank.py +++ b/addons/l10n_ch/bank.py @@ -77,3 +77,5 @@ class ResPartnerBank(osv.osv): 'The BVR adherent number must be unique !')] ResPartnerBank() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_ch/report/__init__.py b/addons/l10n_ch/report/__init__.py index 04cc14f1d80..1839cb9bed0 100644 --- a/addons/l10n_ch/report/__init__.py +++ b/addons/l10n_ch/report/__init__.py @@ -29,4 +29,5 @@ # ############################################################################## -import report_webkit_html \ No newline at end of file +import report_webkit_html +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_ch/report/report_webkit_html.py b/addons/l10n_ch/report/report_webkit_html.py index b551845322f..8b179e7ae58 100644 --- a/addons/l10n_ch/report/report_webkit_html.py +++ b/addons/l10n_ch/report/report_webkit_html.py @@ -322,3 +322,5 @@ BVRWebKitParser('report.invoice_web_bvr', 'account.invoice', 'addons/l10n_ch/report/report_webkit_html.mako', parser=l10n_ch_report_webkit_html) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_ch/wizard/unicode2ascii.py b/addons/l10n_ch/wizard/unicode2ascii.py index 7d95a4ab714..1cec519420c 100644 --- a/addons/l10n_ch/wizard/unicode2ascii.py +++ b/addons/l10n_ch/wizard/unicode2ascii.py @@ -590,3 +590,5 @@ if __name__ == '__main__': if argz: parser.error('Only stdin -> stdout conversion suported') uc_filter(sys.stdin, sys.stdout, bs=optz.bs, in_enc=optz.src_enc, out_enc=optz.dst_enc) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_cr/__init__.py b/addons/l10n_cr/__init__.py index c4c6ee3e380..88b86329a8d 100644 --- a/addons/l10n_cr/__init__.py +++ b/addons/l10n_cr/__init__.py @@ -32,3 +32,5 @@ # ############################################################################## + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_de/__openerp__.py b/addons/l10n_de/__openerp__.py index 8cbdaa3b6ee..646836eba2a 100644 --- a/addons/l10n_de/__openerp__.py +++ b/addons/l10n_de/__openerp__.py @@ -152,3 +152,5 @@ German accounting chart and localization. "certificate": "00517849017945584893", 'images': ['images/config_chart_l10n_de.jpeg','images/l10n_de_chart.jpeg'], } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_ec/__init__.py b/addons/l10n_ec/__init__.py index e59e7efc423..d9537494d6e 100644 --- a/addons/l10n_ec/__init__.py +++ b/addons/l10n_ec/__init__.py @@ -18,3 +18,5 @@ # ############################################################################## + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_ec/__openerp__.py b/addons/l10n_ec/__openerp__.py index 0e93a3ac57b..f3dbf88289b 100644 --- a/addons/l10n_ec/__openerp__.py +++ b/addons/l10n_ec/__openerp__.py @@ -47,3 +47,5 @@ Accounting chart and localization for Ecuador. 'certificate' : '001226484516187330589', 'images': ['images/config_chart_l10n_ec.jpeg','images/l10n_ec_chart.jpeg'], } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_es/__init__.py b/addons/l10n_es/__init__.py index 297d923f6bb..bec854aac95 100644 --- a/addons/l10n_es/__init__.py +++ b/addons/l10n_es/__init__.py @@ -24,3 +24,5 @@ ############################################################################## + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_es/__openerp__.py b/addons/l10n_es/__openerp__.py index 3cdc521ad60..e2f5ad3402d 100644 --- a/addons/l10n_es/__openerp__.py +++ b/addons/l10n_es/__openerp__.py @@ -59,3 +59,5 @@ for yearly account reporting (balance, profit & losses). "certificate" : "00408828172062583229", 'images': ['images/config_chart_l10n_es.jpeg','images/l10n_es_chart.jpeg'], } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_it/__init__.py b/addons/l10n_it/__init__.py index 026004bfa0f..d75c9e75e3f 100644 --- a/addons/l10n_it/__init__.py +++ b/addons/l10n_it/__init__.py @@ -26,3 +26,5 @@ import libroIVA import report + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_it/__openerp__.py b/addons/l10n_it/__openerp__.py index d6138608aa2..e443b71bb4f 100644 --- a/addons/l10n_it/__openerp__.py +++ b/addons/l10n_it/__openerp__.py @@ -60,3 +60,5 @@ Italian accounting chart and localization. 'certificate' : '00926677190009155165', 'images': ['images/config_chart_l10n_it.jpeg','images/l10n_it_chart.jpeg'], } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_it/libroIVA.py b/addons/l10n_it/libroIVA.py index a78c81ffdb3..d8446720c2b 100644 --- a/addons/l10n_it/libroIVA.py +++ b/addons/l10n_it/libroIVA.py @@ -52,3 +52,5 @@ class l10n_chart_it_report_libroIVA (osv.osv): l10n_chart_it_report_libroIVA() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_it/report/__init__.py b/addons/l10n_it/report/__init__.py index be32155c675..0b57a963b2b 100644 --- a/addons/l10n_it/report/__init__.py +++ b/addons/l10n_it/report/__init__.py @@ -1,2 +1,3 @@ import libroIVA_credito -import libroIVA_debito \ No newline at end of file +import libroIVA_debito +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_it/report/libroIVA_credito.py b/addons/l10n_it/report/libroIVA_credito.py index b48c81d2475..9ab4b07f92d 100644 --- a/addons/l10n_it/report/libroIVA_credito.py +++ b/addons/l10n_it/report/libroIVA_credito.py @@ -77,3 +77,5 @@ class l10n_chart_it_report_libroIVA_credito(report_sxw.rml_parse): report_sxw.report_sxw('report.l10n_it.report.libroIVA_credito','account.report_libroiva', 'l10n_it/report/libroIVA_credito.rml', parser=l10n_chart_it_report_libroIVA_credito,header=False) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_it/report/libroIVA_debito.py b/addons/l10n_it/report/libroIVA_debito.py index c7720ab69a1..0a0bd8179c4 100644 --- a/addons/l10n_it/report/libroIVA_debito.py +++ b/addons/l10n_it/report/libroIVA_debito.py @@ -78,3 +78,5 @@ class l10n_chart_it_report_libroIVA_debito(report_sxw.rml_parse): report_sxw.report_sxw('report.l10n_it.report.libroIVA_debito','account.report_libroiva', 'l10n_it/report/libroIVA_debito.rml', parser=l10n_chart_it_report_libroIVA_debito,header=False) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_ma/__init__.py b/addons/l10n_ma/__init__.py index 35aef5a2c44..070b09bdf33 100644 --- a/addons/l10n_ma/__init__.py +++ b/addons/l10n_ma/__init__.py @@ -21,3 +21,5 @@ import l10n_ma import report import wizard + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_ro/res_partner.py b/addons/l10n_ro/res_partner.py index f5521844a49..009aa76b62f 100644 --- a/addons/l10n_ro/res_partner.py +++ b/addons/l10n_ro/res_partner.py @@ -30,3 +30,5 @@ class res_partner(osv.osv): 'nrc' : fields.char('NRC', size=16, help='Registration number at the Registry of Commerce'), } res_partner() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_th/__init__.py b/addons/l10n_th/__init__.py index 45de899ed49..a4a5d907c6b 100644 --- a/addons/l10n_th/__init__.py +++ b/addons/l10n_th/__init__.py @@ -18,3 +18,5 @@ # along with this program. If not, see . # ############################################################################## + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_th/__openerp__.py b/addons/l10n_th/__openerp__.py index 1b2c4771aee..4ab8f7d355c 100644 --- a/addons/l10n_th/__openerp__.py +++ b/addons/l10n_th/__openerp__.py @@ -38,3 +38,5 @@ Thai accounting chart and localization. 'certificate' : '00722263103978957725', 'images': ['images/config_chart_l10n_th.jpeg','images/l10n_th_chart.jpeg'], } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/lunch/report/report_lunch_order.py b/addons/lunch/report/report_lunch_order.py index 05f730db740..7e2b8de9f49 100644 --- a/addons/lunch/report/report_lunch_order.py +++ b/addons/lunch/report/report_lunch_order.py @@ -64,3 +64,5 @@ class report_lunch_order(osv.osv): ) """) report_lunch_order() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/marketing_campaign/marketing_campaign.py b/addons/marketing_campaign/marketing_campaign.py index 547281911c4..82832134c27 100644 --- a/addons/marketing_campaign/marketing_campaign.py +++ b/addons/marketing_campaign/marketing_campaign.py @@ -844,3 +844,5 @@ class report_xml(osv.osv): report_xml() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/marketing_campaign/report/campaign_analysis.py b/addons/marketing_campaign/report/campaign_analysis.py index af04a7e6dff..ebbb6034a1a 100644 --- a/addons/marketing_campaign/report/campaign_analysis.py +++ b/addons/marketing_campaign/report/campaign_analysis.py @@ -99,3 +99,5 @@ class campaign_analysis(osv.osv): ) """) campaign_analysis() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/marketing_campaign_crm_demo/__init__.py b/addons/marketing_campaign_crm_demo/__init__.py index 50a14119520..4c241b72be9 100644 --- a/addons/marketing_campaign_crm_demo/__init__.py +++ b/addons/marketing_campaign_crm_demo/__init__.py @@ -1 +1,3 @@ # Debian packaging removes blank files, so this comment is added. + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp/product.py b/addons/mrp/product.py index 9731d93f84b..c3f9ee855df 100644 --- a/addons/mrp/product.py +++ b/addons/mrp/product.py @@ -66,3 +66,5 @@ class product_product(osv.osv): product_product() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp/report/mrp_production_order.py b/addons/mrp/report/mrp_production_order.py index 4bb525db1ff..d0ff7ba7970 100644 --- a/addons/mrp/report/mrp_production_order.py +++ b/addons/mrp/report/mrp_production_order.py @@ -20,3 +20,5 @@ ############################################################################## + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp/report/price.py b/addons/mrp/report/price.py index a12c580e378..c072b821196 100644 --- a/addons/mrp/report/price.py +++ b/addons/mrp/report/price.py @@ -219,3 +219,5 @@ class report_custom(report_rml): return xml report_custom('report.product.price', 'product.product', '', 'addons/mrp/report/price.xsl') + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/outlook/__init__.py b/addons/outlook/__init__.py index 0190f2f396f..7f5a7a9a9f1 100644 --- a/addons/outlook/__init__.py +++ b/addons/outlook/__init__.py @@ -20,3 +20,5 @@ ############################################################################## import installer + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/outlook/installer.py b/addons/outlook/installer.py index 2be0c243037..061c27da5e5 100644 --- a/addons/outlook/installer.py +++ b/addons/outlook/installer.py @@ -65,3 +65,5 @@ Please refer to the README file for dependencies (external link: openobject-addo """ } outlook_installer() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/outlook/plugin/openerp-outlook-plugin/addin.py b/addons/outlook/plugin/openerp-outlook-plugin/addin.py index 5872ed0291a..c720c5e417d 100644 --- a/addons/outlook/plugin/openerp-outlook-plugin/addin.py +++ b/addons/outlook/plugin/openerp-outlook-plugin/addin.py @@ -297,3 +297,5 @@ if __name__ == '__main__': #mngr = manager.GetManager() #mngr.ShowManager("IDD_MANAGER") + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/outlook/plugin/openerp-outlook-plugin/chilkat.py b/addons/outlook/plugin/openerp-outlook-plugin/chilkat.py index 1afd9f85fdd..3aa329807ef 100644 --- a/addons/outlook/plugin/openerp-outlook-plugin/chilkat.py +++ b/addons/outlook/plugin/openerp-outlook-plugin/chilkat.py @@ -5605,3 +5605,5 @@ CkDirTree_swigregister(CkDirTree) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/outlook/plugin/openerp-outlook-plugin/dialogs/__init__.py b/addons/outlook/plugin/openerp-outlook-plugin/dialogs/__init__.py index 3b3d8973497..a19f2d59cff 100644 --- a/addons/outlook/plugin/openerp-outlook-plugin/dialogs/__init__.py +++ b/addons/outlook/plugin/openerp-outlook-plugin/dialogs/__init__.py @@ -79,3 +79,5 @@ def MakePropertyPage(parent, manager, config, idd, yoffset=24): import dlgutils SetWaitCursor = dlgutils.SetWaitCursor + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/outlook/plugin/openerp-outlook-plugin/dialogs/dialog_map.py b/addons/outlook/plugin/openerp-outlook-plugin/dialogs/dialog_map.py index 87138554e16..8576a3526ff 100644 --- a/addons/outlook/plugin/openerp-outlook-plugin/dialogs/dialog_map.py +++ b/addons/outlook/plugin/openerp-outlook-plugin/dialogs/dialog_map.py @@ -1806,3 +1806,5 @@ dialog_map = { (CommandButtonProcessor, "IDPB_SELECT_STATE IDC_LIST_STATE IDD_SELECT_STATE" , SelectStateFromList,()), ), } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/outlook/plugin/openerp-outlook-plugin/dialogs/dlgcore.py b/addons/outlook/plugin/openerp-outlook-plugin/dialogs/dlgcore.py index efccf4f494e..bce802b5ed1 100644 --- a/addons/outlook/plugin/openerp-outlook-plugin/dialogs/dlgcore.py +++ b/addons/outlook/plugin/openerp-outlook-plugin/dialogs/dlgcore.py @@ -321,3 +321,5 @@ class ProcessorPage(ProcessorDialog): self.template[0][2] = self.template[0][2] & ~(win32con.DS_MODALFRAME|win32con.WS_POPUP|win32con.WS_OVERLAPPED|win32con.WS_CAPTION) self.template[0][2] = self.template[0][2] | win32con.WS_CHILD return win32gui.CreateDialogIndirect(self.hinst, self.template, self.parent, message_map) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/outlook/plugin/openerp-outlook-plugin/dialogs/dlgutils.py b/addons/outlook/plugin/openerp-outlook-plugin/dialogs/dlgutils.py index 8ffc4e62d22..bede3cd63c2 100644 --- a/addons/outlook/plugin/openerp-outlook-plugin/dialogs/dlgutils.py +++ b/addons/outlook/plugin/openerp-outlook-plugin/dialogs/dlgutils.py @@ -16,3 +16,5 @@ def SetWaitCursor(wait): else: hCursor = win32gui.LoadCursor(0, 0) win32gui.SetCursor(hCursor) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/outlook/plugin/openerp-outlook-plugin/dialogs/opt_processors.py b/addons/outlook/plugin/openerp-outlook-plugin/dialogs/opt_processors.py index 7a4970491b0..0a129423e29 100644 --- a/addons/outlook/plugin/openerp-outlook-plugin/dialogs/opt_processors.py +++ b/addons/outlook/plugin/openerp-outlook-plugin/dialogs/opt_processors.py @@ -316,3 +316,5 @@ class ProtocolComboProcessor(ComboProcessor): if sel == -1: win32gui.SendMessage(combo, win32con.CB_SETCURSEL, 1, 0) self.active_control_id = self.control_id + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/outlook/plugin/openerp-outlook-plugin/dialogs/processors.py b/addons/outlook/plugin/openerp-outlook-plugin/dialogs/processors.py index 0b427852c89..34af9e073a4 100644 --- a/addons/outlook/plugin/openerp-outlook-plugin/dialogs/processors.py +++ b/addons/outlook/plugin/openerp-outlook-plugin/dialogs/processors.py @@ -143,3 +143,5 @@ class CommandButtonProcessor(ButtonProcessor): if doc is None: return "" return " ".join(doc.split()) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/outlook/plugin/openerp-outlook-plugin/dialogs/resources/__init__.py b/addons/outlook/plugin/openerp-outlook-plugin/dialogs/resources/__init__.py index abeff9ae69b..cf3e416c209 100644 --- a/addons/outlook/plugin/openerp-outlook-plugin/dialogs/resources/__init__.py +++ b/addons/outlook/plugin/openerp-outlook-plugin/dialogs/resources/__init__.py @@ -28,3 +28,5 @@ def GetImageParamsFromBitmapID(rc_parser, bmpid): filename = os.path.join( os.path.dirname( __file__ ), filename) return 0, filename, win32con.LR_LOADFROMFILE assert 0, "not reached" + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/outlook/plugin/openerp-outlook-plugin/dialogs/resources/dialogs.py b/addons/outlook/plugin/openerp-outlook-plugin/dialogs/resources/dialogs.py index aa417b2cd59..e1e8bac21d7 100644 --- a/addons/outlook/plugin/openerp-outlook-plugin/dialogs/resources/dialogs.py +++ b/addons/outlook/plugin/openerp-outlook-plugin/dialogs/resources/dialogs.py @@ -9,3 +9,5 @@ class FakeParser: bitmaps = {'IDB_OPENERPLOGO': 'OpenERP_Logo.bmp'} def ParseDialogs(s): return FakeParser() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/outlook/plugin/openerp-outlook-plugin/dialogs/resources/rc2py.py b/addons/outlook/plugin/openerp-outlook-plugin/dialogs/resources/rc2py.py index d944fc2dd99..68d62fc7060 100644 --- a/addons/outlook/plugin/openerp-outlook-plugin/dialogs/resources/rc2py.py +++ b/addons/outlook/plugin/openerp-outlook-plugin/dialogs/resources/rc2py.py @@ -37,3 +37,5 @@ if __name__=="__main__": convert(sys.argv[1], sys.argv[2]) else: convert() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/outlook/plugin/openerp-outlook-plugin/dialogs/resources/rcparser.py b/addons/outlook/plugin/openerp-outlook-plugin/dialogs/resources/rcparser.py index 0b05af3f0be..ed20f80e3d4 100644 --- a/addons/outlook/plugin/openerp-outlook-plugin/dialogs/resources/rcparser.py +++ b/addons/outlook/plugin/openerp-outlook-plugin/dialogs/resources/rcparser.py @@ -375,3 +375,5 @@ if __name__=='__main__': print "Dialog %s (%d controls)" % (id, len(ddef)) pprint.pprint(ddef) print + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/outlook/plugin/openerp-outlook-plugin/eml.py b/addons/outlook/plugin/openerp-outlook-plugin/eml.py index fe455c91117..f2cd192230a 100644 --- a/addons/outlook/plugin/openerp-outlook-plugin/eml.py +++ b/addons/outlook/plugin/openerp-outlook-plugin/eml.py @@ -90,4 +90,5 @@ def generateEML(mail): if (success == False): print cemail.lastErrorText() sys.exit() - return new_mail, eml_path \ No newline at end of file + return new_mail, eml_path +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/outlook/plugin/openerp-outlook-plugin/manager.py b/addons/outlook/plugin/openerp-outlook-plugin/manager.py index 0c7e0e640fe..643a5c40e58 100644 --- a/addons/outlook/plugin/openerp-outlook-plugin/manager.py +++ b/addons/outlook/plugin/openerp-outlook-plugin/manager.py @@ -191,3 +191,5 @@ if __name__=='__main__': else: usage() sys.exit(main(verbose)) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/outlook/plugin/openerp-outlook-plugin/tiny_xmlrpc.py b/addons/outlook/plugin/openerp-outlook-plugin/tiny_xmlrpc.py index 41346fe7cf9..9cbcb14d40e 100644 --- a/addons/outlook/plugin/openerp-outlook-plugin/tiny_xmlrpc.py +++ b/addons/outlook/plugin/openerp-outlook-plugin/tiny_xmlrpc.py @@ -569,3 +569,5 @@ class XMLRpcConn(object): name = ustr(rec['name']) res.append((obj,rec['id'],name,obj)) return res + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/pad/__init__.py b/addons/pad/__init__.py index 445f0f9dd9f..663cac2cbf0 100644 --- a/addons/pad/__init__.py +++ b/addons/pad/__init__.py @@ -1,3 +1,5 @@ # -*- coding: utf-8 -*- import res_company import ir_attachment + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/pad/__openerp__.py b/addons/pad/__openerp__.py index 1abf8f0ebfa..9630e74c27a 100644 --- a/addons/pad/__openerp__.py +++ b/addons/pad/__openerp__.py @@ -27,3 +27,5 @@ Lets the company customize which Pad installation should be used to link to new ], 'images': ['static/src/img/pad_link_companies.jpeg'], } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/pad/ir_attachment.py b/addons/pad/ir_attachment.py index efcf1817289..ba8c88632dd 100644 --- a/addons/pad/ir_attachment.py +++ b/addons/pad/ir_attachment.py @@ -33,3 +33,5 @@ class ir_attachment(osv.osv): 'url' : url, }) return url + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/pad/res_company.py b/addons/pad/res_company.py index fe822e213c2..0c1dc7c4929 100644 --- a/addons/pad/res_company.py +++ b/addons/pad/res_company.py @@ -11,3 +11,5 @@ class company_pad(osv.osv): 'pad_url_template': 'http://ietherpad.com/%(db)s-%(model)s-%(id)d-%(salt)s-%(name)s' } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index bccb8d7fb1f..b19405bd43f 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -698,3 +698,5 @@ class product_product(osv.osv): } product_product() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/point_of_sale/wizard/pos_box_entries.py b/addons/point_of_sale/wizard/pos_box_entries.py index 0c48aff736f..8313b345834 100644 --- a/addons/point_of_sale/wizard/pos_box_entries.py +++ b/addons/point_of_sale/wizard/pos_box_entries.py @@ -125,3 +125,5 @@ class pos_box_entries(osv.osv_memory): pos_box_entries() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/point_of_sale/wizard/pos_box_out.py b/addons/point_of_sale/wizard/pos_box_out.py index b4298745c35..46f710c7882 100644 --- a/addons/point_of_sale/wizard/pos_box_out.py +++ b/addons/point_of_sale/wizard/pos_box_out.py @@ -110,3 +110,5 @@ class pos_box_out(osv.osv_memory): pos_box_out() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/point_of_sale/wizard/pos_payment.py b/addons/point_of_sale/wizard/pos_payment.py index adf59e3cbce..3a50ac0f7c9 100644 --- a/addons/point_of_sale/wizard/pos_payment.py +++ b/addons/point_of_sale/wizard/pos_payment.py @@ -101,3 +101,5 @@ class pos_make_payment(osv.osv_memory): pos_make_payment() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/point_of_sale/wizard/pos_payment_report_user.py b/addons/point_of_sale/wizard/pos_payment_report_user.py index 02db921618b..05d06f4df29 100644 --- a/addons/point_of_sale/wizard/pos_payment_report_user.py +++ b/addons/point_of_sale/wizard/pos_payment_report_user.py @@ -51,3 +51,5 @@ class pos_payment_report_user(osv.osv_memory): pos_payment_report_user() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/point_of_sale/wizard/pos_receipt.py b/addons/point_of_sale/wizard/pos_receipt.py index 71efee85b7c..f4feee85504 100644 --- a/addons/point_of_sale/wizard/pos_receipt.py +++ b/addons/point_of_sale/wizard/pos_receipt.py @@ -56,3 +56,5 @@ class pos_receipt(osv.osv_memory): } pos_receipt() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/portal/__init__.py b/addons/portal/__init__.py index 89397d2eab5..b35d11bac45 100644 --- a/addons/portal/__init__.py +++ b/addons/portal/__init__.py @@ -24,3 +24,5 @@ import wizard import res_user import ir_ui_menu + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/portal/ir_ui_menu.py b/addons/portal/ir_ui_menu.py index a4fe364a4fd..c8f59ca8bd1 100644 --- a/addons/portal/ir_ui_menu.py +++ b/addons/portal/ir_ui_menu.py @@ -56,3 +56,5 @@ class portal_menu(osv.osv): portal_menu() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/portal/portal.py b/addons/portal/portal.py index 1c7f84c363a..de39944e69f 100644 --- a/addons/portal/portal.py +++ b/addons/portal/portal.py @@ -226,3 +226,5 @@ portal_widget() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/portal/res_user.py b/addons/portal/res_user.py index 2f32a65b761..127c3079b29 100644 --- a/addons/portal/res_user.py +++ b/addons/portal/res_user.py @@ -32,3 +32,5 @@ class res_users(osv.osv): res_users() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/portal/wizard/__init__.py b/addons/portal/wizard/__init__.py index 90b71a62c30..9d52ae0db6d 100644 --- a/addons/portal/wizard/__init__.py +++ b/addons/portal/wizard/__init__.py @@ -22,3 +22,5 @@ import portal_wizard import share_wizard + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/portal/wizard/portal_wizard.py b/addons/portal/wizard/portal_wizard.py index 7157f22f129..706d6fd4a7f 100644 --- a/addons/portal/wizard/portal_wizard.py +++ b/addons/portal/wizard/portal_wizard.py @@ -225,3 +225,5 @@ wizard_user() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/portal/wizard/share_wizard.py b/addons/portal/wizard/share_wizard.py index ab639bdeccc..b5c9d165cc6 100644 --- a/addons/portal/wizard/share_wizard.py +++ b/addons/portal/wizard/share_wizard.py @@ -184,3 +184,5 @@ class share_wizard_portal(osv.osv_memory): share_wizard_portal() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/procurement/__init__.py b/addons/procurement/__init__.py index 3420ef1f75e..cf186f4136f 100644 --- a/addons/procurement/__init__.py +++ b/addons/procurement/__init__.py @@ -22,4 +22,5 @@ import procurement import wizard import schedulers -import company \ No newline at end of file +import company +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project/company.py b/addons/project/company.py index 0967d130737..6400450cd3e 100644 --- a/addons/project/company.py +++ b/addons/project/company.py @@ -33,3 +33,5 @@ class res_company(osv.osv): } res_company() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project/wizard/project_task_delegate.py b/addons/project/wizard/project_task_delegate.py index 0b4457d5e7f..efadc3f124b 100644 --- a/addons/project/wizard/project_task_delegate.py +++ b/addons/project/wizard/project_task_delegate.py @@ -133,3 +133,5 @@ class project_task_delegate(osv.osv_memory): return action project_task_delegate() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project/wizard/project_task_reevaluate.py b/addons/project/wizard/project_task_reevaluate.py index ce3e728a98e..382c9d64361 100644 --- a/addons/project/wizard/project_task_reevaluate.py +++ b/addons/project/wizard/project_task_reevaluate.py @@ -81,3 +81,5 @@ class project_task_reevaluate(osv.osv_memory): task_pool.do_reopen(cr, uid, [task_id], context=context) return {'type': 'ir.actions.act_window_close'} project_task_reevaluate() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project_caldav/__openerp__.py b/addons/project_caldav/__openerp__.py index 37ecbb1c910..6e716a2e9d0 100644 --- a/addons/project_caldav/__openerp__.py +++ b/addons/project_caldav/__openerp__.py @@ -41,3 +41,5 @@ on a remote server. "certificate" : "001114200456808204637", 'images': ['images/project_tasks_caldav.jpeg','images/project_tasks_caldav_attendees.jpeg','images/project_caldav_calendars.jpeg'], } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py index f7e23c29a58..4ab1722336e 100644 --- a/addons/project_long_term/project_long_term.py +++ b/addons/project_long_term/project_long_term.py @@ -270,3 +270,5 @@ class project_task(osv.osv): 'phase_id': fields.many2one('project.phase', 'Project Phase'), } project_task() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project_long_term/wizard/project_compute_phases.py b/addons/project_long_term/wizard/project_compute_phases.py index 57a1b3b6ed3..4a66cecf9cd 100644 --- a/addons/project_long_term/wizard/project_compute_phases.py +++ b/addons/project_long_term/wizard/project_compute_phases.py @@ -72,3 +72,5 @@ class project_compute_phases(osv.osv_memory): return result project_compute_phases() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project_mrp/__init__.py b/addons/project_mrp/__init__.py index 364dec5a437..df4f0fa8a52 100644 --- a/addons/project_mrp/__init__.py +++ b/addons/project_mrp/__init__.py @@ -21,3 +21,5 @@ import project_procurement import project_mrp + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project_scrum/project_scrum.py b/addons/project_scrum/project_scrum.py index f0db98294e7..1ac0871de68 100644 --- a/addons/project_scrum/project_scrum.py +++ b/addons/project_scrum/project_scrum.py @@ -332,3 +332,5 @@ class project_scrum_meeting(osv.osv): project_scrum_meeting() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project_scrum/wizard/project_scrum_email.py b/addons/project_scrum/wizard/project_scrum_email.py index f1d5b6665f7..c61f43e6779 100644 --- a/addons/project_scrum/wizard/project_scrum_email.py +++ b/addons/project_scrum/wizard/project_scrum_email.py @@ -105,3 +105,5 @@ class project_scrum_email(osv.osv_memory): if data.product_owner_email: mail_message.schedule_with_attach(cr, uid, user_email, [data.product_owner_email], data.subject, body, reply_to=user_email, context=context) return {'type': 'ir.actions.act_window_close'} + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/purchase/edi/__init__.py b/addons/purchase/edi/__init__.py index cfac0182d76..75db9cb06b1 100644 --- a/addons/purchase/edi/__init__.py +++ b/addons/purchase/edi/__init__.py @@ -19,4 +19,5 @@ # ############################################################################## -import purchase_order \ No newline at end of file +import purchase_order +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/purchase/report/purchase_report.py b/addons/purchase/report/purchase_report.py index 4c59f9ea002..e3a4a651b7f 100644 --- a/addons/purchase/report/purchase_report.py +++ b/addons/purchase/report/purchase_report.py @@ -143,3 +143,5 @@ class purchase_report(osv.osv): """) purchase_report() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/purchase_double_validation/__openerp__.py b/addons/purchase_double_validation/__openerp__.py index c02da2fc9d7..7bd9df87c8b 100644 --- a/addons/purchase_double_validation/__openerp__.py +++ b/addons/purchase_double_validation/__openerp__.py @@ -47,3 +47,5 @@ that exceeds minimum amount set by configuration wizard. 'certificate' : '00436592682510544157', } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_intrastat/report_intrastat.py b/addons/report_intrastat/report_intrastat.py index a77c4f5d389..ffe90b54d4f 100644 --- a/addons/report_intrastat/report_intrastat.py +++ b/addons/report_intrastat/report_intrastat.py @@ -124,3 +124,5 @@ class report_intrastat(osv.osv): )""") report_intrastat() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_webkit/__init__.py b/addons/report_webkit/__init__.py index a97025f4896..71aff129508 100644 --- a/addons/report_webkit/__init__.py +++ b/addons/report_webkit/__init__.py @@ -34,4 +34,5 @@ import company import report_helper import webkit_report import ir_report -import wizard \ No newline at end of file +import wizard +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_webkit/__openerp__.py b/addons/report_webkit/__openerp__.py index 52f03efaff7..56496a2d130 100644 --- a/addons/report_webkit/__openerp__.py +++ b/addons/report_webkit/__openerp__.py @@ -98,3 +98,5 @@ TODO "certificate" : "001159699313338995949", 'images': ['images/companies_webkit.jpeg','images/header_html.jpeg','images/header_img.jpeg'], } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_webkit/company.py b/addons/report_webkit/company.py index 5b826617417..eaf3c02b50f 100644 --- a/addons/report_webkit/company.py +++ b/addons/report_webkit/company.py @@ -58,3 +58,5 @@ class ResCompany(osv.osv): } ResCompany() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_webkit/header.py b/addons/report_webkit/header.py index 53252c5e245..b052c612445 100644 --- a/addons/report_webkit/header.py +++ b/addons/report_webkit/header.py @@ -99,3 +99,5 @@ class HeaderImage(osv.osv): 'type' : fields.char('Type', size=32, required =True, help="Image type(png,gif,jpeg)") } HeaderImage() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_webkit/ir_report.py b/addons/report_webkit/ir_report.py index bca10b0d1d8..d2709ea6fc2 100644 --- a/addons/report_webkit/ir_report.py +++ b/addons/report_webkit/ir_report.py @@ -136,3 +136,5 @@ class ReportXML(osv.osv): } ReportXML() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_webkit/report_helper.py b/addons/report_webkit/report_helper.py index 2b9d8c93256..321e1261cd8 100644 --- a/addons/report_webkit/report_helper.py +++ b/addons/report_webkit/report_helper.py @@ -79,4 +79,5 @@ class WebKitHelper(object): """Return HTML embedded logo by name""" img, type = self.get_logo_by_name(name) return self.embed_image(type, img, width, height) - \ No newline at end of file + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_webkit/webkit_report.py b/addons/report_webkit/webkit_report.py index 8d6373e412b..7e828403437 100644 --- a/addons/report_webkit/webkit_report.py +++ b/addons/report_webkit/webkit_report.py @@ -329,3 +329,5 @@ class WebKitParser(report_sxw): if not result: return (False,False) return result + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_webkit/wizard/__init__.py b/addons/report_webkit/wizard/__init__.py index f6f7b3c8019..1d19467ac24 100644 --- a/addons/report_webkit/wizard/__init__.py +++ b/addons/report_webkit/wizard/__init__.py @@ -29,4 +29,5 @@ # ############################################################################## -import report_webkit_actions \ No newline at end of file +import report_webkit_actions +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_webkit/wizard/report_webkit_actions.py b/addons/report_webkit/wizard/report_webkit_actions.py index 79426f8d159..bb2c5312441 100644 --- a/addons/report_webkit/wizard/report_webkit_actions.py +++ b/addons/report_webkit/wizard/report_webkit_actions.py @@ -144,3 +144,5 @@ class report_webkit_actions(osv.osv_memory): } report_webkit_actions() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_webkit_sample/__init__.py b/addons/report_webkit_sample/__init__.py index 9b406f754d8..3e7c030e3ed 100644 --- a/addons/report_webkit_sample/__init__.py +++ b/addons/report_webkit_sample/__init__.py @@ -29,4 +29,5 @@ # ############################################################################## import wizard -import report \ No newline at end of file +import report +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_webkit_sample/__openerp__.py b/addons/report_webkit_sample/__openerp__.py index d485692c164..4e144736c24 100644 --- a/addons/report_webkit_sample/__openerp__.py +++ b/addons/report_webkit_sample/__openerp__.py @@ -54,3 +54,5 @@ You have to create the print buttons by calling the wizard. For more details see "certificate" : "00436592682591421981", 'images': ['images/webkit_invoice_report.jpeg'], } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_webkit_sample/report/__init__.py b/addons/report_webkit_sample/report/__init__.py index 04cc14f1d80..1839cb9bed0 100644 --- a/addons/report_webkit_sample/report/__init__.py +++ b/addons/report_webkit_sample/report/__init__.py @@ -29,4 +29,5 @@ # ############################################################################## -import report_webkit_html \ No newline at end of file +import report_webkit_html +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_webkit_sample/report/report_webkit_html.py b/addons/report_webkit_sample/report/report_webkit_html.py index 3e7f70c4154..5da7f008569 100644 --- a/addons/report_webkit_sample/report/report_webkit_html.py +++ b/addons/report_webkit_sample/report/report_webkit_html.py @@ -15,3 +15,5 @@ report_sxw.report_sxw('report.webkitaccount.invoice', 'account.invoice', 'addons/report_webkit_sample/report/report_webkit_html.mako', parser=report_webkit_html) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/resource/faces/observer.py b/addons/resource/faces/observer.py index 411b2c5395b..894345230ea 100644 --- a/addons/resource/faces/observer.py +++ b/addons/resource/faces/observer.py @@ -77,3 +77,5 @@ factories = { } clear_cache_funcs = {} #@-node:@file observer.py #@-leo + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/resource/faces/pcalendar.py b/addons/resource/faces/pcalendar.py index aba9635fc4b..c82c49d4816 100644 --- a/addons/resource/faces/pcalendar.py +++ b/addons/resource/faces/pcalendar.py @@ -949,3 +949,5 @@ if __name__ == '__main__': start3 = cal.StartDate("10.1.2005") #@-node:@file pcalendar.py #@-leo + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/resource/faces/plocale.py b/addons/resource/faces/plocale.py index a9de390b255..61bfa91917b 100644 --- a/addons/resource/faces/plocale.py +++ b/addons/resource/faces/plocale.py @@ -52,3 +52,5 @@ def get_encoding(): if trans: return trans.charset() return locale.getpreferredencoding() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/resource/faces/resource.py b/addons/resource/faces/resource.py index 7cc2741fc8e..3451806444e 100644 --- a/addons/resource/faces/resource.py +++ b/addons/resource/faces/resource.py @@ -864,3 +864,5 @@ class _AndResourceGroup(_ResourceGroup): #@-others #@-node:@file resource.py #@-leo + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/resource/faces/task.py b/addons/resource/faces/task.py index fe90c42d806..f5240112277 100644 --- a/addons/resource/faces/task.py +++ b/addons/resource/faces/task.py @@ -3851,3 +3851,5 @@ class AdjustedProject(_AllocationPoject): """ #@-node:@file task.py #@-leo + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/resource/faces/timescale.py b/addons/resource/faces/timescale.py index 215766eb958..3e7c3c1dc89 100644 --- a/addons/resource/faces/timescale.py +++ b/addons/resource/faces/timescale.py @@ -111,3 +111,5 @@ class TimeScale(object): _default_scale = TimeScale(pcal._default_calendar) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/resource/faces/utils.py b/addons/resource/faces/utils.py index f7d61fb1dc9..54985767613 100644 --- a/addons/resource/faces/utils.py +++ b/addons/resource/faces/utils.py @@ -122,3 +122,5 @@ def progress_end(): + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/sale/edi/__init__.py b/addons/sale/edi/__init__.py index 566b1714ffd..89edae49949 100644 --- a/addons/sale/edi/__init__.py +++ b/addons/sale/edi/__init__.py @@ -19,4 +19,5 @@ # ############################################################################## -import sale_order \ No newline at end of file +import sale_order +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/sale/stock.py b/addons/sale/stock.py index 9043bc9abe9..9e0a47b3ceb 100644 --- a/addons/sale/stock.py +++ b/addons/sale/stock.py @@ -198,3 +198,5 @@ class stock_picking(osv.osv): stock_picking() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/sale_crm/wizard/crm_make_sale.py b/addons/sale_crm/wizard/crm_make_sale.py index d1f6dc98edd..ae0371a15e5 100644 --- a/addons/sale_crm/wizard/crm_make_sale.py +++ b/addons/sale_crm/wizard/crm_make_sale.py @@ -154,3 +154,5 @@ class crm_make_sale(osv.osv_memory): } crm_make_sale() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/sale_journal/__init__.py b/addons/sale_journal/__init__.py index b05803da6c6..2af863efc1b 100644 --- a/addons/sale_journal/__init__.py +++ b/addons/sale_journal/__init__.py @@ -21,3 +21,5 @@ import sale_journal + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/sale_journal/sale_journal.py b/addons/sale_journal/sale_journal.py index 5a2004842cd..edae822e832 100644 --- a/addons/sale_journal/sale_journal.py +++ b/addons/sale_journal/sale_journal.py @@ -85,3 +85,5 @@ class sale(osv.osv): return result sale() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/share/__init__.py b/addons/share/__init__.py index e3c3acf1bc5..0ad202a6162 100644 --- a/addons/share/__init__.py +++ b/addons/share/__init__.py @@ -22,3 +22,5 @@ import ir_model import res_users import wizard + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/share/ir_model.py b/addons/share/ir_model.py index 437a0c51095..067cebf86d5 100644 --- a/addons/share/ir_model.py +++ b/addons/share/ir_model.py @@ -43,4 +43,5 @@ class ir_model_access(osv.osv): a.perm_''' + access_mode, (model_name,)) return [x[0] for x in cr.fetchall()] -ir_model_access() \ No newline at end of file +ir_model_access() +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/share/res_users.py b/addons/share/res_users.py index 07031ab3845..f7a81a24948 100644 --- a/addons/share/res_users.py +++ b/addons/share/res_users.py @@ -37,3 +37,5 @@ class res_users(osv.osv): help="External user with limited access, created only for the purpose of sharing data.") } res_users() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/share/wizard/__init__.py b/addons/share/wizard/__init__.py index 2034dfe2fc6..1dae9e7a508 100644 --- a/addons/share/wizard/__init__.py +++ b/addons/share/wizard/__init__.py @@ -21,3 +21,5 @@ import share_wizard + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/share/wizard/share_wizard.py b/addons/share/wizard/share_wizard.py index 1cd8104100c..5f33f02f9e5 100644 --- a/addons/share/wizard/share_wizard.py +++ b/addons/share/wizard/share_wizard.py @@ -754,3 +754,5 @@ class share_result_line(osv.osv_memory): 'newly_created': True, } share_result_line() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock/__openerp__.py b/addons/stock/__openerp__.py index 73215505177..9608aa9d8ad 100644 --- a/addons/stock/__openerp__.py +++ b/addons/stock/__openerp__.py @@ -91,3 +91,5 @@ Thanks to the double entry management, the inventory controlling is powerful and 'active': False, 'certificate': '0055421559965', } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock/report/__init__.py b/addons/stock/report/__init__.py index 412e77f3f17..e1e083c2a8d 100644 --- a/addons/stock/report/__init__.py +++ b/addons/stock/report/__init__.py @@ -27,3 +27,5 @@ import report_stock_move import stock_inventory_move_report import lot_overview + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock/report/report_stock_move.py b/addons/stock/report/report_stock_move.py index 7bf817811c4..520efc229a0 100644 --- a/addons/stock/report/report_stock_move.py +++ b/addons/stock/report/report_stock_move.py @@ -222,3 +222,5 @@ CREATE OR REPLACE view report_stock_inventory AS ( report_stock_inventory() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock/wizard/stock_change_standard_price.py b/addons/stock/wizard/stock_change_standard_price.py index fa36559dddc..d4ca8d1138f 100644 --- a/addons/stock/wizard/stock_change_standard_price.py +++ b/addons/stock/wizard/stock_change_standard_price.py @@ -117,3 +117,5 @@ class change_standard_price(osv.osv_memory): return {'type': 'ir.actions.act_window_close'} change_standard_price() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock/wizard/stock_move.py b/addons/stock/wizard/stock_move.py index 9ff0c96a3b8..f8ef095fb01 100644 --- a/addons/stock/wizard/stock_move.py +++ b/addons/stock/wizard/stock_move.py @@ -268,3 +268,5 @@ class stock_move_split_lines_exist(osv.osv_memory): loc_id=False, product_id=False, uom_id=False): return self.pool.get('stock.move').onchange_lot_id(cr, uid, [], prodlot_id, product_qty, loc_id, product_id, uom_id) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock/wizard/stock_splitinto.py b/addons/stock/wizard/stock_splitinto.py index 1f48c8cfc19..78396656389 100644 --- a/addons/stock/wizard/stock_splitinto.py +++ b/addons/stock/wizard/stock_splitinto.py @@ -82,3 +82,5 @@ class stock_split_into(osv.osv_memory): return {'type': 'ir.actions.act_window_close'} stock_split_into() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock_location/__openerp__.py b/addons/stock_location/__openerp__.py index 1c4b7841a10..63d145136c5 100644 --- a/addons/stock_location/__openerp__.py +++ b/addons/stock_location/__openerp__.py @@ -102,3 +102,5 @@ You can use the demo data as follow: 'active': False, 'certificate': '0046505115101', } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock_location/procurement_pull.py b/addons/stock_location/procurement_pull.py index 7122e5ccd12..92cee8c166f 100644 --- a/addons/stock_location/procurement_pull.py +++ b/addons/stock_location/procurement_pull.py @@ -121,4 +121,5 @@ class procurement_order(osv.osv): wf_service.trg_validate(uid, 'procurement.order', proc_id, 'button_check', cr) return False -procurement_order() \ No newline at end of file +procurement_order() +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock_planning/wizard/__init__.py b/addons/stock_planning/wizard/__init__.py index 1e9d74d0394..876b4afdf68 100644 --- a/addons/stock_planning/wizard/__init__.py +++ b/addons/stock_planning/wizard/__init__.py @@ -22,3 +22,5 @@ import stock_planning_create_periods import stock_planning_forecast import stock_planning_createlines + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/thunderbird/__init__.py b/addons/thunderbird/__init__.py index 68afc0cccf9..33d232b3f50 100644 --- a/addons/thunderbird/__init__.py +++ b/addons/thunderbird/__init__.py @@ -21,3 +21,5 @@ import partner import installer + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/thunderbird/__openerp__.py b/addons/thunderbird/__openerp__.py index 5b124af05aa..53a704d2f1b 100644 --- a/addons/thunderbird/__openerp__.py +++ b/addons/thunderbird/__openerp__.py @@ -45,3 +45,5 @@ HR Applicant and Project Issue from selected mails. "certificate" : "00899858104035139949", 'images': ['images/config_thunderbird.jpeg','images/config_thunderbird_plugin.jpeg','images/thunderbird_document.jpeg'], } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/thunderbird/installer.py b/addons/thunderbird/installer.py index 35d31b9d636..4cbcec9fff0 100644 --- a/addons/thunderbird/installer.py +++ b/addons/thunderbird/installer.py @@ -68,3 +68,5 @@ Configure OpenERP in Thunderbird: } thunderbird_installer() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/thunderbird/partner/__init__.py b/addons/thunderbird/partner/__init__.py index 8eee7a82e06..5583bc0e78a 100644 --- a/addons/thunderbird/partner/__init__.py +++ b/addons/thunderbird/partner/__init__.py @@ -21,3 +21,5 @@ import partner + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/thunderbird/partner/partner.py b/addons/thunderbird/partner/partner.py index 80a4bfa4d98..3ce48281de7 100644 --- a/addons/thunderbird/partner/partner.py +++ b/addons/thunderbird/partner/partner.py @@ -281,3 +281,5 @@ class thunderbird_partner(osv.osv_memory): return object thunderbird_partner() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/web_livechat/__init__.py b/addons/web_livechat/__init__.py index 9af39b2f58c..761db42923c 100644 --- a/addons/web_livechat/__init__.py +++ b/addons/web_livechat/__init__.py @@ -18,3 +18,5 @@ # ############################################################################## import publisher_warranty + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/web_livechat/__openerp__.py b/addons/web_livechat/__openerp__.py index 750c4ca7ec5..66d365b5636 100644 --- a/addons/web_livechat/__openerp__.py +++ b/addons/web_livechat/__openerp__.py @@ -47,3 +47,5 @@ Add "Support" button in header from where you can access OpenERP Support. 'certificate': '0013762192410413', 'images': ['static/src/img/web_livechat_support.jpeg'], } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/web_livechat/publisher_warranty.py b/addons/web_livechat/publisher_warranty.py index 132e78d013e..b0a7e793ecf 100644 --- a/addons/web_livechat/publisher_warranty.py +++ b/addons/web_livechat/publisher_warranty.py @@ -48,3 +48,5 @@ class publisher_warranty_contract(osv.osv): publisher_warranty_contract() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/web_uservoice/__init__.py b/addons/web_uservoice/__init__.py index b0c3c528f28..ac2fe14a5c1 100644 --- a/addons/web_uservoice/__init__.py +++ b/addons/web_uservoice/__init__.py @@ -18,3 +18,5 @@ # ############################################################################## + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/web_uservoice/__openerp__.py b/addons/web_uservoice/__openerp__.py index 64b443be3e2..41f80d4f7d1 100644 --- a/addons/web_uservoice/__openerp__.py +++ b/addons/web_uservoice/__openerp__.py @@ -44,3 +44,5 @@ Invite OpenERP user feedback, powered by uservoice. ], 'images': ['static/src/img/submit_an_idea.jpeg', 'static/src/img/web_uservoice_feedback.jpeg'], } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/wiki/web/__init__.py b/addons/wiki/web/__init__.py index 5b55f6cf43b..6fb28f7f2ad 100644 --- a/addons/wiki/web/__init__.py +++ b/addons/wiki/web/__init__.py @@ -1,2 +1,4 @@ import widgets import controllers + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/wiki/web/controllers/__init__.py b/addons/wiki/web/controllers/__init__.py index 8c163ddd260..e1edf0f0f96 100644 --- a/addons/wiki/web/controllers/__init__.py +++ b/addons/wiki/web/controllers/__init__.py @@ -1 +1,3 @@ import wiki + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/wiki/web/controllers/wiki.py b/addons/wiki/web/controllers/wiki.py index f4b0527e1e2..2f147827f24 100644 --- a/addons/wiki/web/controllers/wiki.py +++ b/addons/wiki/web/controllers/wiki.py @@ -61,3 +61,5 @@ class WikiView(SecuredController): res, file_name = self.get_attachment(**kws) cherrypy.response.headers['Content-Disposition'] = 'filename="%s"' % (file_name,) return base64.decodestring(res) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/wiki/web/widgets/__init__.py b/addons/wiki/web/widgets/__init__.py index a3caa17e700..4b2c273d02a 100644 --- a/addons/wiki/web/widgets/__init__.py +++ b/addons/wiki/web/widgets/__init__.py @@ -1 +1,3 @@ from wiki import WikiWidget + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/wiki/web/widgets/rss/__init__.py b/addons/wiki/web/widgets/rss/__init__.py index 464c4364414..1696c2f554b 100644 --- a/addons/wiki/web/widgets/rss/__init__.py +++ b/addons/wiki/web/widgets/rss/__init__.py @@ -1 +1,2 @@ -import feedparser \ No newline at end of file +import feedparser +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/wiki/web/widgets/rss/feedparser.py b/addons/wiki/web/widgets/rss/feedparser.py index 6f30574d300..885050d49f8 100755 --- a/addons/wiki/web/widgets/rss/feedparser.py +++ b/addons/wiki/web/widgets/rss/feedparser.py @@ -2856,3 +2856,5 @@ if __name__ == '__main__': # terminology; parse RFC 822-style dates with no time; lots of other # bug fixes #4.1 - MAP - removed socket timeout; added support for chardet library + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/wiki/web/widgets/wiki.py b/addons/wiki/web/widgets/wiki.py index 0f7240f6fcc..ccf2a75899c 100644 --- a/addons/wiki/web/widgets/wiki.py +++ b/addons/wiki/web/widgets/wiki.py @@ -220,3 +220,5 @@ class WikiWidget(Text): self.data = html register_widget(WikiWidget, ["text_wiki"]) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/wiki/web/widgets/wikimarkup/__init__.py b/addons/wiki/web/widgets/wikimarkup/__init__.py index 5eceea0e86d..f5fe67fada1 100644 --- a/addons/wiki/web/widgets/wikimarkup/__init__.py +++ b/addons/wiki/web/widgets/wikimarkup/__init__.py @@ -2142,3 +2142,5 @@ def str2url(str): for i in zip(mfrom, to): str = str.replace(*i) return str + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From a2f4f2669b29e8bce8d9a72b6b6b1167e3906907 Mon Sep 17 00:00:00 2001 From: Numerigraphe - Lionel Sausin Date: Tue, 22 Nov 2011 09:58:48 +0100 Subject: [PATCH 285/711] [IMP] Added missing vim mode lines lp bug: https://launchpad.net/bugs/524279 fixed bzr revid: ls@numerigraphe.fr-20111122085848-1atcrcw8e64altcp --- gunicorn.conf.py | 2 + history/xml2yml.py | 2 + openerp/addons/base/ir/ir_config_parameter.py | 2 + openerp/addons/base/ir/ir_default.py | 2 + openerp/addons/base/ir/ir_values.py | 2 + .../addons/base/ir/osv_memory_autovacuum.py | 2 + .../addons/base/ir/wizard/wizard_screen.py | 3 +- openerp/addons/base/module/__init__.py | 2 + openerp/addons/base/module/module.py | 2 + .../module/wizard/base_import_language.py | 2 + .../base/module/wizard/base_module_scan.py | 3 +- .../base/module/wizard/base_module_upgrade.py | 2 + .../module/wizard/base_update_translations.py | 2 + openerp/addons/base/report/__init__.py | 2 + openerp/addons/base/res/res_bank.py | 2 + openerp/addons/base/res/res_log.py | 2 + openerp/addons/base/res/res_widget.py | 2 + openerp/addons/base/res/test/res_lang.py | 2 + .../res/wizard/partner_wizard_ean_check.py | 3 +- openerp/report/preprocess.py | 2 + openerp/report/pyPdf/__init__.py | 2 + openerp/report/pyPdf/xmp.py | 2 + openerp/report/render/html2html/html2html.py | 2 + .../report/render/makohtml2html/__init__.py | 2 + .../render/makohtml2html/makohtml2html.py | 2 + openerp/report/render/odt2odt/odt2odt.py | 2 + openerp/report/render/rml2pdf/__init__.py | 2 + openerp/report/render/rml2pdf/customfonts.py | 2 + openerp/report/render/rml2pdf/trml2pdf.py | 2 + openerp/report/report_sxw.py | 2 + openerp/run_tests.py | 2 + openerp/service/http_server.py | 2 + openerp/service/netrpc_server.py | 2 + openerp/service/security.py | 2 + openerp/service/websrv_lib.py | 2 + openerp/test/__init__.py | 2 + openerp/test/test_osv.py | 2 + openerp/test/test_translate.py | 2 + openerp/tiny_socket.py | 2 + openerp/tools/amount_to_text_en.py | 2 + openerp/tools/cache.py | 2 + openerp/tools/config.py | 2 + openerp/tools/convert.py | 2 + openerp/tools/copy.py | 2 + openerp/tools/func.py | 2 + openerp/tools/lru.py | 2 + openerp/tools/osutil.py | 2 + openerp/tools/parse_version.py | 2 + openerp/tools/test_config.py | 2 + openerp/tools/test_reports.py | 2 + openerp/tools/which.py | 2 + openerp/tools/yaml_tag.py | 2 + setup.py | 174 +++++++++++------- tests/__init__.py | 2 + tests/common.py | 2 + tests/test_ir_sequence.py | 2 + tests/test_orm.py | 2 + tests/test_xmlrpc.py | 2 + 58 files changed, 222 insertions(+), 69 deletions(-) mode change 100644 => 100755 setup.py diff --git a/gunicorn.conf.py b/gunicorn.conf.py index 7b117c040f6..55adfb55070 100644 --- a/gunicorn.conf.py +++ b/gunicorn.conf.py @@ -15,3 +15,5 @@ conf = openerp.tools.config conf['addons_path'] = '/home/openerp/repos/addons/trunk-xmlrpc' conf['static_http_document_root'] = '/tmp' #conf['log_level'] = 10 # 10 is DEBUG + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/history/xml2yml.py b/history/xml2yml.py index e926ddf5f94..8344d5f81e0 100755 --- a/history/xml2yml.py +++ b/history/xml2yml.py @@ -343,3 +343,5 @@ if __name__=='__main__': p = xml_parse() p.parse(fname) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/addons/base/ir/ir_config_parameter.py b/openerp/addons/base/ir/ir_config_parameter.py index fe8c651621c..f21c2db8d0a 100644 --- a/openerp/addons/base/ir/ir_config_parameter.py +++ b/openerp/addons/base/ir/ir_config_parameter.py @@ -92,3 +92,5 @@ class ir_config_parameter(osv.osv): else: self.create(cr, uid, {'key': key, 'value': value}, context=context) return False + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/addons/base/ir/ir_default.py b/openerp/addons/base/ir/ir_default.py index a51405b32c1..2378551153d 100644 --- a/openerp/addons/base/ir/ir_default.py +++ b/openerp/addons/base/ir/ir_default.py @@ -45,3 +45,5 @@ class ir_default(osv.osv): } ir_default() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/addons/base/ir/ir_values.py b/openerp/addons/base/ir/ir_values.py index 15e8f3bf3ce..3802baecddc 100644 --- a/openerp/addons/base/ir/ir_values.py +++ b/openerp/addons/base/ir/ir_values.py @@ -457,3 +457,5 @@ class ir_values(osv.osv): def do_get(model,res_id): return self.get_actions(cr, uid, action_slot=key2, model=model, res_id=res_id, context=context) return self._map_legacy_model_list(models, do_get, merge_results=True) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/addons/base/ir/osv_memory_autovacuum.py b/openerp/addons/base/ir/osv_memory_autovacuum.py index 975fcd0a403..1b3ca507eb8 100644 --- a/openerp/addons/base/ir/osv_memory_autovacuum.py +++ b/openerp/addons/base/ir/osv_memory_autovacuum.py @@ -31,3 +31,5 @@ class osv_memory_autovacuum(openerp.osv.osv.osv_memory): model._transient_vacuum(cr, uid) return True + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/addons/base/ir/wizard/wizard_screen.py b/openerp/addons/base/ir/wizard/wizard_screen.py index 5762bdc8752..303cd37a6f1 100644 --- a/openerp/addons/base/ir/wizard/wizard_screen.py +++ b/openerp/addons/base/ir/wizard/wizard_screen.py @@ -49,4 +49,5 @@ class wizard_screen(osv.osv_memory): _defaults = { 'config_logo': _get_image } -wizard_screen() \ No newline at end of file +wizard_screen() +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/addons/base/module/__init__.py b/openerp/addons/base/module/__init__.py index 1b7abf2e76e..f92a94f735e 100644 --- a/openerp/addons/base/module/__init__.py +++ b/openerp/addons/base/module/__init__.py @@ -22,3 +22,5 @@ import module import wizard import report + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/addons/base/module/module.py b/openerp/addons/base/module/module.py index 3a6a044832f..8e8181c89a2 100644 --- a/openerp/addons/base/module/module.py +++ b/openerp/addons/base/module/module.py @@ -707,3 +707,5 @@ class module_dependency(osv.osv): ], string='State', readonly=True, select=True), } module_dependency() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/addons/base/module/wizard/base_import_language.py b/openerp/addons/base/module/wizard/base_import_language.py index fdb9a177d8b..acc0aa9640a 100644 --- a/openerp/addons/base/module/wizard/base_import_language.py +++ b/openerp/addons/base/module/wizard/base_import_language.py @@ -68,3 +68,5 @@ class base_language_import(osv.osv_memory): return {} base_language_import() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/addons/base/module/wizard/base_module_scan.py b/openerp/addons/base/module/wizard/base_module_scan.py index d47e091955f..d99c2db7e4d 100644 --- a/openerp/addons/base/module/wizard/base_module_scan.py +++ b/openerp/addons/base/module/wizard/base_module_scan.py @@ -70,4 +70,5 @@ class base_module_scan(osv.osv_memory): mod_obj.write(cr, uid, [mod['id']], {'state': 'uninstalled'}) return {} -base_module_scan() \ No newline at end of file +base_module_scan() +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/addons/base/module/wizard/base_module_upgrade.py b/openerp/addons/base/module/wizard/base_module_upgrade.py index ca82cfb20d2..3b8671b0ebb 100644 --- a/openerp/addons/base/module/wizard/base_module_upgrade.py +++ b/openerp/addons/base/module/wizard/base_module_upgrade.py @@ -116,3 +116,5 @@ class base_module_upgrade(osv.osv_memory): return self.pool.get('res.config').next(cr, uid, [], context=context) base_module_upgrade() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/addons/base/module/wizard/base_update_translations.py b/openerp/addons/base/module/wizard/base_update_translations.py index bd950ea628d..ebdfc05b75c 100644 --- a/openerp/addons/base/module/wizard/base_update_translations.py +++ b/openerp/addons/base/module/wizard/base_update_translations.py @@ -72,3 +72,5 @@ class base_update_translations(osv.osv_memory): } base_update_translations() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/addons/base/report/__init__.py b/openerp/addons/base/report/__init__.py index 254008f0185..6faf7839863 100644 --- a/openerp/addons/base/report/__init__.py +++ b/openerp/addons/base/report/__init__.py @@ -1 +1,3 @@ import preview_report + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/addons/base/res/res_bank.py b/openerp/addons/base/res/res_bank.py index 9184cf2ad1c..35deb32d551 100644 --- a/openerp/addons/base/res/res_bank.py +++ b/openerp/addons/base/res/res_bank.py @@ -225,3 +225,5 @@ class res_partner_bank(osv.osv): res_partner_bank() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/addons/base/res/res_log.py b/openerp/addons/base/res/res_log.py index 0ec39dbf615..ef49b52ee52 100644 --- a/openerp/addons/base/res/res_log.py +++ b/openerp/addons/base/res/res_log.py @@ -76,3 +76,5 @@ class res_log(osv.osv): return result res_log() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/addons/base/res/res_widget.py b/openerp/addons/base/res/res_widget.py index 71bdd85fc21..c4765c3cb1f 100644 --- a/openerp/addons/base/res/res_widget.py +++ b/openerp/addons/base/res/res_widget.py @@ -84,3 +84,5 @@ class res_widget_wizard(osv.osv_memory): res_widget_wizard() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/addons/base/res/test/res_lang.py b/openerp/addons/base/res/test/res_lang.py index 9272f1142ea..58963043ee6 100644 --- a/openerp/addons/base/res/test/res_lang.py +++ b/openerp/addons/base/res/test/res_lang.py @@ -10,3 +10,5 @@ for k, v in list(sys.modules.items()): import openerp.addons.base.res.res_lang as res_lang res_lang._group_examples() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/addons/base/res/wizard/partner_wizard_ean_check.py b/openerp/addons/base/res/wizard/partner_wizard_ean_check.py index 8ee383c18f5..cf55fe753a8 100644 --- a/openerp/addons/base/res/wizard/partner_wizard_ean_check.py +++ b/openerp/addons/base/res/wizard/partner_wizard_ean_check.py @@ -74,4 +74,5 @@ class partner_wizard_ean_check(osv.osv_memory): }) return {} -partner_wizard_ean_check() \ No newline at end of file +partner_wizard_ean_check() +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/report/preprocess.py b/openerp/report/preprocess.py index b339e078d81..e681860d7a2 100644 --- a/openerp/report/preprocess.py +++ b/openerp/report/preprocess.py @@ -100,3 +100,5 @@ if __name__=='__main__': result = a.preprocess_rml(node) print etree.tostring(result) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/report/pyPdf/__init__.py b/openerp/report/pyPdf/__init__.py index 8d17648d4b9..9e4f84d3863 100644 --- a/openerp/report/pyPdf/__init__.py +++ b/openerp/report/pyPdf/__init__.py @@ -3,3 +3,5 @@ from pdf import PdfFileReader, PdfFileWriter __all__ = ["pdf"] + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/report/pyPdf/xmp.py b/openerp/report/pyPdf/xmp.py index b070df9093e..0813b806d45 100644 --- a/openerp/report/pyPdf/xmp.py +++ b/openerp/report/pyPdf/xmp.py @@ -353,3 +353,5 @@ class XmpInformation(PdfObject): custom_properties = property(custom_properties) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/report/render/html2html/html2html.py b/openerp/report/render/html2html/html2html.py index 9847c4412e3..181c7f7ba67 100644 --- a/openerp/report/render/html2html/html2html.py +++ b/openerp/report/render/html2html/html2html.py @@ -93,3 +93,5 @@ def parseString(node, localcontext = {}): root = r.url_modify(root) return root + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/report/render/makohtml2html/__init__.py b/openerp/report/render/makohtml2html/__init__.py index ee458d04718..8ce38649762 100644 --- a/openerp/report/render/makohtml2html/__init__.py +++ b/openerp/report/render/makohtml2html/__init__.py @@ -23,3 +23,5 @@ from makohtml2html import parseNode #.apidoc title: MAKO to HTML engine + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/report/render/makohtml2html/makohtml2html.py b/openerp/report/render/makohtml2html/makohtml2html.py index 9241862d251..1682385be19 100644 --- a/openerp/report/render/makohtml2html/makohtml2html.py +++ b/openerp/report/render/makohtml2html/makohtml2html.py @@ -131,3 +131,5 @@ class makohtml2html(object): def parseNode(html, localcontext = {}): r = makohtml2html(html, localcontext) return r.render() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/report/render/odt2odt/odt2odt.py b/openerp/report/render/odt2odt/odt2odt.py index a28ec904a22..d077207f4d7 100644 --- a/openerp/report/render/odt2odt/odt2odt.py +++ b/openerp/report/render/odt2odt/odt2odt.py @@ -53,3 +53,5 @@ def parseNode(node, localcontext = {}): r = odt2odt(node, localcontext) return r.render() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/report/render/rml2pdf/__init__.py b/openerp/report/render/rml2pdf/__init__.py index ffe9339b659..fdbb5f77b89 100644 --- a/openerp/report/render/rml2pdf/__init__.py +++ b/openerp/report/render/rml2pdf/__init__.py @@ -23,3 +23,5 @@ from trml2pdf import parseString, parseNode #.apidoc title: RML to PDF engine + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/report/render/rml2pdf/customfonts.py b/openerp/report/render/rml2pdf/customfonts.py index bc70d1f65ea..56803648b4f 100644 --- a/openerp/report/render/rml2pdf/customfonts.py +++ b/openerp/report/render/rml2pdf/customfonts.py @@ -150,3 +150,5 @@ def SetCustomFonts(rmldoc): return True #eof + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/report/render/rml2pdf/trml2pdf.py b/openerp/report/render/rml2pdf/trml2pdf.py index 13ba8fee40d..6cb8a7ec83e 100644 --- a/openerp/report/render/rml2pdf/trml2pdf.py +++ b/openerp/report/render/rml2pdf/trml2pdf.py @@ -1015,3 +1015,5 @@ if __name__=="__main__": print 'Usage: trml2pdf input.rml >output.pdf' print 'Try \'trml2pdf --help\' for more information.' + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/report/report_sxw.py b/openerp/report/report_sxw.py index 98de86b01a8..742efd7e5f5 100644 --- a/openerp/report/report_sxw.py +++ b/openerp/report/report_sxw.py @@ -656,3 +656,5 @@ class report_sxw(report_rml, preprocess.report): html = create_doc(mako_html,html_parser.localcontext) return (html,'html') + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/run_tests.py b/openerp/run_tests.py index 7c0ee2a2431..4735bc9f331 100644 --- a/openerp/run_tests.py +++ b/openerp/run_tests.py @@ -25,3 +25,5 @@ import test if __name__ == '__main__': unittest.TextTestRunner(verbosity=2).run(unittest.defaultTestLoader.loadTestsFromModule(test)) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/service/http_server.py b/openerp/service/http_server.py index 63bd991ee35..506138b7fb4 100644 --- a/openerp/service/http_server.py +++ b/openerp/service/http_server.py @@ -183,3 +183,5 @@ class OpenERPAuthProvider(AuthProvider): raise AuthRequiredExc(atype='Basic', realm=self.realm) #eof + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/service/netrpc_server.py b/openerp/service/netrpc_server.py index 5b0fe239e51..c15ed514249 100644 --- a/openerp/service/netrpc_server.py +++ b/openerp/service/netrpc_server.py @@ -153,3 +153,5 @@ def init_servers(): netrpcd = TinySocketServerThread( tools.config.get('netrpc_interface', ''), int(tools.config.get('netrpc_port', 8070))) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/service/security.py b/openerp/service/security.py index ff140ad261b..d327efe5443 100644 --- a/openerp/service/security.py +++ b/openerp/service/security.py @@ -40,3 +40,5 @@ def check(db, uid, passwd): pool = pooler.get_pool(db) user_obj = pool.get('res.users') return user_obj.check(db, uid, passwd) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/service/websrv_lib.py b/openerp/service/websrv_lib.py index 3df441458fd..a4bdebcec27 100644 --- a/openerp/service/websrv_lib.py +++ b/openerp/service/websrv_lib.py @@ -232,3 +232,5 @@ class HttpOptions: """ return opts + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/test/__init__.py b/openerp/test/__init__.py index 248f468a34c..7a6c167d85b 100644 --- a/openerp/test/__init__.py +++ b/openerp/test/__init__.py @@ -21,3 +21,5 @@ from test_osv import * from test_translate import * + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/test/test_osv.py b/openerp/test/test_osv.py index 48039fa46fa..d3ff75c03d5 100644 --- a/openerp/test/test_osv.py +++ b/openerp/test/test_osv.py @@ -62,3 +62,5 @@ class QueryTestCase(unittest.TestCase): query.tables.append('"product_product"') self.assertRaises(AssertionError, query.join, ("product_template", "product_category", "categ_id", "id"), outer=False) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/test/test_translate.py b/openerp/test/test_translate.py index 85c980bede5..d9f771b69fb 100644 --- a/openerp/test/test_translate.py +++ b/openerp/test/test_translate.py @@ -46,3 +46,5 @@ class TranslationToolsTestCase(unittest.TestCase): \\\\nope\n\n" """) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/tiny_socket.py b/openerp/tiny_socket.py index 29782109347..b4bed83a4c0 100644 --- a/openerp/tiny_socket.py +++ b/openerp/tiny_socket.py @@ -96,3 +96,5 @@ class mysocket: raise res[0] else: return res[0] + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/tools/amount_to_text_en.py b/openerp/tools/amount_to_text_en.py index 914794118aa..48999c066df 100644 --- a/openerp/tools/amount_to_text_en.py +++ b/openerp/tools/amount_to_text_en.py @@ -126,3 +126,5 @@ if __name__=='__main__': else: print int_to_text(int(argv[1]), lang) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/tools/cache.py b/openerp/tools/cache.py index 33a821ce3b3..2c5c4a46e0d 100644 --- a/openerp/tools/cache.py +++ b/openerp/tools/cache.py @@ -135,3 +135,5 @@ if __name__ == '__main__': # For backward compatibility cache = ormcache + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/tools/config.py b/openerp/tools/config.py index f1c3931e81f..7708ab1812d 100644 --- a/openerp/tools/config.py +++ b/openerp/tools/config.py @@ -601,3 +601,5 @@ class configmanager(object): config = configmanager() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/tools/convert.py b/openerp/tools/convert.py index 7d6a982986b..66522f47c8b 100644 --- a/openerp/tools/convert.py +++ b/openerp/tools/convert.py @@ -999,3 +999,5 @@ def convert_xml_import(cr, module, xmlfile, idref=None, mode='init', noupdate=Fa obj.parse(doc.getroot()) return True + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/tools/copy.py b/openerp/tools/copy.py index badd4d51fc5..2f8ddb52cd3 100644 --- a/openerp/tools/copy.py +++ b/openerp/tools/copy.py @@ -437,3 +437,5 @@ def _test(): if __name__ == '__main__': _test() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/tools/func.py b/openerp/tools/func.py index 03463678ffb..9f52f1da956 100644 --- a/openerp/tools/func.py +++ b/openerp/tools/func.py @@ -118,3 +118,5 @@ def frame_codeinfo(fframe, back=0): return (fname, lineno) except Exception: return ("", '') + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/tools/lru.py b/openerp/tools/lru.py index aa7b14a745c..5e84775a352 100644 --- a/openerp/tools/lru.py +++ b/openerp/tools/lru.py @@ -118,3 +118,5 @@ class LRU(object): self.d = {} self.first = None self.last = None + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/tools/osutil.py b/openerp/tools/osutil.py index 51540ae28c7..3da9fa624a3 100644 --- a/openerp/tools/osutil.py +++ b/openerp/tools/osutil.py @@ -60,3 +60,5 @@ def walksymlinks(top, topdown=True, onerror=None): if __name__ == '__main__': from pprint import pprint as pp pp(listdir('../report', True)) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/tools/parse_version.py b/openerp/tools/parse_version.py index c743a9bb239..316f102a5e6 100644 --- a/openerp/tools/parse_version.py +++ b/openerp/tools/parse_version.py @@ -99,3 +99,5 @@ if __name__ == '__main__': chk(('0', '4.2', '4.2.3.4', '5.0.0-alpha', '5.0.0-rc1', '5.0.0-rc1.1', '5.0.0_rc2', '5.0.0_rc3', '5.0.0'), False) chk(('5.0.0-0_rc3', '5.0.0-1dev', '5.0.0-1'), False) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/tools/test_config.py b/openerp/tools/test_config.py index 256e7ba4c32..d89fda19b2e 100644 --- a/openerp/tools/test_config.py +++ b/openerp/tools/test_config.py @@ -44,3 +44,5 @@ conf = config.configmanager() conf.parse_config(['-c', config_file_00, '--osv-memory-age-limit=2.3']) assert conf['osv_memory_age_limit'] == 2.3 + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/tools/test_reports.py b/openerp/tools/test_reports.py index 88430dffc5c..ede199a44f8 100644 --- a/openerp/tools/test_reports.py +++ b/openerp/tools/test_reports.py @@ -307,3 +307,5 @@ def try_report_action(cr, uid, action_id, active_model=None, active_ids=None, return True #eof + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/tools/which.py b/openerp/tools/which.py index 548b836247c..81318541bdc 100755 --- a/openerp/tools/which.py +++ b/openerp/tools/which.py @@ -151,3 +151,5 @@ def which(file, mode=F_OK | X_OK, path=None, pathext=None): if __name__ == '__main__': import doctest doctest.testmod() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/tools/yaml_tag.py b/openerp/tools/yaml_tag.py index 6f7ceec4aee..aca802c374a 100644 --- a/openerp/tools/yaml_tag.py +++ b/openerp/tools/yaml_tag.py @@ -182,3 +182,5 @@ def add_constructors(): yaml.add_constructor(u"!ir_set", ir_set_constructor) add_constructors() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/setup.py b/setup.py old mode 100644 new mode 100755 index 3f108685f94..40695bd7c41 --- a/setup.py +++ b/setup.py @@ -1,73 +1,115 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## -import os -import re -import sys -from setuptools import setup, find_packages +import glob, os, re, setuptools, sys +from os.path import join, isfile -execfile('addons/web/common/release.py') +# List all data files +def data(): + files = [] + for root, dirnames, filenames in os.walk('openerp'): + for filename in filenames: + if not re.match(r'.*(\.pyc|\.pyo|\~)$',filename): + files.append(os.path.join(root, filename)) + d = {} + for v in files: + k=os.path.dirname(v) + if k in d: + d[k].append(v) + else: + d[k]=[v] + r = d.items() + return r -version_dash_incompatible = False -if 'bdist_rpm' in sys.argv: - version_dash_incompatible = True -try: - import py2exe - from py2exe_utils import opts - version_dash_incompatible = True -except ImportError: - opts = {} -if version_dash_incompatible: - version = version.split('-')[0] +def gen_manifest(): + file_list="\n".join(data()) + open('MANIFEST','w').write(file_list) -FILE_PATTERNS = \ - r'.+\.(py|cfg|po|pot|mo|txt|rst|gif|png|jpg|ico|mako|html|js|css|htc|swf)$' -def find_data_files(source, patterns=FILE_PATTERNS): - file_matcher = re.compile(patterns, re.I) - out = [] - for base, _, files in os.walk(source): - cur_files = [] - for f in files: - if file_matcher.match(f): - cur_files.append(os.path.join(base, f)) - if cur_files: - out.append( - (base, cur_files)) +def py2exe_options(): + if os.name == 'nt': + import py2exe + return { + "console" : [ { "script": "openerp-server", "icon_resources": [(1, join("pixmaps","openerp-icon.ico"))], }], + 'options' : { + "py2exe": { + "skip_archive": 1, + "optimize": 2, + "dist_dir": 'dist', + "packages": [ "DAV", "HTMLParser", "PIL", "asynchat", "asyncore", "commands", "dateutil", "decimal", "email", "encodings", "imaplib", "lxml", "lxml._elementpath", "lxml.builder", "lxml.etree", "lxml.objectify", "mako", "openerp", "poplib", "pychart", "pydot", "pyparsing", "reportlab", "select", "simplejson", "smtplib", "uuid", "vatnumber" "vobject", "xml", "xml", "xml.dom", "xml.xpath", "yaml", ], + "excludes" : ["Tkconstants","Tkinter","tcl"], + } + } + } + else: + return {} - return out +execfile(join(os.path.dirname(__file__), 'openerp', 'release.py')) -setup( - name=name, - version=version, - description=description, - long_description=long_description, - author=author, - author_email=author_email, - url=url, - download_url=download_url, - license=license, - install_requires=[ - "Babel >= 0.9.6", - "simplejson >= 2.0.9", - "python-dateutil >= 1.4.1", - "pytz", - "werkzeug == 0.7", - ], - tests_require=[ - 'unittest2', - 'mock', - ], - test_suite = 'unittest2.collector', - zip_safe=False, - packages=find_packages(), - classifiers=[ - 'Development Status :: 6 - Production/Stable', - 'Operating System :: OS Independent', - 'Programming Language :: Python', - 'Environment :: Web Environment', - 'Topic :: Office/Business :: Financial', - ], - scripts=['openerp-web'], - data_files=(find_data_files('addons') - + opts.pop('data_files', []) - ), - **opts +setuptools.setup( + name = 'openerp', + version = version, + description = description, + long_description = long_desc, + url = url, + author = author, + author_email = author_email, + classifiers = filter(None, classifiers.split("\n")), + license = license, + scripts = ['openerp-server'], + data_files = data(), + packages = setuptools.find_packages(), + #include_package_data = True, + install_requires = [ + # TODO the pychart package we include in openerp corresponds to PyChart 1.37. + # It seems there is a single difference, which is a spurious print in generate_docs.py. + # It is probably safe to move to PyChart 1.39 (the latest one). + # (Let setup.py choose the latest one, and we should check we can remove pychart from + # our tree.) http://download.gna.org/pychart/ + # TODO 'pychart', + 'babel', + 'feedparser', + 'gdata', + 'lxml', + 'mako', + 'psycopg2', + 'pydot', + 'python-dateutil', + 'python-ldap', + 'python-openid', + 'pytz', + 'pywebdav', + 'pyyaml', + 'reportlab', + 'simplejson', + 'vatnumber', + 'vobject', + 'werkzeug', + 'zsi', + ], + extras_require = { + 'SSL' : ['pyopenssl'], + }, + **py2exe_options() ) + + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/tests/__init__.py b/tests/__init__.py index 396284efaf7..ec2b8de39b1 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,2 +1,4 @@ # -*- coding: utf-8 -*- import test_xmlrpc + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/tests/common.py b/tests/common.py index 116898dc7ef..3de65489587 100644 --- a/tests/common.py +++ b/tests/common.py @@ -61,3 +61,5 @@ def setUpModule(): def tearDownModule(): """ Shutdown the OpenERP server similarly to a single ctrl-c. """ openerp.service.stop_services() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/tests/test_ir_sequence.py b/tests/test_ir_sequence.py index 8a4731d524f..263710cbd3b 100644 --- a/tests/test_ir_sequence.py +++ b/tests/test_ir_sequence.py @@ -196,3 +196,5 @@ class test_ir_sequence_generate(unittest2.TestCase): if __name__ == '__main__': unittest2.main() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/tests/test_orm.py b/tests/test_orm.py index 61b574df5eb..0dfed0005cb 100644 --- a/tests/test_orm.py +++ b/tests/test_orm.py @@ -173,3 +173,5 @@ class TestO2MSerialization(unittest2.TestCase): self.partner.resolve_o2m_commands_to_record_dicts( self.cr, UID, 'address', [REPLACE_WITH([42])], ['name']) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/tests/test_xmlrpc.py b/tests/test_xmlrpc.py index 4ad530cbeda..3f7286cfab1 100644 --- a/tests/test_xmlrpc.py +++ b/tests/test_xmlrpc.py @@ -64,3 +64,5 @@ class test_xmlrpc(unittest2.TestCase): if __name__ == '__main__': unittest2.main() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From c7de208ffaaca84f9ab51c4cf5df354260fb3a1c Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Tue, 22 Nov 2011 10:25:24 +0100 Subject: [PATCH 286/711] [FIX] account: set the default value for partner when encoding a new address through the invoice form view bzr revid: qdp-launchpad@openerp.com-20111122092524-uv3yzyd530xjsjnj --- addons/account/account_invoice_view.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index efc7a24031c..54a60ee1b57 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -153,7 +153,7 @@ '); + table_selector.append(' '); } } type_widget.start(); @@ -985,13 +944,13 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ model_data = new openerp.web.DataSetSearch(self,'ir.model', null, null); model_data.read_slice([], {domain: [['model','=', self.model]]}, function(result) { self.render_new_field(result[0].id); - }); + }); }); }, render_new_field :function(id){ var self = this; var action = { - context: {'default_model_id':id, 'manual':true}, + context: {'default_model_id': id, 'manual':true}, res_model: "ir.model.fields", views: [[false, 'form']], type: 'ir.actions.act_window', @@ -1008,7 +967,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ new_fields_name = new openerp.web.DataSetSearch(self,'ir.model.fields', null, null); new_fields_name.read_ids([controller.datarecord.id], ['name'], function(result) { self.add_node_dialog.$element. - find('select[id=field_value]').append($(""). + find('select[id=field_value]').append($(""). attr("value",result[0].name).text(result[0].name)); _.detect(self.add_widget,function(widget){ (widget.name == "field_value")?widget.selection.push(result[0].name):false; @@ -1033,8 +992,8 @@ openerp.web.ViewEditor.Field = openerp.web.Class.extend({ this.update_dom(); }, update_dom: function() { - this.$element.find("td[id="+ this.name+"]").toggleClass('invalid', this.is_invalid); - this.$element.find("td[id="+ this.name+"]").toggleClass('required', this.required); + this.$element.find("td[id=" + this.name + "]").toggleClass('invalid', this.is_invalid); + this.$element.find("td[id=" + this.name + "]").toggleClass('required', this.required); }, on_ui_change: function() { this.validate(); @@ -1106,7 +1065,6 @@ openerp.web.ViewEditor.FieldSelect = openerp.web.ViewEditor.Field.extend({ } } }); - }, set_value: function(value) { value = value === null ? false : value; @@ -1133,11 +1091,10 @@ openerp.web.ViewEditor.FieldSelectMulti = openerp.web.ViewEditor.FieldSelect.ext if (_.include(value.split(','), item[0])) { self.$element.find("select[id="+self.name+"] option[value='" + item[0] +"']").attr("selected",1) } - }); + }); } }); openerp.web.ViewEditor.FieldFloat = openerp.web.ViewEditor.FieldChar.extend({ - }); var _PROPERTIES = { From 2a75b1e935897162aa09e0427a29bcb656d9b011 Mon Sep 17 00:00:00 2001 From: "Yogesh (OpenERP)" Date: Tue, 22 Nov 2011 15:34:54 +0530 Subject: [PATCH 288/711] [IMP] Improve code in vieweditor. bzr revid: ysa@tinyerp.com-20111122100454-nzr2tn6mi1112usq --- addons/web/static/src/js/view_editor.js | 118 +++++++++++------------- 1 file changed, 52 insertions(+), 66 deletions(-) diff --git a/addons/web/static/src/js/view_editor.js b/addons/web/static/src/js/view_editor.js index 3341f323467..20610274a67 100644 --- a/addons/web/static/src/js/view_editor.js +++ b/addons/web/static/src/js/view_editor.js @@ -494,8 +494,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ } }, do_node_down: function(cur_tr, img) { - var self = this, next_tr, last_tr; - tr_to_move = []; + var self = this, next_tr, last_tr, tr_to_move = []; tr_to_move.push(cur_tr); if (img) { while (1) { @@ -535,8 +534,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ } }, do_node_up: function(cur_tr, img) { - var self = this, side = cur_tr; - tr_to_move = []; + var self = this, side = cur_tr, tr_to_move = []; tr_to_move.push(side); while (1) { var prev_tr = cur_tr.prev(); @@ -580,9 +578,9 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ var children = _.filter(xml_arch.childNodes[0].childNodes, function (child) { return child.nodeType == 1; }); - arch.arch = _.detect(children, function(xml_child){ - var temp_obj = self.create_View_Node(xml_child); - var insert = _.intersection(_.flatten(temp_obj.att_list),_.uniq(check_list)); + arch.arch = _.detect(children, function(xml_child) { + var temp_obj = self.create_View_Node(xml_child), + insert = _.intersection(_.flatten(temp_obj.att_list),_.uniq(check_list)); if (insert.length == check_list.length ) {return xml_child;} }); } @@ -648,13 +646,13 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ find('a').text(new_obj.name); child_list.splice(index, 1, new_obj); parent = $(arch1).parents(); - }else if(move_direct == "add_node"){ - var tr_click = self.edit_xml_dialog.$element.find("tr[id='viewedit-"+self.one_object.clicked_tr_id+"']"); - var temp_xml = QWeb.load_xml(update_values[0]); - var object_xml = self.create_View_Node(temp_xml.childNodes[0]); + } else if(move_direct == "add_node") { + var tr_click = self.edit_xml_dialog.$element.find("tr[id='viewedit-"+self.one_object.clicked_tr_id+"']"), + temp_xml = QWeb.load_xml(update_values[0]), + object_xml = self.create_View_Node(temp_xml.childNodes[0]); (update_values[1] == "Inside")? object_xml.level = obj.level + 1:object_xml.level = obj.level; - var clone = self.create_clone(tr_click.clone(),object_xml); - var after_append = _.detect(self.one_object['parent_child_id'],function(ele){ + var clone = self.create_clone(tr_click.clone(),object_xml), + after_append = _.detect(self.one_object['parent_child_id'],function(ele){ return self.one_object.clicked_tr_id == ele.key; }); after_append = (after_append)?_.last(after_append.value):self.one_object.clicked_tr_id; @@ -671,14 +669,12 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ child_list.splice(index - 1, 0, object_xml); break; case "Inside": - if(tr_click.find("img[id^='parentimg-']").length == 0){ - ($(tr_click.find('a').parent()).siblings('td')) - .append($(''). - attr('src', '/web/static/src/img/collapse.gif'). - attr('id','parentimg-'+ self.one_object.clicked_tr_id) - .click(function(){ + if (tr_click.find("img[id^='parentimg-']").length == 0) { + ($(tr_click.find('a').parent()).siblings('td')) + .append($('').attr('src', '/web/static/src/img/collapse.gif'). + attr('id','parentimg-'+ self.one_object.clicked_tr_id).click(function(){ self.do_parent_img_hide_show(this); - })); + })); } $(arch1).append(update_values[0]); self.edit_xml_dialog.$element. @@ -765,29 +761,28 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ width: 500, height: 400, buttons: { - "Update": function(){ - var warn = false; - var update_values = []; - _.each(self.edit_widget, function(widget) { - if (widget.is_invalid) { - warn = true; - return false; - }; - if (widget.dirty && !widget.is_invalid) { - update_values.push([widget.name, widget.get_value()]); - } - }); - if (warn) { - self.on_valid_create_view(self.edit_widget); - } else { - self.do_save_update_arch("update_node", update_values); - self.edit_node_dialog.close(); + "Update": function(){ + var warn = false, update_values = []; + _.each(self.edit_widget, function(widget) { + if (widget.is_invalid) { + warn = true; + return false; + }; + if (widget.dirty && !widget.is_invalid) { + update_values.push([widget.name, widget.get_value()]); } - }, - "Cancel": function(){ + }); + if (warn) { + self.on_valid_create_view(self.edit_widget); + } else { + self.do_save_update_arch("update_node", update_values); self.edit_node_dialog.close(); } + }, + "Cancel": function(){ + self.edit_node_dialog.close(); } + } }); this.edit_node_dialog.start().open(); var _PROPERTIES_ATTRIBUTES = { @@ -860,9 +855,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ self.groups = false; def.resolve(); } - var group_ids = [], - group_names = {}, - groups = []; + var group_ids = [], group_names = {}, groups = []; var res_groups = new openerp.web.DataSetSearch(this,'res.groups', null, null), model_data = new openerp.web.DataSetSearch(self,'ir.model.data', null, null); res_groups @@ -876,7 +869,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ model_data .read_slice([],{domain:[['res_id', 'in', group_ids],['model','=','res.groups']]}) .done(function(model_grp) { - _.each(model_grp,function(res_group){ + _.each(model_grp, function(res_group) { groups.push([res_group.module + "." + res_group.name,group_names[res_group.res_id]]); }); self.groups = groups; @@ -889,8 +882,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ var self = this; var render_list = [{'name': 'node_type','selection': _.keys(_CHILDREN).sort(), 'value': 'field', 'string': 'Node Type','type': 'selection'}, {'name': 'field_value','selection': fields, 'value': false, 'string': '','type': 'selection'}, - {'name': 'position','selection': ['After','Before','Inside'], 'value': false, 'string': 'Position','type': 'selection'} - ]; + {'name': 'position','selection': ['After','Before','Inside'], 'value': false, 'string': 'Position','type': 'selection'}]; this.add_widget = []; this.add_node_dialog = new openerp.web.Dialog(this,{ modal: true, @@ -899,8 +891,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ height: 190, buttons: { "Update": function(){ - var check_add_node = true; - var values = {}; + var check_add_node = true, values = {}; _.each(self.add_widget, function(widget) { values[widget.name] = widget.get_value() || false; }); @@ -922,16 +913,15 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ } } }).start().open(); - this.add_node_dialog.$element. - append('
    '); + this.add_node_dialog.$element.append('
    '); var table_selector = self.add_node_dialog.$element.find('table[id=rec_table] tbody'); - _.each(render_list,function(node){ + _.each(render_list, function(node) { type_widget = new (self.property.get_any([node.type])) (self.add_node_dialog, node); - if(node.name == "position"){ + if (node.name == "position") { table_selector.append('' + node.string + '' + type_widget.render() + ''); - }else{ + } else { table_selector.append('' + node.string + '' + type_widget.render() ); - if(node.name == "field_value"){ + if (node.name == "field_value") { table_selector.append(' '); } } @@ -966,12 +956,10 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ action_manager.stop(); new_fields_name = new openerp.web.DataSetSearch(self,'ir.model.fields', null, null); new_fields_name.read_ids([controller.datarecord.id], ['name'], function(result) { - self.add_node_dialog.$element. - find('select[id=field_value]').append($(""). - attr("value",result[0].name).text(result[0].name)); + self.add_node_dialog.$element.find('select[id=field_value]').append($("").attr("value", result[0].name).text(result[0].name)); _.detect(self.add_widget,function(widget){ - (widget.name == "field_value")?widget.selection.push(result[0].name):false; - }); + widget.name == "field_value"? widget.selection.push(result[0].name): false; + }); }); }); }); @@ -1028,8 +1016,7 @@ openerp.web.ViewEditor.FieldBoolean = openerp.web.ViewEditor.Field.extend({ } }, get_value: function() { - var value = this.$element.find("input[id=" + this.name + "]").is(':checked') - return value? "1" : null; + return this.$element.find("input[id=" + this.name + "]").is(':checked')? "1" : null; } }); openerp.web.ViewEditor.FieldChar = openerp.web.ViewEditor.Field.extend({ @@ -1055,11 +1042,11 @@ openerp.web.ViewEditor.FieldSelect = openerp.web.ViewEditor.Field.extend({ this._super(); this.$element.find("select[id=" + this.name + "]").css('width', '100%').change(function() { self.on_ui_change(); - if(self.name == "node_type"){ - if(self.get_value() == "field"){ + if (self.name == "node_type") { + if (self.get_value() == "field") { self.$element.find('#new_field').show(); self.$element.find("select[id=field_value]").show(); - }else{ + } else { self.$element.find('#new_field').hide(); self.$element.find("select[id=field_value]").hide(); } @@ -1067,8 +1054,8 @@ openerp.web.ViewEditor.FieldSelect = openerp.web.ViewEditor.Field.extend({ }); }, set_value: function(value) { - value = value === null ? false : value; var index = 0; + value = value === null? false: value; for (var i = 0, ii = this.selection.length; i < ii; i++) { if ((this.selection[i] instanceof Array && this.selection[i][1] === value) || this.selection[i] === value) index = i; } @@ -1081,7 +1068,7 @@ openerp.web.ViewEditor.FieldSelect = openerp.web.ViewEditor.Field.extend({ openerp.web.ViewEditor.FieldSelectMulti = openerp.web.ViewEditor.FieldSelect.extend({ start: function () { this._super(); - this.$element.find("select[id=" + this.name + "]").css('height', '100px').attr("multiple",true); + this.$element.find("select[id=" + this.name + "]").css('height', '100px').attr("multiple", true); }, set_value: function(value) { var self = this; @@ -1125,7 +1112,6 @@ var _CHILDREN = { 'page': ['notebook', 'group', 'field', 'label', 'button', 'newline', 'separator'], 'group': ['field', 'label', 'button', 'separator', 'newline'], 'board': ['column'], - 'child2': ['action'], 'action': [], 'field': ['form', 'tree', 'graph'], 'label': [], From 6965127b25ce9bc87f276a1dc83a84fd38443436 Mon Sep 17 00:00:00 2001 From: "Hardik Ansodariy (OpenERP)" Date: Tue, 22 Nov 2011 15:39:07 +0530 Subject: [PATCH 289/711] [imp] added decimal_precision on quantity field in order to get three number after coma bzr revid: han@tinyerp.com-20111122100907-r0c8p82xuwlk9z0p --- addons/stock/wizard/stock_partial_picking.py | 3 ++- addons/stock/wizard/stock_return_picking.py | 3 ++- addons/stock/wizard/stock_splitinto.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/stock/wizard/stock_partial_picking.py b/addons/stock/wizard/stock_partial_picking.py index f6ecb6511eb..f666bf1e367 100644 --- a/addons/stock/wizard/stock_partial_picking.py +++ b/addons/stock/wizard/stock_partial_picking.py @@ -22,13 +22,14 @@ import time from osv import fields, osv from tools.misc import DEFAULT_SERVER_DATETIME_FORMAT +import decimal_precision as dp class stock_partial_picking_line(osv.TransientModel): _name = "stock.partial.picking.line" _rec_name = 'product_id' _columns = { 'product_id' : fields.many2one('product.product', string="Product", required=True, ondelete='CASCADE'), - 'quantity' : fields.float("Quantity", required=True), + 'quantity' : fields.float("Quantity", digits_compute=dp.get_precision('Product UoM'), required=True), 'product_uom': fields.many2one('product.uom', 'Unit of Measure', required=True, ondelete='CASCADE'), 'prodlot_id' : fields.many2one('stock.production.lot', 'Production Lot', ondelete='CASCADE'), 'location_id': fields.many2one('stock.location', 'Location', required=True, ondelete='CASCADE'), diff --git a/addons/stock/wizard/stock_return_picking.py b/addons/stock/wizard/stock_return_picking.py index b7c8aa28354..689f17cd9b9 100644 --- a/addons/stock/wizard/stock_return_picking.py +++ b/addons/stock/wizard/stock_return_picking.py @@ -24,13 +24,14 @@ import time from osv import osv,fields from tools.translate import _ +import decimal_precision as dp class stock_return_picking_memory(osv.osv_memory): _name = "stock.return.picking.memory" _rec_name = 'product_id' _columns = { 'product_id' : fields.many2one('product.product', string="Product", required=True), - 'quantity' : fields.float("Quantity", required=True), + 'quantity' : fields.float("Quantity", digits_compute=dp.get_precision('Product UoM'), required=True), 'wizard_id' : fields.many2one('stock.return.picking', string="Wizard"), 'move_id' : fields.many2one('stock.move', "Move"), } diff --git a/addons/stock/wizard/stock_splitinto.py b/addons/stock/wizard/stock_splitinto.py index 1f48c8cfc19..3ed7c39318d 100644 --- a/addons/stock/wizard/stock_splitinto.py +++ b/addons/stock/wizard/stock_splitinto.py @@ -27,7 +27,7 @@ class stock_split_into(osv.osv_memory): _name = "stock.split.into" _description = "Split into" _columns = { - 'quantity': fields.float('Quantity',digits_compute=dp.get_precision('Product UOM')), + 'quantity': fields.float('Quantity',digits_compute=dp.get_precision('Product UoM')), } _defaults = { 'quantity': lambda *x: 0, From 82f88b06d61de3f1a186f6526260d2cb906682ca Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Tue, 22 Nov 2011 11:13:38 +0100 Subject: [PATCH 290/711] [IMP] account: added constraint on account_journal currency + changed default value of type field for new account_account bzr revid: qdp-launchpad@openerp.com-20111122101338-44k60vjsnmf3khud --- addons/account/account.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/addons/account/account.py b/addons/account/account.py index 630735c487f..c8895fa6946 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -461,7 +461,7 @@ class account_account(osv.osv): } _defaults = { - 'type': 'view', + 'type': 'other', 'reconcile': False, 'active': True, 'currency_mode': 'current', @@ -716,6 +716,19 @@ class account_journal(osv.osv): _order = 'code' + def _check_currency(self, cr, uid, ids, context=None): + for journal in self.browse(cr, uid, ids, context=context): + if journal.currency: + if journal.default_credit_account_id and not journal.default_credit_account_id.currency_id.id == journal.currency.id: + return False + if journal.default_debit_account_id and not journal.default_debit_account_id.currency_id.id == journal.currency.id: + return False + return True + + _constraints = [ + (_check_currency, 'Configuration error! The currency chosen should be shared by the default accounts too.', ['currency','default_debit_account_id','default_credit_account_id']), + ] + def copy(self, cr, uid, id, default={}, context=None, done_list=[], local=False): journal = self.browse(cr, uid, id, context=context) if not default: From b7dfc8bb45b326ac813714882f7c120058a8e3b2 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 22 Nov 2011 11:18:13 +0100 Subject: [PATCH 291/711] [FIX] semicolon warnings bzr revid: xmo@openerp.com-20111122101813-61xmoekdio52j1oj --- addons/web/static/src/js/data.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/js/data.js b/addons/web/static/src/js/data.js index 0d3833ee835..1f2520ee774 100644 --- a/addons/web/static/src/js/data.js +++ b/addons/web/static/src/js/data.js @@ -826,7 +826,7 @@ openerp.web.Model = openerp.web.CallbackEnabled.extend({ var index = {}; _.each(_.range(result.length), function(i) { index[result[i]["id"]] = result[i]; - }) + }); result = _.map(args[0], function(x) {return index[x];}); } return result; @@ -843,7 +843,7 @@ openerp.web.Model = openerp.web.CallbackEnabled.extend({ context: context }).pipe(function(result) { return result.records; - });; + }); } }); From 2e5d7852f4586081c25df85d60912b269e036395 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 22 Nov 2011 11:19:50 +0100 Subject: [PATCH 292/711] [FIX] comma-terminated object literals bzr revid: xmo@openerp.com-20111122101950-mng5zy4os3mukj6d --- addons/web/static/src/js/chrome.js | 2 +- addons/web/static/src/js/view_editor.js | 10 +++++----- addons/web/static/src/js/view_form.js | 2 +- addons/web_process/static/src/js/process.js | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 2b838ee3743..f10ee9376f6 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -1114,7 +1114,7 @@ openerp.web.WebClient = openerp.web.Widget.extend(/** @lends openerp.web.WebClie this.action_manager.do_action(action); }, do_about: function() { - }, + } }); diff --git a/addons/web/static/src/js/view_editor.js b/addons/web/static/src/js/view_editor.js index 71cda6fcc47..c53a7f8df38 100644 --- a/addons/web/static/src/js/view_editor.js +++ b/addons/web/static/src/js/view_editor.js @@ -32,7 +32,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ search_view:false, pager:false, radio: true - }, + } }; this.view_edit_dialog = new openerp.web.Dialog(this, { modal: true, @@ -50,7 +50,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ "Close": function(){ self.view_edit_dialog.close(); } - }, + } }); this.view_edit_dialog.start().open(); var action_manager = new openerp.web.ActionManager(this); @@ -276,8 +276,8 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ views_switcher: false, action_buttons:false, search_view:false, - pager:false, - }, + pager:false + } }; var action_manager = new openerp.web.ActionManager(self); action_manager.do_action(action); @@ -289,7 +289,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ }); this.edit_xml_dialog.start().open(); this.edit_xml_dialog.$element.html(QWeb.render('view_editor', { - 'data': one_object['main_object'], + 'data': one_object['main_object'] })); this.edit_xml_dialog.$element.find("tr[id^='viewedit-']").click(function() { self.edit_xml_dialog.$element.find("tr[id^='viewedit-']").removeClass('ui-selected'); diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 9bd1916d714..dcc0c6bd950 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -985,7 +985,7 @@ openerp.web.form.WidgetFrame = openerp.web.form.Widget.extend({ }); openerp.web.form.WidgetGroup = openerp.web.form.WidgetFrame.extend({ - template: 'WidgetGroup', + template: 'WidgetGroup' }), openerp.web.form.WidgetNotebook = openerp.web.form.Widget.extend({ diff --git a/addons/web_process/static/src/js/process.js b/addons/web_process/static/src/js/process.js index f7497773645..52f6ab1a674 100644 --- a/addons/web_process/static/src/js/process.js +++ b/addons/web_process/static/src/js/process.js @@ -303,7 +303,7 @@ openerp.web_process = function (openerp) { pager: false } }); - }, + } }); }; // vim:et fdc=0 fdl=0 foldnestmax=3 fdm=syntax: From 300478d1ec13fd9a9c3c624efc9da1df8f79b6b7 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Tue, 22 Nov 2011 11:23:38 +0100 Subject: [PATCH 293/711] [IMP] account_voucher: usability improvement. bzr revid: qdp-launchpad@openerp.com-20111122102338-l3pysqm8f2j9hwsl --- .../account_voucher/voucher_payment_receipt_view.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/account_voucher/voucher_payment_receipt_view.xml b/addons/account_voucher/voucher_payment_receipt_view.xml index 2c9b2edee6e..46720b2732c 100644 --- a/addons/account_voucher/voucher_payment_receipt_view.xml +++ b/addons/account_voucher/voucher_payment_receipt_view.xml @@ -93,7 +93,7 @@ - + - + @@ -160,7 +160,7 @@ - + - + @@ -309,7 +309,7 @@ - + - + From a738f4390f718c809b51f02597d1dac148e4314b Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 22 Nov 2011 11:26:09 +0100 Subject: [PATCH 294/711] [FIX] do not reload sidebar during form's on_loaded if it's already setup There's no information provided to FormView#on_loaded which should change the sidebar and reloading it apparently breaks stuff... severely. So just don't touch it if it's already setup (assigned to instance variable), everything works right (as the readonly mode fundamentally only changes the way the form is displayed, it should not alter its internal behaviors) lp bug: https://launchpad.net/bugs/891117 fixed bzr revid: xmo@openerp.com-20111122102609-faldd3xkc0xhzvu2 --- 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 dcc0c6bd950..c5a2fbb4dc6 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -107,7 +107,7 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView# this.$form_header.find('button.oe_form_button_delete').click(this.on_button_delete); this.$form_header.find('button.oe_form_button_toggle').click(this.on_toggle_readonly); - if (this.options.sidebar && this.options.sidebar_id) { + if (!this.sidebar && this.options.sidebar && this.options.sidebar_id) { this.sidebar = new openerp.web.Sidebar(this, this.options.sidebar_id); this.sidebar.start(); this.sidebar.do_unfold(); From 733941e97976e161f4f9188e381884fbc441f28e Mon Sep 17 00:00:00 2001 From: "Tejas (OpenERP)" Date: Tue, 22 Nov 2011 16:11:45 +0530 Subject: [PATCH 295/711] Fix search m2o field, default added bzr revid: tta@openerp.com-20111122104145-ce1z32beh8ef6346 --- addons/web/static/src/js/view_form.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 9bd1916d714..178f326f437 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -2534,6 +2534,16 @@ openerp.web.form.SelectCreatePopup = openerp.web.OldWidget.extend(/** @lends ope start: function() { this._super(); var self = this; + search_defaults = {}; + if( "__contexts" in this.context.__contexts[0]) + { + _.each(this.context.__contexts[0].__contexts[0], function (value, key) { + var match = /^search_default_(.*)$/.exec(key); + if (match) { + search_defaults[match[1]] = value; + } + }); + } this.dataset = new openerp.web.ProxyDataSet(this, this.model, this.context); this.dataset.create_function = function() { @@ -2548,18 +2558,18 @@ openerp.web.form.SelectCreatePopup = openerp.web.OldWidget.extend(/** @lends ope this.dataset.parent_view = this.options.parent_view; this.dataset.on_default_get.add(this.on_default_get); if (this.options.initial_view == "search") { - this.setup_search_view(); + this.setup_search_view(search_defaults); } else { // "form" this.new_object(); } }, - setup_search_view: function() { + setup_search_view: function(search_defaults) { var self = this; if (this.searchview) { this.searchview.stop(); } this.searchview = new openerp.web.SearchView(this, - this.dataset, false, {}); + this.dataset, false, search_defaults); this.searchview.on_search.add(function(domains, contexts, groupbys) { if (self.initial_ids) { self.do_search(domains.concat([[["id", "in", self.initial_ids]], self.domain]), From a3f61bd9a7a7eb5c5772927b47101e4261a90464 Mon Sep 17 00:00:00 2001 From: "tfr@openerp.com" <> Date: Tue, 22 Nov 2011 11:44:48 +0100 Subject: [PATCH 296/711] [ADD] common api for plugin bzr revid: tfr@openerp.com-20111122104448-5uo0dd0g50yhk2cq --- addons/plugin/__init__.py | 25 ++++++ addons/plugin/__openerp__.py | 45 ++++++++++ addons/plugin/plugin_handler.py | 151 ++++++++++++++++++++++++++++++++ 3 files changed, 221 insertions(+) create mode 100644 addons/plugin/__init__.py create mode 100644 addons/plugin/__openerp__.py create mode 100644 addons/plugin/plugin_handler.py diff --git a/addons/plugin/__init__.py b/addons/plugin/__init__.py new file mode 100644 index 00000000000..1844c42011c --- /dev/null +++ b/addons/plugin/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +import plugin_handler + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: + diff --git a/addons/plugin/__openerp__.py b/addons/plugin/__openerp__.py new file mode 100644 index 00000000000..b598690cbf2 --- /dev/null +++ b/addons/plugin/__openerp__.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + + +{ + 'name': 'Common interface for CRM plugin (Thunderbird and Outlook)', + 'version': '1.0', + 'category': 'Hidden', + 'complexity': "easy", + 'description': """ +The common interface for pugin. +===================================================== + +""", + 'author': 'OpenERP SA', + 'website': 'http://www.openerp.com', + 'depends': [ + 'base', + ], + 'data': [], + 'demo': [], + 'test': [], + 'installable': True, + 'active': False, + 'images': [], +} +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/plugin/plugin_handler.py b/addons/plugin/plugin_handler.py new file mode 100644 index 00000000000..25ebe7fde80 --- /dev/null +++ b/addons/plugin/plugin_handler.py @@ -0,0 +1,151 @@ +''' +Created on 18 oct. 2011 + +@author: openerp +''' + +from osv import osv, fields + + +class plugin_handler(osv.osv_memory): + _name = 'plugin.handler' + + def _make_url(self, cr, uid, res_id, model, context=None): + """ + @param id: on which document the message is pushed + @param model: name of the document linked with the mail + @return url + """ + base_url = self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url', default='http://localhost:8069', context=context) + if base_url: + base_url += '/?id=%s&model=%s'%(res_id,model) + return base_url + + def is_installed(self, cr, uid): + return True + + def partner_get(self, cr, uid, address_email): + ids = self.pool.get('res.partner.address').search(cr, uid, [('partner_id', '!=', False), ('email', 'like', address_email)]) + res_id = ids and self.pool.get('res.partner.address').browse(cr, uid, ids[0]).partner_id.id or 0 + url = self._make_url(cr, uid, res_id, 'res.partner') + return ('res.partner', res_id , url) + + def document_get(self, cr, uid, email): + """ + @param email: email is a standard RFC2822 email message + @return Dictionary which contain id and the model name of the document linked with the mail + if no document is found the id = 0 + (model_name, res_id, name_get, url) + """ + mail_message_obj = self.pool.get('mail.message') + model = False + res_id = 0 + url = False + + msg = mail_message_obj.parse_message(email) + references = [msg.get('message-id')] + refs = msg.get('references',False) + if refs: + references.extend(refs.split()) + + msg_ids = mail_message_obj.search(cr, uid, [('message_id','in',references)]) + if msg_ids: + msg = mail_message_obj.browse(cr, uid, msg_ids[0]) + res_id = msg.res_id + model = msg.model + url = self._make_url(cr, uid, res_id, model) + return (model, res_id, url) + + def document_type(self, cr, uid, context=None): + """ + Return the list of available model to push + res.partner is a special case + otherwise all model that inherit from mail.thread + ['res.partner', 'project.issue'] + """ + mail_thread_obj = self.pool.get('mail.thread') + doc_dict = mail_thread_obj.message_capable_models(cr, uid, context) + doc_dict['res.partner'] = "Partner" + return doc_dict.items() + + def list_document_get(self, cr, uid, model, name): + """ + This function return the result of name_search on the object model + @param model: the name of the model + @param : the name of the document + @return : the result of name_search a list of tuple + [(id, 'name')] + """ + return self.pool.get(model).name_search(cr,uid,name) + + def push_message(self, cr, uid, model, email, res_id=0): + """ + @param email: email is a standard RFC2822 email message + @param model: On which model the message is pushed + @param thread_id: on which document the message is pushed, if thread_id = 0 a new document is created + @return Dictionary which contain model , url and resource id. + """ + mail_message = self.pool.get('mail.message') + model_obj = self.pool.get(model) + + msg = mail_message.parse_message(email) + message_id = msg.get('message-id') + + + mail_ids = mail_message.search(cr, uid, [('message_id','=',message_id),('res_id','=',res_id),('model','=',model)]) + if message_id and mail_ids : + mail_record = mail_message.browse(cr, uid, mail_ids)[0] + res_id = mail_record.res_id + notify = "Email already pushed" + elif res_id == 0: + if model == 'res.partner': + notify = 'User the button Partner to create a new partner' + else: + res_id = model_obj.message_new(cr, uid, msg) + notify = "Mail succefully pushed, a new %s has been created " % model + else: + model_obj.message_append_dict(cr, uid, [res_id], msg) + notify = "Mail succefully pushed" + url = self._make_url(cr, uid, res_id, model) + return (model, res_id, url, notify) + + + def contact_create(self, cr, uid, data, partner_id): + """ + @param data : the data use to create the res.partner.address + [('field_name', value)], field name is required + @param partner_id : On which partner the address is attached + if partner_id = 0 then create a new partner with the same name that the address + @return : the partner_id sended or created, this allow the plugin to open the right partner page + """ + print "create contact", data, partner_id + partner_obj = self.pool.get('res.partner') + dictcreate = dict(data) + if partner_id == 0: + partner_id = partner_obj.create(cr, uid, {'name':dictcreate.get('name')}) + dictcreate['partner_id'] = partner_id + self.pool.get('res.partner.address').create(cr, uid, dictcreate) + url = self._make_url(cr, uid, partner_id, 'res.partner') + return ('res.partner', partner_id, url) + + + + ############################## + # # + # Specific to outlook # + # # + ############################## + + def attachment_create(self,cr, uid, data): + """ + @param data : the data use to create the ir.attachment + [('field_name', value)], field name is required. + """ + ir_attachment_obj = self.pool.get('ir.attachment') + attachment_ids = ir_attachment_obj.search(cr, uid, [('res_model', '=', data.get('res_model')), ('res_id', '=', data.get('res_id')), ('datas_fname', '=', data.get('datas_fname'))]) + if attachment_ids: + return attachment_ids[0] + else: + vals = {"res_model": data.get('res_model'), "res_id": data.get('res_id'), "name": data.get('name'), "datas" : data.get('datas'), "datas_fname" : data.get('datas_fname')} + return ir_attachment_obj.create(cr, uid, vals) + From 2c8d0d9a3f4e63586af619e1c2e57cafeb6591b5 Mon Sep 17 00:00:00 2001 From: Antoine Huvelle Date: Tue, 22 Nov 2011 11:46:09 +0100 Subject: [PATCH 297/711] Some changes in list and form font sizes bzr revid: ahu@openerp.com-20111122104609-m9kdnqptdo30faoe --- addons/web/static/src/css/base.css | 70 +++++++++++++++++++++-- addons/web/static/src/css/data_import.css | 2 +- 2 files changed, 66 insertions(+), 6 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index d8f31af1d35..1d93249fba3 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -10,6 +10,7 @@ body.openerp { body.openerp, .openerp textarea, .openerp input, .openerp select, .openerp option, .openerp button, .openerp .ui-widget { font-family: Ubuntu, Helvetica, sans-serif; + font-size:85%; } .oe_box { @@ -29,6 +30,17 @@ body.openerp, .openerp textarea, .openerp input, .openerp select, .openerp optio .openerp .oe-listview .oe-number { text-align: right !important; } +.oe-listview-header-columns { + background: #ccc; /* Old browsers */ + background: -moz-linear-gradient(top, #ffffff 0%, #ebe9e9 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#ebe9e9)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #ffffff 0%,#ebe9e9 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #ffffff 0%,#ebe9e9 100%); /* Opera11.10+ */ + background: -ms-linear-gradient(top, #ffffff 0%,#ebe9e9 100%); /* IE10+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF', endColorstr='#EBE9E9',GradientType=0 ); /* IE6-9 */ + background: linear-gradient(top, #ffffff 0%,#ebe9e9 100%); /* W3C */ +} + .openerp .oe_hide { display: none !important; } @@ -530,7 +542,7 @@ label.error { } .openerp h2.oe_view_title { - font-size: 175%; + font-size: 110%; font-weight: normal; margin: 2px 0; color: #252424; @@ -631,6 +643,10 @@ label.error { .openerp .searchview_group_content { padding-left: 10px; } +.openerp .searchview_group_content .oe_label, .openerp .searchview_group_content .oe_label_help { + font-weight:bold; + color:#4c4c4c; +} .openerp .searchview_extended_group { padding: 3px; @@ -738,15 +754,28 @@ label.error { } .openerp .oe-listview th.oe-sortable { cursor: pointer; + font-size:80%; + text-transform:uppercase; + padding:0px; + margin:0px; + padding-left:3px; + color:#333; } .openerp .oe-listview th.oe-sortable .ui-icon { - height: 1em; - display: inline; + height: 60%; + margin: -6px 0px 0px 0px; display: inline-block; + vertical-align:middle; } .openerp .oe-listview .oe-field-cell { cursor: pointer; + font-size:90% + margin-top: 0px; + margin-bottom: 0px; + padding-top: 0px; + padding-bottom: 0px; + font-size:80%; } .openerp .oe-listview .oe-field-cell progress { width: 100%; @@ -778,6 +807,7 @@ label.error { } .openerp .oe-list-pager .oe-pager-state { cursor: pointer; + font-size:90%; } .openerp .oe-listview .oe-group-name { @@ -794,6 +824,8 @@ label.error { .openerp .oe-listview .oe-list-footer { text-align: center; white-space: nowrap; + color:#444; + font-size:85%; } .openerp .oe-listview .oe-list-footer span { margin: 0 1em; @@ -854,7 +886,9 @@ label.error { border-radius: 0; -moz-border-radius: 0; -webkit-border-radius: 0; - line-height: 0.5em; + line-height: 0.8em; + font-size:0.85em; + color:#555; } .openerp .oe_form_notebook ul.ui-tabs-nav li { font-weight: bold; @@ -868,6 +902,13 @@ label.error { } /* Form */ +.openerp table.oe_frame td { + color: #4c4c4c; +} +.openerp td.oe_form_frame_cell { + padding: 2px; + position: relative; +} .openerp .oe_frame.oe_forms { clear: both; } @@ -900,10 +941,14 @@ label.error { } .openerp .oe_form_pager, .openerp .oe_list_pager { float: right; + font-size:80%; + color:gray; + font-weight:bold; } .openerp label.oe_label_help, .openerp label.oe_label { display: block; + font-size:85%; } .openerp label.oe_label_help { cursor: help; @@ -1055,10 +1100,14 @@ label.error { border: 0 solid #666; } .openerp .separator.horizontal { - font-weight: bold; + font-weight: bold; border-bottom-width: 1px; margin: 3px 4px 3px 1px; height: 15px; + font-size:90%; +} +.openerp .separator.horizontal:empty { + height: 5px; } .openerp .oe_form_frame_cell.oe_form_separator_vertical { border-left: 1px solid #666; @@ -1095,6 +1144,17 @@ label.error { background: white; min-width: 90px; } +.openerp tbody.ui-widget-content { + margin-bottom:10px; + border-spacing:4px; + /*border:1px solid red; + background-color:red; + color:red;*/ +} +.openerp .ui-widget-header { + background-image:none; + background-color:white; +} /* Sidebar */ .openerp .view-manager-main-table { diff --git a/addons/web/static/src/css/data_import.css b/addons/web/static/src/css/data_import.css index e5d1c9a910c..a63a52802f0 100644 --- a/addons/web/static/src/css/data_import.css +++ b/addons/web/static/src/css/data_import.css @@ -27,7 +27,7 @@ .openerp .oe-import fieldset.oe-closed table { display: none; } -.openerp .separator.horizontal { +.openerp .oe-import .separator.horizontal { font-weight: bold; border-bottom-width: 1px; margin: 6px 4px 6px 1px; From 784bf2fcbead0e8480e98099897b74e0b34b2c2d Mon Sep 17 00:00:00 2001 From: "tfr@openerp.com" <> Date: Tue, 22 Nov 2011 11:52:02 +0100 Subject: [PATCH 298/711] [CLEAN] remove print bzr revid: tfr@openerp.com-20111122105202-13mhvor9gvo1nwpo --- addons/plugin/plugin_handler.py | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/plugin/plugin_handler.py b/addons/plugin/plugin_handler.py index 25ebe7fde80..202b050c722 100644 --- a/addons/plugin/plugin_handler.py +++ b/addons/plugin/plugin_handler.py @@ -118,7 +118,6 @@ class plugin_handler(osv.osv_memory): if partner_id = 0 then create a new partner with the same name that the address @return : the partner_id sended or created, this allow the plugin to open the right partner page """ - print "create contact", data, partner_id partner_obj = self.pool.get('res.partner') dictcreate = dict(data) if partner_id == 0: From 40e3f490a2dfffe81d164f0b8d8b68317a3e11cf Mon Sep 17 00:00:00 2001 From: vishmita Date: Tue, 22 Nov 2011 16:29:37 +0530 Subject: [PATCH 299/711] [FIX]Title should be change when going to subprocess. bzr revid: vja@vja-desktop-20111122105937-gi2zdinsmajtb53b --- addons/web_process/static/src/js/process.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/web_process/static/src/js/process.js b/addons/web_process/static/src/js/process.js index ab5384340f3..2b7eb9b8c35 100644 --- a/addons/web_process/static/src/js/process.js +++ b/addons/web_process/static/src/js/process.js @@ -45,6 +45,7 @@ openerp.web_process = function (openerp) { if(self.process_id) { self.graph_get().done(function(res) { self.process_notes = res.notes; + self.process_title = res.name; self.process_subflows = _.filter(res.nodes, function(x) { return x.subflow != false; }); From 5c5d874f5f20c1fc0bb5e77521feefc6114596ab Mon Sep 17 00:00:00 2001 From: "Vidhin Mehta (OpenERP)" Date: Tue, 22 Nov 2011 16:46:30 +0530 Subject: [PATCH 300/711] [FIX]fix issue of review. bzr revid: vme@tinyerp.com-20111122111630-i5nekbbyilt16mpr --- addons/web/static/src/js/view_editor.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/addons/web/static/src/js/view_editor.js b/addons/web/static/src/js/view_editor.js index 9a8d5c7268e..617546149a1 100644 --- a/addons/web/static/src/js/view_editor.js +++ b/addons/web/static/src/js/view_editor.js @@ -593,7 +593,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ var arch = _.detect(self.one_object['arch'], function(element) {return element.view_id == self.one_object.clicked_tr_view[0]}); var obj = self.get_object_by_id(this.one_object.clicked_tr_view[1],this.one_object['main_object'], []); - //for finding xpath tag from inherit view + //for finding xpath tag from inherit view var xml_arch = QWeb.load_xml(arch.arch); if (xml_arch.childNodes[0].tagName == "data") { var check_list = _.flatten(obj[0].child_id[0].att_list); @@ -723,8 +723,8 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ }else if(move_direct == "remove_node"){ parent = $(arch1).parents(); if(parent.length == 0 || (parent[0].tagName.toLowerCase() == "data")){ - id = id -1; - level = level - 1; + self.one_object.clicked_tr_id = self.one_object.clicked_tr_id -1; + self.one_object.clicked_tr_level = self.one_object.clicked_tr_level - 1; (parent.length == 0)?parent.push("remove_view"):false; } $(arch1).remove(); @@ -735,6 +735,14 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({ tr_element.remove(); }); cur_tr.remove(); + var parent_img = _.detect(self.one_object['parent_child_id'],function(element){ + return _.include(element.value, self.one_object.clicked_tr_id); + }); + if(parent_img.value.length == 1){ + self.edit_xml_dialog.$element. + find("tr[id='viewedit-"+parent_img.key+"']"). + find("img[id^='parentimg-']").remove(); + } self.one_object['parent_child_id'] = self.parent_child_list(self.one_object['main_object'],[]); } From 2503908223188a55d9fefef2edb72dc65fd62590 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Tue, 22 Nov 2011 16:55:25 +0530 Subject: [PATCH 301/711] [IMP] outlook function prototype for plugin bzr revid: al@openerp.com-20111122112525-wf86e3q6tgb2mgas --- addons/plugin/plugin_handler.py | 59 +++++++++++++++++---------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/addons/plugin/plugin_handler.py b/addons/plugin/plugin_handler.py index 202b050c722..b21f7423263 100644 --- a/addons/plugin/plugin_handler.py +++ b/addons/plugin/plugin_handler.py @@ -9,7 +9,7 @@ from osv import osv, fields class plugin_handler(osv.osv_memory): _name = 'plugin.handler' - + def _make_url(self, cr, uid, res_id, model, context=None): """ @param id: on which document the message is pushed @@ -20,16 +20,16 @@ class plugin_handler(osv.osv_memory): if base_url: base_url += '/?id=%s&model=%s'%(res_id,model) return base_url - + def is_installed(self, cr, uid): return True - + def partner_get(self, cr, uid, address_email): ids = self.pool.get('res.partner.address').search(cr, uid, [('partner_id', '!=', False), ('email', 'like', address_email)]) res_id = ids and self.pool.get('res.partner.address').browse(cr, uid, ids[0]).partner_id.id or 0 url = self._make_url(cr, uid, res_id, 'res.partner') return ('res.partner', res_id , url) - + def document_get(self, cr, uid, email): """ @param email: email is a standard RFC2822 email message @@ -55,7 +55,7 @@ class plugin_handler(osv.osv_memory): model = msg.model url = self._make_url(cr, uid, res_id, model) return (model, res_id, url) - + def document_type(self, cr, uid, context=None): """ Return the list of available model to push @@ -68,6 +68,7 @@ class plugin_handler(osv.osv_memory): doc_dict['res.partner'] = "Partner" return doc_dict.items() + # Can be used where search record was used def list_document_get(self, cr, uid, model, name): """ This function return the result of name_search on the object model @@ -77,7 +78,7 @@ class plugin_handler(osv.osv_memory): [(id, 'name')] """ return self.pool.get(model).name_search(cr,uid,name) - + def push_message(self, cr, uid, model, email, res_id=0): """ @param email: email is a standard RFC2822 email message @@ -108,8 +109,7 @@ class plugin_handler(osv.osv_memory): notify = "Mail succefully pushed" url = self._make_url(cr, uid, res_id, model) return (model, res_id, url, notify) - - + def contact_create(self, cr, uid, data, partner_id): """ @param data : the data use to create the res.partner.address @@ -126,25 +126,26 @@ class plugin_handler(osv.osv_memory): self.pool.get('res.partner.address').create(cr, uid, dictcreate) url = self._make_url(cr, uid, partner_id, 'res.partner') return ('res.partner', partner_id, url) - - - - ############################## - # # - # Specific to outlook # - # # - ############################## - - def attachment_create(self,cr, uid, data): - """ - @param data : the data use to create the ir.attachment - [('field_name', value)], field name is required. - """ - ir_attachment_obj = self.pool.get('ir.attachment') - attachment_ids = ir_attachment_obj.search(cr, uid, [('res_model', '=', data.get('res_model')), ('res_id', '=', data.get('res_id')), ('datas_fname', '=', data.get('datas_fname'))]) - if attachment_ids: - return attachment_ids[0] - else: - vals = {"res_model": data.get('res_model'), "res_id": data.get('res_id'), "name": data.get('name'), "datas" : data.get('datas'), "datas_fname" : data.get('datas_fname')} - return ir_attachment_obj.create(cr, uid, vals) + # Specific to outlook rfc822 is not available so we split in arguments headerd,body,attachemnts + def push_message_outlook(self, cr, uid, model, headers, body_text, body_html, attachments): + pass + # ---------------------------------------- + # solution 1 + # construct a fake rfc822 from the separated arguement + #m = email.asdfsadf + # use the push_message method + #self.push_message(m) + # ---------------------------------------- + # solution 2 + # use self.pushmessage only with header and body + # add attachemnt yourself after + + #ir_attachment_obj = self.pool.get('ir.attachment') + #attachment_ids = ir_attachment_obj.search(cr, uid, [('res_model', '=', data.get('res_model')), ('res_id', '=', data.get('res_id')), ('datas_fname', '=', data.get('datas_fname'))]) + #if attachment_ids: + # return attachment_ids[0] + #else: + # vals = {"res_model": data.get('res_model'), "res_id": data.get('res_id'), "name": data.get('name'), "datas" : data.get('datas'), "datas_fname" : data.get('datas_fname')} + # return ir_attachment_obj.create(cr, uid, vals) + #return (model, res_id, url, notify) From 1c7fa1fabc86da6abf8bed400f1a8514aac56529 Mon Sep 17 00:00:00 2001 From: "Kunal Chavda (OpenERP)" Date: Tue, 22 Nov 2011 17:04:20 +0530 Subject: [PATCH 302/711] [FIX]Fixed code for showing process view icon on viewmanager. bzr revid: kch@tinyerp.com-20111122113420-m5pme4wdkrfrrm19 --- addons/web_process/__openerp__.py | 2 +- addons/web_process/static/src/css/process.css | 10 ++++++++++ addons/web_process/static/src/xml/web_process.xml | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/addons/web_process/__openerp__.py b/addons/web_process/__openerp__.py index 1ef47573d55..edf86ce96f3 100644 --- a/addons/web_process/__openerp__.py +++ b/addons/web_process/__openerp__.py @@ -9,7 +9,7 @@ "static/src/css/process.css" ], 'qweb': [ - "static/src/xml/web_process.css" + "static/src/xml/*.xml" ], 'active': True } diff --git a/addons/web_process/static/src/css/process.css b/addons/web_process/static/src/css/process.css index 364c3788b11..ebb2267714c 100644 --- a/addons/web_process/static/src/css/process.css +++ b/addons/web_process/static/src/css/process.css @@ -50,6 +50,16 @@ a.cta-a strong { display: table-cell; } +.oe-process-view { + height: 20px; + padding: 0; + width: 24px; + cursor: pointer; + display: block; + background: url(/web/static/src/img/icons/gtk-help.png) no-repeat bottom; + float: left; +} + .process-help-text { float: left; padding:5px 10px; diff --git a/addons/web_process/static/src/xml/web_process.xml b/addons/web_process/static/src/xml/web_process.xml index 63e207a4f96..727bdad9d25 100644 --- a/addons/web_process/static/src/xml/web_process.xml +++ b/addons/web_process/static/src/xml/web_process.xml @@ -1,7 +1,7 @@