[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:
@@ -24,7 +24,7 @@ def setup(app):
|
|||||||
app.add_node(address, html=(
|
app.add_node(address, html=(
|
||||||
lambda self, node: self.body.append(self.starttag(node, 'address')),
|
lambda self, node: self.body.append(self.starttag(node, 'address')),
|
||||||
lambda self, node: self.body.append('</address>\n')
|
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))
|
app.add_node(cite, html=(visit_cite, depart_cite))
|
||||||
for name, node in [('mark', mark), ('ins', insert), ('del', delete),
|
for name, node in [('mark', mark), ('ins', insert), ('del', delete),
|
||||||
('s', strikethrough), ('u', underline), ('small', small),
|
('s', strikethrough), ('u', underline), ('small', small),
|
||||||
|
|||||||
@@ -8,10 +8,13 @@ import sphinx.environment
|
|||||||
import sphinx.builders.html
|
import sphinx.builders.html
|
||||||
from docutils import nodes
|
from docutils import nodes
|
||||||
def setup(app):
|
def setup(app):
|
||||||
if getattr(app.config, 'html_translator_class', None):
|
if hasattr(app, 'set_translator'):
|
||||||
app.warn("Overriding the explicitly set html_translator_class setting",
|
app.set_translator('html', translator.BootstrapTranslator)
|
||||||
location="odoo extension")
|
else:
|
||||||
app.config.html_translator_class = 'odoo_ext.translator.BootstrapTranslator'
|
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)
|
switcher.setup(app)
|
||||||
app.add_config_value('odoo_cover_default', None, 'env')
|
app.add_config_value('odoo_cover_default', None, 'env')
|
||||||
|
|||||||
@@ -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.
|
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.
|
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 {
|
.services {
|
||||||
background: #EAEAEA;
|
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
|
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 {
|
.snippet_testimonial {
|
||||||
border: 1px solid #EAEAEA;
|
border: 1px solid #EAEAEA;
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ Index
|
|||||||
api_integration
|
api_integration
|
||||||
setup
|
setup
|
||||||
reference
|
reference
|
||||||
business
|
|
||||||
|
|
||||||
.. ifconfig:: todo_include_todos
|
.. ifconfig:: todo_include_todos
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -58,7 +58,7 @@ features whereas:
|
|||||||
.. warning::
|
.. warning::
|
||||||
|
|
||||||
While Python 3 adds plenty of great features (keyword-only parameters,
|
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
|
until Python 2 support is dropped
|
||||||
|
|
||||||
Semantics changes
|
Semantics changes
|
||||||
|
|||||||
@@ -166,6 +166,10 @@ database
|
|||||||
when creating new databases from the database-management screens, use the
|
when creating new databases from the database-management screens, use the
|
||||||
specified `template database`_. Defaults to ``template1``.
|
specified `template database`_. Defaults to ``template1``.
|
||||||
|
|
||||||
|
.. option:: --no-database-list
|
||||||
|
|
||||||
|
Suppresses the ability to list databases available on the system
|
||||||
|
|
||||||
built-in HTTP
|
built-in HTTP
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
@@ -290,6 +294,38 @@ customize the amount of logging output
|
|||||||
In case of conflict between :option:`--log-level` and
|
In case of conflict between :option:`--log-level` and
|
||||||
:option:`--log-handler`, the latter is used
|
: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:
|
.. _reference/cmdline/scaffold:
|
||||||
|
|
||||||
@@ -325,6 +361,8 @@ Scaffolding is available via the :command:`odoo-bin scaffold` subcommand.
|
|||||||
Configuration file
|
Configuration file
|
||||||
==================
|
==================
|
||||||
|
|
||||||
|
.. program:: odoo-bin
|
||||||
|
|
||||||
Most of the command-line options can also be specified via a configuration
|
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
|
file. Most of the time, they use similar names with the prefix ``-`` removed
|
||||||
and other ``-`` are replaced by ``_`` e.g. :option:`--db-template` becomes
|
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
|
``log_handler``, use that directly in the configuration file
|
||||||
* :option:`--smtp` is stored as ``smtp_server``
|
* :option:`--smtp` is stored as ``smtp_server``
|
||||||
* :option:`--database` is stored as ``db_name``
|
* :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
|
* :option:`--i18n-import` and :option:`--i18n-export` aren't available at all
|
||||||
from configuration files
|
from configuration files
|
||||||
|
|
||||||
|
|||||||
+10
-6
@@ -991,12 +991,16 @@ calendar view are:
|
|||||||
declares fields to aggregate or to use in kanban *logic*. If the field is
|
declares fields to aggregate or to use in kanban *logic*. If the field is
|
||||||
simply displayed in the calendar cards.
|
simply displayed in the calendar cards.
|
||||||
|
|
||||||
On each field can have additional attributes:
|
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
|
``invisible``
|
||||||
display_name in the cards
|
use "True" to hide the value in the cards
|
||||||
``write_model`` and ``write_field``: you can add a filter and save the result
|
``avatar_field``
|
||||||
in the defined model, the filter is added in the sidebar
|
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``
|
``templates``
|
||||||
defines the :ref:`reference/qweb` template ``calendar-box``. Cards definition
|
defines the :ref:`reference/qweb` template ``calendar-box``. Cards definition
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ Configuration samples
|
|||||||
|
|
||||||
in ``/etc/odoo.conf`` set:
|
in ``/etc/odoo.conf`` set:
|
||||||
|
|
||||||
.. code-block:: apacheconf
|
.. code-block:: ini
|
||||||
|
|
||||||
[options]
|
[options]
|
||||||
dbfilter = ^mycompany.*$
|
dbfilter = ^mycompany.*$
|
||||||
@@ -60,7 +60,7 @@ in ``/etc/odoo.conf`` set:
|
|||||||
|
|
||||||
in ``/etc/odoo.conf`` set:
|
in ``/etc/odoo.conf`` set:
|
||||||
|
|
||||||
.. code-block:: apacheconf
|
.. code-block:: ini
|
||||||
|
|
||||||
[options]
|
[options]
|
||||||
dbfilter = ^%d$
|
dbfilter = ^%d$
|
||||||
@@ -101,7 +101,7 @@ Configuration sample
|
|||||||
|
|
||||||
in ``/etc/postgresql/9.5/main/pg_hba.conf`` set:
|
in ``/etc/postgresql/9.5/main/pg_hba.conf`` set:
|
||||||
|
|
||||||
.. code-block:: apacheconf
|
.. code-block:: text
|
||||||
|
|
||||||
# IPv4 local connections:
|
# IPv4 local connections:
|
||||||
host all all 127.0.0.1/32 md5
|
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:
|
in ``/etc/postgresql/9.5/main/postgresql.conf`` set:
|
||||||
|
|
||||||
.. code-block:: apacheconf
|
.. code-block:: text
|
||||||
|
|
||||||
listen_addresses = 'localhost,192.168.1.2'
|
listen_addresses = 'localhost,192.168.1.2'
|
||||||
port = 5432
|
port = 5432
|
||||||
@@ -154,7 +154,7 @@ Configuration sample
|
|||||||
|
|
||||||
in ``/etc/odoo.conf`` set:
|
in ``/etc/odoo.conf`` set:
|
||||||
|
|
||||||
.. code-block:: apacheconf
|
.. code-block:: ini
|
||||||
|
|
||||||
[options]
|
[options]
|
||||||
admin_passwd = mysupersecretpassword
|
admin_passwd = mysupersecretpassword
|
||||||
@@ -226,7 +226,7 @@ Configuration sample
|
|||||||
|
|
||||||
in ``/etc/odoo.conf``:
|
in ``/etc/odoo.conf``:
|
||||||
|
|
||||||
.. code-block:: apacheconf
|
.. code-block:: ini
|
||||||
|
|
||||||
[options]
|
[options]
|
||||||
limit_memory_hard = 1677721600
|
limit_memory_hard = 1677721600
|
||||||
@@ -267,13 +267,13 @@ Configuration sample
|
|||||||
|
|
||||||
in ``/etc/odoo.conf`` set:
|
in ``/etc/odoo.conf`` set:
|
||||||
|
|
||||||
.. code-block:: apacheconf
|
.. code-block:: ini
|
||||||
|
|
||||||
proxy_mode = True
|
proxy_mode = True
|
||||||
|
|
||||||
in ``/etc/nginx/sites-enabled/odoo.conf`` set:
|
in ``/etc/nginx/sites-enabled/odoo.conf`` set:
|
||||||
|
|
||||||
.. code-block:: apacheconf
|
.. code-block:: nginx
|
||||||
|
|
||||||
#odoo server
|
#odoo server
|
||||||
upstream odoo {
|
upstream odoo {
|
||||||
|
|||||||
@@ -439,7 +439,7 @@ Source installation requires manually installing dependencies:
|
|||||||
command from a cmd.exe prompt (replace ``\YourOdooPath`` by the actual
|
command from a cmd.exe prompt (replace ``\YourOdooPath`` by the actual
|
||||||
path where you downloaded Odoo):
|
path where you downloaded Odoo):
|
||||||
|
|
||||||
.. code-block:: ps1
|
.. code-block:: doscon
|
||||||
|
|
||||||
C:\> cd \YourOdooPath
|
C:\> cd \YourOdooPath
|
||||||
C:\YourOdooPath> C:\Python27\Scripts\pip.exe install -r requirements.txt
|
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
|
- on Windows, `install nodejs <http://nodejs.org/download/>`_, reboot (to
|
||||||
update the :envvar:`PATH`) and install less:
|
update the :envvar:`PATH`) and install less:
|
||||||
|
|
||||||
.. code-block:: ps1
|
.. code-block:: doscon
|
||||||
|
|
||||||
C:\> npm install -g less
|
C:\> npm install -g less
|
||||||
|
|
||||||
@@ -517,7 +517,7 @@ Common necessary configurations are:
|
|||||||
|
|
||||||
Under Windows a typical way to execute odoo would be:
|
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$
|
C:\YourOdooPath> python odoo-bin -w odoo -r odoo --addons-path=addons,../mymodules --db-filter=mydb$
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user