[FIX] *: RST cleanup

RST cleanup to comply with the RST guidelines. This is required so we
can use "make test", as there are currently hundreds of errors. For now,
it is unusable because of the oldest code in this repo.

closes odoo/documentation#3574

Signed-off-by: Castillo Jonathan (jcs) <jcs@odoo.com>
This commit is contained in:
Jonathan Castillo (jcs) 2023-02-13 15:50:13 +00:00
parent 245d3ba5c2
commit cddb38c443
64 changed files with 730 additions and 740 deletions

View File

@ -516,6 +516,7 @@ security-related topics:
Blocking Brute Force Attacks Blocking Brute Force Attacks
---------------------------- ----------------------------
For internet-facing deployments, brute force attacks on user passwords are very common, and this For internet-facing deployments, brute force attacks on user passwords are very common, and this
threat should not be neglected for Odoo servers. Odoo emits a log entry whenever a login attempt threat should not be neglected for Odoo servers. Odoo emits a log entry whenever a login attempt
is performed, and reports the result: success or failure, along with the target login and source IP. is performed, and reports the result: success or failure, along with the target login and source IP.

View File

@ -4,19 +4,22 @@ Email gateway
The Odoo mail gateway allows you to inject directly all the received emails in Odoo. The Odoo mail gateway allows you to inject directly all the received emails in Odoo.
Its principle is straightforward: your SMTP server executes the "mailgate" script for every new incoming email. Its principle is straightforward: your SMTP server executes the "mailgate" script for every new
incoming email.
The script takes care of connecting to your Odoo database through XML-RPC, and send the emails via The script takes care of connecting to your Odoo database through XML-RPC, and send the emails via
the `MailThread.message_process()` feature. the `MailThread.message_process()` feature.
Prerequisites Prerequisites
------------- -------------
- Administrator access to the Odoo database. - Administrator access to the Odoo database.
- Your own mail server such as Postfix or Exim. - Your own mail server such as Postfix or Exim.
- Technical knowledge on how to configure an email server. - Technical knowledge on how to configure an email server.
For Postfix For Postfix
----------- -----------
In you alias config (:file:`/etc/aliases`): In you alias config (:file:`/etc/aliases`):
.. code-block:: text .. code-block:: text
@ -33,6 +36,7 @@ In you alias config (:file:`/etc/aliases`):
For Exim For Exim
-------- --------
.. code-block:: text .. code-block:: text
*: |/odoo-directory/addons/mail/static/scripts/odoo-mailgate.py -d <database-name> -u <userid> -p <password> *: |/odoo-directory/addons/mail/static/scripts/odoo-mailgate.py -d <database-name> -u <userid> -p <password>

View File

@ -105,13 +105,13 @@ Linux
----- -----
Debian/Ubuntu Debian/Ubuntu
''''''''''''' ~~~~~~~~~~~~~
Odoo {CURRENT_MAJOR_VERSION} 'deb' package currently supports `Debian 11 (Bullseye)`_, Odoo {CURRENT_MAJOR_VERSION} 'deb' package currently supports `Debian 11 (Bullseye)`_,
`Ubuntu 20.04 (Focal)`_ or above. `Ubuntu 20.04 (Focal)`_ or above.
Prepare Prepare
^^^^^^^ *******
Odoo needs a `PostgreSQL`_ server to run properly. The default configuration for Odoo needs a `PostgreSQL`_ server to run properly. The default configuration for
the Odoo 'deb' package is to use the PostgreSQL server on the same host as your the Odoo 'deb' package is to use the PostgreSQL server on the same host as your
@ -127,7 +127,7 @@ Odoo instance. Execute the following command in order to install the PostgreSQL
details on the various versions. details on the various versions.
Repository Repository
^^^^^^^^^^ **********
Odoo S.A. provides a repository that can be used with Debian and Ubuntu distributions. It can be Odoo S.A. provides a repository that can be used with Debian and Ubuntu distributions. It can be
used to install *Odoo Community Edition* by executing the following commands **as root**: used to install *Odoo Community Edition* by executing the following commands **as root**:
@ -143,7 +143,7 @@ You can then use the usual `apt-get upgrade` command to keep your installation u
At this moment, there is no nightly repository for the Enterprise Edition. At this moment, there is no nightly repository for the Enterprise Edition.
Deb Package Deb Package
^^^^^^^^^^^ ***********
Instead of using the repository as described above, the 'deb' packages for both the *Community* and Instead of using the repository as described above, the 'deb' packages for both the *Community* and
*Enterprise* editions can be downloaded from the `official download page <download_>`_. *Enterprise* editions can be downloaded from the `official download page <download_>`_.
@ -179,12 +179,13 @@ and automatically start the server.
$ sudo pip3 install num2words $ sudo pip3 install num2words
Fedora Fedora
'''''' ~~~~~~
Odoo {CURRENT_MAJOR_VERSION} 'rpm' package supports Fedora 34. Odoo {CURRENT_MAJOR_VERSION} 'rpm' package supports Fedora 34.
Prepare Prepare
^^^^^^^ *******
Odoo needs a `PostgreSQL`_ server to run properly. Make sure that the `sudo` command is available Odoo needs a `PostgreSQL`_ server to run properly. Make sure that the `sudo` command is available
and well configured and, only then, execute the following command in order to install the PostgreSQL and well configured and, only then, execute the following command in order to install the PostgreSQL
server: server:
@ -202,7 +203,7 @@ server:
details on the various versions. details on the various versions.
Repository Repository
^^^^^^^^^^ **********
Odoo S.A. provides a repository that can be used with the Fedora distributions. Odoo S.A. provides a repository that can be used with the Fedora distributions.
It can be used to install *Odoo Community Edition* by executing the following It can be used to install *Odoo Community Edition* by executing the following
@ -216,7 +217,7 @@ commands:
$ sudo systemctl start odoo $ sudo systemctl start odoo
RPM package RPM package
^^^^^^^^^^^ ***********
Instead of using the repository as described above, the 'rpm' packages for both the *Community* and Instead of using the repository as described above, the 'rpm' packages for both the *Community* and
*Enterprise* editions can be downloaded from the `official download page <download_>`_. *Enterprise* editions can be downloaded from the `official download page <download_>`_.
@ -254,12 +255,12 @@ Windows
------- -------
Fetch the sources Fetch the sources
''''''''''''''''' ~~~~~~~~~~~~~~~~~
There are two ways to obtain the source code of Odoo: as a zip **archive** or through **git**. There are two ways to obtain the source code of Odoo: as a zip **archive** or through **git**.
Archive Archive
^^^^^^^ *******
Community Edition: Community Edition:
@ -275,7 +276,7 @@ Enterprise Edition:
.. _setup/install/source/windows/git: .. _setup/install/source/windows/git:
Git Git
^^^ ***
The following requires `Git <git_>`_ to be installed on your machine and that you have basic The following requires `Git <git_>`_ to be installed on your machine and that you have basic
knowledge of Git commands. To clone a Git repository, you must choose between cloning with HTTPS or knowledge of Git commands. To clone a Git repository, you must choose between cloning with HTTPS or
@ -310,10 +311,10 @@ on contributing to Odoo source code, choose SSH.
.. _setup/install/source/windows/prepare: .. _setup/install/source/windows/prepare:
Prepare Prepare
''''''' ~~~~~~~
Python Python
^^^^^^ ******
Odoo requires Python 3.7 or later to run. Visit `Python's download page <https://www.python.org/downloads/windows/>`_ Odoo requires Python 3.7 or later to run. Visit `Python's download page <https://www.python.org/downloads/windows/>`_
to download and install the latest version of Python 3 on your machine. to download and install the latest version of Python 3 on your machine.
@ -335,7 +336,7 @@ sure that **pip** is checked.
C:\> pip --version C:\> pip --version
PostgreSQL PostgreSQL
^^^^^^^^^^ **********
Odoo uses PostgreSQL as database management system. `Download and install PostgreSQL <https://www.postgresql.org/download/windows/>`_ Odoo uses PostgreSQL as database management system. `Download and install PostgreSQL <https://www.postgresql.org/download/windows/>`_
(supported version: 10.0 and later). (supported version: 10.0 and later).
@ -356,7 +357,7 @@ create a new PostgreSQL user:
`Yes`. `Yes`.
Dependencies Dependencies
^^^^^^^^^^^^ ************
Before installing the dependencies, you must download and install the Before installing the dependencies, you must download and install the
`Build Tools for Visual Studio <https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019>`_. `Build Tools for Visual Studio <https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019>`_.
@ -396,7 +397,7 @@ needed:
(typically: `C:\\Users\\<user>\\AppData\\Roaming\\npm\\`). (typically: `C:\\Users\\<user>\\AppData\\Roaming\\npm\\`).
Running Odoo Running Odoo
'''''''''''' ~~~~~~~~~~~~
Once all dependencies are set up, Odoo can be launched by running `odoo-bin`, the Once all dependencies are set up, Odoo can be launched by running `odoo-bin`, the
command-line interface of the server. It is located at the root of the Odoo Community directory. command-line interface of the server. It is located at the root of the Odoo Community directory.
@ -444,12 +445,12 @@ Linux
----- -----
Fetch the sources Fetch the sources
''''''''''''''''' ~~~~~~~~~~~~~~~~~
There are two ways to obtain the source code of Odoo: as a zip **archive** or through **git**. There are two ways to obtain the source code of Odoo: as a zip **archive** or through **git**.
Archive Archive
^^^^^^^ *******
Community Edition: Community Edition:
@ -465,7 +466,7 @@ Enterprise Edition:
.. _setup/install/source/linux/git: .. _setup/install/source/linux/git:
Git Git
^^^ ***
The following requires `Git <git_>`_ to be installed on your machine and that you have basic The following requires `Git <git_>`_ to be installed on your machine and that you have basic
knowledge of Git commands. To clone a Git repository, you must choose between cloning with HTTPS or knowledge of Git commands. To clone a Git repository, you must choose between cloning with HTTPS or
@ -500,10 +501,10 @@ on contributing to Odoo source code, choose SSH.
.. _setup/install/source/linux/prepare: .. _setup/install/source/linux/prepare:
Prepare Prepare
''''''' ~~~~~~~
Python Python
^^^^^^ ******
Odoo requires Python 3.7 or later to run. Use your package manager to download and install Python 3 Odoo requires Python 3.7 or later to run. Use your package manager to download and install Python 3
on your machine if it is not already done. on your machine if it is not already done.
@ -522,7 +523,7 @@ on your machine if it is not already done.
$ pip3 --version $ pip3 --version
PostgreSQL PostgreSQL
^^^^^^^^^^ **********
Odoo uses PostgreSQL as database management system. Use your package manager to download and install Odoo uses PostgreSQL as database management system. Use your package manager to download and install
PostgreSQL (supported version: 10.0 and later). PostgreSQL (supported version: 10.0 and later).
@ -547,10 +548,10 @@ create a new PostgreSQL user:
.. _install/python-dependencies: .. _install/python-dependencies:
Python Dependencies Python Dependencies
^^^^^^^^^^^^^^^^^^^ *******************
Debian/Ubuntu Debian/Ubuntu
~~~~~~~~~~~~~ ^^^^^^^^^^^^^
Using your **distribution packages** is the preferred way of installing dependencies. Using your **distribution packages** is the preferred way of installing dependencies.
@ -565,7 +566,7 @@ On Debian/Ubuntu, the following commands should install the required packages:
$ sed -n -e '/^Depends:/,/^Pre/ s/ python3-\(.*\),/python3-\1/p' debian/control | sudo xargs apt-get install -y $ sed -n -e '/^Depends:/,/^Pre/ s/ python3-\(.*\),/python3-\1/p' debian/control | sudo xargs apt-get install -y
Install with pip Install with pip
~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^
Alternatively, you can use **pip** to install python dependencies. As some of the packages need a Alternatively, you can use **pip** to install python dependencies. As some of the packages need a
compilation step, they require system libraries to be installed. compilation step, they require system libraries to be installed.
@ -599,7 +600,7 @@ the requirements file to install the requirements for the current user.
with your system. You can use virtualenv_ to create isolated Python environments. with your system. You can use virtualenv_ to create isolated Python environments.
Other Dependencies Other Dependencies
^^^^^^^^^^^^^^^^^^ ******************
- `wkhtmltopdf` must be installed manually in version `0.12.5 - `wkhtmltopdf` must be installed manually in version `0.12.5
<https://github.com/wkhtmltopdf/wkhtmltopdf/releases/0.12.5/>`_ to support headers and footers. <https://github.com/wkhtmltopdf/wkhtmltopdf/releases/0.12.5/>`_ to support headers and footers.
@ -615,7 +616,7 @@ Other Dependencies
$ sudo npm install -g rtlcss $ sudo npm install -g rtlcss
Running Odoo Running Odoo
'''''''''''' ~~~~~~~~~~~~
Once all dependencies are set up, Odoo can be launched by running `odoo-bin`, the Once all dependencies are set up, Odoo can be launched by running `odoo-bin`, the
command-line interface of the server. It is located at the root of the Odoo Community directory. command-line interface of the server. It is located at the root of the Odoo Community directory.
@ -664,12 +665,12 @@ Mac OS
------ ------
Fetch the sources Fetch the sources
''''''''''''''''' ~~~~~~~~~~~~~~~~~
There are two ways to obtain the source code of Odoo: as a zip **archive** or through **git**. There are two ways to obtain the source code of Odoo: as a zip **archive** or through **git**.
Archive Archive
^^^^^^^ *******
Community Edition: Community Edition:
@ -685,7 +686,7 @@ Enterprise Edition:
.. _setup/install/source/mac_os/git: .. _setup/install/source/mac_os/git:
Git Git
^^^ ***
The following requires `Git <git_>`_ to be installed on your machine and that you have basic The following requires `Git <git_>`_ to be installed on your machine and that you have basic
knowledge of Git commands. To clone a Git repository, you must choose between cloning with HTTPS or knowledge of Git commands. To clone a Git repository, you must choose between cloning with HTTPS or
@ -720,10 +721,10 @@ on contributing to Odoo source code, choose SSH.
.. _setup/install/source/mac_os/prepare: .. _setup/install/source/mac_os/prepare:
Prepare Prepare
''''''' ~~~~~~~
Python Python
^^^^^^ ******
Odoo requires Python 3.7 or later to run. Use your preferred package manager (homebrew_, macports_) Odoo requires Python 3.7 or later to run. Use your preferred package manager (homebrew_, macports_)
to download and install Python 3 on your machine if it is not already done. to download and install Python 3 on your machine if it is not already done.
@ -742,7 +743,7 @@ to download and install Python 3 on your machine if it is not already done.
$ pip3 --version $ pip3 --version
PostgreSQL PostgreSQL
^^^^^^^^^^ **********
Odoo uses PostgreSQL as database management system. Use `postgres.app <https://postgresapp.com>`_ Odoo uses PostgreSQL as database management system. Use `postgres.app <https://postgresapp.com>`_
to download and install PostgreSQL (supported version: 10.0 and later). to download and install PostgreSQL (supported version: 10.0 and later).
@ -764,7 +765,7 @@ create a new PostgreSQL user:
connect to the database without password. connect to the database without password.
Dependencies Dependencies
^^^^^^^^^^^^ ************
Odoo dependencies are listed in the `requirements.txt` file located at the root of the Odoo Odoo dependencies are listed in the `requirements.txt` file located at the root of the Odoo
community directory. community directory.
@ -808,7 +809,7 @@ needed:
$ sudo npm install -g rtlcss $ sudo npm install -g rtlcss
Running Odoo Running Odoo
'''''''''''' ~~~~~~~~~~~~
Once all dependencies are set up, Odoo can be launched by running `odoo-bin`, the Once all dependencies are set up, Odoo can be launched by running `odoo-bin`, the
command-line interface of the server. It is located at the root of the Odoo Community directory. command-line interface of the server. It is located at the root of the Odoo Community directory.

View File

@ -20,11 +20,11 @@ message:
.. image:: on_premise/error_message_sub_code.png .. image:: on_premise/error_message_sub_code.png
:align: center :align: center
:alt: Something went wrong while registering your database, :alt: Something went wrong while registering your database, you can try again or contact Odoo
you can try again or contact Odoo Help Help
Solutions Solutions
''''''''' ~~~~~~~~~
* Do you have a valid Enterprise subscription? * Do you have a valid Enterprise subscription?
@ -44,14 +44,12 @@ Solutions
.. image:: on_premise/unlink_single_db.png .. image:: on_premise/unlink_single_db.png
:align: center :align: center
A confirmation message will appear; make sure this is the correct database as A confirmation message will appear; make sure this is the correct database as
it will be deactivated shortly: it will be deactivated shortly:
.. image:: on_premise/unlink_confirm_enterprise_edition.png .. image:: on_premise/unlink_confirm_enterprise_edition.png
:align: center :align: center
* Do you have the updated version of Odoo 9? * Do you have the updated version of Odoo 9?
* From July 2016 onward, Odoo 9 now automatically change the uuid of a * From July 2016 onward, Odoo 9 now automatically change the uuid of a
@ -65,7 +63,6 @@ Solutions
.. image:: on_premise/unlink_db_name_collision.png .. image:: on_premise/unlink_db_name_collision.png
:align: center :align: center
In this case, you need to change the UUID on your test databases to solve this In this case, you need to change the UUID on your test databases to solve this
issue. You will find more information about this in :ref:`this section <duplicate_premise>`. issue. You will find more information about this in :ref:`this section <duplicate_premise>`.
@ -85,8 +82,6 @@ Solutions
* Once you activated your database, you must keep these ports open, as the * Once you activated your database, you must keep these ports open, as the
Update notification runs once a week. Update notification runs once a week.
Error message due to too many users Error message due to too many users
----------------------------------- -----------------------------------
@ -95,15 +90,14 @@ Odoo Enterprise subscription, you may encounter this message:
.. image:: on_premise/add_more_users.png .. image:: on_premise/add_more_users.png
:align: center :align: center
:alt: This database will expire in X days, you :alt: This database will expire in X days, you have more users than your subscription allows
have more users than your subscription allows
When the message appears you have 30 days before the expiration. When the message appears you have 30 days before the expiration.
The countdown is updated everyday. The countdown is updated everyday.
Solutions Solutions
''''''''' ~~~~~~~~~
- **Add more users** on your subscription: follow the link and Validate - **Add more users** on your subscription: follow the link and Validate
the upsell quotation and pay for the extra users. the upsell quotation and pay for the extra users.
@ -126,12 +120,11 @@ you will encounter this message:
:align: center :align: center
:alt: This database has expired. :alt: This database has expired.
This **blocking** message appears after a non-blocking message that lasts 30 days. This **blocking** message appears after a non-blocking message that lasts 30 days.
If you fail to take action before the end of the countdown, the database is expired. If you fail to take action before the end of the countdown, the database is expired.
Solutions Solutions
''''''''' ~~~~~~~~~
* Renew your subscription: follow the link and renew your subscription - note that * Renew your subscription: follow the link and renew your subscription - note that
if you wish to pay by Wire Transfer, your subscription will effectively be renewed if you wish to pay by Wire Transfer, your subscription will effectively be renewed
@ -142,7 +135,6 @@ Solutions
None of those solutions worked for you? Please contact our None of those solutions worked for you? Please contact our
`Support <https://www.odoo.com/help>`__ `Support <https://www.odoo.com/help>`__
.. _force_ping: .. _force_ping:
.. _duplicate_premise: .. _duplicate_premise:
@ -157,15 +149,15 @@ duplicate your database (among other things).
.. image:: on_premise/db_manager.gif .. image:: on_premise/db_manager.gif
:align: center :align: center
When you duplicate a local database, it is **strongly** advised to change When you duplicate a local database, it is **strongly** advised to change
the duplicated database's uuid (Unniversally Unique Identifier), since this the duplicated database's uuid (Unniversally Unique Identifier), since this
uuid is how your database identifies itself with our servers. Having two uuid is how your database identifies itself with our servers. Having two
databases with the same uuid could result in invoicing problems or registration databases with the same uuid could result in invoicing problems or registration
problems down the line. problems down the line.
.. note:: From July 2016 onward, Odoo 9 now automatically change the uuid of a .. note::
duplicated database; a manual operation is no longer required. From July 2016 onward, Odoo 9 now automatically change the uuid of a duplicated database; a
manual operation is no longer required.
The database uuid is currently accessible from the menu :menuselection:`Settings --> Technical --> The database uuid is currently accessible from the menu :menuselection:`Settings --> Technical -->
System Parameters`, we advise you to use a `uuid generator <https://www.uuidtools.com>`_ or to System Parameters`, we advise you to use a `uuid generator <https://www.uuidtools.com>`_ or to

