Divyesh Makwana (Open ERP) 2012-10-31 10:29:10 +05:30
commit 24f74d9d3a
103 changed files with 722 additions and 433 deletions

View File

@ -87,9 +87,9 @@ In addition to the above possibilities, when invoked with a non-existing module
sub-modules.
Depending on the unittest2_ class that is used to write the tests (see
``openerp.tests.common`` for some helper classes that you can re-use), a database
may be created before the test is run, and the module providing the test will
be installed on that database.
:mod:`openerp.tests.common` for some helper classes that you can re-use), a
database may be created before the test is run, and the module providing the
test will be installed on that database.
Because creating a database, installing modules, and then dropping it is
expensive, it is possible to interleave the run of the ``fast_suite`` tests
@ -98,3 +98,9 @@ each requested module is installed, its fast_suite tests are run. The database
is thus created and dropped (and the modules installed) only once.
.. _unittest2: http://pypi.python.org/pypi/unittest2
TestCase subclasses
-------------------
.. automodule:: openerp.tests.common
:members:

View File

@ -101,6 +101,7 @@ def preload_registry(dbname):
def run_test_file(dbname, test_file):
""" Preload a registry, possibly run a test file, and start the cron."""
try:
config = openerp.tools.config
db, registry = openerp.pooler.get_db_and_pool(dbname, update_module=config['init'] or config['update'], pooljobs=False)
cr = db.cursor()
_logger.info('loading test file %s', test_file)

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:00+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:57+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:00+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:57+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:00+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:57+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:00+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:58+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:01+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:58+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:01+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:58+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:01+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:58+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:01+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:58+0000\n"
"X-Generator: Launchpad (build 16165)\n"
"X-Poedit-Language: Czech\n"
#. module: base
@ -25,7 +25,7 @@ msgstr "Svatá Helena"
#. module: base
#: view:ir.actions.report.xml:0
msgid "Other Configuration"
msgstr "Ostatní nastavení"
msgstr "Další nastavení"
#. module: base
#: selection:ir.property,type:0
@ -35,7 +35,7 @@ msgstr "Datum a čas"
#. module: base
#: model:ir.module.module,shortdesc:base.module_project_mailgate
msgid "Tasks-Mail Integration"
msgstr ""
msgstr "Integrace úkolů a e-mailů"
#. module: base
#: code:addons/fields.py:582
@ -126,7 +126,7 @@ msgstr ""
#. module: base
#: view:ir.module.module:0
msgid "Created Views"
msgstr "Vytvořit pohledy"
msgstr "Vytvořené náhledy"
#. module: base
#: code:addons/base/ir/ir_model.py:532

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:01+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:59+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:02+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:00+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -12,8 +12,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:03+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:00+0000\n"
"X-Generator: Launchpad (build 16165)\n"
"X-Poedit-Country: GREECE\n"
"X-Poedit-Language: Greek\n"
"X-Poedit-SourceCharset: utf-8\n"

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:08+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:05+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:06+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:04+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:08+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:05+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:08+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:05+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:08+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:06+0000\n"
"X-Generator: Launchpad (build 16165)\n"
"Language: \n"
#. module: base

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:09+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:06+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:09+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:06+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:02+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:59+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:00+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:58+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -9,8 +9,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:05+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:02+0000\n"
"X-Generator: Launchpad (build 16165)\n"
"X-Poedit-Country: IRAN, ISLAMIC REPUBLIC OF\n"
"X-Poedit-Language: Persian\n"

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:09+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:06+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:02+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:59+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:02+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:59+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:03+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:00+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:03+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:00+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:03+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:00+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:06+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:03+0000\n"
"X-Generator: Launchpad (build 16165)\n"
"Language: hr\n"
#. module: base

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:03+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:00+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh
@ -35,7 +35,7 @@ msgstr "Dátum/Idő"
#. module: base
#: model:ir.module.module,shortdesc:base.module_project_mailgate
msgid "Tasks-Mail Integration"
msgstr ""
msgstr "Feladat-levél beillesztés"
#. module: base
#: code:addons/fields.py:582
@ -109,6 +109,8 @@ msgid ""
"Helps you manage your projects and tasks by tracking them, generating "
"plannings, etc..."
msgstr ""
"Segít Önnek a projektjei és feladatai menedzselésében, azok "
"nyomonkövetésével, tervezések készítésével, stb..."
#. module: base
#: field:ir.actions.act_window,display_menu_tip:0
@ -145,6 +147,11 @@ msgid ""
"\n"
"This module allows you to create retro planning for managing your events.\n"
msgstr ""
"\n"
"Az események szervezése és menedzselése.\n"
"======================================\n"
"\n"
"Ezzel a modullal átütemezést készíthet az események menedzselésében.\n"
#. module: base
#: help:ir.model.fields,domain:0
@ -175,17 +182,17 @@ msgstr "Cél Ablak"
#. module: base
#: model:ir.module.module,shortdesc:base.module_sale_analytic_plans
msgid "Sales Analytic Distribution"
msgstr ""
msgstr "Eladás elemzés osztályozás"
#. module: base
#: model:ir.module.module,shortdesc:base.module_web_process
msgid "Process"
msgstr ""
msgstr "Folyamat"
#. module: base
#: model:ir.module.module,shortdesc:base.module_analytic_journal_billing_rate
msgid "Billing Rates on Contracts"
msgstr ""
msgstr "Árfolyamok a szerződéseken"
#. module: base
#: code:addons/base/res/res_users.py:558
@ -359,6 +366,11 @@ msgid ""
" complex data from other software\n"
" "
msgstr ""
"\n"
" Ez a modul gondoskodik egy csoport keretmunka_bevitelről ami "
"segítséget nyújt\n"
" más szoftver összetett adatainak betöltéséhez\n"
" "
#. module: base
#: field:ir.actions.wizard,wiz_name:0
@ -378,7 +390,7 @@ msgstr "Ügyfél kapcsolati irányítás"
#. module: base
#: view:ir.module.module:0
msgid "Extra"
msgstr ""
msgstr "Extra"
#. module: base
#: code:addons/orm.py:2526
@ -399,7 +411,7 @@ msgstr "Hitelkeret"
#. module: base
#: model:ir.module.module,description:base.module_web_graph
msgid "Openerp web graph view"
msgstr ""
msgstr "Openerp web grafikus nézet"
#. module: base
#: field:ir.model.data,date_update:0
@ -409,7 +421,7 @@ msgstr "Frissítés Dátuma"
#. module: base
#: model:ir.module.module,shortdesc:base.module_base_action_rule
msgid "Automated Action Rules"
msgstr ""
msgstr "Automata végrehalytási szabályok"
#. module: base
#: view:ir.attachment:0
@ -15451,6 +15463,8 @@ msgid ""
"This field is computed automatically based on bank accounts defined, having "
"the display on footer checkbox set."
msgstr ""
"Ez a mező automatikusan generált a megadott bank számlák alapján, a "
"lábjegyzetben lévő jelölőnégyzet kiválasztásával."
#. module: base
#: model:ir.module.module,description:base.module_mrp_subproduct

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:00+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:58+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:03+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:01+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:03+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:01+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:04+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:01+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:04+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:01+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:02+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:59+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:04+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:01+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:04+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:01+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:04+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:02+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:04+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:02+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:04+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:02+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:05+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:02+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:05+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:02+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:01+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:59+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:08+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:05+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:05+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:02+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:05+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:03+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:08+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:05+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:05+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:03+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

