[FIX] doc warnings

* add Sphinx 1.6 compatibility (use app.set_translator when
  available as in that case programmatically setting
  html_translator_class is broken)
* fix a bunch of code block lexers to avoid warnings & get better
  coloration
* add a few options which were referred to without being actually
  defined
* fix some rST formatting
This commit is contained in:
Xavier Morel
2017-07-03 11:49:03 +02:00
parent 828c7c3da9
commit 9a07a4599c
9 changed files with 74 additions and 27 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ def setup(app):
app.add_node(address, html=(
lambda self, node: self.body.append(self.starttag(node, 'address')),
lambda self, node: self.body.append('</address>\n')
))
), override=True) # docutils.nodes.address exists and is a bibliographic element
app.add_node(cite, html=(visit_cite, depart_cite))
for name, node in [('mark', mark), ('ins', insert), ('del', delete),
('s', strikethrough), ('u', underline), ('small', small),
+7 -4
View File
@@ -8,10 +8,13 @@ import sphinx.environment
import sphinx.builders.html
from docutils import nodes
def setup(app):
if getattr(app.config, 'html_translator_class', None):
app.warn("Overriding the explicitly set html_translator_class setting",
location="odoo extension")
app.config.html_translator_class = 'odoo_ext.translator.BootstrapTranslator'
if hasattr(app, 'set_translator'):
app.set_translator('html', translator.BootstrapTranslator)
else:
if getattr(app.config, 'html_translator_class', None):
app.warn("Overriding the explicitly set html_translator_class setting",
location="odoo extension")
app.config.html_translator_class = 'odoo_ext.translator.BootstrapTranslator'
switcher.setup(app)
app.add_config_value('odoo_cover_default', None, 'env')
+6 -2
View File
@@ -512,7 +512,11 @@ The final result won't be pretty, but will provide you with enough information t
Let’s start by creating an empty file called **style.less** and place it in a folder called **less** in your static folder.
The following rules will style our *Services* page. Copy and paste it, then save the file.
.. code-block:: css
.. as of Pygments 2.2, the Less lexer can't handle inline comments or nested
rules so use scss instead, it's not quite perfect but it doesn't trigger
warnings/errors
.. code-block:: scss
.services {
background: #EAEAEA;
@@ -727,7 +731,7 @@ Dropping our snippet onto the page, you will notice that our new options are aut
Let’s create some css rules in order to provide a visual feedback for our options. Open our **style.less** file and add the following
.. code-block:: css
.. code-block:: scss
.snippet_testimonial {
border: 1px solid #EAEAEA;
-1
View File
@@ -17,7 +17,6 @@ Index
api_integration
setup
reference
business
.. ifconfig:: todo_include_todos
+1 -1
View File
@@ -58,7 +58,7 @@ features whereas:
.. warning::
While Python 3 adds plenty of great features (keyword-only parameters,
generator delegation, pathlib, ...), you must *not *use them in Odoo
generator delegation, pathlib, ...), you must *not* use them in Odoo
until Python 2 support is dropped
Semantics changes
+38 -1
View File
@@ -166,6 +166,10 @@ database
when creating new databases from the database-management screens, use the
specified `template database`_. Defaults to ``template1``.
.. option:: --no-database-list
Suppresses the ability to list databases available on the system
built-in HTTP
-------------
@@ -290,6 +294,38 @@ customize the amount of logging output
In case of conflict between :option:`--log-level` and
:option:`--log-handler`, the latter is used
translations
------------
.. option:: --i18n-import
.. option:: --i18n-export
emails
------
.. option:: --email-from <address>
Email address used as <FROM> when Odoo needs to send mails
.. option:: --smtp <server>
Address of the SMTP server to connect to in order to send mails
.. option:: --smtp-port <port>
.. option:: --smtp-ssl
If set, odoo should use SSL/STARTSSL SMTP connections
.. option:: --smtp-user <name>
Username to connect to the SMTP server
.. option:: --smtp-password <password>
Password to connect to the SMTP server
.. _reference/cmdline/scaffold:
@@ -325,6 +361,8 @@ Scaffolding is available via the :command:`odoo-bin scaffold` subcommand.
Configuration file
==================
.. program:: odoo-bin
Most of the command-line options can also be specified via a configuration
file. Most of the time, they use similar names with the prefix ``-`` removed
and other ``-`` are replaced by ``_`` e.g. :option:`--db-template` becomes
@@ -339,7 +377,6 @@ Some conversions don't match the pattern:
``log_handler``, use that directly in the configuration file
* :option:`--smtp` is stored as ``smtp_server``
* :option:`--database` is stored as ``db_name``
* :option:`--debug` is stored as ``debug_mode`` (a boolean)
* :option:`--i18n-import` and :option:`--i18n-export` aren't available at all
from configuration files
+10 -6
View File
@@ -991,12 +991,16 @@ calendar view are:
declares fields to aggregate or to use in kanban *logic*. If the field is
simply displayed in the calendar cards.
On each field can have additional attributes:
``invisible``: use "True" to hide the value in the cards
``avatar_field``: only for x2many field, to display the avatar instead the
display_name in the cards
``write_model`` and ``write_field``: you can add a filter and save the result
in the defined model, the filter is added in the sidebar
Fields can have additional attributes:
``invisible``
use "True" to hide the value in the cards
``avatar_field``
only for x2many field, to display the avatar instead the display_name
in the cards
``write_model`` and ``write_field``
you can add a filter and save the result in the defined model, the
filter is added in the sidebar
``templates``
defines the :ref:`reference/qweb` template ``calendar-box``. Cards definition
+8 -8
View File
@@ -48,7 +48,7 @@ Configuration samples
in ``/etc/odoo.conf`` set:
.. code-block:: apacheconf
.. code-block:: ini
[options]
dbfilter = ^mycompany.*$
@@ -60,7 +60,7 @@ in ``/etc/odoo.conf`` set:
in ``/etc/odoo.conf`` set:
.. code-block:: apacheconf
.. code-block:: ini
[options]
dbfilter = ^%d$
@@ -101,7 +101,7 @@ Configuration sample
in ``/etc/postgresql/9.5/main/pg_hba.conf`` set:
.. code-block:: apacheconf
.. code-block:: text
# IPv4 local connections:
host all all 127.0.0.1/32 md5
@@ -109,7 +109,7 @@ in ``/etc/postgresql/9.5/main/pg_hba.conf`` set:
in ``/etc/postgresql/9.5/main/postgresql.conf`` set:
.. code-block:: apacheconf
.. code-block:: text
listen_addresses = 'localhost,192.168.1.2'
port = 5432
@@ -154,7 +154,7 @@ Configuration sample
in ``/etc/odoo.conf`` set:
.. code-block:: apacheconf
.. code-block:: ini
[options]
admin_passwd = mysupersecretpassword
@@ -226,7 +226,7 @@ Configuration sample
in ``/etc/odoo.conf``:
.. code-block:: apacheconf
.. code-block:: ini
[options]
limit_memory_hard = 1677721600
@@ -267,13 +267,13 @@ Configuration sample
in ``/etc/odoo.conf`` set:
.. code-block:: apacheconf
.. code-block:: ini
proxy_mode = True
in ``/etc/nginx/sites-enabled/odoo.conf`` set:
.. code-block:: apacheconf
.. code-block:: nginx
#odoo server
upstream odoo {
+3 -3
View File
@@ -439,7 +439,7 @@ Source installation requires manually installing dependencies:
command from a cmd.exe prompt (replace ``\YourOdooPath`` by the actual
path where you downloaded Odoo):
.. code-block:: ps1
.. code-block:: doscon
C:\> cd \YourOdooPath
C:\YourOdooPath> C:\Python27\Scripts\pip.exe install -r requirements.txt
@@ -484,7 +484,7 @@ Source installation requires manually installing dependencies:
- on Windows, `install nodejs <http://nodejs.org/download/>`_, reboot (to
update the :envvar:`PATH`) and install less:
.. code-block:: ps1
.. code-block:: doscon
C:\> npm install -g less
@@ -517,7 +517,7 @@ Common necessary configurations are:
Under Windows a typical way to execute odoo would be:
.. code-block:: ps1
.. code-block:: doscon
C:\YourOdooPath> python odoo-bin -w odoo -r odoo --addons-path=addons,../mymodules --db-filter=mydb$