View File

@ -104,6 +104,7 @@ and you're all set.
Source Install (Tarball) Source Install (Tarball)
------------------------ ------------------------
If you have originally installed Odoo with the "tarball" version (source code archive), you have If you have originally installed Odoo with the "tarball" version (source code archive), you have
to replace the installation directory with a newer version. First download the latest tarball to replace the installation directory with a newer version. First download the latest tarball
from Odoo.com. They are updated daily and include the latest security fixes (see step #1) from Odoo.com. They are updated daily and include the latest security fixes (see step #1)
@ -123,6 +124,7 @@ Finally, restart the Odoo service or reboot the machine, and you are all set.
Source Install (Github) Source Install (Github)
----------------------- -----------------------
If you have originally installed Odoo with a full Github clone of the official repositories, the If you have originally installed Odoo with a full Github clone of the official repositories, the
update procedure requires you to pull the latest source code via git. update procedure requires you to pull the latest source code via git.
Change into the directory for each repository (the main Odoo repository, and the Enterprise Change into the directory for each repository (the main Odoo repository, and the Enterprise

View File

@ -1,6 +1,7 @@
======================== ========================
Credit notes and refunds Credit notes and refunds
======================== ========================
A **credit note**, or **credit memo**, is a document issued A **credit note**, or **credit memo**, is a document issued
to a customer that notifies them that they have been credited to a customer that notifies them that they have been credited
a certain amount. a certain amount.
@ -18,6 +19,7 @@ There are several reasons that can lead to a credit note, such as:
Issue a Credit Note Issue a Credit Note
=================== ===================
You can create a credit note from scratch by going to You can create a credit note from scratch by going to
:menuselection:`Accounting --> Customers --> Credit Notes`, :menuselection:`Accounting --> Customers --> Credit Notes`,
and by clicking on *Create*. Filling the Credit Notes form and by clicking on *Create*. Filling the Credit Notes form
@ -42,6 +44,7 @@ You can choose between three options:
Partial Refund Partial Refund
-------------- --------------
Odoo creates a draft credit note already prefilled with all the Odoo creates a draft credit note already prefilled with all the
necessary information from the original invoice. necessary information from the original invoice.
@ -53,6 +56,7 @@ want to modify any detail on the credit note.
Full Refund Full Refund
----------- -----------
Odoo creates a credit note, automatically validates it, and Odoo creates a credit note, automatically validates it, and
reconciles the original invoice with it. reconciles the original invoice with it.
@ -64,6 +68,7 @@ a validated invoice.
Full refund and new draft invoice Full refund and new draft invoice
--------------------------------- ---------------------------------
Odoo creates a credit note, automatically validates it, reconciles Odoo creates a credit note, automatically validates it, reconciles
the original invoice with it, and open a new draft invoice the original invoice with it, and open a new draft invoice
prefilled with the same details from the original invoice. prefilled with the same details from the original invoice.
@ -72,6 +77,7 @@ This is the option to choose to modify the content of a validated invoice.
Record a Vendor Refund Record a Vendor Refund
====================== ======================
**Vendor Refunds** are recorded the same way you would do with invoices credit notes: **Vendor Refunds** are recorded the same way you would do with invoices credit notes:
You can either create a credit note from scratch by going You can either create a credit note from scratch by going
@ -81,6 +87,7 @@ and clicking on *Add Credit Note*.
Journal Entries Journal Entries
=============== ===============
Issuing a credit note from an invoice creates a **reverse entry** Issuing a credit note from an invoice creates a **reverse entry**
that zeroes out the journal items generated by the original invoice. that zeroes out the journal items generated by the original invoice.

View File

@ -1,6 +1,7 @@
============================ ============================
Add EPC QR Codes to invoices Add EPC QR Codes to invoices
============================ ============================
European Payments Council Quick Response Code, European Payments Council Quick Response Code,
or **EPC QR Code**, are two-dimensional barcodes or **EPC QR Code**, are two-dimensional barcodes
that customers can scan with their **mobile banking that customers can scan with their **mobile banking
@ -18,6 +19,7 @@ make for payment issues.
Configuration Configuration
============= =============
Go to :menuselection:`Accounting --> Configuration --> Settings` Go to :menuselection:`Accounting --> Configuration --> Settings`
and activate the **SEPA QR Code** feature. and activate the **SEPA QR Code** feature.
@ -26,6 +28,7 @@ and activate the **SEPA QR Code** feature.
Configure your Bank Accounts journal Configure your Bank Accounts journal
------------------------------------- -------------------------------------
Make sure that your *Bank Account* is correctly configured Make sure that your *Bank Account* is correctly configured
on Odoo with your IBAN and BIC. on Odoo with your IBAN and BIC.
@ -38,6 +41,7 @@ To do so, go to :menuselection:`Accounting --> Configuration
Issue Invoices with EPC QR Codes Issue Invoices with EPC QR Codes
================================ ================================
EPC QR Codes are added automatically to your invoices, as EPC QR Codes are added automatically to your invoices, as
long as you issue them to customers that are located in a long as you issue them to customers that are located in a
country where this feature is available. country where this feature is available.

View File

@ -149,7 +149,7 @@ It remains possible to resequence the invoices but with some restrictions:
current year without starting over from the beginning. current year without starting over from the beginning.
Invoice digitization with optical character recognition (OCR) Invoice digitization with optical character recognition (OCR)
--------------------------------------------------------------- -------------------------------------------------------------
**Invoice digitization** is the process of automatically encoding traditional paper invoices into **Invoice digitization** is the process of automatically encoding traditional paper invoices into
invoices forms in your accounting. invoices forms in your accounting.

View File

@ -86,8 +86,7 @@ into the **Production** environment. As these two environments are completely is
other, the digital certificates of one instance are not valid in the other one. other, the digital certificates of one instance are not valid in the other one.
To select a database environment, go to :menuselection:`Accounting --> Settings --> Argentinean To select a database environment, go to :menuselection:`Accounting --> Settings --> Argentinean
Localization` and choose either :guilabel:`Prueba (Testing)` or :guilabel:`Produccion (Production)` Localization` and choose either :guilabel:`Prueba (Testing)` or :guilabel:`Produccion (Production)`.
.
.. image:: argentina/select-environment.png .. image:: argentina/select-environment.png
:align: center :align: center

View File

@ -22,14 +22,12 @@ requires the next modules:
required for the Integration with Carvajal and generate the required for the Integration with Carvajal and generate the
electronic invoice, based on the DIAN legal requirements. electronic invoice, based on the DIAN legal requirements.
Workflow Workflow
======== ========
.. image:: colombia/colombia01.png .. image:: colombia/colombia01.png
:align: center :align: center
Configuration Configuration
============= =============
@ -42,7 +40,6 @@ filter and search for "Colombia". Then click on *Install* for the first two modu
.. image:: colombia/colombia02.png .. image:: colombia/colombia02.png
:align: center :align: center
Configure credentials for Carvajal web service Configure credentials for Carvajal web service
---------------------------------------------- ----------------------------------------------
@ -72,7 +69,6 @@ CSC is the default for new databases.
Once that Odoo and Carvajal are fully configured and ready for Once that Odoo and Carvajal are fully configured and ready for
production the testing environment can be disabled. production the testing environment can be disabled.
Configure your report data Configure your report data
-------------------------- --------------------------
@ -86,7 +82,6 @@ look for the *Colombian Electronic Invoice* section.
.. image:: colombia/colombia04.png .. image:: colombia/colombia04.png
:align: center :align: center
Configure data required in the XML Configure data required in the XML
---------------------------------- ----------------------------------
@ -94,7 +89,7 @@ Partner
~~~~~~~ ~~~~~~~
Identification Identification
^^^^^^^^^^^^^^ **************
As part of the Colombian Localization, the document types defined by As part of the Colombian Localization, the document types defined by
the DIAN are now available on the Partner form. Colombian partners the DIAN are now available on the Partner form. Colombian partners
@ -108,9 +103,8 @@ have to have their identification number and document type set:
will split this number when the data to the third party vendor is will split this number when the data to the third party vendor is
sent. sent.
Fiscal structure (RUT) Fiscal structure (RUT)
^^^^^^^^^^^^^^^^^^^^^^ **********************
The partner's responsibility codes (section 53 in the RUT document) The partner's responsibility codes (section 53 in the RUT document)
are included as part of the electronic invoice module given that is are included as part of the electronic invoice module given that is
@ -125,7 +119,6 @@ Purchase Tab --> Fiscal Information`
Additionally two booleans fields were added in order to specify the Additionally two booleans fields were added in order to specify the
fiscal regimen of the partner. fiscal regimen of the partner.
Taxes Taxes
~~~~~ ~~~~~
@ -143,7 +136,6 @@ to correctly display taxes in the invoice PDF.
.. image:: colombia/colombia08.png .. image:: colombia/colombia08.png
:align: center :align: center
Journals Journals
~~~~~~~~ ~~~~~~~~
@ -162,7 +154,6 @@ should be configured and synchronized with the CEN Financiero.
.. image:: colombia/colombia10.png .. image:: colombia/colombia10.png
:align: center :align: center
Users Users
~~~~~ ~~~~~
@ -173,7 +164,6 @@ configured:
.. image:: colombia/colombia11.png .. image:: colombia/colombia11.png
:align: center :align: center
Usage and testing Usage and testing
================= =================
@ -183,7 +173,6 @@ Invoice
When all your master data and credentials has been configured, it's When all your master data and credentials has been configured, it's
possible to start testing the electronic invoice workflow. possible to start testing the electronic invoice workflow.
Invoice creation Invoice creation
~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~
@ -206,7 +195,6 @@ There are three types of documents:
this invoice is added to the ERP, this invoice type should be this invoice is added to the ERP, this invoice type should be
selected. selected.
Invoice validation Invoice validation
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
@ -224,7 +212,6 @@ displayed with the Electronic Invoice status, with the initial value
.. image:: colombia/colombia14.png .. image:: colombia/colombia14.png
:align: center :align: center
Reception of legal XML and PDF Reception of legal XML and PDF
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -247,7 +234,6 @@ After this:
- The Electronic Invoice status changes to "Accepted" - The Electronic Invoice status changes to "Accepted"
Common errors Common errors
~~~~~~~~~~~~~ ~~~~~~~~~~~~~
@ -268,7 +254,6 @@ button:
.. image:: colombia/colombia19.png .. image:: colombia/colombia19.png
:align: center :align: center
Additional use cases Additional use cases
-------------------- --------------------

View File

@ -208,7 +208,7 @@ Odoo is compliant with the **Indian Goods and Services Tax (GST) E-waybill syste
.. _india/e-waybill-api: .. _india/e-waybill-api:
API Registration on your NIC E-waybill web portal API Registration on your NIC E-waybill web portal
-------------------------------------------------- -------------------------------------------------
You must register on the **NIC E-waybill** web portal to create your **API credentials**. You need You must register on the **NIC E-waybill** web portal to create your **API credentials**. You need
these credentials to :ref:`configure your Odoo Accounting app <india/e-waybill-configuration>`. these credentials to :ref:`configure your Odoo Accounting app <india/e-waybill-configuration>`.

View File

@ -60,6 +60,7 @@ section, click :guilabel:`Update info`. From here, fill out the fields:
PEC mail PEC mail
-------- --------
The **PEC email** is a specific type of **certified** email providing a legal equivalent to the The **PEC email** is a specific type of **certified** email providing a legal equivalent to the
traditional registered mail. The **PEC email** of the main company must be the same as the one traditional registered mail. The **PEC email** of the main company must be the same as the one
registered by the **Agenzia delle Entrate** authorities. registered by the **Agenzia delle Entrate** authorities.

View File

@ -1,8 +1,9 @@
===========
Netherlands Netherlands
=========== ===========
XAF Export XAF Export
---------- ==========
With the Dutch accounting localization installed, you will be able to With the Dutch accounting localization installed, you will be able to
export all your accounting entries in XAF format. For this, you have to export all your accounting entries in XAF format. For this, you have to
@ -11,13 +12,11 @@ define the entries you want to export using the filters (period, journals, ...)
and then you click on the button **EXPORT (XAF)**. and then you click on the button **EXPORT (XAF)**.
Dutch Accounting Reports Dutch Accounting Reports
------------------------ ========================
If you install the Dutch accounting localization, you will have access If you install the Dutch accounting localization, you will have access
to some reports that are specific to the Netherlands such as : to some reports that are specific to the Netherlands such as :
- Profit & Loss - Profit & Loss
- Tax Report (Aangifte omzetbelasting) - Tax Report (Aangifte omzetbelasting)
- Intrastat Report (ICP) - Intrastat Report (ICP)

View File

@ -533,9 +533,8 @@ Advance Payments
#. Reconcile the Credit note with the final invoice. #. Reconcile the Credit note with the final invoice.
#. The remaining balance on the final invoice should be paid with a regular payment transaction. #. The remaining balance on the final invoice should be paid with a regular payment transaction.
Detraction Invoices Detraction Invoices
******************** *******************
When creating invoices that is subject to Detractions, take into account the next considerations: When creating invoices that is subject to Detractions, take into account the next considerations:
@ -578,9 +577,8 @@ To finish the workflow please follow the instructions on :doc:`our page about Cr
.. note:: .. note::
The EDI workflow for the Credit notes works in the same way as the invoices. The EDI workflow for the Credit notes works in the same way as the invoices.
Debit Notes Debit Notes
------------ -----------
As part of the Peruvian localization, besides creating credit notes from an existing document As part of the Peruvian localization, besides creating credit notes from an existing document
you can also create debit Notes. For this just use the button “Add Debit Note”. you can also create debit Notes. For this just use the button “Add Debit Note”.

View File

@ -13,7 +13,7 @@ improving their overall experience with the company.
making customizations more robust as you dont have to edit code. making customizations more robust as you dont have to edit code.
Defining a default reply to on your mail template Defining a default reply to on your mail template
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ =================================================
Although the field *reply to* is available within the mail templates, **this field is only used Although the field *reply to* is available within the mail templates, **this field is only used
for mass mailing** mode (this means when sending templates on what we call bulk emailing). You for mass mailing** mode (this means when sending templates on what we call bulk emailing). You
@ -37,7 +37,7 @@ communication between your customer and your Odoo database. For more information
the catchall works, please check :ref:`how to manage inbound messages <email_communication/inbound_messages>`. the catchall works, please check :ref:`how to manage inbound messages <email_communication/inbound_messages>`.
Transactional emails and corresponding URL for each company Transactional emails and corresponding URL for each company
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ===========================================================
When using Odoo, multiple events trigger the sending of automated emails. These emails are known When using Odoo, multiple events trigger the sending of automated emails. These emails are known
as transactional emails and sometimes contain links pointing to your Odoo database. as transactional emails and sometimes contain links pointing to your Odoo database.
@ -72,7 +72,7 @@ For more information about how to configure your domains, we invite you to check
documentation </administration/maintain/domain_names>`. documentation </administration/maintain/domain_names>`.
Updating translations within email templates Updating translations within email templates
******************************************** --------------------------------------------
Email templates are automatically translated. Changing the translations shouldnt be necessary. Email templates are automatically translated. Changing the translations shouldnt be necessary.
However, if for a specific reason youd like to change some of the translations, this can be done. However, if for a specific reason youd like to change some of the translations, this can be done.

View File

@ -6,7 +6,7 @@ Installing Asterisk server
========================== ==========================
Dependencies Dependencies
~~~~~~~~~~~~ ------------
Before installing Asterisk you need to install the following dependencies: Before installing Asterisk you need to install the following dependencies:
@ -32,7 +32,8 @@ In order to install libsrtp, follow the instructions below:
./configure CFLAGS=-fPIC --prefix=/usr/local/lib ./configure CFLAGS=-fPIC --prefix=/usr/local/lib
make && make install make && make install
You also need to install PJSIP, you can download the source `here <http://www.pjsip.org/download.htm>`_. Once the source directory is extracted: You also need to install PJSIP, you can download the source `here
<http://www.pjsip.org/download.htm>`_. Once the source directory is extracted:
- **Change to the pjproject source directory:** - **Change to the pjproject source directory:**
@ -83,9 +84,10 @@ You also need to install PJSIP, you can download the source `here <http://www.pj
libpj.so (libc6,x86-64) => /usr/lib/libpj.so libpj.so (libc6,x86-64) => /usr/lib/libpj.so
Asterisk Asterisk
~~~~~~~~ --------
- In order to install Asterisk 13.7.0, you can download the source directly `there <http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/asterisk-13.7.0.tar.gz>`_. - In order to install Asterisk 13.7.0, you can download the source directly `there
<http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/asterisk-13.7.0.tar.gz>`_.
- Extract Asterisk: - Extract Asterisk:
@ -111,7 +113,9 @@ Asterisk
make menuselect make menuselect
- In the menuselect, go to the resources option and ensure that res_srtp is enabled. If there are 3 xs next to res_srtp, there is a problem with the srtp library and you must reinstall it. Save the configuration (press x). You should also see stars in front of the res_pjsip lines. - In the menuselect, go to the resources option and ensure that res_srtp is enabled. If there are
3 xs next to res_srtp, there is a problem with the srtp library and you must reinstall it. Save
the configuration (press x). You should also see stars in front of the res_pjsip lines.
- Compile and install Asterisk: - Compile and install Asterisk:
@ -119,10 +123,11 @@ Asterisk
make && make install make && make install
- If you need the sample configs you can run 'make samples' to install the sample configs. If you need to install the Asterisk startup script you can run 'make config'. - If you need the sample configs you can run 'make samples' to install the sample configs. If you
need to install the Asterisk startup script you can run 'make config'.
DTLS Certificates DTLS Certificates
~~~~~~~~~~~~~~~~~ -----------------
- After you need to setup the DTLS certificates. - After you need to setup the DTLS certificates.
@ -136,7 +141,8 @@ DTLS Certificates
cd /asterisk*/contrib/scripts cd /asterisk*/contrib/scripts
- Create the DTLS certificates (replace pbx.mycompany.com with your ip address or dns name, replace My Super Company with your company name): - Create the DTLS certificates (replace pbx.mycompany.com with your ip address or dns name, replace
My Super Company with your company name):
.. code-block:: console .. code-block:: console
@ -145,7 +151,9 @@ DTLS Certificates
Configure Asterisk server Configure Asterisk server
========================= =========================
For WebRTC, a lot of the settings that are needed MUST be in the peer settings. The global settings do not flow down into the peer settings very well. By default, Asterisk config files are located in /etc/asterisk/. Start by editing http.conf and make sure that the following lines are uncommented: For WebRTC, a lot of the settings that are needed MUST be in the peer settings. The global settings
do not flow down into the peer settings very well. By default, Asterisk config files are located in
/etc/asterisk/. Start by editing http.conf and make sure that the following lines are uncommented:
.. code-block:: console .. code-block:: console
@ -155,7 +163,10 @@ For WebRTC, a lot of the settings that are needed MUST be in the peer settings.
bindaddr=127.0.0.1 ; Replace this with your IP address bindaddr=127.0.0.1 ; Replace this with your IP address
bindport=8088 ; Replace this with the port you want to listen on bindport=8088 ; Replace this with the port you want to listen on
Next, edit sip.conf. The WebRTC peer requires encryption, avpf, and icesupport to be enabled. In most cases, directmedia should be disabled. Also under the WebRTC client, the transport needs to be listed as ws to allow websocket connections. All of these config lines should be under the peer itself; setting these config lines globally might not work: Next, edit sip.conf. The WebRTC peer requires encryption, avpf, and icesupport to be enabled. In
most cases, directmedia should be disabled. Also under the WebRTC client, the transport needs to be
listed as ws to allow websocket connections. All of these config lines should be under the peer
itself; setting these config lines globally might not work:
.. code-block:: console .. code-block:: console
@ -207,11 +218,13 @@ In Odoo, the configuration should be done in the user's preferences.
.. image:: asterisk/voip_config01.png .. image:: asterisk/voip_config01.png
:align: center :align: center
- The SIP Login/Browser's Extension is the number you configured previously in the sip.conf file (in our example: 1060). - The SIP Login/Browser's Extension is the number you configured previously in the sip.conf file (in
our example: 1060).
- The SIP Password is the secret you chose in the sip.conf file. - The SIP Password is the secret you chose in the sip.conf file.
- The extension of your office's phone is not a required field but it is used if you want to transfer your call from Odoo to an external phone also configured in the sip.conf file. - The extension of your office's phone is not a required field but it is used if you want to
transfer your call from Odoo to an external phone also configured in the sip.conf file.
The configuration should also be done in the General Settings under the "Integrations" section. The configuration should also be done in the General Settings under the "Integrations" section.
@ -221,4 +234,5 @@ The configuration should also be done in the General Settings under the "Integra
- The PBX Server IP should be the same as the IP you define in the http.conf file. - The PBX Server IP should be the same as the IP you define in the http.conf file.
- The WebSocket should be: ws://localhost:XXXX/ws where "localhost" needs to be the same as the IP defined previously and "XXXX" needs to be the port defined in the http.conf file. - The WebSocket should be: ws://localhost:XXXX/ws where "localhost" needs to be the same as the IP
defined previously and "XXXX" needs to be the port defined in the http.conf file.

View File

@ -15,7 +15,7 @@ to reorganize products and load another truck.
<https://www.odoo.com/blog/business-hacks-1/post/what-is-cross-docking-and-is-it-for-me-270>`_ <https://www.odoo.com/blog/business-hacks-1/post/what-is-cross-docking-and-is-it-for-me-270>`_
Configuration Configuration
============== =============
In the *Inventory* app, open :menuselection:`Configuration --> Settings` and activate the In the *Inventory* app, open :menuselection:`Configuration --> Settings` and activate the
*Multi-Step Routes*. *Multi-Step Routes*.

View File

@ -81,8 +81,8 @@ Open the products you want to ship and set a weight on it.
Don't forget to do the conversion if you are used to the imperial Don't forget to do the conversion if you are used to the imperial
measurement system. measurement system.
How to print shipping labels ? How to print shipping labels?
=============================== =============================
The delivery order created from the sale order will take the shipping The delivery order created from the sale order will take the shipping
information from it, but you can change the carrier if you want to. information from it, but you can change the carrier if you want to.

View File

@ -1,6 +1,6 @@
================= ===============
Quality Control Quality Control
================= ===============
Whether you want to control the quality of your production, or the production Whether you want to control the quality of your production, or the production
of your subcontractor, before registering the products into your stock, you can of your subcontractor, before registering the products into your stock, you can

View File

@ -195,7 +195,7 @@ From the location form, you are then able to access the Current Stock.
Manual Replenishment Manual Replenishment
-------------------------------- --------------------
You can also choose to replenish your subcontractors manually. You can also choose to replenish your subcontractors manually.

View File

@ -18,18 +18,18 @@ Follow the steps to connect your IoT Box.
:align: center :align: center
Ethernet Connection Ethernet Connection
~~~~~~~~~~~~~~~~~~~ ===================
1. Connect to the IoT Box all the devices that have to be connected with #. Connect to the IoT Box all the devices that have to be connected with
cables (ethernet, usb devices, etc.). cables (ethernet, usb devices, etc.).
2. Power on the IoT Box. #. Power on the IoT Box.
3. Read the Pairing Code from a screen or a receipt printer connected to the IoT Box. #. Read the Pairing Code from a screen or a receipt printer connected to the IoT Box.
.. image:: connect/connect04.png .. image:: connect/connect04.png
4. Input the Pairing Code and click on the Pair button. #. Input the Pairing Code and click on the Pair button.
.. note:: .. note::
Recent changes in modern web browsers forced us to modify the connection wizard. Recent changes in modern web browsers forced us to modify the connection wizard.
@ -37,20 +37,20 @@ Ethernet Connection
``iot_pairing`` module is installed. ``iot_pairing`` module is installed.
WiFi Connection WiFi Connection
~~~~~~~~~~~~~~~ ===============
1. Power on the IoT Box #. Power on the IoT Box
2. Copy the token #. Copy the token
.. image:: connect/connect05.png .. image:: connect/connect05.png
3. Connect to the IoT Box WiFi Network (make sure there is no ethernet #. Connect to the IoT Box WiFi Network (make sure there is no ethernet
cable plugged in your computer). cable plugged in your computer).
.. image:: connect/connect06.png .. image:: connect/connect06.png
4. You will be redirected to the IoT Box Homepage (if it doesn't work, #. You will be redirected to the IoT Box Homepage (if it doesn't work,
connect to the IP address of the box). Give a name to your IoT Box (not connect to the IP address of the box). Give a name to your IoT Box (not
required) and paste the token, then click on next. required) and paste the token, then click on next.
@ -63,7 +63,7 @@ WiFi Connection
should become should become
**http://375228-saas-11-5-iot-f3f920-all.runbot16.odoo.com\|4957098401**). **http://375228-saas-11-5-iot-f3f920-all.runbot16.odoo.com\|4957098401**).
5. Choose the WiFi network you want to connect with (enter the password #. Choose the WiFi network you want to connect with (enter the password
if there is one) and click on Submit. Wait a few seconds before being if there is one) and click on Submit. Wait a few seconds before being
redirected to your database. redirected to your database.
@ -75,7 +75,7 @@ You should now see the IoT Box.
:align: center :align: center
IoT Box Schema IoT Box Schema
~~~~~~~~~~~~~~ ==============
.. image:: connect/connect10.png .. image:: connect/connect10.png
:align: center :align: center

