From 03c8f4c3884af9d438e237058eba1bc10282d294 Mon Sep 17 00:00:00 2001 From: Julien De Coster Date: Fri, 19 Dec 2014 12:14:53 +0100 Subject: [FIX] Server Action examples in reference doc --- doc/reference/actions.rst | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/reference') 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 + Res Partner Server Action print self, object @@ -218,6 +219,7 @@ field: .. code-block:: xml + Res Partner Server Action if object.some_condition(): -- cgit v1.2.3 From 9808ca3e314ea765a81ec685b229863fe67e010f Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 15 Jan 2015 13:28:25 +0100 Subject: [IMP] test discovery, documentation, deprecation warnings * document and warn that checks and fast_suite in tests sub-packages are deprecated and have no effect * avoid iterating all currently loaded modules when looking for test modules in a tests sub-package * replace use of __import__ by importlib Fixes #3152 --- doc/reference/testing.rst | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'doc/reference') 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 -- cgit v1.2.3 From 0baa13232c5066f167232734e54f4789ab195bb1 Mon Sep 17 00:00:00 2001 From: Henri-Maxime Ducoulombier Date: Thu, 15 Jan 2015 12:16:33 +0100 Subject: [FIX] doc: typo in qweb reference fixes #4711 --- doc/reference/qweb.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/reference') 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:: - +
  • new element
  • -- cgit v1.2.3 From f020c5f534e0327eb3a67ccd0c9c64be5ad1927e Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 19 Jan 2015 11:02:01 +0100 Subject: [ADD] documentation for un-deprecated --log-level --- doc/reference/cmdline.rst | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'doc/reference') 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 + + 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 -- cgit v1.2.3 From 0aab81cd3ac6881b2b64ccedb901b55badd421d4 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 19 Jan 2015 15:51:16 +0100 Subject: [IMP] doc: move manifest description from backend tutorial to manifest doc --- doc/reference/module.rst | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'doc/reference') 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) -- cgit v1.2.3