File diff suppressed because it is too large Load Diff

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:06+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:04+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:06+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:04+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:00+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 04:57+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:06+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:03+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:09+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:06+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:07+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:04+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:07+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:04+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:07+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:04+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:07+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:04+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:07+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:04+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:07+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:05+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:07+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:05+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:09+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:06+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:07+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:05+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-12 05:08+0000\n"
"X-Generator: Launchpad (build 16130)\n"
"X-Launchpad-Export-Date: 2012-10-20 05:06+0000\n"
"X-Generator: Launchpad (build 16165)\n"
#. module: base
#: model:res.country,name:base.sh

View File

@ -766,7 +766,7 @@ class ir_actions_todo(osv.osv):
'action_id': fields.many2one(
'ir.actions.actions', 'Action', select=True, required=True),
'sequence': fields.integer('Sequence'),
'state': fields.selection(TODO_STATES, string='State', required=True),
'state': fields.selection(TODO_STATES, string='Status', required=True),
'name': fields.char('Name', size=64),
'type': fields.selection(TODO_TYPES, 'Type', required=True,
help="""Manual: Launched manually.

View File

@ -57,7 +57,7 @@ class ir_attachment(osv.osv):
def _search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False, access_rights_uid=None):
ids = super(ir_attachment, self)._search(cr, uid, args, offset=offset,
limit=limit, order=order,
context=context, count=count,
context=context, count=False,
access_rights_uid=access_rights_uid)
if not ids:
if count:

View File

@ -167,7 +167,7 @@ class ir_translation(osv.osv):
[('to_translate','To Translate'),
('inprogress','Translation in Progress'),
('translated','Translated')],
string="State",
string="Status",
help="Automatically set to let administators find new terms that might need to be translated"),
# aka gettext extracted-comments - we use them to flag openerp-web translation
@ -408,7 +408,7 @@ class ir_translation(osv.osv):
if trans_file:
_logger.info('module %s: loading translation file (%s) for language %s', module_name, lang_code, lang)
tools.trans_load(cr, trans_file, lang, verbose=False, module_name=module_name, context=context)
elif lang_code != 'en':
elif lang_code != 'en_US':
_logger.warning('module %s: no translation for language %s', module_name, lang_code)
return True

View File

@ -132,20 +132,29 @@ class ir_ui_menu(osv.osv):
return len(result)
return result
def _get_full_name(self, cr, uid, ids, name, args, context):
res = {}
for m in self.browse(cr, uid, ids, context=context):
res[m.id] = self._get_one_full_name(m)
def name_get(self, cr, uid, ids, context=None):
res = []
for id in ids:
elmt = self.browse(cr, uid, id, context=context)
res.append((id, self._get_one_full_name(elmt)))
return res
def _get_one_full_name(self, menu, level=6):
def _get_full_name(self, cr, uid, ids, name=None, args=None, context=None):
if context == None:
context = {}
res = {}
for elmt in self.browse(cr, uid, ids, context=context):
res[elmt.id] = self._get_one_full_name(elmt)
return res
def _get_one_full_name(self, elmt, level=6):
if level<=0:
return '...'
if menu.parent_id:
parent_path = self._get_one_full_name(menu.parent_id, level-1) + "/"
if elmt.parent_id:
parent_path = self._get_one_full_name(elmt.parent_id, level-1) + "/"
else:
parent_path = ''
return parent_path + menu.name
return parent_path + elmt.name
def create(self, *args, **kwargs):
self.clear_cache()
@ -282,7 +291,7 @@ class ir_ui_menu(osv.osv):
'groups_id': fields.many2many('res.groups', 'ir_ui_menu_group_rel',
'menu_id', 'gid', 'Groups', help="If you have groups, the visibility of this menu will be based on these groups. "\
"If this field is empty, OpenERP will compute visibility based on the related object's read access."),
'complete_name': fields.function(_get_full_name,
'complete_name': fields.function(_get_full_name,
string='Full Path', type='char', size=128),
'icon': fields.selection(tools.icons, 'Icon', size=64),
'icon_pict': fields.function(_get_icon_pict, type='char', size=32),

View File

@ -136,7 +136,7 @@ class wkf_instance(osv.osv):
'wkf_id': fields.many2one('workflow', 'Workflow', ondelete='cascade', select=True),
'res_id': fields.integer('Resource ID'),
'res_type': fields.char('Resource Object', size=64),
'state': fields.char('State', size=32),
'state': fields.char('Status', size=32),
}
def _auto_init(self, cr, context=None):
super(wkf_instance, self)._auto_init(cr, context)
@ -159,7 +159,7 @@ class wkf_workitem(osv.osv):
'wkf_id': fields.related('act_id','wkf_id', type='many2one', relation='workflow', string='Workflow'),
'subflow_id': fields.many2one('workflow.instance', 'Subflow', ondelete="cascade", select=True),
'inst_id': fields.many2one('workflow.instance', 'Instance', required=True, ondelete="cascade", select=True),
'state': fields.char('State', size=64, select=True),
'state': fields.char('Status', size=64, select=True),
}
wkf_workitem()

View File

@ -344,7 +344,7 @@
<field name="model">workflow.workitem</field>
<field name="arch" type="xml">
<search string="Workflow Workitems">
<field name="state" string="State"/>
<field name="state" string="Status"/>
<filter icon="terp-camera_test" string="Active" name="active" domain="[('state','=','active')]"/>
<field name="wkf_id"/>
<field name="act_id"/>

View File

@ -223,7 +223,7 @@ class module(osv.osv):
('to upgrade','To be upgraded'),
('to remove','To be removed'),
('to install','To be installed')
], string='State', readonly=True, select=True),
], string='Status', readonly=True, select=True),
'demo': fields.boolean('Demo Data', readonly=True),
'license': fields.selection([
('GPL-2', 'GPL Version 2'),
@ -418,13 +418,12 @@ class module(osv.osv):
_, pool = pooler.restart_pool(cr.dbname, update_module=True)
config = pool.get('res.config').next(cr, uid, [], context=context) or {}
if config.get('type') not in ('ir.actions.reload', 'ir.actions.act_window_close'):
if config.get('type') not in ('ir.actions.act_window_close',):
return config
# reload the client; open the first available root menu
menu_obj = self.pool.get('ir.ui.menu')
menu_ids = menu_obj.search(cr, uid, [('parent_id', '=', False)], context=context)
return {
'type' : 'ir.actions.client',
'tag' : 'reload',
@ -671,7 +670,7 @@ class module_dependency(osv.osv):
('to remove','To be removed'),
('to install','To be installed'),
('unknown', 'Unknown'),
], string='State', readonly=True, select=True),
], string='Status', readonly=True, select=True),
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -105,7 +105,7 @@
<field name="name">ir.module.module.form</field>
<field name="model">ir.module.module</field>
<field name="arch" type="xml">
<form string="Module" version="7.0">
<form create="0" edit="0" string="Module" version="7.0">
<sheet>
<field name="icon_image" widget="image" class="oe_avatar oe_left"/>
<div class="oe_title">

View File

@ -31,7 +31,7 @@ class base_language_install(osv.osv_memory):
_columns = {
'lang': fields.selection(tools.scan_languages(),'Language', required=True),
'overwrite': fields.boolean('Overwrite Existing Terms', help="If you check this box, your customized translations will be overwritten and replaced by the official ones."),
'state':fields.selection([('init','init'),('done','done')], 'state', readonly=True),
'state':fields.selection([('init','init'),('done','done')], 'Status', readonly=True),
}
_defaults = {
'state': 'init',

View File

@ -38,7 +38,7 @@ class base_module_import(osv.osv_memory):
_columns = {
'module_file': fields.binary('Module .ZIP file', required=True),
'state':fields.selection([('init','init'),('done','done')],
'state', readonly=True),
'Status', readonly=True),
'module_name': fields.char('Module Name', size=128),
}

View File

@ -29,7 +29,7 @@ class base_module_update(osv.osv_memory):
_columns = {
'update': fields.integer('Number of modules updated', readonly=True),
'add': fields.integer('Number of modules added', readonly=True),
'state':fields.selection([('init','init'),('done','done')], 'state', readonly=True),
'state':fields.selection([('init','init'),('done','done')], 'Status', readonly=True),
}
_defaults = {

View File

@ -361,6 +361,7 @@ class res_config_installer(osv.osv_memory):
'to install', ['uninstalled'], context=context)
cr.commit() #TOFIX: after remove this statement, installation wizard is fail
new_db, self.pool = pooler.restart_pool(cr.dbname, update_module=True)
res_config_installer()
DEPRECATION_MESSAGE = 'You are using an addon using old-style configuration '\
@ -538,6 +539,10 @@ class res_config_settings(osv.osv_memory):
ir_module.button_uninstall(cr, uid, to_uninstall_ids, context=context)
ir_module.button_immediate_install(cr, uid, to_install_ids, context=context)
config = self.pool.get('res.config').next(cr, uid, [], context=context) or {}
if config.get('type') not in ('ir.actions.act_window_close',):
return config
# force client-side reload (update user menu and current view)
return {
'type': 'ir.actions.client',

View File

@ -47,7 +47,7 @@ class Country(osv.osv):
help='The full name of the country.', required=True, translate=True),
'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),
'You can use this field for quick search.'),
'address_format': fields.text('Address Format', help="""You can state here the usual format to use for the \
addresses belonging to this country.\n\nYou can use the python-style string patern with all the field of the address \
(for example, use '%(street)s' to display the field 'street') plus

View File

@ -31,8 +31,7 @@
<field name="code"/>
</group>
</group>
<label for="address_format" string="Address Format"/>
<field name="address_format" colspan="4" groups="base.group_no_one"/>
<field name="address_format" groups="base.group_no_one" placeholder="Address format..."/>
</form>
</field>
</record>
@ -45,7 +44,7 @@
<field name="help">Display and manage the list of all countries that can be assigned to your partner records. You can create or delete countries to make sure the ones you are working on will be maintained.</field>
</record>
<menuitem id="menu_localisation" name="Localisation" parent="menu_config_address_book" sequence="1" groups="base.group_no_one"/>
<menuitem id="menu_localisation" name="Localization" parent="menu_config_address_book" sequence="1" groups="base.group_no_one"/>
<menuitem action="action_country" id="menu_country_partner" parent="menu_localisation" sequence="0" groups="base.group_no_one"/>

View File

@ -157,7 +157,7 @@ def _lang_get(self, cr, uid, context=None):
lang_pool = self.pool.get('res.lang')
ids = lang_pool.search(cr, uid, [], context=context)
res = lang_pool.read(cr, uid, ids, ['code', 'name'], context)
return [(r['code'], r['name']) for r in res] + [('','')]
return [(r['code'], r['name']) for r in res]
POSTAL_ADDRESS_FIELDS = ('street', 'street2', 'zip', 'city', 'state_id', 'country_id')
ADDRESS_FIELDS = POSTAL_ADDRESS_FIELDS + ('email', 'phone', 'fax', 'mobile', 'website', 'ref', 'lang')
@ -186,7 +186,7 @@ class res_partner(osv.osv, format_address):
'name': fields.char('Name', size=128, required=True, select=True),
'date': fields.date('Date', select=1),
'title': fields.many2one('res.partner.title', 'Title'),
'parent_id': fields.many2one('res.partner', 'Company'),
'parent_id': fields.many2one('res.partner', 'Related Company'),
'child_ids': fields.one2many('res.partner', 'parent_id', 'Contacts'),
'ref': fields.char('Reference', size=64, select=1),
'lang': fields.selection(_lang_get, 'Language',
@ -229,7 +229,7 @@ class res_partner(osv.osv, format_address):
'fax': fields.char('Fax', size=64),
'mobile': fields.char('Mobile', size=64),
'birthdate': fields.char('Birthdate', size=64),
'is_company': fields.boolean('Company', help="Check if the contact is a company, otherwise it is a person"),
'is_company': fields.boolean('Is a Company', help="Check if the contact is a company, otherwise it is a person"),
'use_parent_address': fields.boolean('Use Company Address', help="Select this if you want to set company's address information for this contact"),
# image: all image fields are base64 encoded and PIL-supported
'image': fields.binary("Image",

View File

@ -116,7 +116,7 @@
<field eval="1" name="supplier"/>
<field name="is_company">1</field>
<field name="city">Fremont</field>
<field name="zip">CA 94538</field>
<field name="zip">94538</field>
<field name="country_id" ref="base.us"/>
<field model="res.country.state" name="state_id" search="[('code','ilike','ca')]"/>
<field name="street">3661 Station Street</field>
@ -148,7 +148,7 @@
<field eval="0" name="customer"/>
<field name="is_company">1</field>
<field name="city">Chicago</field>
<field name="zip">IL 60623</field>
<field name="zip">60623</field>
<field name="country_id" ref="base.us"/>
<field model="res.country.state" name="state_id" search="[('code','ilike','il')]"/>
<field name="street">23 Rockwell Lane</field>
@ -206,7 +206,7 @@
<field eval="[(6, 0, [ref('res_partner_category_4'), ref('res_partner_category_7')])]" name="category_id"/>
<field name="is_company">1</field>
<field name="city">Miami</field>
<field name="zip">FL 33169</field>
<field name="zip">33169</field>
<field name="country_id" ref="base.us"/>
<field model="res.country.state" name="state_id" search="[('code','=','FL')]"/>
<field name="email">contact@jackson.com</field>
@ -270,7 +270,7 @@
<field eval="[(6, 0, [ref('res_partner_category_7'), ref('res_partner_category_9')])]" name="category_id"/>
<field name="is_company">1</field>
<field name="city">Detroit</field>
<field name="zip">MI 48212</field>
<field name="zip">48212</field>
<field name="country_id" ref="base.us"/>
<field model="res.country.state" name="state_id" search="[('code','ilike','mi')]"/>
<field name="street">60, Rosewood Court</field>
@ -327,7 +327,7 @@
<field name="is_company">1</field>
<field eval="[(6, 0, [ref('res_partner_category_5')])]" name="category_id"/>
<field name="city">Boston</field>
<field name="zip">MA 02203</field>
<field name="zip">02203</field>
<field name="email">info@thinkbig.com</field>
<field name="phone">+1 857 349 3049</field>
<field name="country_id" ref="base.us"/>
@ -343,7 +343,7 @@
<field eval="1" name="supplier"/>
<field name="is_company">1</field>
<field name="city">Cupertino</field>
<field name="zip">CA 95014</field>
<field name="zip">95014</field>
<field name="country_id" ref="base.us"/>
<field model="res.country.state" name="state_id" search="[('code','ilike','ca')]"/>
<field name="street">10200 S. De Anza Blvd</field>
@ -403,7 +403,7 @@
<field name="street">3rd Floor, Room 3-C,</field>
<field name="street2">Carretera Panamericana, Km 1, Urb. Delgado Chalbaud</field>
<field name="city">Caracas</field>
<field name="zip">CP 1090</field>
<field name="zip">1090</field>
<field name="email">info@vauxoo.com</field>
<field name="phone">+58 212 681 0538</field>
<field name="country_id" ref="base.ve"/>

View File

@ -85,6 +85,7 @@
<field name="is_company" invisible="1"/>
<field name="country" invisible="1"/>
<field name="country_id" invisible="1"/>
<field name="parent_id" invisible="1"/>
</tree>
</field>
</record>
@ -211,7 +212,7 @@
<img t-att-src="kanban_image('res.partner', 'image', record.id.value, {'preview_image': 'image_small'})" class="oe_avatar oe_kanban_avatar_smallbox"/>
</a>
<div class="oe_module_desc">
<div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_box_show_onclick_trigger oe_kanban_color_border">
<div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_color_border">
<table class="oe_kanban_table">
<tr>
<td class="oe_kanban_title1" align="left" valign="middle">
@ -298,7 +299,7 @@
<field name="user_id"/>
<field name="parent_id" filter_domain="[('parent_id','child_of',[self])]"/>
<group expand="0" string="Group By...">
<filter string="Salesman" icon="terp-personal" domain="[]" context="{'group_by' : 'user_id'}" />
<filter string="Salesperson" icon="terp-personal" domain="[]" context="{'group_by' : 'user_id'}" />
<filter string="Company" context="{'group_by': 'parent_id'}"/>
</group>
</search>

View File

@ -73,7 +73,7 @@ class res_request(osv.osv):
'ref_partner_id':fields.many2one('res.partner', 'Partner Ref.', states={'closed':[('readonly',True)]}),
'ref_doc1':fields.reference('Document Ref 1', selection=_links_get, size=128, states={'closed':[('readonly',True)]}),
'ref_doc2':fields.reference('Document Ref 2', selection=_links_get, size=128, states={'closed':[('readonly',True)]}),
'state': fields.selection([('draft','draft'),('waiting','waiting'),('active','active'),('closed','closed')], 'State', required=True, readonly=True),
'state': fields.selection([('draft','draft'),('waiting','waiting'),('active','active'),('closed','closed')], 'Status', required=True, readonly=True),
'history': fields.one2many('res.request.history','req_id', 'History')
}
_defaults = {

View File

@ -334,10 +334,10 @@ class res_users(osv.osv):
context={}
ids = []
if name:
ids = self.search(cr, user, [('login','=',name)]+ args, limit=limit)
ids = self.search(cr, user, [('login','=',name)]+ args, limit=limit, context=context)
if not ids:
ids = self.search(cr, user, [('name',operator,name)]+ args, limit=limit)
return self.name_get(cr, user, ids)
ids = self.search(cr, user, [('name',operator,name)]+ args, limit=limit, context=context)
return self.name_get(cr, user, ids, context=context)
def copy(self, cr, uid, id, default=None, context=None):
user2copy = self.read(cr, uid, [id], ['login','name'])[0]
@ -409,8 +409,8 @@ class res_users(osv.osv):
# prevent/delay login in that case. It will also have been logged
# as a SQL error, if anyone cares.
try:
cr.execute("SELECT id FROM res_users WHERE id=%s FOR UPDATE NOWAIT", str(user_id))
cr.execute("UPDATE res_users SET login_date = now() AT TIME ZONE 'UTC' WHERE id=%s", str(user_id))
cr.execute("SELECT id FROM res_users WHERE id=%s FOR UPDATE NOWAIT", (user_id,))
cr.execute("UPDATE res_users SET login_date = now() AT TIME ZONE 'UTC' WHERE id=%s", (user_id,))
except Exception, e:
_logger.exception("Failed to update last_login for db:%s login:%s", db, login)
except openerp.exceptions.AccessDenied:

View File

@ -83,6 +83,16 @@
<field name="domain_force">[('user_id','=',user.id)]</field>
</record>
<record id="res_partner_bank_rule" model="ir.rule">
<field name="name">Partner bank company rule</field>
<field name="model_id" ref="model_res_partner_bank"/>
<field name="global" eval="True"/>
<!--
Same as res_partner above.
-->
<field name="domain_force">['|','|',('company_id.child_ids','child_of',[user.company_id.id]),('company_id','child_of',[user.company_id.id]),('company_id','=',False)]</field>
</record>
</data>
</openerp>

View File

@ -8,6 +8,7 @@
"access_ir_default_group_system","ir_default group_system","model_ir_default",,1,1,1,1
"access_ir_exports_group_system","ir_exports group_system","model_ir_exports","base.group_user",1,1,1,1
"access_ir_exports_line_group_system","ir_exports_line group_system","model_ir_exports_line","base.group_user",1,1,1,1
"access_ir_fields_converter_group_system","ir_fields_converter","model_ir_fields_converter","base.group_user",1,1,1,1
"access_ir_model_group_erp_manager","ir_model group_erp_manager","model_ir_model","group_erp_manager",1,1,1,1
"access_ir_model_constraint_group_erp_manager","ir_model_constraint group_erp_manager","model_ir_model_constraint","group_erp_manager",1,1,1,1
"access_ir_model_relation_group_erp_manager","ir_model_relation group_erp_manager","model_ir_model_relation","group_erp_manager",1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
8 access_ir_default_group_system ir_default group_system model_ir_default 1 1 1 1
9 access_ir_exports_group_system ir_exports group_system model_ir_exports base.group_user 1 1 1 1
10 access_ir_exports_line_group_system ir_exports_line group_system model_ir_exports_line base.group_user 1 1 1 1
11 access_ir_fields_converter_group_system ir_fields_converter model_ir_fields_converter base.group_user 1 1 1 1
12 access_ir_model_group_erp_manager ir_model group_erp_manager model_ir_model group_erp_manager 1 1 1 1
13 access_ir_model_constraint_group_erp_manager ir_model_constraint group_erp_manager model_ir_model_constraint group_erp_manager 1 1 1 1
14 access_ir_model_relation_group_erp_manager ir_model_relation group_erp_manager model_ir_model_relation group_erp_manager 1 1 1 1

View File

@ -83,7 +83,7 @@
Test one2many operator with False
-
!assert {model: res.partner, search: "[('child_ids', '=', False)]"}:
- address in (False, None, [])
- child_ids in (False, None, [])
-
Test many2many operator with empty search list
-
@ -396,7 +396,7 @@
assert res_8 == [1]
assert res_9 == []
# get the companies referenced by some currency (this is normally the main company)
# get the companies referenced by some currency (this is normally the main company) using a weird negative domain
res_10 = self.search(cr, uid, [('currency_ids', 'not like', 'probably_unexisting_name')])
res_11 = self.search(cr, uid, [('currency_ids', 'not in', [max_currency_id + 1])])
res_12 = self.search(cr, uid, [('currency_ids', '!=', False)])
@ -408,6 +408,20 @@
assert res_10 == res_11
assert res_10 == res_12
assert res_10 == res_13
# try testing real subsets with IN/NOT IN
res_partner = self.pool.get('res.partner')
res_users = self.pool.get('res.users')
p1, _ = res_partner.name_create(cr, uid, "Dédé Boitaclou")
p2, _ = res_partner.name_create(cr, uid, "Raoulette Pizza O'poil")
u1a = res_users.create(cr, uid, {'login': 'dbo', 'partner_id': p1})
u1b = res_users.create(cr, uid, {'login': 'dbo2', 'partner_id': p1})
u2 = res_users.create(cr, uid, {'login': 'rpo', 'partner_id': p2})
assert [p1] == res_partner.search(cr, uid, [('user_ids', 'in', u1a)]), "o2m IN accept single int on right side"
assert [p1,p2] == res_partner.search(cr, uid, [('user_ids', 'in', [u1a,u2])]), "o2m IN matches any on the right side"
all_partners = res_partner.search(cr, uid, [])
assert (set(all_partners) - set([p1])) == set(res_partner.search(cr, uid, [('user_ids', 'not in', u1a)])), "o2m NOT IN matches none on the right side"
assert (set(all_partners) - set([p1,p2])) == set(res_partner.search(cr, uid, [('user_ids', 'not in', [u1b, u2])])), "o2m NOT IN matches none on the right side"
# child_of x returns x and its children (direct or not).
company = self.browse(cr, uid, ref('ymltest_company3'))

View File

@ -1,5 +1,7 @@
import test_ir_values, test_base
import test_base, test_expression, test_ir_values
checks = [
test_ir_values, test_base
test_base,
test_expression,
test_ir_values,
]

View File

@ -0,0 +1,72 @@
import unittest2
import openerp.tests.common as common
class test_expression(common.TransactionCase):
def test_in_not_in_m2m(self):
registry, cr, uid = self.registry, self.cr, self.uid
# Create 4 partners with no category, or one or two categories (out of two categories).
categories = registry('res.partner.category')
cat_a = categories.create(cr, uid, {'name': 'test_expression_category_A'})
cat_b = categories.create(cr, uid, {'name': 'test_expression_category_B'})
partners = registry('res.partner')
a = partners.create(cr, uid, {'name': 'test_expression_partner_A', 'category_id': [(6, 0, [cat_a])]})
b = partners.create(cr, uid, {'name': 'test_expression_partner_B', 'category_id': [(6, 0, [cat_b])]})
ab = partners.create(cr, uid, {'name': 'test_expression_partner_AB', 'category_id': [(6, 0, [cat_a, cat_b])]})
c = partners.create(cr, uid, {'name': 'test_expression_partner_C'})
# The tests.
# On a one2many or many2many field, `in` should be read `contains` (and
# `not in` should be read `doesn't contain`.
with_a = partners.search(cr, uid, [('category_id', 'in', [cat_a])])
self.assertEqual(set([a, ab]), set(with_a), "Search for category_id in cat_a failed.")
with_b = partners.search(cr, uid, [('category_id', 'in', [cat_b])])
self.assertEqual(set([ab, b]), set(with_b), "Search for category_id in cat_b failed.")
# Partners with the category A or the category B.
with_a_or_b = partners.search(cr, uid, [('category_id', 'in', [cat_a, cat_b])])
self.assertEqual(set([ab, a, b]), set(with_a_or_b), "Search for category_id contains cat_a or cat_b failed.")
# Show that `contains list` is really `contains element or contains element`.
with_a_or_with_b = partners.search(cr, uid, ['|', ('category_id', 'in', [cat_a]), ('category_id', 'in', [cat_b])])
self.assertEqual(set([ab, a, b]), set(with_a_or_with_b), "Search for category_id contains cat_a or contains cat_b failed.")
# If we change the OR in AND...
with_a_and_b = partners.search(cr, uid, [('category_id', 'in', [cat_a]), ('category_id', 'in', [cat_b])])
self.assertEqual(set([ab]), set(with_a_and_b), "Search for category_id contains cat_a and cat_b failed.")
# Partners without category A and without category B.
without_a_or_b = partners.search(cr, uid, [('category_id', 'not in', [cat_a, cat_b])])
self.assertTrue(all(i not in without_a_or_b for i in [a, b, ab]), "Search for category_id doesn't contain cat_a or cat_b failed (1).")
self.assertTrue(c in without_a_or_b, "Search for category_id doesn't contain cat_a or cat_b failed (2).")
# Show that `doesn't contain list` is really `doesn't contain element and doesn't contain element`.
without_a_and_without_b = partners.search(cr, uid, [('category_id', 'not in', [cat_a]), ('category_id', 'not in', [cat_b])])
self.assertTrue(all(i not in without_a_and_without_b for i in [a, b, ab]), "Search for category_id doesn't contain cat_a and cat_b failed (1).")
self.assertTrue(c in without_a_and_without_b, "Search for category_id doesn't contain cat_a and cat_b failed (2).")
# We can exclude any partner containing the category A.
without_a = partners.search(cr, uid, [('category_id', 'not in', [cat_a])])
self.assertTrue(a not in without_a, "Search for category_id doesn't contain cat_a failed (1).")
self.assertTrue(ab not in without_a, "Search for category_id doesn't contain cat_a failed (2).")
self.assertTrue(set([b, c]).issubset(set(without_a)), "Search for category_id doesn't contain cat_a failed (3).")
# (Obviously we can do the same for cateory B.)
without_b = partners.search(cr, uid, [('category_id', 'not in', [cat_b])])
self.assertTrue(b not in without_b, "Search for category_id doesn't contain cat_b failed (1).")
self.assertTrue(ab not in without_b, "Search for category_id doesn't contain cat_b failed (2).")
self.assertTrue(set([a, c]).issubset(set(without_b)), "Search for category_id doesn't contain cat_b failed (3).")
# We can't express the following: Partners with a category different than A.
# with_any_other_than_a = ...
# self.assertTrue(a not in with_any_other_than_a, "Search for category_id with any other than cat_a failed (1).")
# self.assertTrue(ab in with_any_other_than_a, "Search for category_id with any other than cat_a failed (2).")

View File

@ -540,7 +540,8 @@ class expression(object):
ids2 = select_from_where(cr, field._fields_id, field_obj._table, 'id', ids2, operator)
if ids2:
call_null = False
self.__exp[i] = ('id', 'in', ids2)
o2m_op = 'not in' if operator in NEGATIVE_TERM_OPERATORS else 'in'
self.__exp[i] = ('id', o2m_op, ids2)
if call_null:
o2m_op = 'in' if operator in NEGATIVE_TERM_OPERATORS else 'not in'

View File

@ -1548,7 +1548,6 @@ class BaseModel(object):
)
self._invalids.update(fields)
if error_msgs:
cr.rollback()
raise except_orm('ValidateError', '\n'.join(error_msgs))
else:
self._invalids.clear()
@ -4357,7 +4356,20 @@ class BaseModel(object):
upd0 = upd0 + ',"' + field + '"'
upd1 = upd1 + ',' + self._columns[field]._symbol_set[0]
upd2.append(self._columns[field]._symbol_set[1](vals[field]))
#for the function fields that receive a value, we set them directly in the database
#(they may be required), but we also need to trigger the _fct_inv()
if (hasattr(self._columns[field], '_fnct_inv')) and not isinstance(self._columns[field], fields.related):
#TODO: this way to special case the related fields is really creepy but it shouldn't be changed at
#one week of the release candidate. It seems the only good way to handle correctly this is to add an
#attribute to make a field `really readonly´ and thus totally ignored by the create()... otherwise
#if, for example, the related has a default value (for usability) then the fct_inv is called and it
#may raise some access rights error. Changing this is a too big change for now, and is thus postponed
#after the release but, definitively, the behavior shouldn't be different for related and function
#fields.
upd_todo.append(field)
else:
#TODO: this `if´ statement should be removed because there is no good reason to special case the fields
#related. See the above TODO comment for further explanations.
if not isinstance(self._columns[field], fields.related):
upd_todo.append(field)
if field in self._columns \

View File

@ -215,6 +215,9 @@ class Cursor(object):
_logger.warning(query)
_logger.warning("SQL queries cannot contain %d or %f anymore. "
"Use only %s")
if params and not isinstance(params, (tuple, list, dict)):
_logger.error("SQL query parameters should be a tuple, list or dict; got %r", params)
raise ValueError("SQL query parameters should be a tuple, list or dict; got %r" % (params,))
if self.sql_log:
now = mdt.now()

View File

@ -9,7 +9,8 @@ See the :ref:`test-framework` section in the :ref:`features` list.
"""
from . import test_expression, test_html_sanitize, test_ir_sequence, test_orm,\
test_view_validation, test_uninstall, test_misc
test_per_class_teardown, \
test_view_validation, test_uninstall, test_misc, test_db_cursor
fast_suite = [
test_ir_sequence,
@ -18,7 +19,9 @@ fast_suite = [
checks = [
test_expression,
test_html_sanitize,
test_db_cursor,
test_orm,
test_per_class_teardown,
test_view_validation,
test_misc,
]

View File

@ -1088,7 +1088,7 @@ class test_datetime(ImporterCase):
['value'], [['2012-02-03 11:11:11']])
self.assertFalse(result['messages'])
self.assertEqual(
values(self.read(domain=[('id', '=', result['ids'])])),
values(self.read(domain=[('id', 'in', result['ids'])])),
['2012-02-03 01:11:11'])
def test_notz(self):
@ -1098,5 +1098,5 @@ class test_datetime(ImporterCase):
result = self.import_(['value'], [['2012-02-03 11:11:11']])
self.assertFalse(result['messages'])
self.assertEqual(
values(self.read(domain=[('id', '=', result['ids'])])),
values(self.read(domain=[('id', 'in', result['ids'])])),
['2012-02-03 11:11:11'])

View File

@ -1,4 +1,8 @@
# -*- coding: utf-8 -*-
"""
The module :mod:`openerp.tests.common` provides a few helper and classes to write
tests.
"""
import os
import threading
import time
@ -40,10 +44,25 @@ def stop_openerp():
"""
openerp.service.stop_services()
class TransactionCase(unittest2.TestCase):
class BaseCase(unittest2.TestCase):
"""
Subclass of TestCase with a single transaction, rolled-back at the end of
the tests.
Subclass of TestCase for common OpenERP-specific code.
"""
@classmethod
def cursor(self):
return openerp.modules.registry.RegistryManager.get(DB).db.cursor()
@classmethod
def registry(self, model):
return openerp.modules.registry.RegistryManager.get(DB)[model]
class TransactionCase(BaseCase):
"""
Subclass of BaseCase with a single transaction, rolled-back at the end of
each test (method).
"""
def setUp(self):
@ -54,19 +73,31 @@ class TransactionCase(unittest2.TestCase):
self.cr.rollback()
self.cr.close()
def cursor(self):
return openerp.modules.registry.RegistryManager.get(DB).db.cursor()
def registry(self, model):
return openerp.modules.registry.RegistryManager.get(DB)[model]
class SingleTransactionCase(BaseCase):
"""
Subclass of BaseCase with a single transaction for the whole class,
rolled-back after all the tests.
"""
@classmethod
def setUpClass(cls):
cls.cr = cls.cursor()
cls.uid = openerp.SUPERUSER_ID
@classmethod
def tearDownClass(cls):
cls.cr.rollback()
cls.cr.close()
class RpcCase(unittest2.TestCase):
"""
Subclass of TestCase with a few XML-RPC proxies.
"""
def __init__(self, name):
super(RpcCase, self).__init__(name)
def __init__(self, methodName='runTest'):
super(RpcCase, self).__init__(methodName)
class A(object):
pass

View File

@ -0,0 +1,32 @@
# -*- coding: utf-8 -*-
import unittest2
import openerp
from openerp.tools.misc import mute_logger
import common
DB = common.DB
ADMIN_USER_ID = common.ADMIN_USER_ID
def cursor():
return openerp.modules.registry.RegistryManager.get(DB).db.cursor()
class test_cr_execute(unittest2.TestCase):
""" Try cr.execute with wrong parameters """
@mute_logger('openerp.sql_db')
def test_execute_bad_params(self):
"""
Try to use iterable but non-list or int params in query parameters.
"""
cr = cursor()
with self.assertRaises(ValueError):
cr.execute("SELECT id FROM res_users WHERE login=%s", 'admin')
with self.assertRaises(ValueError):
cr.execute("SELECT id FROM res_users WHERE id=%s", 1)
with self.assertRaises(ValueError):
cr.execute("SELECT id FROM res_users WHERE id=%s", '1')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,48 @@
# -*- coding: utf-8 -*-
import unittest2
import openerp
import common
class test_per_class_teardown(common.SingleTransactionCase):
"""
Check the whole-class transaction behavior of SingleTransactionCase.
"""
def test_00(self):
"""Create a partner."""
cr, uid = self.cr, self.uid
self.registry('res.partner').create(cr, uid, {'name': 'test_per_class_teardown_partner'})
ids = self.registry('res.partner').search(cr, uid, [('name', '=', 'test_per_class_teardown_partner')])
self.assertEqual(1, len(ids), "Test partner not found.")
def test_01(self):
"""Find the created partner."""
cr, uid = self.cr, self.uid
ids = self.registry('res.partner').search(cr, uid, [('name', '=', 'test_per_class_teardown_partner')])
self.assertEqual(1, len(ids), "Test partner not found.")
class test_per_method_teardown(common.TransactionCase):
"""
Check the per-method transaction behavior of TransactionCase.
"""
def test_00(self):
"""Create a partner."""
cr, uid = self.cr, self.uid
ids = self.registry('res.partner').search(cr, uid, [('name', '=', 'test_per_class_teardown_partner')])
self.assertEqual(0, len(ids), "Test partner found.")
self.registry('res.partner').create(cr, uid, {'name': 'test_per_class_teardown_partner'})
ids = self.registry('res.partner').search(cr, uid, [('name', '=', 'test_per_class_teardown_partner')])
self.assertEqual(1, len(ids), "Test partner not found.")
def test_01(self):
"""Don't find the created partner."""
cr, uid = self.cr, self.uid
ids = self.registry('res.partner').search(cr, uid, [('name', '=', 'test_per_class_teardown_partner')])
self.assertEqual(0, len(ids), "Test partner found.")
if __name__ == '__main__':
unittest2.main()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -43,7 +43,7 @@ class ormcache(object):
return r
except KeyError:
self.stat_miss += 1
value = d[args] = self.method(self2, cr, *args)
value = d[key] = self.method(self2, cr, *args)
return value
except TypeError:
self.stat_err += 1

View File

@ -27,12 +27,11 @@ Miscellaneous tools used by OpenERP.
"""
from functools import wraps
import inspect
import subprocess
import logging
import os
import random
import re
import smtplib
import socket
import sys
import threading
@ -40,13 +39,6 @@ import time
import zipfile
from collections import defaultdict
from datetime import datetime
from email.MIMEText import MIMEText
from email.MIMEBase import MIMEBase
from email.MIMEMultipart import MIMEMultipart
from email.Header import Header
from email.Utils import formatdate, COMMASPACE
from email import Utils
from email import Encoders
from itertools import islice, izip
from lxml import etree
from which import which
@ -312,16 +304,8 @@ def html2plaintext(html, body_id=None, encoding='utf-8'):
html = ustr(html)
from lxml.etree import tostring
try:
from lxml.html.soupparser import fromstring
kwargs = {}
except ImportError:
_logger.debug('tools.misc.html2plaintext: cannot use BeautifulSoup, fallback to lxml.etree.HTMLParser')
from lxml.etree import fromstring, HTMLParser
kwargs = dict(parser=HTMLParser())
tree = fromstring(html, **kwargs)
from lxml.etree import tostring, fromstring, HTMLParser
tree = fromstring(html, parser=HTMLParser())
if body_id is not None:
source = tree.xpath('//*[@id=%s]'%(body_id,))
@ -371,7 +355,12 @@ def generate_tracking_message_id(res_id):
Used to track the replies related to a given object thanks to the "In-Reply-To"
or "References" fields that Mail User Agents will set.
"""
return "<%s-openerp-%s@%s>" % (time.time(), res_id, socket.gethostname())
try:
rnd = random.SystemRandom().random()
except NotImplementedError:
rnd = random.random()
rndstr = ("%.15f" % rnd)[2:]
return "<%.15f.%s-openerp-%s@%s>" % (time.time(), rndstr, res_id, socket.gethostname())
def email_send(email_from, email_to, subject, body, email_cc=None, email_bcc=None, reply_to=False,
attachments=None, message_id=None, references=None, openobject_id=False, debug=False, subtype='plain', headers=None,
@ -608,7 +597,7 @@ def get_iso_codes(lang):
ALL_LANGUAGES = {
'ab_RU': u'Abkhazian / аҧсуа',
'ar_AR': u'Arabic / الْعَرَبيّة',
'ar_SY': u'Arabic / الْعَرَبيّة',
'bg_BG': u'Bulgarian / български език',
'bs_BS': u'Bosnian / bosanski jezik',
'ca_ES': u'Catalan / Català',

Some files were not shown because too many files have changed in this diff Show More