View File

@ -6,7 +6,7 @@ Use the IoT Box for the PoS
:align: center :align: center
Prerequisites Prerequisites
~~~~~~~~~~~~~ =============
Before starting, make sure you have the following: Before starting, make sure you have the following:
@ -27,7 +27,7 @@ Before starting, make sure you have the following:
page <https://www.odoo.com/page/point-of-sale-hardware>`__ page <https://www.odoo.com/page/point-of-sale-hardware>`__
Set Up Set Up
~~~~~~~ ======
To connect hardware to the PoS, the first step is to connect an IoT Box To connect hardware to the PoS, the first step is to connect an IoT Box
to your database. For this, follow this to your database. For this, follow this

View File

@ -6,7 +6,7 @@ IoT Box Connection
================== ==================
I can't find the pairing code to connect my IoT Box I can't find the pairing code to connect my IoT Box
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------------------------
The pairing code should be printed on receipt printers connected to the The pairing code should be printed on receipt printers connected to the
IoT Box and should also be displayed on connected monitors. IoT Box and should also be displayed on connected monitors.
@ -30,7 +30,7 @@ has correctly started, by checking that a fixed green LED is showing next to
the micro-USB port. the micro-USB port.
I've connected my IoT Box but it's not showing in my database I've connected my IoT Box but it's not showing in my database
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -------------------------------------------------------------
When you connect an IoT Box to a database, the IoT Box might restart, if When you connect an IoT Box to a database, the IoT Box might restart, if
that is the case, it might take up to one minute before appearing in your that is the case, it might take up to one minute before appearing in your
@ -39,7 +39,7 @@ your database can be reached from the IoT Box and that your server doesn't
use a multi-database environment. use a multi-database environment.
My IoT Box is connected to my database, but cannot be reached My IoT Box is connected to my database, but cannot be reached
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -------------------------------------------------------------
Make sure that the IoT Box and the device running the browser are located Make sure that the IoT Box and the device running the browser are located
on the same network as the IoT Box cannot be reached from outside the local on the same network as the IoT Box cannot be reached from outside the local
@ -49,7 +49,7 @@ Printer
======= =======
My printer is not detected My printer is not detected
~~~~~~~~~~~~~~~~~~~~~~~~~~ --------------------------
If one of your printers doesn't show up in your devices list, go to the If one of your printers doesn't show up in your devices list, go to the
IoT Box homepage and make sure that it is listed under *Printers*. IoT Box homepage and make sure that it is listed under *Printers*.
@ -63,7 +63,7 @@ If your printer is not present on the IoT Box homepage, hit
not connected properly. not connected properly.
My printer outputs random text My printer outputs random text
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ------------------------------
For most printers, the correct driver should be automatically detected For most printers, the correct driver should be automatically detected
and selected. However, in some cases, the automatic detection mechanism and selected. However, in some cases, the automatic detection mechanism
@ -85,7 +85,7 @@ corresponding to your printer.
printers. printers.
My Zebra Printer doesn't print anything My Zebra Printer doesn't print anything
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------------
Zebra printers are quite sensitive to the format of the ZPL code that is Zebra printers are quite sensitive to the format of the ZPL code that is
printed. If nothing comes out of the printer or blank labels are printed, printed. If nothing comes out of the printer or blank labels are printed,
@ -97,7 +97,7 @@ Barcode Scanner
=============== ===============
The characters read by the barcode scanner don't match the barcode The characters read by the barcode scanner don't match the barcode
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ------------------------------------------------------------------
By default, we assume that your barcode scanner is configured in US By default, we assume that your barcode scanner is configured in US
QWERTY. This is the default configuration of most barcode readers. QWERTY. This is the default configuration of most barcode readers.
@ -105,14 +105,14 @@ If your barcode scanner uses a different layout, please go to the
form view of your device and select the correct one. form view of your device and select the correct one.
Nothing happens when a barcode is scanned Nothing happens when a barcode is scanned
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -----------------------------------------
Make sure that the correct device is selected in your Point of Sale Make sure that the correct device is selected in your Point of Sale
configuration and that your barcode is configured to send an ENTER configuration and that your barcode is configured to send an ENTER
character (keycode 28) at the end of every barcode. character (keycode 28) at the end of every barcode.
The barcode scanner is detected as a keyboard The barcode scanner is detected as a keyboard
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------------------
Some poorly built barcode scanners do not advertise themselves as Some poorly built barcode scanners do not advertise themselves as
barcode scanners but as a USB keyboard instead, and will not be barcode scanners but as a USB keyboard instead, and will not be
@ -128,7 +128,7 @@ Cashdrawer
========== ==========
The cashdrawer does not open The cashdrawer does not open
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ----------------------------
The cashdrawer should be connected to the printer and the *Cashdrawer* The cashdrawer should be connected to the printer and the *Cashdrawer*
checkbox should be ticked in the POS configuration. checkbox should be ticked in the POS configuration.

View File

