diff --git a/addons/account/invoice.py b/addons/account/invoice.py index e14a41ce448..26906ef3308 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -1258,7 +1258,7 @@ class account_invoice_line(osv.osv): t = t - (p * l[2].get('quantity')) taxes = l[2].get('invoice_line_tax_id') if len(taxes[0]) >= 3 and taxes[0][2]: - taxes = tax_obj.browse(cr, uid, taxes[0][2]) + taxes = tax_obj.browse(cr, uid, list(taxes[0][2])) for tax in tax_obj.compute_all(cr, uid, taxes, p,l[2].get('quantity'), context.get('address_invoice_id', False), l[2].get('product_id', False), context.get('partner_id', False))['taxes']: t = t - tax['amount'] return t diff --git a/addons/account/report/account_balance_sheet.py b/addons/account/report/account_balance_sheet.py index fa80ad96f3c..79bcce882ae 100644 --- a/addons/account/report/account_balance_sheet.py +++ b/addons/account/report/account_balance_sheet.py @@ -214,4 +214,4 @@ report_sxw.report_sxw('report.account.balancesheet', 'account.account', 'addons/account/report/account_balance_sheet.rml',parser=report_balancesheet_horizontal, header='internal') -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/report/account_invoice_report.py b/addons/account/report/account_invoice_report.py index 9c7cf014e4d..4da8401e9a7 100644 --- a/addons/account/report/account_invoice_report.py +++ b/addons/account/report/account_invoice_report.py @@ -89,7 +89,7 @@ class account_invoice_report(osv.osv): ai.payment_term as payment_term, ai.period_id as period_id, (case when u.uom_type not in ('reference') then - (select name from product_uom where uom_type='reference' and category_id=u.category_id) + (select name from product_uom where uom_type='reference' and active and category_id=u.category_id LIMIT 1) else u.name end) as uom_name, diff --git a/addons/account/report/account_tax_code.py b/addons/account/report/account_tax_code.py index 86d3128cfe7..56895987b45 100644 --- a/addons/account/report/account_tax_code.py +++ b/addons/account/report/account_tax_code.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################## # diff --git a/addons/account/wizard/account_change_currency.py b/addons/account/wizard/account_change_currency.py index 009352aa7c9..eb4319a56b6 100644 --- a/addons/account/wizard/account_change_currency.py +++ b/addons/account/wizard/account_change_currency.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- encoding: utf-8 -*- ############################################################################## # diff --git a/addons/account_budget/account_budget.py b/addons/account_budget/account_budget.py index d8616a94ebf..12caba17374 100644 --- a/addons/account_budget/account_budget.py +++ b/addons/account_budget/account_budget.py @@ -190,7 +190,7 @@ class crossovered_budget_lines(osv.osv): _description = "Budget Line" _columns = { 'crossovered_budget_id': fields.many2one('crossovered.budget', 'Budget', ondelete='cascade', select=True, required=True), - 'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account',required=False), + 'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account',required=True), 'general_budget_id': fields.many2one('account.budget.post', 'Budgetary Position',required=True), 'date_from': fields.date('Start Date', required=True), 'date_to': fields.date('End Date', required=True), diff --git a/addons/account_voucher/voucher_payment_receipt_view.xml b/addons/account_voucher/voucher_payment_receipt_view.xml index c53cc91d324..7be6022c474 100644 --- a/addons/account_voucher/voucher_payment_receipt_view.xml +++ b/addons/account_voucher/voucher_payment_receipt_view.xml @@ -162,6 +162,7 @@ + @@ -221,7 +222,6 @@ - @@ -303,6 +303,7 @@ + @@ -362,7 +363,6 @@ - diff --git a/addons/account_voucher/voucher_sales_purchase_view.xml b/addons/account_voucher/voucher_sales_purchase_view.xml index 04a7e5a43e0..6672f49f319 100644 --- a/addons/account_voucher/voucher_sales_purchase_view.xml +++ b/addons/account_voucher/voucher_sales_purchase_view.xml @@ -100,7 +100,8 @@ - + + @@ -140,7 +141,6 @@ - @@ -228,6 +228,7 @@ + @@ -260,7 +261,6 @@ - diff --git a/addons/anonymization/anonymization.py b/addons/anonymization/anonymization.py index 35a1fe83f56..2814227015a 100644 --- a/addons/anonymization/anonymization.py +++ b/addons/anonymization/anonymization.py @@ -295,9 +295,8 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory): eview = etree.fromstring(res['arch']) placeholder = eview.xpath("group[@name='placeholder1']") - placeholder = len(placeholder) and placeholder[0] or None - - if placeholder: + if len(placeholder): + placeholder = placeholder[0] if step == 'new_window' and state == 'clear': # clicked in the menu and the fields are not anonymized: warn the admin that backuping the db is very important placeholder.addnext(etree.Element('field', {'name': 'msg', 'colspan': '4', 'nolabel': '1'})) diff --git a/addons/audittrail/audittrail.py b/addons/audittrail/audittrail.py index 1af4dba61f3..12e2fe7dd26 100644 --- a/addons/audittrail/audittrail.py +++ b/addons/audittrail/audittrail.py @@ -406,13 +406,16 @@ class audittrail_objects_proxy(object_proxy): cr.close() return res else: - res_ids = args[0] - old_values = {} - fields = [] - if len(args)>1 and type(args[1]) == dict: - fields = args[1].keys() - if type(res_ids) in (long, int): - res_ids = [res_ids] + res_ids = [] + res = True + if args: + res_ids = args[0] + old_values = {} + fields = [] + if len(args)>1 and type(args[1]) == dict: + fields = args[1].keys() + if type(res_ids) in (long, int): + res_ids = [res_ids] if res_ids: for resource in resource_pool.read(cr, uid, res_ids): resource_id = resource['id'] diff --git a/addons/base_crypt/crypt.py b/addons/base_crypt/crypt.py index 9f437ace9fc..a616b7e5b74 100644 --- a/addons/base_crypt/crypt.py +++ b/addons/base_crypt/crypt.py @@ -41,6 +41,7 @@ from string import ascii_letters, digits from osv import fields,osv import pooler from tools.translate import _ +from service import security magic_md5 = '$1$' @@ -184,7 +185,7 @@ class users(osv.osv): cr.close() def _login(self, cr, db, login, password): - cr.execute( 'SELECT password, id FROM res_users WHERE login=%s', + cr.execute( 'SELECT password, id FROM res_users WHERE login=%s AND active', (login.encode('utf-8'),)) if cr.rowcount: @@ -220,6 +221,10 @@ class users(osv.osv): return False def check(self, db, uid, passwd): + if not passwd: + # empty passwords disallowed for obvious security reasons + raise security.ExceptionNoTb('AccessDenied') + # Get a chance to hash all passwords in db before using the uid_cache. obj = pooler.get_pool(db).get('res.users') if not hasattr(obj, "_salt_cache"): @@ -245,7 +250,7 @@ class users(osv.osv): raise security.ExceptionNoTb('AccessDenied') else: salt = self._salt_cache[db][uid] - cr.execute('SELECT COUNT(*) FROM res_users WHERE id=%s AND password=%s', + cr.execute('SELECT COUNT(*) FROM res_users WHERE id=%s AND password=%s AND active', (int(uid), encrypt_md5(passwd, salt))) res = cr.fetchone()[0] finally: diff --git a/addons/base_module_doc_rst/i18n/bg.po b/addons/base_module_doc_rst/i18n/bg.po index 17e244a246b..53270abacd4 100644 --- a/addons/base_module_doc_rst/i18n/bg.po +++ b/addons/base_module_doc_rst/i18n/bg.po @@ -6,21 +6,62 @@ msgid "" msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" -"POT-Creation-Date: 2009-01-28 00:58+0000\n" -"PO-Revision-Date: 2010-01-26 11:45+0000\n" -"Last-Translator: Boris \n" +"POT-Creation-Date: 2011-01-11 11:14+0000\n" +"PO-Revision-Date: 2011-04-03 13:20+0000\n" +"Last-Translator: Vasil Bojilov Bovilov \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: 2010-04-24 04:03+0000\n" -"X-Generator: Launchpad (build Unknown)\n" +"X-Launchpad-Export-Date: 2011-04-04 05:53+0000\n" +"X-Generator: Launchpad (build 12559)\n" + +#. module: base_module_doc_rst +#: view:ir.module.module:0 +msgid "You can save this image as .png file" +msgstr "Можете да запишете това изображение като .png файл" #. module: base_module_doc_rst #: wizard_view:tech.guide.rst,init:0 msgid "Technical Guide in rst format" msgstr "Техническо ръководство във формат rst" +#. module: base_module_doc_rst +#: wizard_button:create.relation.graph,init,end:0 +msgid "Ok" +msgstr "Ok" + +#. module: base_module_doc_rst +#: wizard_view:create.relation.graph,init:0 +msgid "(Relationship Graphs generated)" +msgstr "(Генерирана е графика с релациите)" + +#. module: base_module_doc_rst +#: wizard_view:tech.guide.rst,init:0 +msgid "Please choose a file where the Technical Guide will be written." +msgstr "Изберете фйл в който Техническото ръководство ще бъде написано." + +#. module: base_module_doc_rst +#: model:ir.module.module,description:base_module_doc_rst.module_meta_information +msgid "" +"\n" +" * This module generates the Technical Guides of selected modules in " +"Restructured Text format (RST)\n" +" * It uses the Sphinx (http://sphinx.pocoo.org) implementation of RST\n" +" * It creates a tarball (.tgz file suffix) containing an index file and " +"one file per module\n" +" * Generates Relationship Graph\n" +" " +msgstr "" +"\n" +" * В този модул се генерират технически ръководства на избрани модули в " +"преструктуриран текстов формат(RST)\n" +"* При него се използва сфинкс (http://sphinx.pocoo.org) прилагане на RST\n" +"* Това създава tarball (. наставка tgz файл), съдържащ индекс файл и файл на " +"модул\n" +"* Генерира Връзка Graph\n" +" " + #. module: base_module_doc_rst #: wizard_field:tech.guide.rst,init,name:0 msgid "filename" @@ -32,9 +73,21 @@ msgid "Create RST Technical Guide" msgstr "Създай ръководство във формат rst" #. module: base_module_doc_rst -#: wizard_view:tech.guide.rst,init:0 -msgid "Please choose a file where the Technical Guide will be written." -msgstr "Изберете фйл в който Техническото ръководство ще бъде написано." +#: model:ir.actions.wizard,name:base_module_doc_rst.wiz_gen_graph +msgid "Generate Relationship Graph" +msgstr "Генериране на графика за релациите" + +#. module: base_module_doc_rst +#: wizard_view:create.relation.graph,init:0 +#: view:ir.module.module:0 +#: field:ir.module.module,file_graph:0 +msgid "Relationship Graph" +msgstr "Диаграма на връзките" + +#. module: base_module_doc_rst +#: model:ir.model,name:base_module_doc_rst.model_ir_module_module +msgid "Module" +msgstr "Модул" #. module: base_module_doc_rst #: wizard_field:tech.guide.rst,init,rst_file:0 @@ -51,6 +104,11 @@ msgstr "Затвори" msgid "Module Technical Guide in Restructured Text " msgstr "Модул Техническо ръководство като преструктуриран текст " +#. module: base_module_doc_rst +#: model:ir.actions.report.xml,name:base_module_doc_rst.report_proximity_graph +msgid "Proximity graph" +msgstr "Графика на сближаване" + #. module: base_module_doc_rst #: wizard_view:tech.guide.rst,init:0 msgid "Create Technical Guide in rst format" diff --git a/addons/base_module_doc_rst/i18n/ca.po b/addons/base_module_doc_rst/i18n/ca.po index 47699b5e827..d710361a08a 100644 --- a/addons/base_module_doc_rst/i18n/ca.po +++ b/addons/base_module_doc_rst/i18n/ca.po @@ -6,22 +6,63 @@ msgid "" msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" -"POT-Creation-Date: 2009-01-28 00:58+0000\n" -"PO-Revision-Date: 2010-01-26 11:45+0000\n" -"Last-Translator: Jordi Esteve - http://www.zikzakmedia.com " +"POT-Creation-Date: 2011-01-11 11:14+0000\n" +"PO-Revision-Date: 2011-03-26 18:22+0000\n" +"Last-Translator: Jordi Esteve (www.zikzakmedia.com) " "\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: 2010-04-24 04:03+0000\n" -"X-Generator: Launchpad (build Unknown)\n" +"X-Launchpad-Export-Date: 2011-03-27 06:28+0000\n" +"X-Generator: Launchpad (build 12559)\n" + +#. module: base_module_doc_rst +#: view:ir.module.module:0 +msgid "You can save this image as .png file" +msgstr "Podeu desar aquesta imatge com un fitxer. png" #. module: base_module_doc_rst #: wizard_view:tech.guide.rst,init:0 msgid "Technical Guide in rst format" msgstr "Guia tècnica en format RST" +#. module: base_module_doc_rst +#: wizard_button:create.relation.graph,init,end:0 +msgid "Ok" +msgstr "D'acord" + +#. module: base_module_doc_rst +#: wizard_view:create.relation.graph,init:0 +msgid "(Relationship Graphs generated)" +msgstr "(Gràfics de relacions generats)" + +#. module: base_module_doc_rst +#: wizard_view:tech.guide.rst,init:0 +msgid "Please choose a file where the Technical Guide will be written." +msgstr "Seleccioneu un fitxer on la guia tècnica serà escrita." + +#. module: base_module_doc_rst +#: model:ir.module.module,description:base_module_doc_rst.module_meta_information +msgid "" +"\n" +" * This module generates the Technical Guides of selected modules in " +"Restructured Text format (RST)\n" +" * It uses the Sphinx (http://sphinx.pocoo.org) implementation of RST\n" +" * It creates a tarball (.tgz file suffix) containing an index file and " +"one file per module\n" +" * Generates Relationship Graph\n" +" " +msgstr "" +"\n" +" * Aquest mòdul genera les guies tècniques dels mòduls seleccionats en " +"RST (Restructured Text format).\n" +" * Utilitza la implementació Sphinx d'RST (http://sphinx.pocoo.org).\n" +" * Crea un arxiu comprimit (amb extensió .tgz) que conté un fitxer índex " +"i un fitxer per mòdul.\n" +" * Genera un gràfic de relacions.\n" +" " + #. module: base_module_doc_rst #: wizard_field:tech.guide.rst,init,name:0 msgid "filename" @@ -33,9 +74,21 @@ msgid "Create RST Technical Guide" msgstr "Crea guia tècnica RST" #. module: base_module_doc_rst -#: wizard_view:tech.guide.rst,init:0 -msgid "Please choose a file where the Technical Guide will be written." -msgstr "Seleccioneu un fitxer on la guia tècnica serà escrita." +#: model:ir.actions.wizard,name:base_module_doc_rst.wiz_gen_graph +msgid "Generate Relationship Graph" +msgstr "Genera gràfic de relacions" + +#. module: base_module_doc_rst +#: wizard_view:create.relation.graph,init:0 +#: view:ir.module.module:0 +#: field:ir.module.module,file_graph:0 +msgid "Relationship Graph" +msgstr "Gràfic de relacions" + +#. module: base_module_doc_rst +#: model:ir.model,name:base_module_doc_rst.model_ir_module_module +msgid "Module" +msgstr "Mòdul" #. module: base_module_doc_rst #: wizard_field:tech.guide.rst,init,rst_file:0 @@ -52,6 +105,11 @@ msgstr "Tanca" msgid "Module Technical Guide in Restructured Text " msgstr "Guia tècnica d'un mòdul en text reestructurat (RST) " +#. module: base_module_doc_rst +#: model:ir.actions.report.xml,name:base_module_doc_rst.report_proximity_graph +msgid "Proximity graph" +msgstr "Gràfic de proximitat" + #. module: base_module_doc_rst #: wizard_view:tech.guide.rst,init:0 msgid "Create Technical Guide in rst format" diff --git a/addons/base_module_doc_rst/i18n/es.po b/addons/base_module_doc_rst/i18n/es.po index 84ad1df3c5f..90e3c2c0710 100644 --- a/addons/base_module_doc_rst/i18n/es.po +++ b/addons/base_module_doc_rst/i18n/es.po @@ -6,22 +6,63 @@ msgid "" msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" -"POT-Creation-Date: 2009-01-28 00:58+0000\n" -"PO-Revision-Date: 2010-01-26 11:45+0000\n" -"Last-Translator: Jordi Esteve - http://www.zikzakmedia.com " +"POT-Creation-Date: 2011-01-11 11:14+0000\n" +"PO-Revision-Date: 2011-03-26 18:22+0000\n" +"Last-Translator: Jordi Esteve (www.zikzakmedia.com) " "\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: 2010-04-24 04:03+0000\n" -"X-Generator: Launchpad (build Unknown)\n" +"X-Launchpad-Export-Date: 2011-03-27 06:28+0000\n" +"X-Generator: Launchpad (build 12559)\n" + +#. module: base_module_doc_rst +#: view:ir.module.module:0 +msgid "You can save this image as .png file" +msgstr "Puede guardar esta imagen como un archivo .png" #. module: base_module_doc_rst #: wizard_view:tech.guide.rst,init:0 msgid "Technical Guide in rst format" msgstr "Guía técnica en formato RST" +#. module: base_module_doc_rst +#: wizard_button:create.relation.graph,init,end:0 +msgid "Ok" +msgstr "Aceptar" + +#. module: base_module_doc_rst +#: wizard_view:create.relation.graph,init:0 +msgid "(Relationship Graphs generated)" +msgstr "(Gráficos de relaciones generados)" + +#. module: base_module_doc_rst +#: wizard_view:tech.guide.rst,init:0 +msgid "Please choose a file where the Technical Guide will be written." +msgstr "Por favor, seleccione un archivo donde la guía técnica será escrita." + +#. module: base_module_doc_rst +#: model:ir.module.module,description:base_module_doc_rst.module_meta_information +msgid "" +"\n" +" * This module generates the Technical Guides of selected modules in " +"Restructured Text format (RST)\n" +" * It uses the Sphinx (http://sphinx.pocoo.org) implementation of RST\n" +" * It creates a tarball (.tgz file suffix) containing an index file and " +"one file per module\n" +" * Generates Relationship Graph\n" +" " +msgstr "" +"\n" +" * Este módulo genera las guías técnicas de los módulos seleccionados en " +"RST (Restructured Text format).\n" +" * Utiliza la implementación Sphinx de RST (http://sphinx.pocoo.org).\n" +" * Crea un archivo comprimido (con extensión .tgz) que contiene un " +"archivo índice y un archivo por módulo.\n" +" * Genera un gráfico de relaciones.\n" +" " + #. module: base_module_doc_rst #: wizard_field:tech.guide.rst,init,name:0 msgid "filename" @@ -33,9 +74,21 @@ msgid "Create RST Technical Guide" msgstr "Crear guía técnica RST" #. module: base_module_doc_rst -#: wizard_view:tech.guide.rst,init:0 -msgid "Please choose a file where the Technical Guide will be written." -msgstr "Por favor, seleccione un archivo donde la guía técnica será escrita." +#: model:ir.actions.wizard,name:base_module_doc_rst.wiz_gen_graph +msgid "Generate Relationship Graph" +msgstr "Genera gráfico de relaciones" + +#. module: base_module_doc_rst +#: wizard_view:create.relation.graph,init:0 +#: view:ir.module.module:0 +#: field:ir.module.module,file_graph:0 +msgid "Relationship Graph" +msgstr "Gráfico de relaciones" + +#. module: base_module_doc_rst +#: model:ir.model,name:base_module_doc_rst.model_ir_module_module +msgid "Module" +msgstr "Módulo" #. module: base_module_doc_rst #: wizard_field:tech.guide.rst,init,rst_file:0 @@ -52,6 +105,11 @@ msgstr "Cerrar" msgid "Module Technical Guide in Restructured Text " msgstr "Guía técnica de un módulo en texto reestructurado (RST) " +#. module: base_module_doc_rst +#: model:ir.actions.report.xml,name:base_module_doc_rst.report_proximity_graph +msgid "Proximity graph" +msgstr "Gráfico de proximidad" + #. module: base_module_doc_rst #: wizard_view:tech.guide.rst,init:0 msgid "Create Technical Guide in rst format" diff --git a/addons/base_module_doc_rst/i18n/es_PY.po b/addons/base_module_doc_rst/i18n/es_PY.po new file mode 100644 index 00000000000..321947c6d3e --- /dev/null +++ b/addons/base_module_doc_rst/i18n/es_PY.po @@ -0,0 +1,116 @@ +# Spanish (Paraguay) translation for openobject-addons +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2011-01-11 11:14+0000\n" +"PO-Revision-Date: 2011-03-08 17:38+0000\n" +"Last-Translator: fadel \n" +"Language-Team: Spanish (Paraguay) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2011-03-09 06:12+0000\n" +"X-Generator: Launchpad (build 12351)\n" + +#. module: base_module_doc_rst +#: view:ir.module.module:0 +msgid "You can save this image as .png file" +msgstr "Puede guardar esta image como un archivo .png" + +#. module: base_module_doc_rst +#: wizard_view:tech.guide.rst,init:0 +msgid "Technical Guide in rst format" +msgstr "Guía técnica en formato RST" + +#. module: base_module_doc_rst +#: wizard_button:create.relation.graph,init,end:0 +msgid "Ok" +msgstr "Aceptar" + +#. module: base_module_doc_rst +#: wizard_view:create.relation.graph,init:0 +msgid "(Relationship Graphs generated)" +msgstr "(Generado gráfico de relaciones)" + +#. module: base_module_doc_rst +#: wizard_view:tech.guide.rst,init:0 +msgid "Please choose a file where the Technical Guide will be written." +msgstr "Por favor, seleccione un archivo donde la guía técnica será escrita." + +#. module: base_module_doc_rst +#: model:ir.module.module,description:base_module_doc_rst.module_meta_information +msgid "" +"\n" +" * This module generates the Technical Guides of selected modules in " +"Restructured Text format (RST)\n" +" * It uses the Sphinx (http://sphinx.pocoo.org) implementation of RST\n" +" * It creates a tarball (.tgz file suffix) containing an index file and " +"one file per module\n" +" * Generates Relationship Graph\n" +" " +msgstr "" +"\n" +" Este módulo genera las guías técnicas de los módulos seleccionados en " +"RST\n" +"Utiliza la implementación Sphinx de RST (http://sphinx.pocoo.org) \n" +"Crea un archivo comprimido (con extensión .tgz) que contiene un archivo " +"índice y un archivo por módulo\n" +"Genera un gráfico de relaciones\n" +" " + +#. module: base_module_doc_rst +#: wizard_field:tech.guide.rst,init,name:0 +msgid "filename" +msgstr "Nombre de Archivo" + +#. module: base_module_doc_rst +#: model:ir.actions.wizard,name:base_module_doc_rst.wiz_tech_guide_rst +msgid "Create RST Technical Guide" +msgstr "Crear guía técnica RST" + +#. module: base_module_doc_rst +#: model:ir.actions.wizard,name:base_module_doc_rst.wiz_gen_graph +msgid "Generate Relationship Graph" +msgstr "Genera gráfico de relaciones" + +#. module: base_module_doc_rst +#: wizard_view:create.relation.graph,init:0 +#: view:ir.module.module:0 +#: field:ir.module.module,file_graph:0 +msgid "Relationship Graph" +msgstr "Gráfico de Relaciones" + +#. module: base_module_doc_rst +#: model:ir.model,name:base_module_doc_rst.model_ir_module_module +msgid "Module" +msgstr "Módulo" + +#. module: base_module_doc_rst +#: wizard_field:tech.guide.rst,init,rst_file:0 +msgid "file" +msgstr "Archivo" + +#. module: base_module_doc_rst +#: wizard_button:tech.guide.rst,init,end:0 +msgid "Close" +msgstr "Cerrar" + +#. module: base_module_doc_rst +#: model:ir.module.module,shortdesc:base_module_doc_rst.module_meta_information +msgid "Module Technical Guide in Restructured Text " +msgstr "Guía técnica de un módulo en texto reestructurado (RST) " + +#. module: base_module_doc_rst +#: model:ir.actions.report.xml,name:base_module_doc_rst.report_proximity_graph +msgid "Proximity graph" +msgstr "Gráfico de proximidad" + +#. module: base_module_doc_rst +#: wizard_view:tech.guide.rst,init:0 +msgid "Create Technical Guide in rst format" +msgstr "Crear guía técnica en formato RST" diff --git a/addons/base_module_doc_rst/i18n/nl.po b/addons/base_module_doc_rst/i18n/nl.po index b2752a83daa..e5547c11a36 100644 --- a/addons/base_module_doc_rst/i18n/nl.po +++ b/addons/base_module_doc_rst/i18n/nl.po @@ -6,21 +6,62 @@ msgid "" msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" -"POT-Creation-Date: 2009-01-28 00:58+0000\n" -"PO-Revision-Date: 2010-01-26 12:00+0000\n" -"Last-Translator: Freerk Kalsbeek (Mindswitch BV) \n" +"POT-Creation-Date: 2011-01-11 11:14+0000\n" +"PO-Revision-Date: 2011-03-10 20:02+0000\n" +"Last-Translator: Wouter Schrijvers \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: 2010-04-24 04:03+0000\n" -"X-Generator: Launchpad (build Unknown)\n" +"X-Launchpad-Export-Date: 2011-03-11 06:00+0000\n" +"X-Generator: Launchpad (build 12559)\n" + +#. module: base_module_doc_rst +#: view:ir.module.module:0 +msgid "You can save this image as .png file" +msgstr "Deze weergave kan als .png bestand opgeslagen worden" #. module: base_module_doc_rst #: wizard_view:tech.guide.rst,init:0 msgid "Technical Guide in rst format" msgstr "Techische handleiding in rst formaat" +#. module: base_module_doc_rst +#: wizard_button:create.relation.graph,init,end:0 +msgid "Ok" +msgstr "Ok" + +#. module: base_module_doc_rst +#: wizard_view:create.relation.graph,init:0 +msgid "(Relationship Graphs generated)" +msgstr "(Relatiegrafiek wordt gegenereerd)" + +#. module: base_module_doc_rst +#: wizard_view:tech.guide.rst,init:0 +msgid "Please choose a file where the Technical Guide will be written." +msgstr "Kies een bestand waar de Technische handleiding wordt opgeslagen" + +#. module: base_module_doc_rst +#: model:ir.module.module,description:base_module_doc_rst.module_meta_information +msgid "" +"\n" +" * This module generates the Technical Guides of selected modules in " +"Restructured Text format (RST)\n" +" * It uses the Sphinx (http://sphinx.pocoo.org) implementation of RST\n" +" * It creates a tarball (.tgz file suffix) containing an index file and " +"one file per module\n" +" * Generates Relationship Graph\n" +" " +msgstr "" +"\n" +" * Deze module genereert de Technische Gids voor de geselecteerde modules " +"in Restructured Text format (RST)\n" +" * De Sphinx (http://sphinx.pocoo.org) RST-implementatie wordt gebruikt\n" +" * De gecreëerde tarball (.tgz bestandsextensie) bevat een index-bestand " +"en één bestand per module\n" +" * Genereert Relatiegrafiek\n" +" " + #. module: base_module_doc_rst #: wizard_field:tech.guide.rst,init,name:0 msgid "filename" @@ -32,9 +73,21 @@ msgid "Create RST Technical Guide" msgstr "RST Technische handleiding aanmaken" #. module: base_module_doc_rst -#: wizard_view:tech.guide.rst,init:0 -msgid "Please choose a file where the Technical Guide will be written." -msgstr "Kies een bestand waar de Technische handleiding wordt opgeslagen" +#: model:ir.actions.wizard,name:base_module_doc_rst.wiz_gen_graph +msgid "Generate Relationship Graph" +msgstr "Genereer Relatiegrafiek" + +#. module: base_module_doc_rst +#: wizard_view:create.relation.graph,init:0 +#: view:ir.module.module:0 +#: field:ir.module.module,file_graph:0 +msgid "Relationship Graph" +msgstr "Relatiegrafiek" + +#. module: base_module_doc_rst +#: model:ir.model,name:base_module_doc_rst.model_ir_module_module +msgid "Module" +msgstr "Module" #. module: base_module_doc_rst #: wizard_field:tech.guide.rst,init,rst_file:0 @@ -51,6 +104,11 @@ msgstr "Sluiten" msgid "Module Technical Guide in Restructured Text " msgstr "Module Technische Handleiding in Restructured Text (rst) " +#. module: base_module_doc_rst +#: model:ir.actions.report.xml,name:base_module_doc_rst.report_proximity_graph +msgid "Proximity graph" +msgstr "" + #. module: base_module_doc_rst #: wizard_view:tech.guide.rst,init:0 msgid "Create Technical Guide in rst format" diff --git a/addons/base_module_doc_rst/i18n/ru.po b/addons/base_module_doc_rst/i18n/ru.po index bbaa4b2aa0f..ab3e0bfeb7b 100644 --- a/addons/base_module_doc_rst/i18n/ru.po +++ b/addons/base_module_doc_rst/i18n/ru.po @@ -6,52 +6,111 @@ msgid "" msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" -"POT-Creation-Date: 2009-01-28 00:58+0000\n" -"PO-Revision-Date: 2010-01-26 10:55+0000\n" -"Last-Translator: <>\n" +"POT-Creation-Date: 2011-01-11 11:14+0000\n" +"PO-Revision-Date: 2011-04-25 14:11+0000\n" +"Last-Translator: Stanislav Hanzhin \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: 2010-04-24 04:03+0000\n" -"X-Generator: Launchpad (build Unknown)\n" +"X-Launchpad-Export-Date: 2011-04-30 06:07+0000\n" +"X-Generator: Launchpad (build 12758)\n" + +#. module: base_module_doc_rst +#: view:ir.module.module:0 +msgid "You can save this image as .png file" +msgstr "Вы можете сохранить это изображение как PNG-файл" #. module: base_module_doc_rst #: wizard_view:tech.guide.rst,init:0 msgid "Technical Guide in rst format" -msgstr "" +msgstr "Техническое руководство в формате RST" #. module: base_module_doc_rst -#: wizard_field:tech.guide.rst,init,name:0 -msgid "filename" -msgstr "" +#: wizard_button:create.relation.graph,init,end:0 +msgid "Ok" +msgstr "OK" #. module: base_module_doc_rst -#: model:ir.actions.wizard,name:base_module_doc_rst.wiz_tech_guide_rst -msgid "Create RST Technical Guide" -msgstr "" +#: wizard_view:create.relation.graph,init:0 +msgid "(Relationship Graphs generated)" +msgstr "(Графы отношений сгенерированны)" #. module: base_module_doc_rst #: wizard_view:tech.guide.rst,init:0 msgid "Please choose a file where the Technical Guide will be written." msgstr "" +"Пожалуйста, выберите файл, куда будет записано Техническое руководство" + +#. module: base_module_doc_rst +#: model:ir.module.module,description:base_module_doc_rst.module_meta_information +msgid "" +"\n" +" * This module generates the Technical Guides of selected modules in " +"Restructured Text format (RST)\n" +" * It uses the Sphinx (http://sphinx.pocoo.org) implementation of RST\n" +" * It creates a tarball (.tgz file suffix) containing an index file and " +"one file per module\n" +" * Generates Relationship Graph\n" +" " +msgstr "" +"\n" +" * Этот модуль генерирует Техническое Руководство для выбранных модулей в " +"формате Restructured Text format (RST)\n" +" * Он использует реализацию RST из Sphinx (http://sphinx.pocoo.org)\n" +" * Это создает архив (с расширением .tgz), содержащий файл индекса и один " +"файл на каждый модуль\n" +" * Создает граф отношений\n" +" " + +#. module: base_module_doc_rst +#: wizard_field:tech.guide.rst,init,name:0 +msgid "filename" +msgstr "имя файла" + +#. module: base_module_doc_rst +#: model:ir.actions.wizard,name:base_module_doc_rst.wiz_tech_guide_rst +msgid "Create RST Technical Guide" +msgstr "Создать Техническое Руководство в формате RST" + +#. module: base_module_doc_rst +#: model:ir.actions.wizard,name:base_module_doc_rst.wiz_gen_graph +msgid "Generate Relationship Graph" +msgstr "Сгенерировать граф отношений" + +#. module: base_module_doc_rst +#: wizard_view:create.relation.graph,init:0 +#: view:ir.module.module:0 +#: field:ir.module.module,file_graph:0 +msgid "Relationship Graph" +msgstr "Граф отношений" + +#. module: base_module_doc_rst +#: model:ir.model,name:base_module_doc_rst.model_ir_module_module +msgid "Module" +msgstr "Модуль" #. module: base_module_doc_rst #: wizard_field:tech.guide.rst,init,rst_file:0 msgid "file" -msgstr "" +msgstr "файл" #. module: base_module_doc_rst #: wizard_button:tech.guide.rst,init,end:0 msgid "Close" -msgstr "" +msgstr "Закрыть" #. module: base_module_doc_rst #: model:ir.module.module,shortdesc:base_module_doc_rst.module_meta_information msgid "Module Technical Guide in Restructured Text " -msgstr "" +msgstr "Техническая документация модуля хранится в формате RST " + +#. module: base_module_doc_rst +#: model:ir.actions.report.xml,name:base_module_doc_rst.report_proximity_graph +msgid "Proximity graph" +msgstr "Граф доступности" #. module: base_module_doc_rst #: wizard_view:tech.guide.rst,init:0 msgid "Create Technical Guide in rst format" -msgstr "" +msgstr "Создать Техническое Руководство в формате rst" diff --git a/addons/base_module_doc_rst/i18n/sq.po b/addons/base_module_doc_rst/i18n/sq.po new file mode 100644 index 00000000000..3bccbf6f06d --- /dev/null +++ b/addons/base_module_doc_rst/i18n/sq.po @@ -0,0 +1,108 @@ +# Albanian translation for openobject-addons +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2011-01-11 11:14+0000\n" +"PO-Revision-Date: 2011-03-28 15:34+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Albanian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2011-03-29 06:21+0000\n" +"X-Generator: Launchpad (build 12559)\n" + +#. module: base_module_doc_rst +#: view:ir.module.module:0 +msgid "You can save this image as .png file" +msgstr "" + +#. module: base_module_doc_rst +#: wizard_view:tech.guide.rst,init:0 +msgid "Technical Guide in rst format" +msgstr "" + +#. module: base_module_doc_rst +#: wizard_button:create.relation.graph,init,end:0 +msgid "Ok" +msgstr "" + +#. module: base_module_doc_rst +#: wizard_view:create.relation.graph,init:0 +msgid "(Relationship Graphs generated)" +msgstr "" + +#. module: base_module_doc_rst +#: wizard_view:tech.guide.rst,init:0 +msgid "Please choose a file where the Technical Guide will be written." +msgstr "" + +#. module: base_module_doc_rst +#: model:ir.module.module,description:base_module_doc_rst.module_meta_information +msgid "" +"\n" +" * This module generates the Technical Guides of selected modules in " +"Restructured Text format (RST)\n" +" * It uses the Sphinx (http://sphinx.pocoo.org) implementation of RST\n" +" * It creates a tarball (.tgz file suffix) containing an index file and " +"one file per module\n" +" * Generates Relationship Graph\n" +" " +msgstr "" + +#. module: base_module_doc_rst +#: wizard_field:tech.guide.rst,init,name:0 +msgid "filename" +msgstr "" + +#. module: base_module_doc_rst +#: model:ir.actions.wizard,name:base_module_doc_rst.wiz_tech_guide_rst +msgid "Create RST Technical Guide" +msgstr "" + +#. module: base_module_doc_rst +#: model:ir.actions.wizard,name:base_module_doc_rst.wiz_gen_graph +msgid "Generate Relationship Graph" +msgstr "" + +#. module: base_module_doc_rst +#: wizard_view:create.relation.graph,init:0 +#: view:ir.module.module:0 +#: field:ir.module.module,file_graph:0 +msgid "Relationship Graph" +msgstr "" + +#. module: base_module_doc_rst +#: model:ir.model,name:base_module_doc_rst.model_ir_module_module +msgid "Module" +msgstr "" + +#. module: base_module_doc_rst +#: wizard_field:tech.guide.rst,init,rst_file:0 +msgid "file" +msgstr "" + +#. module: base_module_doc_rst +#: wizard_button:tech.guide.rst,init,end:0 +msgid "Close" +msgstr "" + +#. module: base_module_doc_rst +#: model:ir.module.module,shortdesc:base_module_doc_rst.module_meta_information +msgid "Module Technical Guide in Restructured Text " +msgstr "" + +#. module: base_module_doc_rst +#: model:ir.actions.report.xml,name:base_module_doc_rst.report_proximity_graph +msgid "Proximity graph" +msgstr "" + +#. module: base_module_doc_rst +#: wizard_view:tech.guide.rst,init:0 +msgid "Create Technical Guide in rst format" +msgstr "" diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/OOo_run.sh b/addons/base_report_designer/plugin/openerp_report_designer/bin/OOo_run.sh old mode 100644 new mode 100755 diff --git a/addons/crm/crm_phonecall.py b/addons/crm/crm_phonecall.py index 1ee36cefab2..6a4e7bfd7c7 100644 --- a/addons/crm/crm_phonecall.py +++ b/addons/crm/crm_phonecall.py @@ -24,7 +24,7 @@ from osv import fields, osv from tools.translate import _ import crm import time -from datetime import datetime, timedelta +from datetime import datetime class crm_phonecall(crm_case, osv.osv): """ Phonecall Cases """ @@ -110,14 +110,15 @@ class crm_phonecall(crm_case, osv.osv): @param ids: List of case Ids @param *args: Tuple Value for additional Params """ + res = True for phone in self.browse(cr, uid, ids): - phone_id= phone.id + phone_id = phone.id data = {'date_closed': time.strftime('%Y-%m-%d %H:%M:%S')} if phone.duration <=0: duration = datetime.now() - datetime.strptime(phone.date, '%Y-%m-%d %H:%M:%S') data.update({'duration': duration.seconds/float(60)}) res = super(crm_phonecall, self).case_close(cr, uid, [phone_id], args) - self.write(cr, uid, ids, data) + self.write(cr, uid, [phone_id], data) return res def case_reset(self, cr, uid, ids, *args): diff --git a/addons/crm_helpdesk/crm_helpdesk_view.xml b/addons/crm_helpdesk/crm_helpdesk_view.xml index eaa43d286bb..348492cc308 100644 --- a/addons/crm_helpdesk/crm_helpdesk_view.xml +++ b/addons/crm_helpdesk/crm_helpdesk_view.xml @@ -61,7 +61,7 @@ - + diff --git a/addons/document/document.py b/addons/document/document.py index 27a6c3d3c19..90f57438ce8 100644 --- a/addons/document/document.py +++ b/addons/document/document.py @@ -49,6 +49,7 @@ class document_file(osv.osv): It also establishes the parent_id NOT NULL constraint that ir.attachment should have had (but would have failed if plain attachments contained null values). + It also updates the File Size for the previously created attachments. """ parent_id = self.pool.get('document.directory')._get_root_directory(cr,uid) @@ -62,7 +63,11 @@ class document_file(osv.osv): cr.execute("UPDATE ir_attachment " \ "SET parent_id = %s, db_datas = decode(encode(db_datas,'escape'), 'base64') " \ "WHERE parent_id IS NULL", (parent_id,)) + + cr.execute("UPDATE ir_attachment SET file_size=length(db_datas) WHERE file_size = 0;") + cr.execute("ALTER TABLE ir_attachment ALTER parent_id SET NOT NULL") + return True def _get_filestore(self, cr): diff --git a/addons/document/odt2txt.py b/addons/document/odt2txt.py old mode 100644 new mode 100755 diff --git a/addons/document/test_cindex.py b/addons/document/test_cindex.py old mode 100644 new mode 100755 diff --git a/addons/document_ftp/ftpserver/ftpserver.py b/addons/document_ftp/ftpserver/ftpserver.py old mode 100644 new mode 100755 diff --git a/addons/document_webdav/test_davclient.py b/addons/document_webdav/test_davclient.py old mode 100644 new mode 100755 diff --git a/addons/email_template/email_template_account.py b/addons/email_template/email_template_account.py index 462baa1672d..a5f51400c8a 100644 --- a/addons/email_template/email_template_account.py +++ b/addons/email_template/email_template_account.py @@ -253,7 +253,7 @@ unless it is already specified in the From Email, e.g: John Doe ", except Exception, error: raise osv.except_osv( _("Out going connection test failed"), - _("Reason: %s") % error + _("Reason: %s") % tools.ustr(error) ) def do_approval(self, cr, uid, ids, context=None): @@ -272,7 +272,7 @@ unless it is already specified in the From Email, e.g: John Doe ", try: serv = self.get_outgoing_server(cursor, user, id, context) except Exception, error: - logger.notifyChannel(_("Email Template"), netsvc.LOG_ERROR, _("Mail from Account %s failed on login. Probable Reason:Could not login to server\nError: %s") % (id, error)) + logger.notifyChannel(_("Email Template"), netsvc.LOG_ERROR, _("Mail from Account %s failed on login. Probable Reason:Could not login to server\nError: %s") % (id, tools.ustr(error))) return False #Everything is complete, now return the connection return serv @@ -359,13 +359,13 @@ unless it is already specified in the From Email, e.g: John Doe ", Encoders.encode_base64(part) payload_part.attach(part) except Exception, error: - logger.notifyChannel(_("Email Template"), netsvc.LOG_ERROR, _("Mail from Account %s failed. Probable Reason:MIME Error\nDescription: %s") % (id, error)) + logger.notifyChannel(_("Email Template"), netsvc.LOG_ERROR, _("Mail from Account %s failed. Probable Reason:MIME Error\nDescription: %s") % (id, tools.ustr(error))) return {'error_msg': _("Server Send Error\nDescription: %s")%error} try: serv.sendmail(payload_part['From'], addresses_l['all-recipients'], payload_part.as_string()) except Exception, error: - logging.getLogger('email_template').error(_("Mail from Account %s failed. Probable Reason: Server Send Error\n Description: %s"), id, error, exc_info=True) - return {'error_msg': _("Server Send Error\nDescription: %s")%error} + logging.getLogger('email_template').error(_("Mail from Account %s failed. Probable Reason: Server Send Error\n Description: %s"), id, tools.ustr(error), exc_info=True) + return {'error_msg': _("Server Send Error\nDescription: %s") % tools.ustr(error)} #The mail sending is complete serv.close() logger.notifyChannel(_("Email Template"), netsvc.LOG_INFO, _("Mail from Account %s successfully Sent.") % (id)) @@ -427,7 +427,7 @@ unless it is already specified in the From Email, e.g: John Doe ", "Datetime Extraction failed.Date:%s \ \tError:%s") % ( time_as_string, - e) + tools.ustr(e)) ) return date_as_date diff --git a/addons/email_template/html2text.py b/addons/email_template/html2text.py old mode 100644 new mode 100755 index af7848fee2d..2479843777a --- a/addons/email_template/html2text.py +++ b/addons/email_template/html2text.py @@ -444,11 +444,11 @@ if __name__ == "__main__": encoding = 'utf8' if len(sys.argv) > 2: encoding = sys.argv[2] - f = open(arg, 'r') - try: - data = f.read().decode(encoding) - finally: - f.close() + f = open(arg, 'r') + try: + data = f.read().decode(encoding) + finally: + f.close() else: data = sys.stdin.read().decode('utf8') wrapwrite(html2text(data, baseurl)) diff --git a/addons/fetchmail/__init__.py b/addons/fetchmail/__init__.py index d58bfd1d81b..f9c384ce103 100644 --- a/addons/fetchmail/__init__.py +++ b/addons/fetchmail/__init__.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python #-*- coding:utf-8 -*- ############################################################################## # diff --git a/addons/fetchmail/__openerp__.py b/addons/fetchmail/__openerp__.py index 1ffe731996e..9950502b4dd 100644 --- a/addons/fetchmail/__openerp__.py +++ b/addons/fetchmail/__openerp__.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python #-*- coding:utf-8 -*- ############################################################################## # diff --git a/addons/hr/hr.py b/addons/hr/hr.py index fcfd0b41a27..59e4129fec7 100644 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -206,7 +206,6 @@ class hr_employee(osv.osv): _defaults = { 'active': 1, 'photo': _get_photo, - 'address_id': lambda self, cr, uid, c: self.pool.get('res.users').browse(cr, uid, uid, c).address_id.id } def _check_recursion(self, cr, uid, ids, context=None): diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py index e366d7a6afd..2e7020306b5 100644 --- a/addons/hr_expense/hr_expense.py +++ b/addons/hr_expense/hr_expense.py @@ -21,7 +21,6 @@ import time -import netsvc from osv import fields, osv from tools.translate import _ import decimal_precision as dp @@ -216,7 +215,6 @@ class hr_expense_expense(osv.osv): account_journal.write(cr, uid, [journal.id],{'analytic_journal_id':analytic_journal_ids[0]}) inv_id = invoice_obj.create(cr, uid, inv, {'type': 'in_invoice'}) invoice_obj.button_compute(cr, uid, [inv_id], {'type': 'in_invoice'}, set_total=True) - self.write(cr, uid, [exp.id], {'invoice_id': inv_id, 'state': 'invoiced'}) res = inv_id return res diff --git a/addons/hr_payroll/report/__init__.py b/addons/hr_payroll/report/__init__.py index 3113f281326..f7e464d3129 100644 --- a/addons/hr_payroll/report/__init__.py +++ b/addons/hr_payroll/report/__init__.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python #-*- coding:utf-8 -*- ############################################################################## diff --git a/addons/hr_payroll/report/report_emp_salary_structure.py b/addons/hr_payroll/report/report_emp_salary_structure.py index 0da09d16562..28fdb6dec45 100644 --- a/addons/hr_payroll/report/report_emp_salary_structure.py +++ b/addons/hr_payroll/report/report_emp_salary_structure.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python #-*- coding:utf-8 -*- ############################################################################## @@ -89,10 +88,3 @@ class salary_structure_report(report_sxw.rml_parse): report_sxw.report_sxw('report.salary.structure', 'hr.employee', 'hr_payroll/report/report_emp_salary_structure.rml', parser=salary_structure_report) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - - - - - - - diff --git a/addons/hr_payroll/report/report_employees_detail.py b/addons/hr_payroll/report/report_employees_detail.py index 0e1451e469c..522e36e742f 100644 --- a/addons/hr_payroll/report/report_employees_detail.py +++ b/addons/hr_payroll/report/report_employees_detail.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python #-*- coding:utf-8 -*- ############################################################################## @@ -249,4 +248,3 @@ class employees_salary_report(report_sxw.rml_parse): report_sxw.report_sxw('report.employees.salary', 'hr.payslip', 'hr_payroll/report/report_employees_detail.rml', parser=employees_salary_report,header='internal landscape') # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/hr_payroll/report/report_payroll_advice.py b/addons/hr_payroll/report/report_payroll_advice.py index 5ac20d91d71..7d8c6fd953c 100644 --- a/addons/hr_payroll/report/report_payroll_advice.py +++ b/addons/hr_payroll/report/report_payroll_advice.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python #-*- coding:utf-8 -*- ############################################################################## @@ -78,4 +77,4 @@ class payroll_advice_report(report_sxw.rml_parse): report_sxw.report_sxw('report.payroll.advice', 'hr.payroll.advice', 'hr_payroll/report/report_payroll_advice.rml', parser=payroll_advice_report) -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_payroll/report/report_payroll_register.py b/addons/hr_payroll/report/report_payroll_register.py index 9410a4eedb2..96dde962074 100644 --- a/addons/hr_payroll/report/report_payroll_register.py +++ b/addons/hr_payroll/report/report_payroll_register.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python #-*- coding:utf-8 -*- ############################################################################## @@ -106,4 +105,4 @@ report_sxw.report_sxw( parser=report_payroll_register ) -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_payroll/report/report_payslip.py b/addons/hr_payroll/report/report_payslip.py index d5cd6532251..78e6ee2ff64 100644 --- a/addons/hr_payroll/report/report_payslip.py +++ b/addons/hr_payroll/report/report_payslip.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python #-*- coding:utf-8 -*- ############################################################################## diff --git a/addons/hr_payroll/report/report_year_salary.py b/addons/hr_payroll/report/report_year_salary.py index bc7ac8fc93a..4c5a506d2d3 100644 --- a/addons/hr_payroll/report/report_year_salary.py +++ b/addons/hr_payroll/report/report_year_salary.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python #-*- coding:utf-8 -*- ############################################################################## @@ -119,4 +118,3 @@ class year_salary_report(report_sxw.rml_parse): report_sxw.report_sxw('report.year.salary', 'hr.payslip', 'hr_payroll/report/report_year_report.rml', parser=year_salary_report,header='internal landscape') # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/hr_payroll_account/hr_payroll_account.py b/addons/hr_payroll_account/hr_payroll_account.py index 045063a7284..416aeb485ef 100644 --- a/addons/hr_payroll_account/hr_payroll_account.py +++ b/addons/hr_payroll_account/hr_payroll_account.py @@ -21,10 +21,9 @@ ############################################################################## import time import netsvc -from datetime import date, datetime, timedelta +from datetime import date, timedelta from osv import fields, osv -from tools import config from tools.translate import _ def prev_bounds(cdate=False): @@ -107,8 +106,6 @@ class payroll_register(osv.osv): def compute_sheet(self, cr, uid, ids, context=None): emp_pool = self.pool.get('hr.employee') slip_pool = self.pool.get('hr.payslip') - func_pool = self.pool.get('hr.payroll.structure') - slip_line_pool = self.pool.get('hr.payslip.line') wf_service = netsvc.LocalService("workflow") vals = self.browse(cr, uid, ids, context=context)[0] emp_ids = emp_pool.search(cr, uid, []) @@ -295,10 +292,8 @@ class hr_payslip(osv.osv): self.create_voucher(cr, uid, [slip.id], name, move_id) name = "To %s account" % (slip.employee_id.name) - if not slip.employee_id.property_bank_account.id: raise osv.except_osv(_('Warning !'), _('Employee Bank Account is not defined for %s') % slip.employee_id.name) - ded_rec = { 'move_id': move_id, 'name': name, @@ -430,10 +425,10 @@ class hr_payslip(osv.osv): partner_id = False if not slip.employee_id.bank_account_id: - raise osv.except_osv(_('Integrity Error !'), _('Please define bank account for %s !') % (slip.employee_id.name)) + raise osv.except_osv(_('Configuration Error !'), _('Please define bank account for %s !') % (slip.employee_id.name)) if not slip.employee_id.bank_account_id.partner_id: - raise osv.except_osv(_('Integrity Error !'), _('Please define partner in bank account for %s !') % (slip.employee_id.name)) + raise osv.except_osv(_('Configuration Error !'), _('Please define partner in bank account for %s !') % (slip.employee_id.name)) partner = slip.employee_id.bank_account_id.partner_id partner_id = slip.employee_id.bank_account_id.partner_id.id @@ -467,10 +462,8 @@ class hr_payslip(osv.osv): } move_id = move_pool.create(cr, uid, move, context=context) self.create_voucher(cr, uid, [slip.id], slip.name, move_id) - if not slip.employee_id.salary_account.id: raise osv.except_osv(_('Warning !'), _('Please define Salary Account for %s.') % slip.employee_id.name) - line = { 'move_id':move_id, 'name': "By Basic Salary / " + slip.employee_id.name, @@ -484,7 +477,6 @@ class hr_payslip(osv.osv): 'analytic_account_id': False, 'ref':slip.number } - #Setting Analysis Account for Basic Salary if slip.employee_id.analytic_account: line['analytic_account_id'] = slip.employee_id.analytic_account.id @@ -494,10 +486,9 @@ class hr_payslip(osv.osv): if not slip.employee_id.employee_account.id: raise osv.except_osv(_('Warning !'), _('Please define Employee Payable Account for %s.') % slip.employee_id.name) - line = { 'move_id':move_id, - 'name': "To Basic Payble Salary / " + slip.employee_id.name, + 'name': "To Basic Payable Salary / " + slip.employee_id.name, 'partner_id': partner_id, 'date': slip.date, 'account_id': slip.employee_id.employee_account.id, @@ -508,6 +499,7 @@ class hr_payslip(osv.osv): 'period_id': period_id, 'ref':slip.number } + line_ids += [movel_pool.create(cr, uid, line, context=context)] for line in slip.line_ids: @@ -540,7 +532,7 @@ class hr_payslip(osv.osv): if line.type == 'allowance' or line.type == 'otherpay': rec['debit'] = amount if not partner.property_account_payable: - raise osv.except_osv(_('Integrity Error !'), _('Please Configure Partners Payable Account!!')) + raise osv.except_osv(_('Configuration Error !'), _('Please Configure Partners Payable Account!!')) ded_rec = { 'move_id': move_id, 'name': name, @@ -557,7 +549,7 @@ class hr_payslip(osv.osv): line_ids += [movel_pool.create(cr, uid, ded_rec, context=context)] elif line.type == 'deduction' or line.type == 'otherdeduct': if not partner.property_account_receivable: - raise osv.except_osv(_('Integrity Error !'), _('Please Configure Partners Receivable Account!!')) + raise osv.except_osv(_('Configuration Error !'), _('Please Configure Partners Receivable Account!!')) rec['credit'] = amount total_deduct += amount ded_rec = { diff --git a/addons/hr_payroll_account/hr_payroll_account_view.xml b/addons/hr_payroll_account/hr_payroll_account_view.xml index d2ad309dc32..83cc34c25b0 100644 --- a/addons/hr_payroll_account/hr_payroll_account_view.xml +++ b/addons/hr_payroll_account/hr_payroll_account_view.xml @@ -234,7 +234,6 @@ - diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index a9a05a410c6..2d11116bf32 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -392,5 +392,12 @@ + + diff --git a/addons/hr_timesheet_invoice/wizard/hr_timesheet_final_invoice_create.py b/addons/hr_timesheet_invoice/wizard/hr_timesheet_final_invoice_create.py index 45a4e107e40..66975695814 100644 --- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_final_invoice_create.py +++ b/addons/hr_timesheet_invoice/wizard/hr_timesheet_final_invoice_create.py @@ -95,13 +95,8 @@ class final_invoice_create(osv.osv_memory): last_invoice = invoice_obj.create(cr, uid, curr_invoice, context=context) invoices.append(last_invoice) - context2=context.copy() + context2 = context.copy() context2['lang'] = partner.lang - cr.execute("SELECT product_id, to_invoice, sum(unit_amount) " \ - "FROM account_analytic_line as line " \ - "WHERE account_id = %s " \ - "AND to_invoice IS NOT NULL " \ - "GROUP BY product_id, to_invoice", (account.id,)) cr.execute("""SELECT line.product_id, diff --git a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py index ee66cc045b0..4372a19a89a 100644 --- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py +++ b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py @@ -123,13 +123,13 @@ class hr_timesheet_invoice_create(osv.osv_memory): context2 = context.copy() context2['lang'] = partner.lang - cr.execute("SELECT product_id, to_invoice, sum(unit_amount) " \ + cr.execute("SELECT product_id, to_invoice, sum(unit_amount), product_uom_id " \ "FROM account_analytic_line as line " \ "WHERE account_id = %s " \ "AND id IN %s AND to_invoice IS NOT NULL " \ - "GROUP BY product_id,to_invoice", (account.id, tuple(context['active_ids']),)) + "GROUP BY product_id,to_invoice,product_uom_id", (account.id, tuple(context['active_ids']),)) - for product_id, factor_id, qty in cr.fetchall(): + for product_id, factor_id, qty, uom in cr.fetchall(): product = product_obj.browse(cr, uid, product_id, context2) if not product: raise osv.except_osv(_('Error'), _('At least one line has no product !')) @@ -144,9 +144,11 @@ class hr_timesheet_invoice_create(osv.osv_memory): data['product'] = data['product'][0] factor_name = product_obj.name_get(cr, uid, [data['product']], context=context)[0][1] + ctx = context.copy() + ctx.update({'uom':uom}) if account.pricelist_id: pl = account.pricelist_id.id - price = pro_price_obj.price_get(cr,uid,[pl], data['product'] or product_id, qty or 1.0, account.partner_id.id)[pl] + price = pro_price_obj.price_get(cr,uid,[pl], data['product'] or product_id, qty or 1.0, account.partner_id.id, context=ctx)[pl] else: price = 0.0 @@ -162,7 +164,7 @@ class hr_timesheet_invoice_create(osv.osv_memory): 'name': factor_name, 'product_id': data['product'] or product_id, 'invoice_line_tax_id': [(6,0,tax)], - 'uos_id': product.uom_id.id, + 'uos_id': uom, 'account_id': account_id, 'account_analytic_id': account.id, } diff --git a/addons/l10n_ch/readme.txt b/addons/l10n_ch/readme.txt old mode 100755 new mode 100644 diff --git a/addons/l10n_de/i18n/pt_BR.po b/addons/l10n_de/i18n/pt_BR.po old mode 100755 new mode 100644 diff --git a/addons/l10n_de/i18n/zh_CN.po b/addons/l10n_de/i18n/zh_CN.po old mode 100755 new mode 100644 diff --git a/addons/l10n_de/i18n/zh_TW.po b/addons/l10n_de/i18n/zh_TW.po old mode 100755 new mode 100644 diff --git a/addons/mail_gateway/scripts/openerp_mailgate/openerp_mailgate.py b/addons/mail_gateway/scripts/openerp_mailgate/openerp_mailgate.py old mode 100644 new mode 100755 diff --git a/addons/membership/membership.py b/addons/membership/membership.py index 7353ac33336..48fd8dc2d41 100644 --- a/addons/membership/membership.py +++ b/addons/membership/membership.py @@ -284,14 +284,14 @@ class Partner(osv.osv): 'membership_cancel': False } if name == 'membership_start': - line_id = member_line_obj.search(cr, uid, [('partner', '=', partner_id)], + line_id = member_line_obj.search(cr, uid, [('partner', '=', partner_id),('date_cancel','=',False)], limit=1, order='date_from', context=context) if line_id: res[partner.id]['membership_start'] = member_line_obj.read(cr, uid, line_id[0], ['date_from'], context=context)['date_from'] if name == 'membership_stop': - line_id1 = member_line_obj.search(cr, uid, [('partner', '=', partner_id)], + line_id1 = member_line_obj.search(cr, uid, [('partner', '=', partner_id),('date_cancel','=',False)], limit=1, order='date_to desc', context=context) if line_id1: res[partner.id]['membership_stop'] = member_line_obj.read(cr, uid, line_id1[0], diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index e69e3134e0b..e8e639703d8 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -269,6 +269,10 @@ class mrp_bom(osv.osv): @param product_id: Changed product_id @return: Dictionary of changed values """ + if context is None: + context = {} + context['lang'] = self.pool.get('res.users').browse(cr,uid,uid).context_lang + if product_id: prod = self.pool.get('product.product').browse(cr, uid, product_id, context=context) v = {'product_uom': prod.uom_id.id} diff --git a/addons/mrp_operations/mrp_operations.py b/addons/mrp_operations/mrp_operations.py index 496dc1db5c1..589d3c27031 100644 --- a/addons/mrp_operations/mrp_operations.py +++ b/addons/mrp_operations/mrp_operations.py @@ -252,13 +252,11 @@ class mrp_production(osv.osv): """ Cancels work order if production order is canceled. @return: Super method """ - if context is None: - context = {} - obj = self.browse(cr, uid, ids)[0] + obj = self.browse(cr, uid, ids,context=context)[0] wf_service = netsvc.LocalService("workflow") for workcenter_line in obj.workcenter_lines: wf_service.trg_validate(uid, 'mrp.production.workcenter.line', workcenter_line.id, 'button_cancel', cr) - return super(mrp_production,self).action_cancel(cr,uid,ids) + return super(mrp_production,self).action_cancel(cr,uid,ids,context=context) def _compute_planned_workcenter(self, cr, uid, ids, context=None, mini=False): """ Computes planned and finished dates for work order. diff --git a/addons/procurement/procurement.py b/addons/procurement/procurement.py index 1f808f2bef6..743ef85a9ea 100644 --- a/addons/procurement/procurement.py +++ b/addons/procurement/procurement.py @@ -289,9 +289,15 @@ class procurement_order(osv.osv): return False partner = procurement.product_id.seller_id #Taken Main Supplier of Product of Procurement. + if not partner: + cr.execute('update procurement_order set message=%s where id=%s', + (_('No default supplier defined for this product'), procurement.id)) + return False + if user.company_id and user.company_id.partner_id: if partner.id == user.company_id.partner_id.id: return False + address_id = partner_obj.address_get(cr, uid, [partner.id], ['delivery'])['delivery'] if not address_id: cr.execute('update procurement_order set message=%s where id=%s', diff --git a/addons/product/pricelist.py b/addons/product/pricelist.py index 2271dbc86a6..fce8e04bc7c 100644 --- a/addons/product/pricelist.py +++ b/addons/product/pricelist.py @@ -155,7 +155,7 @@ class product_pricelist(osv.osv): currency_obj = self.pool.get('res.currency') product_obj = self.pool.get('product.product') - product_temp_obj = self.pool.get('product.template') + product_template_obj = self.pool.get('product.template') product_category_obj = self.pool.get('product.category') product_uom_obj = self.pool.get('product.uom') supplierinfo_obj = self.pool.get('product.supplierinfo') @@ -245,7 +245,7 @@ class product_pricelist(osv.osv): price = 0.0 if sinfo: qty_in_product_uom = qty - product_default_uom = product_temp_obj.read(cr, uid, [tmpl_id], ['uom_id'])[0]['uom_id'][0] + product_default_uom = product_template_obj.read(cr, uid, [tmpl_id], ['uom_id'])[0]['uom_id'][0] supplier = supplierinfo_obj.browse(cr, uid, sinfo, context=context)[0] seller_uom = supplier.product_uom and supplier.product_uom.id or False if seller_uom and product_default_uom and product_default_uom != seller_uom: @@ -265,11 +265,10 @@ class product_pricelist(osv.osv): price = currency_obj.compute(cr, uid, price_type.currency_id.id, res['currency_id'], product_obj.price_get(cr, uid, [product_id], - price_type.field, context=context)[product_id], round=False, context=context) + price_type.field, context=context)[product_id], round=False, context=context) - if price >= 0.0: + if price is not False: price_limit = price - price = price * (1.0+(res['price_discount'] or 0.0)) price = rounding(price, res['price_round']) price += (res['price_surcharge'] or 0.0) @@ -417,7 +416,7 @@ class product_pricelist(osv.osv): price = currency_obj.compute(cr, uid, price_type.currency_id.id, res['currency_id'], product_obj.price_get(cr, uid, [prod_id], - price_type.field, context=context)[prod_id], round=False, context=context) + price_type.field, context=context)[prod_id], round=False, context=context) if price: price_limit = price diff --git a/addons/product/pricelist_view.xml b/addons/product/pricelist_view.xml index d0d8cbd2ed4..f284dcbc47b 100644 --- a/addons/product/pricelist_view.xml +++ b/addons/product/pricelist_view.xml @@ -183,14 +183,21 @@ + - Prices Types + Price Types ir.actions.act_window product.price.type form tree,form -