[MERGE] forward port of branch 8.0 up to 0aab81c

This commit is contained in:
Christophe Simonis
2015-01-19 17:15:56 +01:00
272 changed files with 2480 additions and 1214 deletions
+2
View File
@@ -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():
+29
View File
@@ -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
+21
View File
@@ -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)
+1 -1
View File
@@ -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>
+13 -5
View File
@@ -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