@ -10,9 +10,8 @@ connected, the screen can be used to display a :abbr:`PoS (Point of Sale)` order
:alt: An example of a PoS (point of sale) order on a screen display. :alt: An example of a PoS (point of sale) order on a screen display.
.. note:: .. note::
Access the customer display from any other computer by going to the :abbr:`IoT (Internet of Things)` Access the customer display from any other computer by going to the :abbr:`IoT (Internet of
Box homepage and clicking on the :guilabel:`POS Display` button. Things)` Box homepage and clicking on the :guilabel:`POS Display` button.
Connection Connection
========== ==========
@ -24,21 +23,22 @@ on the model.
.. tab:: IoT Box model 4 .. tab:: IoT Box model 4
Connect up to two screens with Micro-HDMI cables on the side of the :abbr:`IoT (Internet of Things)` Connect up to two screens with Micro-HDMI cables on the side of the :abbr:`IoT (Internet of
Box. If two screens are connected, they can display distinct content (see usage below). Things)` Box. If two screens are connected, they can display distinct content (see usage
below).
.. tab:: IoT Box model 3 .. tab:: IoT Box model 3
Connect the screen with an HDMI cable on the side of the :abbr:`IoT (Internet of Things)` Box. Connect the screen with an HDMI cable on the side of the :abbr:`IoT (Internet of Things)` Box.
.. important:: .. important::
Screen(s) should be connected before the :abbr:`IoT (Internet of Things)` Box is switched on. If it Screen(s) should be connected before the :abbr:`IoT (Internet of Things)` Box is switched on. If
is already on, connect the screen(s), and then restart the :abbr:`IoT (Internet of Things)` Box by it is already on, connect the screen(s), and then restart the :abbr:`IoT (Internet of Things)`
unplugging it and plugging it back into its power source. Box by unplugging it and plugging it back into its power source.
.. warning:: .. warning::
The usage of HDMI/Micro-HDMI adapters may cause issues which will result in a blank, black screen on The usage of HDMI/Micro-HDMI adapters may cause issues which will result in a blank, black screen
the screen display. Cable usage is recommended. on the screen display. Cable usage is recommended.
If the connection was successful, the screen should display the :guilabel:`POS Client display` If the connection was successful, the screen should display the :guilabel:`POS Client display`
screen. screen.
@ -56,7 +56,8 @@ Things)` Box homepage.
:alt: An example of a screen display name shown on the IoT Box homepage. :alt: An example of a screen display name shown on the IoT Box homepage.
.. note:: .. note::
If no screen is detected, a default display named :guilabel:`Distant Display` will be used instead. If no screen is detected, a default display named :guilabel:`Distant Display` will be used
instead.
.. image:: screen/screen-no-screen.png .. image:: screen/screen-no-screen.png
:align: center :align: center
@ -66,7 +67,7 @@ Usage
===== =====
Show Point of Sales orders to customers Show Point of Sales orders to customers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------------
To use the screen in the :guilabel:`Point of Sale` app, go to :menuselection:`Point of Sale --> To use the screen in the :guilabel:`Point of Sale` app, go to :menuselection:`Point of Sale -->
Configuration --> Point of Sale`, open the desired screen, click on :guilabel:`Edit`, and enable the Configuration --> Point of Sale`, open the desired screen, click on :guilabel:`Edit`, and enable the
@ -84,17 +85,18 @@ in the top bar to inform the connection status with the screen.
.. image:: screen/screen-pos-icon.png .. image:: screen/screen-pos-icon.png
:align: center :align: center
:alt: The "screen" icon on the Point of Sale display shows the connection status with the screen. :alt: The "screen" icon on the Point of Sale display shows the connection status with the
screen.
The screen will automatically show the :abbr:`PoS (Point of Sale)` orders and update when changes are The screen will automatically show the :abbr:`PoS (Point of Sale)` orders and update when changes
performed on the order. are performed on the order.
.. image:: screen/screen-pos-client-display.png .. image:: screen/screen-pos-client-display.png
:align: center :align: center
:alt: An example of a PoS order on a screen display. :alt: An example of a PoS order on a screen display.
Display a website Display a website
~~~~~~~~~~~~~~~~~ -----------------
Opening the screen form view at :menuselection:`IoT --> Devices --> (screen device)` allows the user Opening the screen form view at :menuselection:`IoT --> Devices --> (screen device)` allows the user
to choose a particular website URL to display on the screen with the :guilabel:`Screen URL` field. to choose a particular website URL to display on the screen with the :guilabel:`Screen URL` field.

View File

@ -1,6 +1,6 @@
==== ===
SIX SIX
==== ===
Connecting a SIX payment terminal allows you to offer a fluid payment flow to your customers and Connecting a SIX payment terminal allows you to offer a fluid payment flow to your customers and
ease the work of your cashiers. ease the work of your cashiers.

View File

@ -1,6 +1,6 @@
------------- =============
Portal access Portal access
------------- =============
Portal access is given to users who need the ability to view certain documents or information Portal access is given to users who need the ability to view certain documents or information
within an Odoo database. within an Odoo database.
@ -24,7 +24,8 @@ all of the following in Odoo:
database. database.
Provide portal access to customers Provide portal access to customers
---------------------------------- ==================================
From the main Odoo dashboard, select the :guilabel:`Contacts` application. If the contact is not From the main Odoo dashboard, select the :guilabel:`Contacts` application. If the contact is not
yet created in the database, click on the :guilabel:`Create` button, enter the details of the yet created in the database, click on the :guilabel:`Create` button, enter the details of the
contact, and then click :guilabel:`Save`. Otherwise, choose an existing contact, and then click on contact, and then click :guilabel:`Save`. Otherwise, choose an existing contact, and then click on

View File

@ -4,7 +4,8 @@ How to adapt your prices to your customers and apply discounts
Odoo has a powerful pricelist feature to support a pricing strategy tailored to your business. Odoo has a powerful pricelist feature to support a pricing strategy tailored to your business.
A pricelist is a list of prices or price rules that Odoo searches to determine the suggested price. A pricelist is a list of prices or price rules that Odoo searches to determine the suggested price.
You can set several criteria to use a specific price: periods, min. sold quantity (meet a minimum order quantity and get a price break), etc. You can set several criteria to use a specific price: periods, min. sold quantity (meet a minimum
order quantity and get a price break), etc.
As pricelists only suggest prices, they can be overridden by vendors completing sales orders. As pricelists only suggest prices, they can be overridden by vendors completing sales orders.
Choose your pricing strategy from :menuselection:`Sales --> Settings`. Choose your pricing strategy from :menuselection:`Sales --> Settings`.
@ -14,10 +15,10 @@ Choose your pricing strategy from :menuselection:`Sales --> Settings`.
:align: center :align: center
.. note:: .. note::
* *A single sale price per product:* doesn't let you adapt prices, it use default product
* *A single sale price per product :* doesn't let you adapt prices, it use default product price ; price ;
* *Different prices per customer segment :* you will set several prices per products ; * *Different prices per customer segment:* you will set several prices per products ;
* *Advanced pricing based on formula :* will let you apply discounts, margins and roundings. * *Advanced pricing based on formula:* will let you apply discounts, margins and roundings.
Several prices per product Several prices per product
========================== ==========================
@ -81,15 +82,15 @@ use e-Commerce).
.. image:: pricing/pricing_formula.png .. image:: pricing/pricing_formula.png
:align: center :align: center
Each pricelist item can be associated to either all products, to a product internal category (set of products) or to a specific product. Like in second option, you can set dates and minimum quantities. Each pricelist item can be associated to either all products, to a product internal category (set of
products) or to a specific product. Like in second option, you can set dates and minimum quantities.
.. image:: pricing/pricelist_apply.png .. image:: pricing/pricelist_apply.png
:align: center :align: center
.. note:: .. note::
* Once again the system is smart. If a rule is set for a particular item and another one for its
* Once again the system is smart. If a rule is set for a particular item and another one for its category, Odoo will take the rule of the item. category, Odoo will take the rule of the item.
* Make sure at least one pricelist item covers all your products. * Make sure at least one pricelist item covers all your products.
There are 3 modes of computation: fix price, discount & formula. There are 3 modes of computation: fix price, discount & formula.
@ -117,8 +118,10 @@ e.g. sale price = 2*cost (100% markup) with $5 of minimal margin.
Prices per country Prices per country
================== ==================
Pricelists can be set by countries group.
Any new customer recorded in Odoo gets a default pricelist, i.e. the first one in the list matching the country. In case no country is set for the customer, Odoo takes the first pricelist without any country group. Pricelists can be set by countries group. Any new customer recorded in Odoo gets a default
pricelist, i.e. the first one in the list matching the country. In case no country is set for the
customer, Odoo takes the first pricelist without any country group.
The default pricelist can be replaced when creating a sales order. The default pricelist can be replaced when creating a sales order.
@ -127,9 +130,11 @@ The default pricelist can be replaced when creating a sales order.
Compute and show discount % to customers Compute and show discount % to customers
======================================== ========================================
In case of discount, you can show the public price and the computed discount % on printed sales orders and in your eCommerce catalog. To do so: In case of discount, you can show the public price and the computed discount % on printed sales
orders and in your eCommerce catalog. To do so:
* Check *Allow discounts on sales order lines* in :menuselection:`Sales --> Configuration --> Settings --> Quotations & Sales --> Discounts`. * Check *Allow discounts on sales order lines* in :menuselection:`Sales --> Configuration -->
Settings --> Quotations & Sales --> Discounts`.
* Apply the option in the pricelist setup form. * Apply the option in the pricelist setup form.
.. image:: pricing/discount_options.png .. image:: pricing/discount_options.png

View File

@ -1,11 +1,13 @@
================================================ ===============================================
Plan onsite interventions from helpdesk tickets Plan onsite interventions from helpdesk tickets
================================================ ===============================================
The integration with the Helpdesk app lets your helpdesk team manage intervention requests directly. The integration with the Helpdesk app lets your helpdesk team manage intervention requests directly.
Planning field service tasks from tickets speeds up your processes. Planning field service tasks from tickets speeds up your processes.
Configure the helpdesk team Configure the helpdesk team
=========================== ===========================
Go to :menuselection:`Helpdesk --> Configuration --> Helpdesk Teams`. Select a team and enable Go to :menuselection:`Helpdesk --> Configuration --> Helpdesk Teams`. Select a team and enable
*Onsite Interventions*. *Onsite Interventions*.

View File

@ -1,21 +1,19 @@
============================================= =============================================
Create onsite interventions from sales orders Create onsite interventions from sales orders
============================================= =============================================
Allowing your sales team to open onsite interventions creates a seamless experience for your Allowing your sales team to open onsite interventions creates a seamless experience for your
customers. They can receive a quotation they first have to approve before the work even starts. customers. They can receive a quotation they first have to approve before the work even starts.
Configure a product Configure a product
=================== ===================
Go to :menuselection:`Field Service --> Configuration --> Products` and create or edit a product. Go to :menuselection:`Field Service --> Configuration --> Products` and create or edit a product.
#. Under the *General Information* tab, select *Service* as *Product Type*. #. Under the *General Information* tab, select *Service* as *Product Type*.
#. Under the *Sales* tab, select *Timesheets on tasks* as *Service Invoicing Policy*. #. Under the *Sales* tab, select *Timesheets on tasks* as *Service Invoicing Policy*.
#. Select *Create a task in an existing project* as *Service Tracking*. #. Select *Create a task in an existing project* as *Service Tracking*.
#. Select your *Project*. #. Select your *Project*.
#. If you use them, select your *Worksheet Template* and then click on *Save*. #. If you use them, select your *Worksheet Template* and then click on *Save*.
.. image:: onsite_tasks_from_sales_orders/product-configuration-tasks-from-sales-orders.png .. image:: onsite_tasks_from_sales_orders/product-configuration-tasks-from-sales-orders.png

View File

@ -7,7 +7,7 @@ track trends, identify areas for improvement, manage employees workloads and,
meet your customers expectations. meet your customers expectations.
Cases Cases
~~~~~ =====
Some examples of the reports Odoo Helpdesk can generate include: Some examples of the reports Odoo Helpdesk can generate include:
@ -45,7 +45,7 @@ customers not only expect fast responses but they also want their issues to be h
Odoo Helpdesk Odoo Helpdesk
Save filters Save filters
~~~~~~~~~~~~ ============
Save the filters you use the most and avoid having to reconstruct them every time they are Save the filters you use the most and avoid having to reconstruct them every time they are
needed. To do so, set the groups, filters, and measures needed. Then, go to *Favorites*. needed. To do so, set the groups, filters, and measures needed. Then, go to *Favorites*.

View File

@ -1,8 +1,8 @@
:nosearch: :nosearch:
================= ===========
Get started Get started
================= ===========
.. toctree:: .. toctree::
:titlesonly: :titlesonly:

View File

@ -1,6 +1,6 @@
================================== ================================
How to customize my catalog page How to customize my catalog page
================================== ================================
Product Catalog Product Catalog
=============== ===============

View File

@ -1,6 +1,6 @@
============================ ===========================
How to build a product page How to build a product page
============================ ===========================
On the website click *New Page* in the top-right corner. On the website click *New Page* in the top-right corner.
@ -23,9 +23,9 @@ See how to configure your products from links here below.
.. seealso:: .. seealso::
* :doc:`../managing_products/variants` - :doc:`../managing_products/variants`
* :doc:`/applications/sales/sales/products_prices/taxes` - :doc:`/applications/sales/sales/products_prices/taxes`
* :doc:`../maximizing_revenue/cross_selling` - :doc:`../maximizing_revenue/cross_selling`
* :doc:`../maximizing_revenue/reviews` - :doc:`../maximizing_revenue/reviews`
* :doc:`../maximizing_revenue/pricing` - :doc:`../maximizing_revenue/pricing`
* :doc:`../../website/optimize/seo` - :doc:`../../website/optimize/seo`

View File

@ -1,6 +1,6 @@
================================================= ===============================================
How customers can access their customer account How customers can access their customer account
================================================= ===============================================
It has never been so easy for your customers to access their It has never been so easy for your customers to access their
customer account. Forget endless signup forms, customer account. Forget endless signup forms,

View File

@ -1,8 +1,8 @@
:nosearch: :nosearch:
================= =============
Collect taxes Collect taxes
================= =============
.. toctree:: .. toctree::
:titlesonly: :titlesonly:

View File

@ -37,6 +37,7 @@ be downgraded by search engines.
Keywords Keywords
-------- --------
In order to write quality content and boost your traffic, Odoo provides In order to write quality content and boost your traffic, Odoo provides
a ``<keyword>`` finder. Those keywords are the searches you want to head a ``<keyword>`` finder. Those keywords are the searches you want to head
towards your website. For each keyword, you see how it is used in the content towards your website. For each keyword, you see how it is used in the content

View File

@ -42,6 +42,7 @@ Installation
How To Test GeoIP Geolocation In Your Odoo Website How To Test GeoIP Geolocation In Your Odoo Website
================================================== ==================================================
1. Go to your website. Open the web page that you want to test ``GeoIP``. 1. Go to your website. Open the web page that you want to test ``GeoIP``.
2. Choose :menuselection:`Customize --> HTML/CSS/JS Editor`. 2. Choose :menuselection:`Customize --> HTML/CSS/JS Editor`.
3. Add the following piece of XML in the page : 3. Add the following piece of XML in the page :
@ -58,7 +59,9 @@ You should end up with a dictionary indicating the location of the IP address.
.. note:: .. note::
If the curly braces are empty ``{}``, it can be for any of the following reasons : If the curly braces are empty ``{}``, it can be for any of the following reasons :
- The browsing IP address is the localhost (``127.0.0.1``) or a local area network one (``192.168.*.*``) - The browsing IP address is the localhost (``127.0.0.1``) or a local area network one
- If a reversed proxy is used, make sure to configure it correctly. See :option:`proxy mode <odoo-bin --proxy-mode>` (``192.168.*.*``)
- If a reversed proxy is used, make sure to configure it correctly. See :option:`proxy mode
<odoo-bin --proxy-mode>`
- ``geoip2`` is not installed or the GeoIP database file wasn't found - ``geoip2`` is not installed or the GeoIP database file wasn't found
- The GeoIP database was unable to resolve the given IP address - The GeoIP database was unable to resolve the given IP address

View File

@ -1,6 +1,6 @@
=============================== ===========================
How to translate my website How to translate my website
=============================== ===========================
Overview Overview
======== ========

View File

@ -30,6 +30,7 @@ Module structure
Directories Directories
----------- -----------
A module is organized in important directories. Those contain the business logic; A module is organized in important directories. Those contain the business logic;
having a look at them should make you understand the purpose of the module. having a look at them should make you understand the purpose of the module.
@ -242,6 +243,7 @@ XML files
Format Format
------ ------
To declare a record in XML, the **record** notation (using *<record>*) is recommended: To declare a record in XML, the **record** notation (using *<record>*) is recommended:
- Place ``id`` attribute before ``model`` - Place ``id`` attribute before ``model``
@ -408,6 +410,7 @@ source code tries to respect Python standard, but some of them can be ignored.
Imports Imports
------- -------
The imports are ordered as The imports are ordered as
#. External libraries (one per line sorted and split in python stdlib) #. External libraries (one per line sorted and split in python stdlib)
@ -588,6 +591,7 @@ Programming in Odoo
Propagate the context Propagate the context
~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
The context is a ``frozendict`` that cannot be modified. To call a method with The context is a ``frozendict`` that cannot be modified. To call a method with
a different context, the ``with_context`` method should be used : a different context, the ``with_context`` method should be used :
@ -610,7 +614,6 @@ choose a good name, and eventually prefix it by the name of the module to
isolate its impact. A good example are the keys of ``mail`` module : isolate its impact. A good example are the keys of ``mail`` module :
*mail_create_nosubscribe*, *mail_notrack*, *mail_notify_user_signature*, ... *mail_create_nosubscribe*, *mail_notrack*, *mail_notify_user_signature*, ...
Think extendable Think extendable
~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~
@ -654,9 +657,9 @@ the starting point of readable/maintainable code and tighter documentation.
This recommendation is also relevant for classes, files, modules and packages. This recommendation is also relevant for classes, files, modules and packages.
(See also http://en.wikipedia.org/wiki/Cyclomatic_complexity) (See also http://en.wikipedia.org/wiki/Cyclomatic_complexity)
Never commit the transaction Never commit the transaction
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Odoo framework is in charge of providing the transactional context for The Odoo framework is in charge of providing the transactional context for
all RPC calls. The principle is that a new database cursor is opened at the all RPC calls. The principle is that a new database cursor is opened at the
beginning of each RPC call, and committed when the call has returned, just beginning of each RPC call, and committed when the call has returned, just
@ -722,7 +725,6 @@ have an **explicit comment** explaining why they are absolutely necessary, why
they are indeed correct, and why they do not break the transactions. Otherwise they are indeed correct, and why they do not break the transactions. Otherwise
they can and will be removed ! they can and will be removed !
Use translation method correctly Use translation method correctly
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -811,7 +813,6 @@ In general in Odoo, when manipulating strings, prefer ``%`` over ``.format()``
of position (when multiple variables have to be replaced). This makes the of position (when multiple variables have to be replaced). This makes the
translation easier for the community translators. translation easier for the community translators.
Symbols and Conventions Symbols and Conventions
----------------------- -----------------------
@ -925,7 +926,7 @@ Javascript and CSS
================== ==================
Static files organization Static files organization
-------------------------- -------------------------
Odoo addons have some conventions on how to structure various files. We explain Odoo addons have some conventions on how to structure various files. We explain
here in more details how web assets are supposed to be organized. here in more details how web assets are supposed to be organized.

View File

@ -1,6 +1,6 @@
================= ==============
Git guidelines Git guidelines
================= ==============
Configure your git Configure your git
------------------ ------------------

View File

@ -1,8 +1,8 @@
:code-column: :code-column:
=============== ===========
Extract API Extract API
=============== ===========
Odoo provides a service allowing you to automate the processing of your invoices. The service scans your document using an Optical Odoo provides a service allowing you to automate the processing of your invoices. The service scans your document using an Optical
Character Recognition (OCR) engine and then uses AI-based algorithms to extract the fields of interest such as the total, the due date, or Character Recognition (OCR) engine and then uses AI-based algorithms to extract the fields of interest such as the total, the due date, or
@ -15,6 +15,7 @@ allows you to integrate our service directly into your own projects.
Invoices Invoices
======== ========
The extract API use the JSON-RPC2_ protocol. The diffent routes are located at the following address: **https://iap-extract.odoo.com**. The extract API use the JSON-RPC2_ protocol. The diffent routes are located at the following address: **https://iap-extract.odoo.com**.
Expected successful flow Expected successful flow
@ -36,14 +37,15 @@ Routes
.. _webservices/extract_api/invoice_parse: .. _webservices/extract_api/invoice_parse:
``/iap/invoice_extract/parse`` ``/iap/invoice_extract/parse``
'''''''''''''''''''''''''''''' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Description Description
^^^^^^^^^^^ ***********
Request a processing of the document from the OCR. The route will return a `document_id` you can use to obtain the result of your request. Request a processing of the document from the OCR. The route will return a `document_id` you can use to obtain the result of your request.
Request Body Request Body
^^^^^^^^^^^^ ************
``jsonrpc`` (required) ``jsonrpc`` (required)
Must be exactly “2.0”. Must be exactly “2.0”.
@ -97,7 +99,7 @@ Request Body
} }
Response Response
^^^^^^^^ ********
``jsonrpc`` ``jsonrpc``
A string specifying the version of the JSON-RPC protocol. It will be “2.0”. A string specifying the version of the JSON-RPC protocol. It will be “2.0”.
@ -139,14 +141,15 @@ Response
.. _webservices/extract_api/invoice_get_results: .. _webservices/extract_api/invoice_get_results:
``/iap/invoice_extract/get_results`` ``/iap/invoice_extract/get_results``
'''''''''''''''''''''''''''''''''''' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Description Description
^^^^^^^^^^^ ***********
Request the results of the documents ids obtained with the :ref:`/parse <webservices/extract_api/invoice_parse>` route. Can either return the results or a "request pending" message. Request the results of the documents ids obtained with the :ref:`/parse <webservices/extract_api/invoice_parse>` route. Can either return the results or a "request pending" message.
Request Body Request Body
^^^^^^^^^^^^ ************
``jsonrpc`` (required) ``jsonrpc`` (required)
|SAME_AS_PARSE| |SAME_AS_PARSE|
@ -174,7 +177,7 @@ Request Body
} }
Response Response
^^^^^^^^ ********
``jsonrpc`` ``jsonrpc``
|SAME_AS_PARSE| |SAME_AS_PARSE|
@ -231,7 +234,7 @@ Response
.. _webservices/extract_api/invoice_get_results/feature_result: .. _webservices/extract_api/invoice_get_results/feature_result:
``feature_result`` ``feature_result``
'''''''''''''''''' ~~~~~~~~~~~~~~~~~~
Each field of interest we want to extract from the invoice such as the total or the due date are also called features. An exhaustive list of all the extracted features can be found in the table below. Each field of interest we want to extract from the invoice such as the total or the due date are also called features. An exhaustive list of all the extracted features can be found in the table below.
@ -252,7 +255,7 @@ For each feature, we return a list of candidates and we spotlight the candidate
``candidate`` ``candidate``
''''''''''''' ~~~~~~~~~~~~~
For each candidate we give its representation and position in the document. Candidates are sorted by decreasing order of suitability. For each candidate we give its representation and position in the document. Candidates are sorted by decreasing order of suitability.
@ -326,7 +329,7 @@ For each candidate we give its representation and position in the document. Cand
+-------------------------+------------------------------------------------------------------------------------+ +-------------------------+------------------------------------------------------------------------------------+
``feature_result`` for the ``invoice_lines`` feature ``feature_result`` for the ``invoice_lines`` feature
'''''''''''''''''''''''''''''''''''''''''''''''''''' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It follows a more specific structure. It is basically a list of dictionaries where each dictionary represents an invoice line. Each value follows It follows a more specific structure. It is basically a list of dictionaries where each dictionary represents an invoice line. Each value follows
a :ref:`webservices/extract_api/invoice_get_results/feature_result` structure. a :ref:`webservices/extract_api/invoice_get_results/feature_result` structure.
@ -353,15 +356,16 @@ a :ref:`webservices/extract_api/invoice_get_results/feature_result` structure.
.. _webservices/extract_api/invoice_validate: .. _webservices/extract_api/invoice_validate:
``/iap/invoice_extract/validate`` ``/iap/invoice_extract/validate``
''''''''''''''''''''''''''''''''' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Description Description
^^^^^^^^^^^ ***********
Route that validates the different features of an invoice. The validation step is an optional step but is strongly recommended. By telling the system if it were right or wrong for each Route that validates the different features of an invoice. The validation step is an optional step but is strongly recommended. By telling the system if it were right or wrong for each
feature you give an important feedback. It has no direct impact but it helps the system to greatly improve its prediction accuracy for the invoices you will send in the future. feature you give an important feedback. It has no direct impact but it helps the system to greatly improve its prediction accuracy for the invoices you will send in the future.
Request Body Request Body
^^^^^^^^^^^^ ************
``jsonrpc`` (required) ``jsonrpc`` (required)
|SAME_AS_PARSE| |SAME_AS_PARSE|
@ -395,7 +399,7 @@ Request Body
} }
``validation`` ``validation``
'''''''''''''' ~~~~~~~~~~~~~~
A **validation** for a given feature is a dictionary containing the textual representation of the expected value for this given feature. A **validation** for a given feature is a dictionary containing the textual representation of the expected value for this given feature.
This format apply for all the features except for ``global_taxes`` and ``invoice_lines`` which have more complex validation format. This format apply for all the features except for ``global_taxes`` and ``invoice_lines`` which have more complex validation format.
@ -406,7 +410,7 @@ This format apply for all the features except for ``global_taxes`` and ``invoice
{ "content": string|float } { "content": string|float }
validation for ``global_taxes`` validation for ``global_taxes``
''''''''''''''''''''''''''''''' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**content** is a list of dictionaries. Each dictionary represents a tax: **content** is a list of dictionaries. Each dictionary represents a tax:
@ -433,7 +437,7 @@ validation for ``global_taxes``
]} ]}
validation for ``invoice_lines`` validation for ``invoice_lines``
'''''''''''''''''''''''''''''''' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**lines** is a list of dictionaries. Each dictionary represents an invoice line. The dictionary keys speak for themselves. **lines** is a list of dictionaries. Each dictionary represents an invoice line. The dictionary keys speak for themselves.

View File

@ -1,4 +1,3 @@
.. _reference/cmdline: .. _reference/cmdline:
============================ ============================
@ -371,7 +370,7 @@ Advanced Options
.. _reference/cmdline/dev: .. _reference/cmdline/dev:
Developer features Developer features
'''''''''''''''''' ~~~~~~~~~~~~~~~~~~
.. option:: --dev <feature,feature,...,feature> .. option:: --dev <feature,feature,...,feature>
@ -399,7 +398,7 @@ Developer features
.. _reference/cmdline/server/http: .. _reference/cmdline/server/http:
HTTP HTTP
'''' ~~~~
.. option:: --no-http .. option:: --no-http
@ -436,7 +435,7 @@ HTTP
.. _reference/cmdline/server/logging: .. _reference/cmdline/server/logging:
Logging Logging
''''''' ~~~~~~~
By default, Odoo displays all logging of level_ ``info`` except for workflow By default, Odoo displays all logging of level_ ``info`` except for workflow
logging (``warning`` only), and log output is sent to ``stdout``. Various logging (``warning`` only), and log output is sent to ``stdout``. Various
@ -531,7 +530,7 @@ customize the amount of logging output.
.. _reference/cdmline/workers: .. _reference/cdmline/workers:
Multiprocessing Multiprocessing
''''''''''''''' ~~~~~~~~~~~~~~~
.. option:: --workers <count> .. option:: --workers <count>
@ -805,7 +804,7 @@ Processed files
.. _reference/cmdline/cloc/database-option: .. _reference/cmdline/cloc/database-option:
With the :option:`--database` option With the :option:`--database` option
'''''''''''''''''''''''''''''''''''' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Odoo Cloc counts the lines in each file of extra installed modules in a Odoo Cloc counts the lines in each file of extra installed modules in a
given database. In addition, it counts the Python lines of server actions and given database. In addition, it counts the Python lines of server actions and
@ -838,12 +837,10 @@ per module. This is specified by the ``cloc_exclude`` entry of the manifest:
| For more information about the pattern syntax, see `glob | For more information about the pattern syntax, see `glob
<https://docs.python.org/3/library/pathlib.html#pathlib.Path.glob>`_. <https://docs.python.org/3/library/pathlib.html#pathlib.Path.glob>`_.
.. _reference/cmdline/cloc/path-option: .. _reference/cmdline/cloc/path-option:
With the :option:`--path` option With the :option:`--path` option
'''''''''''''''''''''''''''''''' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This method works the same as with the :ref:`--database option This method works the same as with the :ref:`--database option
<reference/cmdline/cloc/database-option>` if a manifest file is present in the given <reference/cmdline/cloc/database-option>` if a manifest file is present in the given
@ -866,7 +863,7 @@ Some file cannot be counted by Odoo Cloc.
Those file are reported at the end of the output. Those file are reported at the end of the output.
Max file size exceeded Max file size exceeded
'''''''''''''''''''''' ~~~~~~~~~~~~~~~~~~~~~~
Odoo Cloc rejects any file larger than 25MB. Usually, source files are smaller Odoo Cloc rejects any file larger than 25MB. Usually, source files are smaller
than 1 MB. If a file is rejected, it may be: than 1 MB. If a file is rejected, it may be:
@ -875,7 +872,7 @@ than 1 MB. If a file is rejected, it may be:
- A JavaScript library that should be placed in the :file:`static/lib` folder. - A JavaScript library that should be placed in the :file:`static/lib` folder.
Syntax Error Syntax Error
'''''''''''' ~~~~~~~~~~~~
Odoo Cloc cannot count the lines of code of a Python file with a syntax problem. Odoo Cloc cannot count the lines of code of a Python file with a syntax problem.
If an extra module contains such files, they should be fixed to allow the module to If an extra module contains such files, they should be fixed to allow the module to

View File

@ -7,7 +7,6 @@ Building a Module
================= =================
.. warning:: .. warning::
This tutorial requires :ref:`having installed Odoo <setup/install>` This tutorial requires :ref:`having installed Odoo <setup/install>`
Start/Stop the Odoo server Start/Stop the Odoo server
@ -80,8 +79,8 @@ option.
.. tip:: .. tip::
:class: aphorism :class: aphorism
most command-line options can also be set using :ref:`a configuration most command-line options can also be set using :ref:`a configuration file
file <reference/cmdline/config>` <reference/cmdline/config>`
An Odoo module is declared by its :ref:`manifest <reference/module/manifest>`. An Odoo module is declared by its :ref:`manifest <reference/module/manifest>`.
@ -109,8 +108,7 @@ or XML. The usage of most of those files will be explained along this tutorial.
.. exercise:: Module creation .. exercise:: Module creation
Use the command line above to create an empty module Open Academy, and Use the command line above to create an empty module Open Academy, and install it in Odoo.
install it in Odoo.
Object-Relational Mapping Object-Relational Mapping
------------------------- -------------------------
@ -147,7 +145,7 @@ defined as attributes on the model class::
name = fields.Char() name = fields.Char()
Common Attributes Common Attributes
################# ~~~~~~~~~~~~~~~~~
Much like the model itself, its fields can be configured, by passing Much like the model itself, its fields can be configured, by passing
configuration attributes as parameters:: configuration attributes as parameters::
@ -167,7 +165,7 @@ Some attributes are available on all fields, here are the most common ones:
Requests that Odoo create a `database index`_ on the column. Requests that Odoo create a `database index`_ on the column.
Simple fields Simple fields
############# ~~~~~~~~~~~~~
There are two broad categories of fields: "simple" fields which are atomic There are two broad categories of fields: "simple" fields which are atomic
values stored directly in the model's table and "relational" fields linking values stored directly in the model's table and "relational" fields linking
@ -177,7 +175,7 @@ Example of simple fields are :class:`~odoo.fields.Boolean`,
:class:`~odoo.fields.Date`, :class:`~odoo.fields.Char`. :class:`~odoo.fields.Date`, :class:`~odoo.fields.Char`.
Reserved fields Reserved fields
############### ~~~~~~~~~~~~~~~
Odoo creates a few fields in all models\ [#autofields]_. These fields are Odoo creates a few fields in all models\ [#autofields]_. These fields are
managed by the system and shouldn't be written to. They can be read if managed by the system and shouldn't be written to. They can be read if
@ -195,7 +193,7 @@ useful or necessary:
user who last modified the record. user who last modified the record.
Special fields Special fields
############## ~~~~~~~~~~~~~~
By default, Odoo also requires a ``name`` field on all models for various By default, Odoo also requires a ``name`` field on all models for various
display and search behaviors. The field used for these purposes can be display and search behaviors. The field used for these purposes can be
@ -203,8 +201,8 @@ overridden by setting :attr:`~odoo.models.Model._rec_name`.
.. exercise:: Define a model .. exercise:: Define a model
Define a new data model *Course* in the *openacademy* module. A course Define a new data model *Course* in the *openacademy* module. A course has a title and a
has a title and a description. Courses must have a title. description. Courses must have a title.
Data files Data files
---------- ----------
@ -241,15 +239,13 @@ be declared in the ``'data'`` list (always loaded) or in the ``'demo'`` list
.. exercise:: Define demonstration data .. exercise:: Define demonstration data
Create demonstration data filling the *Courses* model with a few Create demonstration data filling the *Courses* model with a few demonstration courses.
demonstration courses.
.. tip:: The content of the data files is only loaded when a module is .. tip::
installed or updated. The content of the data files is only loaded when a module is installed or updated.
After making some changes, do not forget to use After making some changes, do not forget to use :ref:`odoo-bin -u openacademy
:ref:`odoo-bin -u openacademy <reference/cmdline>` to save the changes <reference/cmdline>` to save the changes to your database.
to your database.
.. _howtos/module/actions: .. _howtos/module/actions:
@ -282,13 +278,13 @@ action more easily.
The action must be declared before its corresponding menu in the XML file. The action must be declared before its corresponding menu in the XML file.
Data files are executed sequentially, the action's ``id`` must be present Data files are executed sequentially, the action's ``id`` must be present in the database before
in the database before the menu can be created. the menu can be created.
.. exercise:: Define new menu entries .. exercise:: Define new menu entries
Define new menu entries to access courses under the Define new menu entries to access courses under the OpenAcademy menu entry. A user should be able
OpenAcademy menu entry. A user should be able to : to:
- display a list of all the courses - display a list of all the courses
- create/modify courses - create/modify courses
@ -327,8 +323,7 @@ is implied by the root element of the ``arch`` field:
.. danger:: The view's content is XML. .. danger:: The view's content is XML.
:class: aphorism :class: aphorism
The ``arch`` field must thus be declared as ``type="xml"`` to be parsed The ``arch`` field must thus be declared as ``type="xml"`` to be parsed correctly.
correctly.
Tree views Tree views
---------- ----------
@ -384,14 +379,13 @@ elements (groups, notebooks) and interactive elements (buttons and fields):
.. exercise:: Customise form view using XML .. exercise:: Customise form view using XML
Create your own form view for the Course object. Data displayed should be: Create your own form view for the Course object. Data displayed should be: the name and the
the name and the description of the course. description of the course.
.. exercise:: Notebooks .. exercise:: Notebooks
In the Course form view, put the description field under a tab, such that In the Course form view, put the description field under a tab, such that it will be easier to
it will be easier to add other tabs later, containing additional add other tabs later, containing additional information.
information.
Form views can also use plain HTML for more flexible layouts: Form views can also use plain HTML for more flexible layouts:
@ -544,7 +538,6 @@ fields of the parent record.
:align: center :align: center
.. seealso:: .. seealso::
* :attr:`~odoo.models.Model._inherit` * :attr:`~odoo.models.Model._inherit`
* :attr:`~odoo.models.Model._inherits` * :attr:`~odoo.models.Model._inherits`
@ -595,7 +588,6 @@ instead of a single view its ``arch`` field is composed of any number of
``attribute`` elements in the ``xpath``'s body ``attribute`` elements in the ``xpath``'s body
.. tip:: .. tip::
When matching a single element, the ``position`` attribute can be set directly When matching a single element, the ``position`` attribute can be set directly
on the element to be found. Both inheritances below will give the same result. on the element to be found. Both inheritances below will give the same result.
@ -618,7 +610,7 @@ instead of a single view its ``arch`` field is composed of any number of
* Using view inheritance, display this fields in the partner form view * Using view inheritance, display this fields in the partner form view
Domains Domains
####### ~~~~~~~
In Odoo, :ref:`reference/orm/domains` are values that encode conditions on In Odoo, :ref:`reference/orm/domains` are values that encode conditions on
records. A domain is a list of criteria used to select a subset of a model's records. A domain is a list of criteria used to select a subset of a model's
@ -671,14 +663,13 @@ method should simply set the value of the field to compute on every record in
.. danger:: ``self`` is a collection .. danger:: ``self`` is a collection
:class: aphorism :class: aphorism
The object ``self`` is a *recordset*, i.e., an ordered collection of The object ``self`` is a *recordset*, i.e., an ordered collection of records. It supports the
records. It supports the standard Python operations on collections, like standard Python operations on collections, like ``len(self)`` and ``iter(self)``, plus extra set
``len(self)`` and ``iter(self)``, plus extra set operations like ``recs1 + operations like ``recs1 + recs2``.
recs2``.
Iterating over ``self`` gives the records one by one, where each record is Iterating over ``self`` gives the records one by one, where each record is itself a collection of
itself a collection of size 1. You can access/assign fields on single size 1. You can access/assign fields on single records by using the dot notation, like
records by using the dot notation, like ``record.name``. ``record.name``.
.. code-block:: python .. code-block:: python
@ -734,9 +725,7 @@ float, string), or a function taking a recordset and returning a value::
user_id = fields.Many2one('res.users', default=lambda self: self.env.user) user_id = fields.Many2one('res.users', default=lambda self: self.env.user)
.. note:: .. note::
The object ``self.env`` gives access to request parameters and other useful things:
The object ``self.env`` gives access to request parameters and other useful
things:
- ``self.env.cr`` or ``self._cr`` is the database *cursor* object; it is - ``self.env.cr`` or ``self._cr`` is the database *cursor* object; it is
used for querying the database used for querying the database
@ -977,9 +966,8 @@ Gantt
----- -----
.. warning:: .. warning::
The gantt view requires the web_gantt module which is present in :ref:`the enterprise edition
The gantt view requires the web_gantt module which is present in <setup/install/editions>` version.
:ref:`the enterprise edition <setup/install/editions>` version.
Horizontal bar charts typically used to show project planning and advancement, Horizontal bar charts typically used to show project planning and advancement,
their root element is ``<gantt>``. their root element is ``<gantt>``.
@ -1004,10 +992,9 @@ Graph views allow aggregated overview and analysis of models, their root
element is ``<graph>``. element is ``<graph>``.
.. note:: .. note::
Pivot views (element ``<pivot>``) a multidimensional table, allows the Pivot views (element ``<pivot>``) a multidimensional table, allows the selection of filers and
selection of filers and dimensions to get the right aggregated dataset dimensions to get the right aggregated dataset before moving to a more graphical overview. The
before moving to a more graphical overview. The pivot view shares the same pivot view shares the same content definition as graph views.
content definition as graph views.
Graph views have 4 display modes, the default mode is selected using the Graph views have 4 display modes, the default mode is selected using the
``@type`` attribute. ``@type`` attribute.
@ -1039,9 +1026,8 @@ the values:
</graph> </graph>
.. warning:: .. warning::
Graph views perform aggregations on database values, they do not work with non-stored computed
Graph views perform aggregations on database values, they do not work fields.
with non-stored computed fields.
.. exercise:: Graph view .. exercise:: Graph view
@ -1197,7 +1183,6 @@ the action is "bound" to.
</record> </record>
.. tip:: .. tip::
While wizards use regular views and buttons, normally clicking any button in While wizards use regular views and buttons, normally clicking any button in
a form would first save the form then close the dialog. Because this is a form would first save the form then close the dialog. Because this is
often undesirable in wizards, a special attribute ``special="cancel"`` is often undesirable in wizards, a special attribute ``special="cancel"`` is
@ -1234,9 +1219,9 @@ Translation` without specifying a language), to create the module template POT
file, and then derive the translated PO files. Many IDE's have plugins or modes file, and then derive the translated PO files. Many IDE's have plugins or modes
for editing and merging PO/POT files. for editing and merging PO/POT files.
.. tip:: The Portable Object files generated by Odoo are published on .. tip::
`Transifex <https://www.transifex.com/odoo/public/>`__, making it The Portable Object files generated by Odoo are published on `Transifex
easy to translate the software. <https://www.transifex.com/odoo/public/>`_, making it easy to translate the software.
.. code-block:: text .. code-block:: text
@ -1248,7 +1233,6 @@ for editing and merging PO/POT files.
| (...) | (...)
.. tip:: .. tip::
By default Odoo's POT export only extracts labels inside XML files or By default Odoo's POT export only extracts labels inside XML files or
inside field definitions in Python code, but any Python string can be inside field definitions in Python code, but any Python string can be
translated this way by surrounding it with the function :func:`odoo._` translated this way by surrounding it with the function :func:`odoo._`

View File

@ -288,7 +288,7 @@ For JavaScript, we use ESLint and you can find a `configuration file example her
<https://github.com/odoo/odoo/wiki/Javascript-coding-guidelines#use-a-linter>`_. <https://github.com/odoo/odoo/wiki/Javascript-coding-guidelines#use-a-linter>`_.
Administrator tools for PostgreSQL Administrator tools for PostgreSQL
----------------------------------- ----------------------------------
You can manage your PostgreSQL databases using the command line as demonstrated earlier or using You can manage your PostgreSQL databases using the command line as demonstrated earlier or using
a GUI application such as `pgAdmin <https://www.pgadmin.org/download/pgadmin-4-apt/>`_ or `DBeaver a GUI application such as `pgAdmin <https://www.pgadmin.org/download/pgadmin-4-apt/>`_ or `DBeaver
@ -377,7 +377,5 @@ Here is a list of commands:
Quit the debugger. The program being executed is aborted. Quit the debugger. The program being executed is aborted.
----
Now that your server is running, it's time to start :ref:`writing your own application Now that your server is running, it's time to start :ref:`writing your own application
<howto/rdtraining/03_newapp>`! <howto/rdtraining/03_newapp>`!

View File

@ -205,7 +205,7 @@ template is passed more than one record, it can produce one PDF report for all t
Using the Print menu in the list view with multiple records selected will demonstrate this. Using the Print menu in the list view with multiple records selected will demonstrate this.
Make a Report Make a Report
--------------- -------------
Finally, you now know where to create your files and how the content of the files should look. Happy report making! Finally, you now know where to create your files and how the content of the files should look. Happy report making!

View File

@ -105,6 +105,7 @@ these options. A full example to reference while doing the exercises in this sec
Data Data
---- ----
To fully enjoy our dashboard view, we will need good test data to populate it. Test data will To fully enjoy our dashboard view, we will need good test data to populate it. Test data will
allow us to check that the resulting look and statistics are correct. It is a good idea to test allow us to check that the resulting look and statistics are correct. It is a good idea to test
with data that will cover most or all of your expected use cases, but is also easy to verify with with data that will cover most or all of your expected use cases, but is also easy to verify with
@ -130,6 +131,7 @@ data after you write your dashboard code and then test that your view is working
Aggregations Aggregations
------------ ------------
Building a dashboard view is very similar to what you have previously done in Building a dashboard view is very similar to what you have previously done in
:ref:`howto/rdtraining/07_basicviews`. For the dashboard view, we use the `dashboard` root element :ref:`howto/rdtraining/07_basicviews`. For the dashboard view, we use the `dashboard` root element
and choose from its possible tags (see all the possibilities and their attributes in the and choose from its possible tags (see all the possibilities and their attributes in the
@ -164,6 +166,7 @@ covered in :ref:`howto/rdtraining/06_firstui`). Now let's make some dashboards!
Pie Charts Pie Charts
---------- ----------
Adding pie charts to dashboards is a piece of cake using the `<widget>` element. An example is: Adding pie charts to dashboards is a piece of cake using the `<widget>` element. An example is:
.. code-block:: xml .. code-block:: xml
@ -192,6 +195,7 @@ the ``title`` for the pie chart, and that we're grouping it by property type.
Subviews Subviews
-------- --------
Similar to how we can use the list view within the form view (we saw this automatically happen for Similar to how we can use the list view within the form view (we saw this automatically happen for
One2many relationships in :ref:`howto/rdtraining/08_relations`), we can add other views within our One2many relationships in :ref:`howto/rdtraining/08_relations`), we can add other views within our
dashboard view. The most commonly added are the pivot and graph views, but the cohort view is dashboard view. The most commonly added are the pivot and graph views, but the cohort view is
@ -248,6 +252,7 @@ model clean of unnecessary fields.
Model Model
----- -----
We will start with the more difficult part: our special report model. This file starts the same as We will start with the more difficult part: our special report model. This file starts the same as
any other model, except that we add 2 attributes ``_auto`` and ``_rec_name``:: any other model, except that we add 2 attributes ``_auto`` and ``_rec_name``::
@ -318,6 +323,7 @@ or use alias names that match.
View View
---- ----
Now that we have our model, we can make its dashboard view. There is no difference in how it's made, Now that we have our model, we can make its dashboard view. There is no difference in how it's made,
except that its file is in the ``report`` folder. Since it is a new model not linked to except that its file is in the ``report`` folder. Since it is a new model not linked to
any other model, we will also have to add a new menuitem to view our dashboard. Typically, SQL views any other model, we will also have to add a new menuitem to view our dashboard. Typically, SQL views
@ -334,6 +340,7 @@ remember how to add a ``menuitem``? If not, revisit :ref:`howto/rdtraining/06_fi
Extra Tips Extra Tips
---------- ----------
**Tip 1** A common mistake in SQL views is not considering the duplication of certain data **Tip 1** A common mistake in SQL views is not considering the duplication of certain data
due to table JOINs. For example, in our **Goal**, we have a pie chart of the offers' property types. due to table JOINs. For example, in our **Goal**, we have a pie chart of the offers' property types.
We may be tempted to add a similar pie chart with a domain to only include canceled properties, We may be tempted to add a similar pie chart with a domain to only include canceled properties,

View File

@ -28,12 +28,9 @@ From common CMS to Odoo
----------------------- -----------------------
.. note:: .. note::
If you always think and work in the same way, youll probably get the same results. If you want something completely new, then try something different. If you always think and work in the same way, youll probably get the same results. If you want something completely new, then try something different.
.. **Where is my header.php file?**
Where is my header.php file?
This is usually the first question from a web designer used to working with Wordpress or Joomla and coming to Odoo for the first time. This is usually the first question from a web designer used to working with Wordpress or Joomla and coming to Odoo for the first time.
@ -185,7 +182,7 @@ Keep reading the tutorial to learn to how properly extend it with your own code.
Create a theme module Create a theme module
====================== =====================
Odoos themes are packaged like modules. Even if you are designing a very simple website for your company or client, you need to package the theme like an Odoo module. Odoos themes are packaged like modules. Even if you are designing a very simple website for your company or client, you need to package the theme like an Odoo module.
@ -810,7 +807,7 @@ Options allow publishers to edit a snippets appearance using the Website Buil
Using Website Builder functionalities, you can create snippet options easily and automatically add them to the UI. Using Website Builder functionalities, you can create snippet options easily and automatically add them to the UI.
Options group properties Options group properties
------------------------- ------------------------
Options are wrapped in groups. Groups can have properties that define how the included options will interact with the user interface. Options are wrapped in groups. Groups can have properties that define how the included options will interact with the user interface.
@ -824,7 +821,7 @@ Options are wrapped in groups. Groups can have properties that define how the in
Defines the list of elements that the snippet can be dropped beside. Defines the list of elements that the snippet can be dropped beside.
Default option methods Default option methods
----------------------- ----------------------
Options apply standard CSS classes to the snippet. Depending on the method that you choose, the UI will behave differently. Options apply standard CSS classes to the snippet. Depending on the method that you choose, the UI will behave differently.
@ -1102,11 +1099,12 @@ Describe your page
------------------ ------------------
Define keywords Define keywords
''''''''''''''' ~~~~~~~~~~~~~~~
You should use appropriate, relevant keywords and synonyms for those keywords. You can define them for each page using the built-in “Promote” function found in the bar at the top. You should use appropriate, relevant keywords and synonyms for those keywords. You can define them for each page using the built-in “Promote” function found in the bar at the top.
Define a title and a description Define a title and a description
'''''''''''''''''''''''''''''''' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Define them using the “Promote” function. Keep your page titles short and include the main keyword phrase for the page. Define them using the “Promote” function. Keep your page titles short and include the main keyword phrase for the page.
Good titles evoke an emotional response, ask a question or promise something. Good titles evoke an emotional response, ask a question or promise something.

