diff options
| author | Christophe Simonis <chs@odoo.com> | 2015-01-19 17:15:56 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2015-01-19 17:15:56 +0100 |
| commit | 18e22be138f4d273ce8f63c0ff2c8a437cf6ce5d (patch) | |
| tree | 63bd658de7b6fa0e91d521ca19322dd68bdc1492 /doc/reference | |
| parent | f6e5bf847b1a7107c09b009a757823b0f9514fa4 (diff) | |
| parent | 0aab81cd3ac6881b2b64ccedb901b55badd421d4 (diff) | |
[MERGE] forward port of branch 8.0 up to 0aab81c
Diffstat (limited to 'doc/reference')
| -rw-r--r-- | doc/reference/actions.rst | 2 | ||||
| -rw-r--r-- | doc/reference/cmdline.rst | 29 | ||||
| -rw-r--r-- | doc/reference/module.rst | 21 | ||||
| -rw-r--r-- | doc/reference/qweb.rst | 2 | ||||
| -rw-r--r-- | doc/reference/testing.rst | 18 |
5 files changed, 66 insertions, 6 deletions
diff --git a/doc/reference/actions.rst b/doc/reference/actions.rst index 8e31d58b36c..fe2dfb6d68c 100644 --- a/doc/reference/actions.rst +++ b/doc/reference/actions.rst @@ -204,6 +204,7 @@ field: .. code-block:: xml <record model="ir.actions.server" id="print_instance"> + <field name="name">Res Partner Server Action</field> <field name="model_id" ref="model_res_partner"/> <field name="code"> print self, object @@ -218,6 +219,7 @@ field: .. code-block:: xml <record model="ir.actions.server" id="print_instance"> + <field name="name">Res Partner Server Action</field> <field name="model_id" ref="model_res_partner"/> <field name="code"> if object.some_condition(): diff --git a/doc/reference/cmdline.rst b/doc/reference/cmdline.rst index 269f62ed2eb..280cd079622 100644 --- a/doc/reference/cmdline.rst +++ b/doc/reference/cmdline.rst @@ -249,6 +249,35 @@ customize the amout of logging output enables DEBUG logging of SQL querying, equivalent to ``--log-handler=openerp.sql_db:DEBUG`` +.. option:: --log-level <level> + + Shortcut to more easily set predefined levels on specific loggers. "real" + levels (``critical``, ``error``, ``warn``, ``debug``) are set on the + ``openerp`` and ``werkzeug`` loggers (except for ``debug`` which is only + set on ``openerp``). + + Odoo also provides debugging pseudo-levels which apply to different sets + of loggers: + + ``debug_sql`` + sets the SQL logger to ``debug`` + + equivalent to ``--log-sql`` + ``debug_rpc`` + sets the ``openerp`` and HTTP request loggers to ``debug`` + + equivalent to ``--log-level debug --log-request`` + ``debug_rpc_answer`` + sets the ``openerp`` and HTTP request and response loggers to + ``debug`` + + equivalent to ``--log-level debug --log-request --log-response`` + + .. note:: + + In case of conflict between :option:`--log-level` and + :option:`--log-handler`, the latter is used + .. _reference/cmdline/scaffold: Scaffolding diff --git a/doc/reference/module.rst b/doc/reference/module.rst index 14e7847f1da..5dd93ca2cf6 100644 --- a/doc/reference/module.rst +++ b/doc/reference/module.rst @@ -15,6 +15,27 @@ and to specify a number of module metadata. It is a file called ``__openerp__.py`` and contains a single Python dictionary, each dictionary key specifying a module metadatum. +:: + + { + 'name': "A Module", + 'version': '1.0', + 'depends': ['base'], + 'author': "Author Name", + 'category': 'Category', + 'description': """ + Description text + """, + # data files always loaded at installation + 'data': [ + 'mymodule_view.xml', + ], + # data files containing optionally loaded demonstration data + 'demo': [ + 'demo_data.xml', + ], + } + Available manifest fields are: ``name`` (``str``, required) diff --git a/doc/reference/qweb.rst b/doc/reference/qweb.rst index 08170da0d23..a7564ded394 100644 --- a/doc/reference/qweb.rst +++ b/doc/reference/qweb.rst @@ -418,7 +418,7 @@ the name of the template to alter as parameter. The alteration is then performed with any number of ``t-jquery`` sub-directives:: - <t t-extends="base.template"> + <t t-extend="base.template"> <t t-jquery="ul" t-operation="append"> <li>new element</li> </t> diff --git a/doc/reference/testing.rst b/doc/reference/testing.rst index 2676c2b4084..e1c78919f15 100644 --- a/doc/reference/testing.rst +++ b/doc/reference/testing.rst @@ -24,8 +24,16 @@ and ``__init__.py`` contains:: from . import test_foo, test_bar -.. note:: test modules which are not imported from ``tests/__init__.py`` will - not be run +.. warning:: + + test modules which are not imported from ``tests/__init__.py`` will not be + run + +.. versionchanged:: 8.0 + + previously, the test runner would only run modules added to two lists + ``fast_suite`` and ``checks`` in ``tests/__init__.py``. In 8.0 it will + run all imported modules The test runner will simply run any test case, as described in the official `unittest documentation`_, but Odoo provides a number of utilities and helpers @@ -46,8 +54,8 @@ been installed, and not run right after the module installation: .. autofunction:: openerp.tests.common.post_install The most common situation is to use -:class:`~openerp.tests.common.TransactionCase` and test a property of a of a -model in each method:: +:class:`~openerp.tests.common.TransactionCase` and test a property of a model +in each method:: class TestModelA(common.TransactionCase): def test_some_action(self): @@ -67,7 +75,7 @@ Tests are automatically run when installing or updating modules if Odoo server. As of Odoo 8, running tests outside of the install/update cycle is not - +supported. .. _unittest2: http://pypi.python.org/pypi/unittest2 .. _unittest documentation: https://docs.python.org/2/library/unittest.html |
