From 87003e214eca7aafa3bf322cf2623afcbfd98716 Mon Sep 17 00:00:00 2001 From: Victor Feyens Date: Thu, 7 Feb 2019 16:32:01 +0000 Subject: [PATCH] [DOC] batch of UI, Https, linter corrections --- doc/reference/cmdline.rst | 36 +++--- doc/reference/data.rst | 6 +- doc/reference/javascript_api.rst | 2 + doc/reference/javascript_cheatsheet.rst | 6 +- doc/reference/javascript_reference.rst | 24 ++-- doc/reference/mixins.rst | 155 ++++++++++++------------ doc/reference/module.rst | 2 +- doc/reference/qweb.rst | 26 ++-- doc/reference/reports.rst | 16 +-- doc/reference/testing.rst | 15 +-- doc/reference/translations.rst | 11 +- doc/webservices/iap.rst | 4 +- 12 files changed, 153 insertions(+), 150 deletions(-) diff --git a/doc/reference/cmdline.rst b/doc/reference/cmdline.rst index d10a3e8c0ec..9e71ce600d6 100644 --- a/doc/reference/cmdline.rst +++ b/doc/reference/cmdline.rst @@ -85,8 +85,8 @@ Running the server .. option:: --max-cron-threads - number of workers dedicated to cron jobs. Defaults to 2. The workers are - threads in multi-threading mode and processes in multi-processing mode. + number of workers dedicated to :ref:`cron ` jobs. Defaults to 2. + The workers are threads in multi-threading mode and processes in multi-processing mode. For multi-processing mode, this is in addition to the HTTP worker processes. @@ -175,10 +175,10 @@ database listen by using the --database parameter and specifying a comma-separated list of databases - When combining the two parameters, db-filter superseed the comma-separated + When combining the two parameters, db-filter supersedes the comma-separated database list for restricting database list, while the comma-separated list is used for performing requested operations like upgrade of modules. - + .. code-block:: bash odoo-bin --db-filter ^11.*$ @@ -190,7 +190,7 @@ database odoo-bin --database 11firstdatabase,11seconddatabase Restrict access to only two databases, 11firstdatabase and 11seconddatabase - + .. code-block:: bash odoo-bin --database 11firstdatabase,11seconddatabase -u base @@ -199,16 +199,16 @@ database and update base module on one database: 11firstdatabase If database 11seconddatabase doesn't exist, the database is created and base modules is installed - + .. code-block:: bash odoo-bin --db-filter ^11.*$ --database 11firstdatabase,11seconddatabase -u base - + Restrict access to databases whose name starts with 11, and update base module on one database: 11firstdatabase If database 11seconddatabase doesn't exist, the database is created and base modules is installed - + .. option:: --db-template -The main template calls the translatable template with ``doc.partner_id.lang`` as a -``t-lang`` parameter, so it will be rendered in the language of the partner. This way, -each Sale Order will be printed in the language of the corresponding customer. If you wish -to translate only the body of the document, but keep the header and footer in a default +The main template calls the translatable template with ``doc.partner_id.lang`` as a +``t-lang`` parameter, so it will be rendered in the language of the partner. This way, +each Sale Order will be printed in the language of the corresponding customer. If you wish +to translate only the body of the document, but keep the header and footer in a default language, you could call the report's external layout this way:: @@ -180,7 +180,7 @@ language, you could call the report's external layout this way:: .. tip:: Please take note that this works only when calling external templates, you will not be - able to translate part of a document by setting a ``t-lang`` attribute on an xml node other + able to translate part of a document by setting a ``t-lang`` attribute on an xml node other than ``t-call``. If you wish to translate part of a template, you can create an external template with this partial template and call it from the main one with the ``t-lang`` attribute. @@ -345,4 +345,4 @@ For example, you can access a Sale Order report in html mode by going to Or you can access the pdf version at \http:///report/pdf/sale.report_saleorder/38 -.. _wkhtmltopdf: http://wkhtmltopdf.org +.. _wkhtmltopdf: https://wkhtmltopdf.org diff --git a/doc/reference/testing.rst b/doc/reference/testing.rst index c1d9410bc4a..12ab6609829 100644 --- a/doc/reference/testing.rst +++ b/doc/reference/testing.rst @@ -43,12 +43,6 @@ and ``__init__.py`` contains:: 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 related to testing Odoo content (modules, mainly): @@ -108,10 +102,7 @@ Tests are automatically run when installing or updating modules if :option:`--test-enable ` was enabled when starting the Odoo server. -As of Odoo 8, running tests outside of the install/update cycle is not -supported. - -.. _unittest documentation: https://docs.python.org/2/library/unittest.html +.. _unittest documentation: https://docs.python.org/3/library/unittest.html Test selection -------------- @@ -514,7 +505,7 @@ test runner will then create a phantom_js browser, point it to the proper url and simulate the click and inputs, according to the scenario. -.. _qunit: http://qunitjs.com/ +.. _qunit: https://qunitjs.com/ .. _qunit_config.js: https://github.com/odoo/odoo/blob/51ee0c3cb59810449a60dae0b086b49b1ed6f946/addons/web/static/tests/helpers/qunit_config.js#L49 .. _web.js_tests_assets: https://github.com/odoo/odoo/blob/51ee0c3cb59810449a60dae0b086b49b1ed6f946/addons/web/views/webclient_templates.xml#L427 .. _web.qunit_suite: https://github.com/odoo/odoo/blob/51ee0c3cb59810449a60dae0b086b49b1ed6f946/addons/web/views/webclient_templates.xml#L509 @@ -523,4 +514,4 @@ and simulate the click and inputs, according to the scenario. .. _test_utils.js: https://github.com/odoo/odoo/blob/51ee0c3cb59810449a60dae0b086b49b1ed6f946/addons/web/static/tests/helpers/test_utils.js .. _mock server: https://github.com/odoo/odoo/blob/51ee0c3cb59810449a60dae0b086b49b1ed6f946/addons/web/static/tests/helpers/mock_server.js .. _qunit assertions: https://github.com/odoo/odoo/blob/51ee0c3cb59810449a60dae0b086b49b1ed6f946/addons/web/static/tests/helpers/qunit_asserts.js -.. _createView: https://github.com/odoo/odoo/blob/51ee0c3cb59810449a60dae0b086b49b1ed6f946/addons/web/static/tests/helpers/test_utils_create.js#L267 \ No newline at end of file +.. _createView: https://github.com/odoo/odoo/blob/51ee0c3cb59810449a60dae0b086b49b1ed6f946/addons/web/static/tests/helpers/test_utils_create.js#L267 diff --git a/doc/reference/translations.rst b/doc/reference/translations.rst index 81ec506df63..b30bb58d3d9 100644 --- a/doc/reference/translations.rst +++ b/doc/reference/translations.rst @@ -7,6 +7,11 @@ Translating Modules =================== +This section explains how to provide translation abilities to your module. + +.. note:: If you want to contribute to the translation of Odoo itself, please refer to the + `Odoo Wiki page `_. + Exporting translatable term =========================== @@ -184,6 +189,6 @@ Read vs Run Time }; -.. _PO File: http://en.wikipedia.org/wiki/Gettext#Translating -.. _msginit: http://www.gnu.org/software/gettext/manual/gettext.html#Creating -.. _POEdit: http://poedit.net/ +.. _PO File: https://en.wikipedia.org/wiki/Gettext#Translating +.. _msginit: https://www.gnu.org/software/gettext/manual/gettext.html#Creating +.. _POEdit: https://poedit.net/ diff --git a/doc/webservices/iap.rst b/doc/webservices/iap.rst index 2dec1fb1dc0..e4f8d7ed4c4 100644 --- a/doc/webservices/iap.rst +++ b/doc/webservices/iap.rst @@ -550,6 +550,7 @@ care how they are implemented. pending transactions/existing holds). .. exception:: odoo.exceptions.AccessError + :noindex: Raised by: @@ -557,8 +558,9 @@ care how they are implemented. * any failure in an inter-server call. (typically, in :func:`~odoo.addons.iap.jsonrpc`). .. exception:: odoo.exceptions.UserError + :noindex: - Raised by any unexpeted behaviour at the discretion of the App developer (*you*). + Raised by any unexpected behaviour at the discretion of the App developer (*you*). Test the API