View File

@ -1,7 +1,5 @@
.. _reference/translations: .. _reference/translations:
=================== ===================
Translating Modules Translating Modules
=================== ===================
@ -118,7 +116,8 @@ of global variables.
return modules + ['your_module'] return modules + ['your_module']
Variables Variables
^^^^^^^^^ ---------
**Don't** the extract may work but it will not translate the text correctly:: **Don't** the extract may work but it will not translate the text correctly::
_("Scheduled meeting with %s" % invitee.name) _("Scheduled meeting with %s" % invitee.name)
@ -130,7 +129,8 @@ will fallback on source in case of missing placeholder in the translation)::
Blocks Blocks
^^^^^^ ------
**Don't** split your translation in several blocks or multiples lines:: **Don't** split your translation in several blocks or multiples lines::
# bad, trailing spaces, blocks out of context # bad, trailing spaces, blocks out of context
@ -152,7 +152,8 @@ Blocks
"this sales order request.") "this sales order request.")
Plural Plural
^^^^^^ ------
**Don't** pluralize terms the English-way:: **Don't** pluralize terms the English-way::
msg = _("You have %(count)s invoice", count=invoice_count) msg = _("You have %(count)s invoice", count=invoice_count)
@ -167,7 +168,7 @@ Plural
msg = _("You have one invoice") msg = _("You have one invoice")
Read vs Run Time Read vs Run Time
^^^^^^^^^^^^^^^^ ----------------
**Don't** invoke translation lookup at server launch:: **Don't** invoke translation lookup at server launch::

View File

@ -1,8 +1,8 @@
:orphan: :orphan:
============================= ==========================
Customizing the web client Customizing the web client
============================= ==========================
.. note:: .. note::
@ -10,7 +10,6 @@ Customizing the web client
but meanwhile, this tutorial will probably be frustrating to follow, since it but meanwhile, this tutorial will probably be frustrating to follow, since it
was written a long time ago. was written a long time ago.
.. highlight:: javascript .. highlight:: javascript
.. default-domain:: js .. default-domain:: js
@ -30,7 +29,6 @@ or extend existing business systems of Odoo, see :doc:`backend`.
It also requires :ref:`an installed Odoo <setup/install>`, and Git_. It also requires :ref:`an installed Odoo <setup/install>`, and Git_.
A Simple Module A Simple Module
=============== ===============
@ -110,7 +108,9 @@ sub-folders are conventional and not strictly necessary.
Which only prints a small message in the browser's console. Which only prints a small message in the browser's console.
The files in the ``static`` folder, need to be defined within the module in order for them to be loaded correctly. Everything in ``src/xml`` is defined in ``__manifest__.py`` while the contents of ``src/css`` and ``src/js`` are defined in ``petstore.xml``, or a similar file. The files in the ``static`` folder, need to be defined within the module in order for them to be
loaded correctly. Everything in ``src/xml`` is defined in ``__manifest__.py`` while the contents of
``src/css`` and ``src/js`` are defined in ``petstore.xml``, or a similar file.
.. warning:: .. warning::
@ -503,7 +503,6 @@ must be explicitly cleaned up (because the garbage collector will not handle
them), you can override :func:`~odoo.Widget.destroy`. them), you can override :func:`~odoo.Widget.destroy`.
.. danger:: .. danger::
when overriding :func:`~odoo.Widget.destroy`, ``_super()`` when overriding :func:`~odoo.Widget.destroy`, ``_super()``
*must always* be called otherwise the widget and its children are not *must always* be called otherwise the widget and its children are not
correctly cleaned up leaving possible memory leaks and "phantom events", correctly cleaned up leaving possible memory leaks and "phantom events",
@ -537,7 +536,6 @@ characteristics:
:class:`~odoo.Widget` without relying on QWeb) :class:`~odoo.Widget` without relying on QWeb)
.. note:: .. note::
The rationale behind using QWeb instead of existing javascript template The rationale behind using QWeb instead of existing javascript template
engines is the extensibility of pre-existing (third-party) templates, much engines is the extensibility of pre-existing (third-party) templates, much
like Odoo :ref:`views <reference/views>`. like Odoo :ref:`views <reference/views>`.
@ -598,14 +596,13 @@ usages:
sub-widget also gets a red background sub-widget also gets a red background
.. warning:: .. warning::
templates should have a single non-``t`` root element, especially if templates should have a single non-``t`` root element, especially if
they're set as a widget's :attr:`~odoo.Widget.template`. If there are they're set as a widget's :attr:`~odoo.Widget.template`. If there are
multiple "root elements", results are undefined (usually only the first multiple "root elements", results are undefined (usually only the first
root element will be used and the others will be ignored) root element will be used and the others will be ignored)
QWeb Context QWeb Context
'''''''''''' ~~~~~~~~~~~~
QWeb templates can be given data and can contain basic display logic. QWeb templates can be given data and can contain basic display logic.
@ -659,7 +656,7 @@ Result:
<div>Hello Mordecai</div> <div>Hello Mordecai</div>
Template Declaration Template Declaration
'''''''''''''''''''' ~~~~~~~~~~~~~~~~~~~~
We've seen how to *render* QWeb templates, let's now see the syntax of We've seen how to *render* QWeb templates, let's now see the syntax of
the templates themselves. the templates themselves.
@ -683,7 +680,7 @@ it can be called using :func:`QWeb.render`. It can only be used at the
top-level of a template file. top-level of a template file.
Escaping Escaping
'''''''' ~~~~~~~~
The ``t-esc`` directive can be used to output text: The ``t-esc`` directive can be used to output text:
@ -707,7 +704,7 @@ or method calls:
<div><t t-esc="name.toUpperCase()"/></div> <div><t t-esc="name.toUpperCase()"/></div>
Outputting HTML Outputting HTML
''''''''''''''' ~~~~~~~~~~~~~~~
To inject HTML in the page being rendered, use ``t-raw``. Like ``t-esc`` it To inject HTML in the page being rendered, use ``t-raw``. Like ``t-esc`` it
takes an arbitrary Javascript expression as parameter, but it does not takes an arbitrary Javascript expression as parameter, but it does not
@ -724,7 +721,7 @@ perform an HTML-escape step.
vulnerabilities vulnerabilities
Conditionals Conditionals
'''''''''''' ~~~~~~~~~~~~
QWeb can have conditional blocks using ``t-if``. The directive takes an QWeb can have conditional blocks using ``t-if``. The directive takes an
arbitrary expression, if the expression is falsy (``false``, ``null``, ``0`` arbitrary expression, if the expression is falsy (``false``, ``null``, ``0``
@ -748,7 +745,7 @@ or an empty string) the whole block is suppressed, otherwise it is displayed.
local variable if it's a complex or expensive expression. local variable if it's a complex or expensive expression.
Iteration Iteration
''''''''' ~~~~~~~~~
To iterate on a list, use ``t-foreach`` and ``t-as``. ``t-foreach`` takes an To iterate on a list, use ``t-foreach`` and ``t-as``. ``t-foreach`` takes an
expression returning a list to iterate on ``t-as`` takes a variable name to expression returning a list to iterate on ``t-as`` takes a variable name to
@ -768,7 +765,7 @@ bind to each item during iteration.
(dictionaries) (dictionaries)
Defining attributes Defining attributes
''''''''''''''''''' ~~~~~~~~~~~~~~~~~~~
QWeb provides two related directives to define computed attributes: QWeb provides two related directives to define computed attributes:
:samp:`t-att-{name}` and :samp:`t-attf-{name}`. In either case, *name* is the :samp:`t-att-{name}` and :samp:`t-attf-{name}`. In either case, *name* is the
@ -799,7 +796,7 @@ literal and partially computed such as a class:
</div> </div>
Calling other templates Calling other templates
''''''''''''''''''''''' ~~~~~~~~~~~~~~~~~~~~~~~
Templates can be split into sub-templates (for simplicity, maintainability, Templates can be split into sub-templates (for simplicity, maintainability,
reusability or to avoid excessive markup nesting). reusability or to avoid excessive markup nesting).
@ -829,12 +826,12 @@ rendering the ``A`` template will result in:
Sub-templates inherit the rendering context of their caller. Sub-templates inherit the rendering context of their caller.
To Learn More About QWeb To Learn More About QWeb
'''''''''''''''''''''''' ~~~~~~~~~~~~~~~~~~~~~~~~
For a QWeb reference, see :ref:`reference/qweb`. For a QWeb reference, see :ref:`reference/qweb`.
Exercise Exercise
'''''''' ~~~~~~~~
.. exercise:: Usage of QWeb in Widgets .. exercise:: Usage of QWeb in Widgets
@ -1667,7 +1664,7 @@ In Odoo Web, the component responsible for handling and reacting to these
actions is the *Action Manager*. actions is the *Action Manager*.
Using the Action Manager Using the Action Manager
'''''''''''''''''''''''' ~~~~~~~~~~~~~~~~~~~~~~~~
The action manager can be invoked explicitly from javascript code by creating The action manager can be invoked explicitly from javascript code by creating
a dictionary describing :ref:`an action <reference/actions>` of the right a dictionary describing :ref:`an action <reference/actions>` of the right
@ -1811,7 +1808,7 @@ Much of Odoo web's usefulness (and complexity) resides in views. Each view
type is a way of displaying a model in the client. type is a way of displaying a model in the client.
The View Manager The View Manager
'''''''''''''''' ~~~~~~~~~~~~~~~~
When an ``ActionManager`` instance receive an action of type When an ``ActionManager`` instance receive an action of type
``ir.actions.act_window``, it delegates the synchronization and handling of ``ir.actions.act_window``, it delegates the synchronization and handling of
@ -1823,7 +1820,7 @@ multiple views depending on the original action's requirements:
:width: 40% :width: 40%
The Views The Views
''''''''' ~~~~~~~~~
Most :ref:`Odoo views <reference/views>` are implemented through a subclass Most :ref:`Odoo views <reference/views>` are implemented through a subclass
of :class:`odoo.web.View` which provides a bit of generic basic structure of :class:`odoo.web.View` which provides a bit of generic basic structure
@ -1932,14 +1929,14 @@ interface and the ``AbstractField`` class directly in the code of the Odoo web
client. client.
Creating a New Type of Field Creating a New Type of Field
'''''''''''''''''''''''''''' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In this part we will explain how to create a new type of field. The example In this part we will explain how to create a new type of field. The example
here will be to re-implement the ``FieldChar`` class and progressively explain here will be to re-implement the ``FieldChar`` class and progressively explain
each part. each part.
Simple Read-Only Field Simple Read-Only Field
"""""""""""""""""""""" **********************
Here is a first implementation that will only display text. The Here is a first implementation that will only display text. The
user will not be able to modify the content of the field. user will not be able to modify the content of the field.
@ -1979,7 +1976,7 @@ none is specified by the form view (here we assume the default value of a
``char`` field should be an empty string). ``char`` field should be an empty string).
Read-Write Field Read-Write Field
"""""""""""""""" ****************
Read-only fields, which only display content and don't allow the Read-only fields, which only display content and don't allow the
user to modify it can be useful, but most fields in Odoo also allow editing. user to modify it can be useful, but most fields in Odoo also allow editing.

View File

@ -408,7 +408,7 @@ how the POS interface works.
.. _reference/actions/cron: .. _reference/actions/cron:
Automated Actions (``ir.cron``) Automated Actions (``ir.cron``)
====================================== ===============================
Actions triggered automatically on a predefined frequency. Actions triggered automatically on a predefined frequency.

View File

@ -77,7 +77,7 @@ following attributes:
Requires an :term:`external id`, defaults to ``True``. Requires an :term:`external id`, defaults to ``True``.
``field`` ``field``
---------- ---------
Each record can be composed of ``field`` tags, defining values to set when Each record can be composed of ``field`` tags, defining values to set when
creating the record. A ``record`` with no ``field`` will use all default creating the record. A ``record`` with no ``field`` will use all default

View File

@ -20,7 +20,7 @@ Messaging integration
--------------------- ---------------------
Basic messaging system Basic messaging system
'''''''''''''''''''''' ~~~~~~~~~~~~~~~~~~~~~~
Integrating messaging features to your model is extremely easy. Simply inheriting Integrating messaging features to your model is extremely easy. Simply inheriting
the ``mail.thread`` model and adding the messaging fields (and their appropriate the ``mail.thread`` model and adding the messaging fields (and their appropriate
@ -192,9 +192,8 @@ a date or an e-mail address, add CC's addresses as followers, etc.).
:return: True :return: True
:rtype: bool :rtype: bool
Logging changes Logging changes
''''''''''''''' ~~~~~~~~~~~~~~~
The ``mail`` module adds a powerful tracking system on fields, allowing you The ``mail`` module adds a powerful tracking system on fields, allowing you
to log changes to specific fields in the record's chatter. To add tracking to log changes to specific fields in the record's chatter. To add tracking
@ -221,9 +220,8 @@ to a field, simple set the tracking attribute to True.
well to give more context about the notification (even if the name did not well to give more context about the notification (even if the name did not
change). change).
Subtypes Subtypes
'''''''' ~~~~~~~~
Subtypes give you more granular control over messages. Subtypes act as a classification Subtypes give you more granular control over messages. Subtypes act as a classification
system for notifications, allowing subscribers to a document to customize the system for notifications, allowing subscribers to a document to customize the
@ -318,9 +316,8 @@ can override the ``_track_subtype()`` function:
return self.env.ref('my_module.mt_state_change') return self.env.ref('my_module.mt_state_change')
return super(BusinessTrip, self)._track_subtype(init_values) return super(BusinessTrip, self)._track_subtype(init_values)
Customizing notifications Customizing notifications
''''''''''''''''''''''''' ~~~~~~~~~~~~~~~~~~~~~~~~~
When sending notifications to followers, it can be quite useful to add buttons in When sending notifications to followers, it can be quite useful to add buttons in
the template to allow quick actions directly from the e-mail. Even a simple button the template to allow quick actions directly from the e-mail. Even a simple button
@ -469,7 +466,7 @@ The urls in the actions list can be generated automatically by calling the
that can sometimes be boring, I choose the former instead of the latter. that can sometimes be boring, I choose the former instead of the latter.
Overriding defaults Overriding defaults
''''''''''''''''''' ~~~~~~~~~~~~~~~~~~~
There are several ways you can customize the behaviour of ``mail.thread`` models, There are several ways you can customize the behaviour of ``mail.thread`` models,
including (but not limited to): including (but not limited to):
@ -510,7 +507,7 @@ the outside, allowing users or customers to quickly create records in your
database without needing to connect to Odoo directly. database without needing to connect to Odoo directly.
Aliases vs. Incoming Mail Gateway Aliases vs. Incoming Mail Gateway
''''''''''''''''''''''''''''''''' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Some people use the Incoming Mail Gateway for this same purpose. You still need Some people use the Incoming Mail Gateway for this same purpose. You still need
a correctly configured mail gateway to use aliases, however a single a correctly configured mail gateway to use aliases, however a single
@ -531,7 +528,7 @@ Aliases have several advantages over Mail Gateways:
Alias support integration Alias support integration
''''''''''''''''''''''''' ~~~~~~~~~~~~~~~~~~~~~~~~~
Aliases are usually configured on a parent model which will then create specific Aliases are usually configured on a parent model which will then create specific
record when contacted by e-mail. For example, Project have aliases to create tasks record when contacted by e-mail. For example, Project have aliases to create tasks
@ -977,7 +974,7 @@ The rating mixin allows sending email to ask for customer rating, automatic
transitioning in a kanban processes and aggregating statistics on your ratings. transitioning in a kanban processes and aggregating statistics on your ratings.
Adding rating on your model Adding rating on your model
''''''''''''''''''''''''''' ~~~~~~~~~~~~~~~~~~~~~~~~~~~
To add rating support, simply inherit the ``rating.mixin`` model: To add rating support, simply inherit the ``rating.mixin`` model:
@ -1010,7 +1007,7 @@ The behaviour of the mixin adapts to your model:
``mail.thread``) ``mail.thread``)
Send rating requests by e-mail Send rating requests by e-mail
'''''''''''''''''''''''''''''' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you wish to send emails to request a rating, simply generate an e-mail with If you wish to send emails to request a rating, simply generate an e-mail with
links to the rating object. A very basic email template could look like this: links to the rating object. A very basic email template could look like this:

View File

@ -147,7 +147,7 @@ Advanced Fields
.. _reference/fields/date: .. _reference/fields/date:
Date(time) Fields Date(time) Fields
''''''''''''''''' ~~~~~~~~~~~~~~~~~
:class:`Dates <odoo.fields.Date>` and :class:`Datetimes <odoo.fields.Datetime>` :class:`Dates <odoo.fields.Date>` and :class:`Datetimes <odoo.fields.Datetime>`
are very important fields in any kind of business application. are very important fields in any kind of business application.
@ -208,7 +208,7 @@ These helpers are also available by importing `odoo.tools.date_utils`.
.. _reference/fields/relational: .. _reference/fields/relational:
Relational Fields Relational Fields
''''''''''''''''' ~~~~~~~~~~~~~~~~~
.. autoclass:: Many2one() .. autoclass:: Many2one()
@ -222,7 +222,7 @@ Relational Fields
:member-order: bysource :member-order: bysource
Pseudo-relational fields Pseudo-relational fields
'''''''''''''''''''''''' ~~~~~~~~~~~~~~~~~~~~~~~~
.. autoclass:: Reference() .. autoclass:: Reference()
@ -231,7 +231,7 @@ Pseudo-relational fields
.. _reference/fields/compute: .. _reference/fields/compute:
Computed Fields Computed Fields
''''''''''''''' ~~~~~~~~~~~~~~~
Fields can be computed (instead of read straight from the database) using the Fields can be computed (instead of read straight from the database) using the
``compute`` parameter. **It must assign the computed value to the field**. If ``compute`` parameter. **It must assign the computed value to the field**. If
@ -322,7 +322,7 @@ it uses the values of other *fields*, it should specify those fields using
.. _reference/fields/related: .. _reference/fields/related:
Related fields Related fields
'''''''''''''' ~~~~~~~~~~~~~~
A special case of computed fields are *related* (proxy) fields, which provide A special case of computed fields are *related* (proxy) fields, which provide
the value of a sub-field on the current record. They are defined by setting the value of a sub-field on the current record. They are defined by setting
@ -404,7 +404,7 @@ Automatic fields
.. _reference/fields/automatic/log_access: .. _reference/fields/automatic/log_access:
Access Log fields Access Log fields
''''''''''''''''' ~~~~~~~~~~~~~~~~~
These fields are automatically set and updated if These fields are automatically set and updated if
:attr:`~odoo.models.BaseModel._log_access` is enabled. It can be :attr:`~odoo.models.BaseModel._log_access` is enabled. It can be
@ -466,10 +466,10 @@ behavior is desired:
.. automethod:: Model.action_unarchive .. automethod:: Model.action_unarchive
.. .. attribute:: sequence .. .. attribute:: sequence
..
.. Alterable ordering criteria, allows drag-and-drop reordering of models .. Alterable ordering criteria, allows drag-and-drop reordering of models
.. in list views. .. in list views.
..
.. :class:`~odoo.fields.Integer` .. :class:`~odoo.fields.Integer`
.. attribute:: Model.state .. attribute:: Model.state
@ -774,7 +774,7 @@ Search/Read
.. automethod:: Model.read_group .. automethod:: Model.read_group
Fields/Views Fields/Views
'''''''''''' ~~~~~~~~~~~~
.. automethod:: Model.fields_get .. automethod:: Model.fields_get
@ -783,7 +783,7 @@ Fields/Views
.. _reference/orm/domains: .. _reference/orm/domains:
Search domains Search domains
'''''''''''''' ~~~~~~~~~~~~~~
A domain is a list of criteria, each criterion being a triple (either a A domain is a list of criteria, each criterion being a triple (either a
``list`` or a ``tuple``) of ``(field_name, operator, value)`` where: ``list`` or a ``tuple``) of ``(field_name, operator, value)`` where:
@ -945,14 +945,14 @@ Recordsets therefore provide the following operations returning recordsets thems
(when possible): (when possible):
Filter Filter
'''''' ~~~~~~
.. automethod:: Model.filtered .. automethod:: Model.filtered
.. automethod:: Model.filtered_domain .. automethod:: Model.filtered_domain
Map Map
''' ~~~
.. automethod:: Model.mapped .. automethod:: Model.mapped
@ -967,7 +967,7 @@ Map
records.partner_id.mapped('name') # == records.mapped('partner_id.name') records.partner_id.mapped('name') # == records.mapped('partner_id.name')
Sort Sort
'''' ~~~~
.. automethod:: Model.sorted .. automethod:: Model.sorted

View File

@ -164,6 +164,7 @@ More parameters can be passed as a query string
Useful Remarks Useful Remarks
-------------- --------------
* Twitter Bootstrap and FontAwesome classes can be used in your report * Twitter Bootstrap and FontAwesome classes can be used in your report
template template
* Local CSS can be put directly in the template * Local CSS can be put directly in the template
@ -277,6 +278,7 @@ the template, such as data from additional models:
Custom fonts Custom fonts
============ ============
If you want to use custom fonts you will need to add your custom font and the related less/CSS to the ``web.reports_assets_common`` assets bundle. If you want to use custom fonts you will need to add your custom font and the related less/CSS to the ``web.reports_assets_common`` assets bundle.
Adding your custom font(s) to ``web.assets_common`` or ``web.assets_backend`` will not make your font available in QWeb reports. Adding your custom font(s) to ``web.assets_common`` or ``web.assets_backend`` will not make your font available in QWeb reports.

View File

@ -225,6 +225,7 @@ properly.
Bypassing the ORM Bypassing the ORM
----------------- -----------------
You should never use the database cursor directly when the ORM can do the same You should never use the database cursor directly when the ORM can do the same
thing! By doing so you are bypassing all the ORM features, possibly the thing! By doing so you are bypassing all the ORM features, possibly the
automated behaviours like translations, invalidation of fields, ``active``, automated behaviours like translations, invalidation of fields, ``active``,
@ -250,6 +251,7 @@ less secure.
SQL injections SQL injections
~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
Care must be taken not to introduce SQL injections vulnerabilities when using Care must be taken not to introduce SQL injections vulnerabilities when using
manual SQL queries. The vulnerability is present when user input is either manual SQL queries. The vulnerability is present when user input is either
incorrectly filtered or badly quoted, allowing an attacker to introduce incorrectly filtered or badly quoted, allowing an attacker to introduce
@ -420,6 +422,7 @@ likely it is to break things.
Evaluating content Evaluating content
------------------ ------------------
Some may want to ``eval`` to parse user provided content. Using ``eval`` should Some may want to ``eval`` to parse user provided content. Using ``eval`` should
be avoided at all cost. A safer, sandboxed, method :class:`~odoo.tools.safe_eval` be avoided at all cost. A safer, sandboxed, method :class:`~odoo.tools.safe_eval`
can be used instead but still gives tremendous capabilities to the user running can be used instead but still gives tremendous capabilities to the user running

View File

@ -1,10 +1,8 @@
.. _reference/testing: .. _reference/testing:
============
===============
Testing Odoo Testing Odoo
=============== ============
There are many ways to test an application. In Odoo, we have three kinds of There are many ways to test an application. In Odoo, we have three kinds of
tests tests

View File

@ -280,12 +280,13 @@ using the view in the kanban arch (a specific example is the helpdesk dashboard)
need to have a valid arch field. need to have a valid arch field.
Promises and asynchronous code Promises and asynchronous code
=============================== ==============================
For a very good and complete introduction to promises, please read this excellent article https://github.com/getify/You-Dont-Know-JS/blob/1st-ed/async%20%26%20performance/ch3.md For a very good and complete introduction to promises, please read this excellent article https://github.com/getify/You-Dont-Know-JS/blob/1st-ed/async%20%26%20performance/ch3.md
Creating new Promises Creating new Promises
----------------------- ---------------------
- turn a constant into a promise - turn a constant into a promise
There are 2 static functions on Promise that create a resolved or rejected promise based on a constant: There are 2 static functions on Promise that create a resolved or rejected promise based on a constant:
@ -383,6 +384,7 @@ Creating new Promises
Waiting for Promises Waiting for Promises
-------------------- --------------------
- waiting for a number of Promises - waiting for a number of Promises
if you have multiple promises that all need to be waited, you can convert them into a single promise that will be resolved when all the promises are resolved using Promise.all(arrayOfPromises). if you have multiple promises that all need to be waited, you can convert them into a single promise that will be resolved when all the promises are resolved using Promise.all(arrayOfPromises).
@ -486,7 +488,7 @@ Error handling
Testing asynchronous code Testing asynchronous code
-------------------------- -------------------------
- using promises in tests - using promises in tests
In the tests code, we support the latest version of Javascript, including primitives like `async` and `await`. This makes using and waiting for promises very easy. In the tests code, we support the latest version of Javascript, including primitives like `async` and `await`. This makes using and waiting for promises very easy.

View File

@ -263,7 +263,7 @@ within the same Odoo addon.
.. _frontend/modules/odoo_module: .. _frontend/modules/odoo_module:
Odoo Module System Odoo Module System
=================== ==================
Odoo has defined a small module system (located in the file Odoo has defined a small module system (located in the file
:file:`addons/web/static/src/js/boot.js`, which needs to be loaded first). The Odoo :file:`addons/web/static/src/js/boot.js`, which needs to be loaded first). The Odoo
@ -371,7 +371,7 @@ If an error happens, it will be logged (in debug mode) in the console:
Modules who depend on a missing or a failed module Modules who depend on a missing or a failed module
Asynchronous modules Asynchronous modules
--------------------- --------------------
It can happen that a module needs to perform some work before it is ready. For It can happen that a module needs to perform some work before it is ready. For
example, it could do an rpc to load some data. In that case, the module can example, it could do an rpc to load some data. In that case, the module can

View File

@ -1,11 +1,10 @@
.. highlight:: javascript .. highlight:: javascript
.. default-domain:: js .. default-domain:: js
===================== ====================
Javascript Reference Javascript Reference
===================== ====================
This document presents the Odoo Javascript framework. This This document presents the Odoo Javascript framework. This
framework is not a large application in term of lines of code, but it is quite framework is not a large application in term of lines of code, but it is quite
@ -15,7 +14,7 @@ records in the database. It is even possible to use the web client to modify
the interface of the web client. the interface of the web client.
Overview Overview
========= ========
The Javascript framework is designed to work with three main use cases: The Javascript framework is designed to work with three main use cases:
@ -53,7 +52,7 @@ action manager) actually creates and destroys many sub components. The state is
highly dynamic, and each widget could be destroyed at any time. highly dynamic, and each widget could be destroyed at any time.
Overview of web client JS code Overview of web client JS code
------------------------------------- ------------------------------
Here, we give a very quick overview on the web client code, in Here, we give a very quick overview on the web client code, in
the *web/static/src/js* addon. Note that it is deliberately not exhaustive. the *web/static/src/js* addon. Note that it is deliberately not exhaustive.
@ -105,7 +104,7 @@ are a few things you can try to solve the issue:
Loading Javascript Code Loading Javascript Code
======================== =======================
Large applications are usually broken up into smaller files, that need to be Large applications are usually broken up into smaller files, that need to be
connected together. Some file may need to use some part of code defined in connected together. Some file may need to use some part of code defined in
@ -146,8 +145,6 @@ not the primary way to write javascript code.
.. note:: .. note::
Native javascript modules are the primary way to define javascript code. Native javascript modules are the primary way to define javascript code.
Class System Class System
============ ============
@ -204,7 +201,6 @@ framework will secretly rebind a special method: *_super* to the currently
called method. This allows us to use *this._super* whenever we need to call a called method. This allows us to use *this._super* whenever we need to call a
parent method. parent method.
.. code-block:: javascript .. code-block:: javascript
var Animal = require('web.Animal'); var Animal = require('web.Animal');
@ -248,7 +244,6 @@ of them in the new class.
In this example, the *Hamster* class is a subclass of Animal, but it also mix In this example, the *Hamster* class is a subclass of Animal, but it also mix
the DanceMixin in. the DanceMixin in.
Patching an existing class Patching an existing class
-------------------------- --------------------------
@ -273,7 +268,6 @@ the way Odoo is structured, it is sometimes necessary in one addon to modify
the behavior of a widget/class defined in another addon. Note that it will the behavior of a widget/class defined in another addon. Note that it will
modify all instances of the class, even if they have already been created. modify all instances of the class, even if they have already been created.
Widgets Widgets
======= =======
@ -524,7 +518,6 @@ Widget API
:param Element element: a DOM element or jQuery object to set as :param Element element: a DOM element or jQuery object to set as
the widget's DOM root the widget's DOM root
Inserting a widget in the DOM Inserting a widget in the DOM
----------------------------- -----------------------------
@ -558,7 +551,7 @@ and are charged with three tasks:
* starting the widget, and returning the result of starting it * starting the widget, and returning the result of starting it
Widget Guidelines Widget Guidelines
---------------------- -----------------
* Identifiers (``id`` attribute) should be avoided. In generic applications * Identifiers (``id`` attribute) should be avoided. In generic applications
and modules, ``id`` limits the re-usability of components and tends to make and modules, ``id`` limits the re-usability of components and tends to make
@ -668,7 +661,6 @@ in order to make the web client slightly lighter. In that case, we can use the
With this, the *Counter* widget will load the xmlDependencies files in its With this, the *Counter* widget will load the xmlDependencies files in its
*willStart* method, so the template will be ready when the rendering is performed. *willStart* method, so the template will be ready when the rendering is performed.
Event system Event system
============ ============
@ -760,9 +752,8 @@ The previous example can be updated to use the custom event system:
... this.trigger_up('valuechange', {value: someValue}); ... this.trigger_up('valuechange', {value: someValue});
Registries Registries
=========== ==========
A common need in the Odoo ecosystem is to extend/change the behaviour of the A common need in the Odoo ecosystem is to extend/change the behaviour of the
base system from the outside (by installing an application, i.e. a different base system from the outside (by installing an application, i.e. a different
@ -799,7 +790,6 @@ action registry
action. In version 11, each value should simply be a subclass of *Widget*. action. In version 11, each value should simply be a subclass of *Widget*.
However, in version 12, the values are required to be *AbstractAction*. However, in version 12, the values are required to be *AbstractAction*.
Communication between widgets Communication between widgets
============================= =============================
@ -867,7 +857,6 @@ Cross component
}, },
}); });
In this example, we use the bus exported by *web.core*, but this is not In this example, we use the bus exported by *web.core*, but this is not
required. A bus could be created for a specific purpose. required. A bus could be created for a specific purpose.
@ -884,7 +873,7 @@ events, these events bubble up to a service provider, which will ask a service
to perform a task, then maybe return an answer. to perform a task, then maybe return an answer.
Service Service
-------- -------
A service is an instance of the *AbstractService* class. It basically only has A service is an instance of the *AbstractService* class. It basically only has
a name and a few methods. Its job is to perform some work, typically something a name and a few methods. Its job is to perform some work, typically something
@ -916,7 +905,6 @@ dispatch the custom events. In the *backend* (web client), this is done by the
main web client instance. Note that the code for the service provider comes from main web client instance. Note that the code for the service provider comes from
the *ServiceProviderMixin*. the *ServiceProviderMixin*.
Widget Widget
------ ------
@ -975,7 +963,7 @@ may need to directly call a controller (available on some route).
}); });
Notifications Notifications
============== =============
The Odoo framework has a standard way to communicate various information to the The Odoo framework has a standard way to communicate various information to the
user: notifications, which are displayed on the top right of the user interface. user: notifications, which are displayed on the top right of the user interface.
@ -1010,9 +998,9 @@ The notification system in Odoo is designed with the following components:
- an helper function in *ServiceMixin*: *displayNotification* - an helper function in *ServiceMixin*: *displayNotification*
Displaying a notification Displaying a notification
------------------------- -------------------------
The most common way to display a notification is by using the method that come The most common way to display a notification is by using the method that come
from the *ServiceMixin*: from the *ServiceMixin*:
@ -1102,7 +1090,6 @@ the class variable SystrayMenu.items.
SystrayMenu.Items.push(MySystrayWidget); SystrayMenu.Items.push(MySystrayWidget);
Ordering Ordering
-------- --------
@ -1116,7 +1103,6 @@ left).
MySystrayWidget.prototype.sequence = 100; MySystrayWidget.prototype.sequence = 100;
Translation management Translation management
====================== ======================
@ -1211,7 +1197,7 @@ client for everyone), and for data which is required early in the initialization
process. process.
Views Views
====== =====
The word 'view' has more than one meaning. This section is about the design of The word 'view' has more than one meaning. This section is about the design of
the javascript code of the views, not the structure of the *arch* or anything the javascript code of the views, not the structure of the *arch* or anything
@ -1220,7 +1206,6 @@ else.
In 2017, Odoo replaced the previous view code with a new architecture. The In 2017, Odoo replaced the previous view code with a new architecture. The
main need was to separate the rendering logic from the model logic. main need was to separate the rendering logic from the model logic.
Views (in a generic sense) are now described with 4 pieces: a View, a Views (in a generic sense) are now described with 4 pieces: a View, a
Controller, a Renderer and a Model. The API of these 4 pieces is described in Controller, a Renderer and a Model. The API of these 4 pieces is described in
the AbstractView, AbstractController, AbstractRenderer and AbstractModel classes. the AbstractView, AbstractController, AbstractRenderer and AbstractModel classes.
@ -2094,6 +2079,7 @@ reference (FieldReference)
Widgets Widgets
------- -------
week_days (WeekDays) week_days (WeekDays)
This field displays a list of checkboxes for week days, 1 checkbox for each day This field displays a list of checkboxes for week days, 1 checkbox for each day
and allow the user to select a subset of the choices. and allow the user to select a subset of the choices.
@ -2166,7 +2152,6 @@ Registering the client action:
<field name="tag">my-custom-action</field> <field name="tag">my-custom-action</field>
</record> </record>
Using the control panel Using the control panel
----------------------- -----------------------

View File

@ -1,9 +1,8 @@
.. _reference/mobile: .. _reference/mobile:
================== =================
Mobile JavaScript Mobile JavaScript
================== =================
Introduction Introduction
============ ============
@ -11,15 +10,16 @@ Introduction
In Odoo 10.0 we released a mobile app which allows you to access all **Odoo apps** In Odoo 10.0 we released a mobile app which allows you to access all **Odoo apps**
(even your customized modules). (even your customized modules).
The application is a combination of **Odoo Web** and **Native Mobile The application is a combination of **Odoo Web** and **Native Mobile components**. In other words it
components**. In other words it is a Odoo Web instance loaded inside a native, mobile, WebView container. is a Odoo Web instance loaded inside a native, mobile, WebView container.
This page documents how you can access mobile native components like Camera, This page documents how you can access mobile native components like Camera,
Vibration, Notification and Toast through Odoo Web (via JavaScript). For this, you Vibration, Notification and Toast through Odoo Web (via JavaScript). For this, you
do not need to be a mobile developer, if you know Odoo JavaScript API you can do not need to be a mobile developer, if you know Odoo JavaScript API you can
access all available mobile features. access all available mobile features.
.. warning:: These features work with **Odoo Enterprise 10.0+** only .. warning::
These features work with **Odoo Enterprise 10.0+** only
How does it work? How does it work?
================= =================
@ -64,7 +64,7 @@ Methods
a data JSON dictionary a data JSON dictionary
Show Toast in device Show Toast in device
..................... ~~~~~~~~~~~~~~~~~~~~
.. js:function:: showToast .. js:function:: showToast
@ -80,10 +80,8 @@ remains visible and interactive.
.. image:: mobile/toast.png .. image:: mobile/toast.png
Vibrating device Vibrating device
................ ~~~~~~~~~~~~~~~~
.. js:function:: vibrate .. js:function:: vibrate
@ -97,7 +95,7 @@ Vibrate mobile device with given duration.
mobile.methods.vibrate({'duration': 100}); mobile.methods.vibrate({'duration': 100});
Show snackbar with action Show snackbar with action
......................... ~~~~~~~~~~~~~~~~~~~~~~~~~
.. js:function:: showSnackBar .. js:function:: showSnackBar
@ -122,7 +120,7 @@ displayed at a time.
.. image:: mobile/snackbar.png .. image:: mobile/snackbar.png
Showing notification Showing notification
..................... ~~~~~~~~~~~~~~~~~~~~
.. js:function:: showNotification .. js:function:: showNotification
@ -143,7 +141,7 @@ view at any time.
Create contact in device Create contact in device
......................... ~~~~~~~~~~~~~~~~~~~~~~~~
.. js:function:: addContact .. js:function:: addContact
@ -176,7 +174,7 @@ Create a new device contact with the given contact details.
.. image:: mobile/mobile_contact_create.png .. image:: mobile/mobile_contact_create.png
Scanning barcodes Scanning barcodes
.................. ~~~~~~~~~~~~~~~~~
.. js:function:: scanBarcode .. js:function:: scanBarcode
@ -198,7 +196,7 @@ The barcode API can read the following barcode formats:
}); });
Switching account in device Switching account in device
........................... ~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. js:function:: switchAccount .. js:function:: switchAccount

View File

@ -480,7 +480,7 @@ open themselves on mouse hover, without the need for a click.
Example: Direct Siblings Dropdown Example: Direct Siblings Dropdown
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When one dropdown toggler is clicked (**File** , **Edit** or **About**), the When one dropdown toggler is clicked (**File** , **Edit** or **About**), the
others will open themselves on hover. others will open themselves on hover.

View File

@ -257,9 +257,8 @@ exists in 3 different forms:
setting variables setting variables
================= =================
QWeb allows creating variables from within the template, to memoize a QWeb allows creating variables from within the template, to memoize a computation (to use it
computation (to use it multiple times), give a piece of data a clearer name, multiple times), give a piece of data a clearer name, ...
...
This is done via the ``set`` directive, which takes the name of the variable This is done via the ``set`` directive, which takes the name of the variable
to create. The value to set can be provided in two ways: to create. The value to set can be provided in two ways:
@ -374,7 +373,7 @@ templates:
will not strip that information from safe content. will not strip that information from safe content.
Creating safe content using :class:`~markupsafe.Markup` Creating safe content using :class:`~markupsafe.Markup`
''''''''''''''''''''''''''''''''''''''''''''''''''''''' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
See the official documentation for explanations, but the big advantage of See the official documentation for explanations, but the big advantage of
:class:`~markupsafe.Markup` is that it's a very rich type overrinding :class:`~markupsafe.Markup` is that it's a very rich type overrinding
@ -471,12 +470,12 @@ Exclusive directives
-------------------- --------------------
Asset bundles Asset bundles
''''''''''''' ~~~~~~~~~~~~~
.. todo:: have fme write these up because I've no idea how they work .. todo:: have fme write these up because I've no idea how they work
"smart records" fields formatting "smart records" fields formatting
''''''''''''''''''''''''''''''''' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The ``t-field`` directive can only be used when performing field access The ``t-field`` directive can only be used when performing field access
(``a.b``) on a "smart" record (result of the ``browse`` method). It is able (``a.b``) on a "smart" record (result of the ``browse`` method). It is able
@ -503,7 +502,7 @@ Helpers
------- -------
Request-based Request-based
''''''''''''' ~~~~~~~~~~~~~
Most Python-side uses of QWeb are in controllers (and during HTTP requests), Most Python-side uses of QWeb are in controllers (and during HTTP requests),
in which case templates stored in the database (as in which case templates stored in the database (as
@ -520,7 +519,7 @@ This automatically creates a :class:`~odoo.http.Response` object which can
be returned from the controller (or further customized to suit). be returned from the controller (or further customized to suit).
View-based View-based
'''''''''' ~~~~~~~~~~
At a deeper level than the previous helper is the ``render`` method on At a deeper level than the previous helper is the ``render`` method on
``ir.ui.view``: ``ir.ui.view``:
@ -576,7 +575,7 @@ Exclusive directives
-------------------- --------------------
Defining templates Defining templates
'''''''''''''''''' ~~~~~~~~~~~~~~~~~~
The ``t-name`` directive can only be placed at the top-level of a template The ``t-name`` directive can only be placed at the top-level of a template
file (direct children to the document root):: file (direct children to the document root)::
@ -595,7 +594,7 @@ are related (e.g. called sub-templates) it is customary to use dot-separated
names to indicate hierarchical relationships. names to indicate hierarchical relationships.
Template inheritance Template inheritance
'''''''''''''''''''' ~~~~~~~~~~~~~~~~~~~~
Template inheritance is used to either: Template inheritance is used to either:
- Alter existing templates in-place, e.g. to add information to templates - Alter existing templates in-place, e.g. to add information to templates
@ -632,7 +631,7 @@ Extension inheritance (in-place transformation)::
</t> </t>
Old inheritance mechanism (deprecated) Old inheritance mechanism (deprecated)
'''''''''''''''''''''''''''''''''''''' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Template inheritance is performed via the ``t-extend`` directive which takes Template inheritance is performed via the ``t-extend`` directive which takes
the name of the template to alter as parameter. the name of the template to alter as parameter.

View File

@ -673,8 +673,7 @@ When a rpc fails, then:
* the promise representing the rpc is rejected, so the calling code will crash, * the promise representing the rpc is rejected, so the calling code will crash,
unless it handles the situation unless it handles the situation
* * an event ``RPC_ERROR`` is triggered on the main application bus. The event payload
an event ``RPC_ERROR`` is triggered on the main application bus. The event payload
contains a description of the cause of the error: contains a description of the cause of the error:
If it is a server error (the server code threw an exception). In that case If it is a server error (the server code threw an exception). In that case

View File

@ -1,6 +1,7 @@
:orphan: :orphan:
:nosearch: :nosearch:
===============
Last build date Last build date
=============== ===============