Compare commits

..

1 Commits

Author SHA1 Message Date
Xavier-Do
3cbbc40f23 [IMP] developer/performances: add performances section 2021-09-30 17:03:29 +02:00
90 changed files with 873 additions and 1036 deletions

View File

@@ -24,7 +24,7 @@ SOURCE_DIR = content
HTML_BUILD_DIR = $(BUILD_DIR)/html
ifdef VERSIONS
HTML_BUILD_DIR := $(HTML_BUILD_DIR)/15.0
HTML_BUILD_DIR := $(HTML_BUILD_DIR)/saas-14.5
endif
ifneq ($(CURRENT_LANG),en)
HTML_BUILD_DIR := $(HTML_BUILD_DIR)/$(CURRENT_LANG)

View File

@@ -19,7 +19,7 @@ copyright = 'Odoo S.A.'
# `version` if the version info for the project being documented, acts as replacement for |version|,
# also used in various other places throughout the built documents.
# `release` is the full version, including alpha/beta/rc tags. Acts as replacement for |release|.
version = release = '15.0'
version = release = 'saas-14.5'
# The minimal Sphinx version required to build the documentation.
needs_sphinx = '3.0.0'

View File

@@ -20,37 +20,37 @@ This matrix shows the support status of every version.
**Major releases are in bold type.**
+-----------------+-------------+----------+-------------+----------------+------------------------+
| | Odoo Online | Odoo.sh | On-Premise | Release date | End of support |
+=================+=============+==========+=============+================+========================+
| **Odoo 15.0** | |green| | |green| | |green| | October 2021 | October 2024 (planned) |
+-----------------+-------------+----------+-------------+----------------+------------------------+
| **Odoo 14.0** | |green| | |green| | |green| | October 2020 | October 2023 (planned) |
+-----------------+-------------+----------+-------------+----------------+------------------------+
| **Odoo 13.0** | |green| | |green| | |green| | October 2019 | October 2022 (planned) |
+-----------------+-------------+----------+-------------+----------------+------------------------+
| Odoo 12.saas~3 | |orange| | N/A | N/A | August 2019 | |
+-----------------+-------------+----------+-------------+----------------+------------------------+
| **Odoo 12.0** | |orange| | |orange| | |red| | October 2018 | October 2021 |
+-----------------+-------------+----------+-------------+----------------+------------------------+
| Odoo 11.saas~3 | |orange| | N/A | N/A | April 2018 | |
+-----------------+-------------+----------+-------------+----------------+------------------------+
| **Odoo 11.0** | |orange| | |orange| | |red| | October 2017 | October 2020 |
+-----------------+-------------+----------+-------------+----------------+------------------------+
| Odoo 10.saas~15 | |orange| | N/A | N/A | March 2017 | |
+-----------------+-------------+----------+-------------+----------------+------------------------+
| Odoo 10.saas~14 | |orange| | N/A | N/A | January 2017 | |
+-----------------+-------------+----------+-------------+----------------+------------------------+
| **Odoo 10.0** | |orange| | |orange| | |red| | October 2016 | October 2019 |
+-----------------+-------------+----------+-------------+----------------+------------------------+
| Odoo 9.saas~11 | |orange| | N/A | N/A | May 2016 | |
+-----------------+-------------+----------+-------------+----------------+------------------------+
| **Odoo 9.0** | |orange| | N/A | |red| | October 2015 | October 2018 |
+-----------------+-------------+----------+-------------+----------------+------------------------+
| Odoo 8.saas~6 | |orange| | N/A | N/A | February 2015 | |
+-----------------+-------------+----------+-------------+----------------+------------------------+
| **Odoo 8.0** | |orange| | N/A | |red| | September 2014 | October 2017 |
+-----------------+-------------+----------+-------------+----------------+------------------------+
+--------------------+-------------+----------+--------------+----------------+----------------------------------------------+
| | Odoo Online | Odoo.sh | On-Premise | Release date | |
+====================+=============+==========+==============+================+==============================================+
| **Odoo 14.0** | |green| | |green| | |green| | October 2020 | |
+--------------------+-------------+----------+--------------+----------------+----------------------------------------------+
| Odoo 13.saas~4 | |green| | N/A | N/A | August 2019 | |
+--------------------+-------------+----------+--------------+----------------+----------------------------------------------+
| **Odoo 13.0** | |green| | |green| | |green| | October 2019 | |
+--------------------+-------------+----------+--------------+----------------+----------------------------------------------+
| Odoo 12.saas~3 | |green| | N/A | N/A | August 2019 | |
+--------------------+-------------+----------+--------------+----------------+----------------------------------------------+
| **Odoo 12.0** | |green| | |green| | |green| | October 2018 | *End-of-support is planned for October 2021* |
+--------------------+-------------+----------+--------------+----------------+----------------------------------------------+
| Odoo 11.saas~3 | |orange| | N/A | N/A | April 2018 | |
+--------------------+-------------+----------+--------------+----------------+----------------------------------------------+
| **Odoo 11.0** | |orange| | |orange| | |red| | October 2017 | |
+--------------------+-------------+----------+--------------+----------------+----------------------------------------------+
| Odoo 10.saas~15 | |orange| | N/A | N/A | March 2017 | |
+--------------------+-------------+----------+--------------+----------------+----------------------------------------------+
| Odoo 10.saas~14 | |orange| | N/A | N/A | January 2017 | |
+--------------------+-------------+----------+--------------+----------------+----------------------------------------------+
| **Odoo 10.0** | |orange| | |orange| | |red| | October 2016 | |
+--------------------+-------------+----------+--------------+----------------+----------------------------------------------+
| Odoo 9.saas~11 | |orange| | N/A | N/A | May 2016 | |
+--------------------+-------------+----------+--------------+----------------+----------------------------------------------+
| **Odoo 9.0** | |orange| | N/A | |red| | October 2015 | |
+--------------------+-------------+----------+--------------+----------------+----------------------------------------------+
| Odoo 8.saas~6 | |orange| | N/A | N/A | February 2015 | |
+--------------------+-------------+----------+--------------+----------------+----------------------------------------------+
| **Odoo 8.0** | |orange| | N/A | |red| | September 2014 | |
+--------------------+-------------+----------+--------------+----------------+----------------------------------------------+
.. note::
@@ -66,9 +66,6 @@ This matrix shows the support status of every version.
🏁 Future version, not released yet
.. This is an awful way to display colored circles but "Large Green Circle Emoji" was only released
in 2019 (see https://unicode-table.com/en/1F7E2/). Let's wait a few more years...
.. |green| image:: data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMzIuMTkgMjMyLjE5Ij48Y2lyY2xlIGN4PSIxMTYuMDkiIGN5PSIxMTYuMDkiIHI9IjExNi4wOSIgc3R5bGU9ImZpbGw6IzAwYTcwMCIvPjwvc3ZnPg==
:width: 15

View File

@@ -100,5 +100,5 @@ The synchronization is a two-way process, meaning that events are reconciled in
to manage a specific instance of Microsoft cloud services for your internal and external users.
.. seealso::
- :doc:`../../../productivity/mail_plugins/outlook`
- :doc:`../../../sales/crm/optimize/outlook_extension`
- :doc:`../google/google_calendar_credentials`

View File

@@ -1,25 +1,19 @@
:show-content:
=================================================
Payment acquirers (credit cards, online payments)
=================================================
================================================
Payment Acquirers (Credit Cards, Online Payment)
================================================
.. toctree::
:titlesonly:
payment_acquirers/wire_transfer
payment_acquirers/adyen
payment_acquirers/alipay
payment_acquirers/authorize
payment_acquirers/buckaroo
payment_acquirers/mollie
payment_acquirers/ogone
payment_acquirers/paypal
payment_acquirers/sips
payment_acquirers/stripe
Odoo embeds several **payment acquirers** that allow your customers to pay on their *Customer
Portals* or your *eCommerce website*. They can pay sales orders, invoices, or subscriptions with
Portals* or your *eCommerce website*. They can pay Sales Orders, invoices, or subscriptions with
recurring payments with their favorite payment methods such as **Credit Cards**.
Offering several payment methods increases the chances of getting paid in time, or even immediately,
@@ -34,13 +28,13 @@ trust.
Odoo apps delegate the handling of sensitive information to the certified payment acquirer so
that you don't ever have to worry about PCI compliance.
This means that no sensitive information (such as credit card numbers) is stored on Odoo servers
or Odoo databases hosted elsewhere. Instead, Odoo apps use a unique reference number to the data
stored safely in the payment acquirers' systems.
This means that no sensitive information (such as credit card numbers or credentials) is stored
on Odoo servers or Odoo databases hosted elsewhere. Instead, Odoo apps use a unique reference
number to the data stored safely in the payment acquirers' systems.
.. _payment_acquirers/acquirers:
Payment acquirers
Payment Acquirers
=================
From an accounting perspective, we can distinguish two types of payment acquirers: the payments that
@@ -49,7 +43,7 @@ acquirers that are third-party services and require you to follow another accoun
.. _payment_acquirers/bank_payments:
Bank payments
Bank Payments
-------------
- | :doc:`Wire Transfer <payment_acquirers/wire_transfer>`
@@ -57,58 +51,43 @@ Bank payments
approve the payment manually once you have received it on your bank account.
- | SEPA Direct Debit
| Your customers can sign a SEPA Direct Debit mandate online and get their bank account charged
directly. :doc:`Click here <../finance/accounting/receivables/customer_payments/batch_sdd>` for
more information about this payment method.
directly. :doc:`Click here <../finance/accounting/receivables/customer_payments/batch_sdd>` for more
information about this payment method.
.. _payment_acquirers/online_providers:
Online payment providers
Online Payment Providers
------------------------
+-------------------------------+----------------------+------------+-----------------+-----------+
| | Payment flow | Save cards | Capture amount | Refund |
| | | | manually | from Odoo |
+===============================+======================+============+=================+===========+
| :doc:`Adyen | Payment from Odoo | |V| | | |V| |
| <payment_acquirers/adyen>` | | | | |
+-------------------------------+----------------------+------------+-----------------+-----------+
| :doc:`Alipay | Redirection to the | | | |
| <payment_acquirers/alipay>` | acquirer website | | | |
+-------------------------------+----------------------+------------+-----------------+-----------+
| :doc:`Authorize.Net | Payment from Odoo | |V| | |V| | |
| <payment_acquirers/authorize>`| | | | |
+-------------------------------+----------------------+------------+-----------------+-----------+
| :doc:`Buckaroo | Redirection to the | | | |
| <payment_acquirers/buckaroo>` | acquirer website | | | |
+-------------------------------+----------------------+------------+-----------------+-----------+
| :doc:`Mollie | Redirection to the | | | |
| <payment_acquirers/mollie>` | acquirer website | | | |
+-------------------------------+----------------------+------------+-----------------+-----------+
| :doc:`Ogone | Redirection to the | |V| | | |
| <payment_acquirers/ogone>` | acquirer website | | | |
+-------------------------------+----------------------+------------+-----------------+-----------+
| :doc:`PayPal | Redirection to the | | | |
| <payment_acquirers/paypal>` | acquirer website | | | |
+-------------------------------+----------------------+------------+-----------------+-----------+
| PayU Latam | Redirection to the | | | |
| | acquirer website | | | |
+-------------------------------+----------------------+------------+-----------------+-----------+
| PayUMoney | Redirection to the | | | |
| | acquirer website | | | |
+-------------------------------+----------------------+------------+-----------------+-----------+
| :doc:`SIPS | Redirection to the | | | |
| <payment_acquirers/sips>` | acquirer website | | | |
+-------------------------------+----------------------+------------+-----------------+-----------+
| :doc:`Stripe | Redirection to the | |V| | | |
| <payment_acquirers/stripe>` | acquirer website | | | |
+-------------------------------+----------------------+------------+-----------------+-----------+
.. |V| replace::
+-------------------------------------+----------------------+-----------+------------+-----------------+
| | Redirection to | Payment | Save Cards | Capture Amount |
| | the acquirer website | from Odoo | | Manually |
+=====================================+======================+===========+============+=================+
| Adyen | ✔ | | | |
+-------------------------------------+----------------------+-----------+------------+-----------------+
| Alipay | ✔ | | | |
+-------------------------------------+----------------------+-----------+------------+-----------------+
| :doc:`Authorize.Net | | ✔ | ✔ | ✔ |
| <payment_acquirers/authorize>` | | | | |
+-------------------------------------+----------------------+-----------+------------+-----------------+
| Buckaroo | | | | |
+-------------------------------------+----------------------+-----------+------------+-----------------+
| Ingenico | ✔ | ✔ | ✔ | |
+-------------------------------------+----------------------+-----------+------------+-----------------+
| :doc:`PayPal | ✔ | | | |
| <payment_acquirers/paypal>` | | | | |
+-------------------------------------+----------------------+-----------+------------+-----------------+
| PayUMoney | ✔ | | | |
+-------------------------------------+----------------------+-----------+------------+-----------------+
| SIPS | | | | |
+-------------------------------------+----------------------+-----------+------------+-----------------+
| Stripe | ✔ | ✔ | ✔ | |
+-------------------------------------+----------------------+-----------+------------+-----------------+
.. note::
Some of these online payment providers can also be added as :doc:`bank accounts
<../finance/accounting/bank/setup/bank_accounts>`, but this is **not** the same process as adding
them as payment acquirers. Payment acquirers allow customers to pay online, and bank accounts are
Some of these Online Payment Providers can also be added as :doc:`Bank Accounts
<../finance/accounting/bank/setup/bank_accounts>`, but this is **not** the same process as adding them
as Payment Acquirers. Payment Acquirers allow customers to pay online, and Bank Accounts are
added and configured on your Accounting app to do a bank reconciliation, which is an accounting
control process.
@@ -117,15 +96,15 @@ Online payment providers
Configuration
=============
Some of the features described in this section are available only with some payment acquirers. Refer
Some of the features described in this section are available only with some Payment Acquirers. Refer
to :ref:`the table above <payment_acquirers/online_providers>` for more details.
.. _payment_acquirers/add_new:
Add a new payment acquirer
Add a new Payment Acquirer
--------------------------
To add a new payment acquirer and make it available to your customers, go to
To add a new Payment acquirer and make it available to your customers, go to
:menuselection:`Accounting --> Configuration --> Payment Acquirers`, look for your payment acquirer,
install the related module, and activate it. To do so, open the payment acquirer and change its
state from *Disabled* to *Enabled*.
@@ -145,11 +124,11 @@ state from *Disabled* to *Enabled*.
Credentials tab
~~~~~~~~~~~~~~~
If not done yet, go to the online payment provider website, create an account, and make sure to have
the credentials required for third-party use. Odoo requires these credentials to communicate with
the payment acquirer.
If not done yet, go to the **Online Payment Provider**'s website, create an account, and make sure
to have the credentials required for third-party use. Odoo requires these credentials to communicate
with the Payment Acquirer and get the confirmation of the *payment authentication*.
The form in this section is specific to the payment acquirer you are configuring. Please refer to
The form in this section is specific to the Payment Acquirer you are configuring. Please refer to
the related documentation for more information.
.. _payment_acquirers/configuration_tab:
@@ -157,66 +136,66 @@ the related documentation for more information.
Configuration tab
~~~~~~~~~~~~~~~~~
You can change the payment acquirer's front-end appearance by modifying its name under the
**Displayed as** field and which credit card icons to display under the **Supported Payment Icons**
field.
You can change the Payment Acquirer front-end appearance by modifying its name under the **Displayed
as** field and which credit card icons to display under the **Supported Payment Icons** field.
.. _payment_acquirers/save_cards:
Save and reuse credit cards
Save and reuse Credit Cards
***************************
With the **Save Cards** feature, Odoo can store **Payment Tokens** in your database, which can be
used for subsequent payments, without having to reenter the payment details. This is particularly
useful for the eCommerce conversion rate and subscriptions' recurring payments.
useful for subscriptions' recurring payments.
.. _payment_acquirers/capture_amount:
Place a hold on a card
**********************
If you wish to manually capture an amount instead of having an immediate capture, you can enable the
manual capture. Capturing payments manually has many advantages:
- Receive the payment confirmation and wait until the order is shipped to capture the payment.
- Review and verify that orders are legitimate before the payment is completed and the fulfillment
process starts.
- Avoid potentially high credit card fees in the event of overselling or cancelled orders.
The **Capture Amount Manually** field is under the **Configuration** tab. If enabled, the funds are
reserved for a few days on the customer's card, but not charged yet. Please refer to your acquirer's
documentation for the exact reservation duration.
.. image:: payment_acquirers/media/capture_manually.png
:align: center
:alt: Configuration tab on Odoo
To capture the payment, you must then go to the related sales order or invoice and manually
If the **Capture Amount Manually** field is enabled, the funds are reserved for a few days on the
customer's card, but not charged yet. You must then go to the related Sales Order and manually
*capture* the funds before its automatic cancellation, or *void the transaction* to unlock the funds
from the customer's card.
.. image:: payment_acquirers/media/capture.png
:align: center
:alt: Hold the credit card payment until you capture or revoke it on Odoo
.. _payment_acquirers/payment_flow:
Payment Flow
************
Choose in the **Payment Flow** field if to redirect the user to the payment acquirer's portal to
authenticate the payment, or if to stay on the current page and authenticate the payment from Odoo.
.. note::
Odoo may not yet support the manual capture for all acquirers, but some acquirers allow managing
the capture from their interfaces.
Some features are available only if you select *Redirection to the acquirer website*.
.. _payment_acquirers/countries:
Countries
*********
Restrict the use of the payment acquirer to a selection of countries. Leave this field blank to make
the payment acquirer available to all countries.
Restrict the use of the Payment Acquirer to a selection of countries. Leave this field blank to make
the Payment Acquirer available to all countries.
.. _payment_acquirers/journal:
Payment journal
Payment Journal
***************
The **Payment journal** selected for your payment acquirer must be a *Bank* journal.
The **Payment Journal** selected for your Payment Acquirer must be a *Bank* journal.
.. important::
In many cases, Odoo automatically creates a new **Journal** and a new **Account** when you
activate a new Payment Acquirer. Both of them are preset to work out-of-the-box, but we strongly
recommend you to make sure these fields are correctly set according to your accounting needs, and
adapt them if necessary.
.. _payment_acquirers/messages:
Messages tab
~~~~~~~~~~~~
Change here the messages displayed by Odoo after a payment's confirmation or failure.
.. _payment_acquirers/accounting:
@@ -228,30 +207,33 @@ reconciliation workflows. However, payments recorded with **Online Payment Provi
to consider how you want to record your payments' journal entries. We recommend you to ask your
accountant for advice.
You need to select a *Payment Journal* on your acquirer configuration to record the payments,
on a **Outstanding Account**. The Journal's **type** must be *Bank Journal*.
Odoo default method is to record the payments on a *Current Assets Account*, on a dedicated *Bank
Journal*, once the *Payment Authentication* is confirmed. At some point, you transfer the funds from
the *Payment Acquirer* to your *Bank Account*.
You can use a single journal for many payment methods. And for each payment method, you can either:
Here are the requirements for this to work:
- Define an **Accounting Account** to separate these payments from another payment method.
- Leave blank to fallback on the default account, which you can see or change in the settings.
- Bank Journal
.. image:: payment_acquirers/media/bank_journal.png
:align: center
:alt: A bank journal in the "Incoming Payments Tab".
- The Journal's **type** must be *Bank Journal*.
- Select the right **Default Debit Account** and **Default Credit Account**.
- | Under the *Advanced Settings* tab, make sure that **Posting** is set as *Post At Payment
Validation*.
| This implies that the Journal Entry is recorded directly when your Odoo database receives the
confirmation of the *Payment Authentication* from the Online Payment Provider.
You can have the same bank account for the whole company, or for some journals only, or a single
payment method... What best suit your needs.
- Current Asset Account
- The Account's **type** is *Current Assets*
- The Account must **Allow Reconciliation**
.. note::
In many cases, Odoo automatically creates a new **Journal** and a new **Current Asset Account**
when you activate a new Payment Acquirer. You can modify them if necessary.
.. seealso::
- :doc:`../finance/accounting/receivables/customer_payments/recording`
- :doc:`payment_acquirers/wire_transfer`
- :doc:`payment_acquirers/adyen`
- :doc:`payment_acquirers/alipay`
- :doc:`payment_acquirers/authorize`
- :doc:`payment_acquirers/buckaroo`
- :doc:`payment_acquirers/mollie`
- :doc:`payment_acquirers/ogone`
- :doc:`payment_acquirers/paypal`
- :doc:`payment_acquirers/sips`
- :doc:`payment_acquirers/stripe`
- :doc:`../websites/ecommerce/shopper_experience/payment_acquirer`
- :doc:`payment_acquirers/paypal`

View File

@@ -1,103 +0,0 @@
=====
Adyen
=====
`Adyen <https://www.adyen.com/>`_ is a Dutch-based company that offers several online payment
possibilities.
Configuration
=============
.. seealso::
- :ref:`payment_acquirers/add_new`
Credentials tab
---------------
Odoo needs your **API Credentials** to connect with your Adyen account, which comprise:
- **Merchant Account**: The code of the merchant account to use with Adyen.
- :ref:`API Key <adyen/api_and_client_keys>`: The API key of the webservice user.
- :ref:`Client Key <adyen/api_and_client_keys>`: The client key of the webservice user.
- :ref:`HMAC Key <adyen/hmac_key>`: The HMAC key of the webhook.
- :ref:`Checkout API URL <adyen/urls>`: The base URL for the Checkout API endpoints.
- :ref:`Recurring API URL <adyen/urls>`: The base URL for the Recurring API endpoints.
You can copy your credentials from your Adyen account, and paste them in the related fields under
the **Credentials** tab.
.. important::
If you are trying Adyen as a test, with a *test account*, change the **State** to *Test Mode*. We
recommend doing this on a test Odoo database, rather than on your main database.
.. _adyen/api_and_client_keys:
API Key and Client Key
~~~~~~~~~~~~~~~~~~~~~~
In order to retrieve the API Key and the Client Key, log into your Adyen account, go to
:menuselection:`Developers --> API Credentials`.
- If you already have an API user, open it.
- If you don't have an API user yet, click on **Create new credential**.
Go to :menuselection:`Authentication` and get or generate your **API Key** and **Client Key**. Be
careful to copy your API key as you'll not be allowed to get it later without generating a new one.
This is also the place where you'll :ref:`allow payments to be made from your website
<adyen/allowed_origins>`.
.. _adyen/hmac_key:
HMAC key
~~~~~~~~
In order to retrieve the HMAC Key, you'll need to configure a `Standard Notification` webhook. For
this, log into your Adyen account then go to :menuselection:`Developers --> Webhooks --> Add webhook
--> Add Standard notification`.
.. image:: media/adyen_add_webhook.png
:align: center
:alt: Configure a webhook.
There, in :menuselection:`Transport --> URL`, enter your server address followed by
`/payment/adyen/notification`.
.. image:: media/adyen_webhook_url.png
:align: center
:alt: Enter the notification URL.
Then continue in :menuselection:`Additional Settings --> HMAC Key --> Generate new HMAC key`. Be
careful to copy it as you'll not be allowed to get it later without generating a new one.
You have to save the webhook to finalize its creation.
.. _adyen/urls:
URLs
~~~~
To retrieve the URLs, log into your Adyen account, go to :menuselection:`Developers --> API URLs`.
Pick one of the URLs listed next to **Recurring** as your **Recurring API URL** and one of the URLs
listed next to **Checkout API** as your **Checkout API URL**.
.. image:: media/adyen_api_urls.png
:align: center
:alt: Get the links for the different API.
Adyen Account
-------------
.. _adyen/allowed_origins:
Allow payments from a specific origin
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To allow payment originated from your website, follow the steps in :ref:`adyen/api_and_client_keys`
to navigate to your API user and go to :menuselection:`Allowed Origins`, then add the URLs from
where payments will be made (the URLs of the servers hosting your Odoo instances).
.. image:: media/adyen_allowed_origins.png
:align: center
:alt: Allows payments originated from a specific domain.
.. seealso::
- :doc:`../payment_acquirers`

View File

@@ -1,36 +0,0 @@
======
Alipay
======
`Alipay <https://www.alipay.com/>`_ is an online payments platform established in China by Alibaba
Group.
Configuration
=============
.. seealso::
- :ref:`payment_acquirers/add_new`
Credentials tab
---------------
Odoo needs your **API Credentials** to connect with your Alipay account, which comprise:
- **Account**: Depending on where you are situated
- `Express Checkout` if your are a Chinese Merchant.
- `Cross-border` if you are not.
- **Alipay Seller Email**: Your public Alipay partner email (for express checkout only).
- **Merchant Partner ID**: The public partner ID solely used to identify the account with Alipay.
- **MD5 Signature Key**: The signature key.
You can copy your credentials from your Alipay account, and paste them in the related fields under
the **Credentials** tab.
To retrieve them, log into your Alipay account, they are on the front page.
.. important::
If you are trying Alipay as a test, in the *sandbox*, change the **State** to *Test Mode*. We
recommend doing this on a test Odoo database, rather than on your main database.
.. seealso::
- :doc:`../payment_acquirers`

View File

@@ -2,46 +2,116 @@
Authorize.Net
=============
`Authorize.Net <https://www.authorize.net>`_ is a United States-based online payment solution
`Authorize.Net <https://www.authorize.net>`__ is a United States-based online payment solution
provider, allowing businesses to accept **credit cards**.
Configuration
=============
.. image:: media/authorize-net.png
:align: center
:alt: Authorize.Net logo
.. seealso::
- :ref:`payment_acquirers/add_new`
This Payment Acquirer offers additional options that are not available for other :doc:`Payment
Acquirers <../payment_acquirers>`, such as the ability to process your customer's payment after
delivery.
Credentials tab
---------------
Authorize.Net account
=====================
If not done yet, choose a plan and `Sign Up for an Authorize.Net account
<https://www.authorize.net/sign-up.html>`__.
Odoo needs your **API Credentials & Keys** to connect with your Authorize.Net account, which
comprise:
- **API Login ID**: The ID solely used to identify the account with Authorize.Net.
- **API Transaction Key**
- **API Signature Key**
- **API Client Key**
- API Login ID
- Transaction Key
- Signature Key
To retrieve them, log into your Authorize.Net account, go to :menuselection:`Account --> Settings
--> Security Settings --> API Credentials & Keys`, generate your **Transaction Key** and
**Signature Key**, and paste them on the related fields in Odoo. Then, click on **Generate Client
Key**.
To retrieve them, log into your Authorize.Net account, go to :menuselection:`Account --> Security
Settings --> General Security Settings --> API Credentials & Keys`, and generate your **Transaction
Key** and **Signature Key**.
.. image:: media/authorize-api-keys.png
:align: center
:alt: Generate your Transaction Key and Signature Key on your Authorize.Net account
.. seealso::
- `Authorize.Net: Getting Started Guide
<https://support.authorize.net/s/article/Authorize-Net-Getting-Started-Guide>`__
Payment Acquirer Configuration
==============================
To configure Authorize.Net as Payment Acquirer in Odoo, go to :menuselection:`Accounting -->
Configuration --> Payment Acquirers`, open **Authorize.Net**, and change the **State** to *Enabled*.
Don't forget to click on *Save* once you've set everything up.
.. note::
Please refer to the :doc:`Payment Acquirers documentation <../payment_acquirers>` to read how to
configure this payment acquirer.
Credentials
-----------
Copy your credentials from your Authorize.Net account (API Login Id, API Transaction Key, and API
Signature Key), paste them in the related fields under the **Credentials** tab, then click on
**Generate Client Key**.
.. note::
The **API Client Key** is necessary only if you select *Payment from Odoo* option as
:ref:`Payment Flow <payment_acquirers/payment_flow>`.
.. important::
If you are trying Authorize.Net as a test, with a *sandbox account*, change the **State** to
*Test Mode*. We recommend doing this on a test Odoo database, rather than on your main database.
Configuration tab
-----------------
Payment Flow
------------
Place a hold on a card
~~~~~~~~~~~~~~~~~~~~~~
The **Payment Flow** lets you decide if to redirect the user to the payment acquirer's portal to
authenticate the payment, or if to stay on the current page and authenticate the payment from Odoo.
This field is under the **Configuration** tab.
With Authorize.net, you can enable the :ref:`manual capture <payment_acquirers/capture_amount>`. If
enabled, the funds are reserved for 30 days on the customer's card, but not charged yet.
If you select *Redirection to the acquirer website*, make sure you add a **Default Receipt URL** and
a **Default Relay Response URL** to your Authorize.net account.
To do so, log into your Authorize.Net account, go to :menuselection:`Account --> Transaction Format
Settings --> Transaction Response Settings --> Response/Receipt URLs`, and set the default links:
- | Default Receipt URL:
| *https://[yourcompany.odoo.com]*/**payment/authorize/return**
- | Default Relay Response URL:
| *https://[yourcompany.odoo.com]*/**shop/confirmation**
.. note::
| Failing to complete this step results in the following error:
| *The referrer, relay response or receipt link URL is invalid.*
Capture the payment after the delivery
--------------------------------------
The **Capture Amount Manually** field is under the **Configuration** tab. If enabled, the funds are
reserved for 30 days on the customer's card, but not charged yet.
.. image:: media/authorize-configuration.png
:align: center
:alt: Authorize.Net Configuration tab on Odoo
To capture the payment, go to the related Sales Order and click on *Capture Transaction*. If the
order is canceled, you can click on *Void Transaction* to unlock the funds from the customer's card.
.. image:: media/authorize-capture.png
:align: center
:alt: Hold the credit card payment until you capture or revoke it on Odoo
.. warning::
After **30 days**, the transaction is **voided automatically** by Authorize.net.
.. note::
With other payment acquirers, you can manage the capture in their own interfaces, not from Odoo.
.. seealso::
- `Authorize.Net: Getting Started Guide
<https://support.authorize.net/s/article/Authorize-Net-Getting-Started-Guide>`__
- :doc:`../payment_acquirers`
- :doc:`../../websites/ecommerce/shopper_experience/payment_acquirer`

View File

@@ -1,47 +0,0 @@
========
Buckaroo
========
`Buckaroo <https://www.buckaroo.eu/>`_ is a Dutch-based company that offers several online payment
possibilities.
Configuration
=============
.. seealso::
- :ref:`payment_acquirers/add_new`
Credentials tab
---------------
Odoo needs your **API Credentials** to connect with your Buckaroo account, which comprise:
- :ref:`Website Key <buckaroo/website_key>`: The key solely used to identify the website with
Buckaroo.
- :ref:`Secret Key <buckaroo/secret_key>`: The secret key you entered on Buckaroo.
You can copy your credentials from your Buckaroo account, and paste them in the related fields under
the **Credentials** tab.
.. _buckaroo/website_key:
Website Key
~~~~~~~~~~~
In order to retrieve the Website Key, log into your Buckaroo account, go to
:menuselection:`Configuration --> Templates --> Your Website`.
.. _buckaroo/secret_key:
Secret Key
~~~~~~~~~~
In order to retrieve the Website Key, log into your Buckaroo account, go to
:menuselection:`Configuration --> Security --> Secret Key`.
.. important::
If you are trying Buckaroo in a test account, change the **State** to *Test Mode*. We
recommend doing this on a test Odoo database, rather than on your main database.
.. seealso::
- :doc:`../payment_acquirers`

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@@ -1,31 +0,0 @@
======
Mollie
======
`Mollie <https://www.mollie.com/>`_ is an online payments platform established in the Netherlands.
Configuration
=============
.. seealso::
- :ref:`payment_acquirers/add_new`
Credentials tab
---------------
Odoo needs your **API Credentials** to connect with your Mollie account, which comprise:
- **API Key**: The test or live API Key depending on the configuration of the acquirer.
You can copy your credentials from your Mollie account, and paste them in the related fields under
the **Credentials** tab.
To retrieve your API key, log into your Mollie account, go to
:menuselection:`Developers --> API keys`, and copy your Test or Live **API Key**.
.. important::
If you are trying Mollie as a test, with the Test API key, change the **State** to *Test Mode*.
We recommend doing this on a test Odoo database, rather than on your main database.
.. seealso::
- :doc:`../payment_acquirers`

View File

@@ -1,69 +0,0 @@
=====
Ogone
=====
`Ogone <https://www.ingenico.com/>`_, also known as **Ingenico Payment Services** is a France-based
company that provides the technology involved in secure electronic transactions.
Configuration
=============
.. seealso::
- :ref:`payment_acquirers/add_new`
Credentials tab
---------------
Odoo needs your **API Credentials** to connect with your Ogone account, which comprise:
- **PSPID**: The ID solely used to identify the account with Ogone. You chose it when you opened
your account.
- :ref:`API User ID <ogone/api_user>`: The ID solely used to identify the user with Ogone.
- :ref:`API User Password <ogone/api_user>`: Value used to identify the user with Ogone.
- :ref:`SHA Key IN <ogone/sha_key_in>`: Key used in the signature Odoo send to Ogone.
- :ref:`SHA Key OUT <ogone/sha_key_out>`: Key used in the signature Ogone send to Odoo.
You can copy your credentials from your Ogone account, and paste them in the related fields under
the **Credentials** tab.
.. _ogone/api_user:
API User ID and Password
~~~~~~~~~~~~~~~~~~~~~~~~
If you already created a user and have both its ID and password, just copy them. You can also
generate a new password from :menuselection:`Configuration --> Users --> Your chosen user --> change
password`.
If you don't have a user, create one by going to :menuselection:`Configuration --> Users -->
New User`. Set your **User ID** to get your **password** when you save your new user.
.. image:: media/ogone_new_user.png
:align: center
:alt: Get your password when you save the new user.
.. _ogone/sha_key_in:
SHA Key IN
~~~~~~~~~~
In order to retrieve the SHA Key IN, log into your ogone account, go to
:menuselection:`Configuration --> Technical Information --> Data and origin verification -->
Checks for e-Commerce & Alias Gateway`, and retrieve **SHA Key IN**.
.. _ogone/sha_key_out:
SHA Key OUT
~~~~~~~~~~~
In order to retrieve the API Key and the Client Key, log into your ogone account, go to
:menuselection:`Configuration --> Technical Information --> Transaction feedback --> All transaction
submission modes`, and get or generate your **API Key** and **Client Key**. Be careful to copy your
API key as you'll not be allowed to get it later without generating a new one.
.. important::
If you are trying Ogone as a test, with the Test Account, change the **State** to *Test Mode*. We
recommend doing this on a test Odoo database, rather than on your main database.
.. seealso::
- :doc:`../payment_acquirers`

View File

@@ -1,123 +1,185 @@
======
Paypal
======
=============================
Configure your Paypal account
=============================
`Paypal <https://www.paypal.com//>` is available and popular worldwide. It doesn't charge any
subscription fee and creating an account is very easy. That's why we definitely recommend it for
starters in Odoo. It works as a seamless flow where the customer is routed to Paypal website to
register the payment.
Paypal is available and popular worldwide. It doesnt charge any
subscription fee and creating an account is very easy. Thats why we
definitely recommend it for starters in Odoo. It works as a seamless
flow where the customer is routed to Paypal website to register the
payment.
Paypal account
==============
A business account is needed to get paid with Paypal. Create a
`Paypal Business Account <https://www.paypal.com/us/merchantsignup/
applicationChecklist?signupType=CREATE_NEW_ACCOUNT&productIntentId=wp_standard>`_
or upgrade your Personal account to a Business account. Go to the Paypal
settings and click on *Upgrade to a Business account*.
Then follow the few configuration steps.
Settings in Paypal
==================
| First, lets see how to set up your Paypal account in order to build a
seamless customer experience with Odoo.
| Log in and open the settings. Go to :menuselection:`Products & Services -->
Website payments` and click **Update** on **Website preferences**.
.. image:: media/paypal01.png
:align: center
Auto Return
-----------
*Auto Return* automatically redirects your customers to Odoo once the
payment is processed. Check *Auto Return* and enter your domain name
with the suffix ``/shop/confirmation`` as *Return URL*
(e.g. ``https://yourcompany.odoo.com/shop/confirmation``).
This URL is requested in Paypal but not used in practice as Odoo
transmits it at each transaction. Dont worry if you manage several
sales channels or Odoo databases.
.. image:: media/paypal02.png
:align: center
Payment Data Transfer (PDT)
---------------------------
*Payment Data Transfer* delivers the payment confirmation to Odoo as
soon as it is processed. Without it, Odoo cannot end the sales flow.
This setting must be activated as well. When saving, an *Identity
Token* is generated. You will be later requested to enter it in Odoo.
.. image:: media/paypal03.png
:align: center
Paypal Account Optional
We advise you to not prompt customers to log in with a Paypal account
when they get to pay. Let them pay with debit/credit cards as well, or you might lose some deals. Make sure this setting is turned on.
.. image:: media/paypal04.png
:align: center
Instant Payment Notification (IPN)
----------------------------------
PDT sends order confirmations once and only once. As a result, your site
must be running when it happens; otherwise, it will never receive the
message. Thats why we advise to activate the *Instant Payment
Notification* (IPN) on top. With IPN, delivery of order confirmations
is virtually guaranteed since IPN resends a confirmation until your site acknowledges receipt.
| To activate IPN, get back to *Website payments* menu and click
*Update* in *Instant Payment Notification*.
| The *Notification URL* to set is your domain name +
“payment/paypal/ipn” (e.g. ``https://yourcompany.odoo.com/payment/paypal/ipn``).
.. image:: media/paypal05.png
:align: center
Payment Messages Format
-----------------------
If you use accented characters (or anything else than basic Latin characters)
for your customer names, addresses... you MUST configure the encoding format of
the payment request sent by Odoo to Paypal.
.. danger::
If you don't configure this setting, some transactions fail without notice.
To do so, open:
* `this page for a test account <https://sandbox.paypal.com/cgi-bin/customerprofileweb?cmd=_profile-language-encoding>`__
* `this page for a production account <https://www.paypal.com/cgi-bin/customerprofileweb?cmd=_profile-language-encoding>`__
Then, click *More Options* and set the two default encoding formats as **UTF-8**.
.. image:: media/paypal07.png
:align: center
.. image:: media/paypal08.png
:align: center
Your Paypal account is ready!
.. tip::
If you want your customers to pay without creating a Paypal account,
*Paypal Account Optional* needs to be turned on.
.. image:: media/paypal_account_optional.png
.. tip::
For Encrypted Website Payments & EWP_SETTINGS error,
please check the `Paypal documentation <https://developer.paypal.com/docs/
classic/paypal-payments-standard/integration-guide/encryptedwebpayments/
#encrypted-website-payments-ewp>`_.
Settings in Odoo
================
.. seealso::
- :ref:`payment_acquirers/add_new`
Activation
----------
Credentials tab
---------------
Activate *Paypal* from the config bar of Sales, Invoicing and
eCommerce apps, or from the configuration menu of *Payment Acquirers*.
Odoo needs your **API Credentials** to connect with your PayPal account, which comprise:
Credentials
-----------
- **Email ID**: your login email address in Paypal.
- **Merchant ID**: the code of the merchant account used to identify your Paypal account.
- **Use IPN**: either you want to use Instant Payment Notification. Already checked, you don't have
to change it.
Odoo requires three Paypal credentials:
You can copy your credentials from your Paypal account, and paste them in the related fields under
the **Credentials** tab.
- *Email ID* is your login email address in Paypal.
- *Merchant ID* can be found in the settings of your Paypal account, in
:menuselection:`Account Settings --> Business information`.
- *Paypal PDT Token* is given in *Website payments* configuration as explained here above.
To retrieve them, log into your Paypal account, and go to :menuselection:`Your account menu -->
Account settings --> Business Profile --> Business Information`
.. image:: media/paypal09.png
:align: center
.. important::
If you are trying Paypal as a test, with a *sandbox account*, change the **State** to *Test
Mode*. We recommend doing this on a test Odoo database, rather than on your main database.
Configuration tab
-----------------
Transaction fees
----------------
You can charge extra fees to your customers for paying with Paypal;
This to cover the transaction fees Paypal charges you. Once redirected to Paypal, your customer sees
an extra applied to the order amount.
This to cover the transaction fees Paypal charges you. Once redirected to Paypal, your customer sees an extra applied to the order amount.
To activate this, go to the Configuration tab of Paypal configuration in Odoo and check *Add Extra
Fees*.
To activate this, go to the Configuration tab of Paypal configuration in
Odoo and check *Add Extra Fees*.
You can refer to `Paypal Fees <https://www.paypal.com/webapps/mpp/paypal-fees>`_ to set up fees.
.. image:: media/paypal10.png
:align: center
You can refer to `Paypal Fees <https://www.paypal.com/webapps/mpp/paypal-fees>`__ to set up
fees.
.. note::
`Traders in the EU <https://europa.eu/youreurope/citizens/consumers/shopping/pricing-payments/
index_en.htm>`_ are not allowed to charge extra fees for paying with credit cards.
Settings in Paypal
==================
Go live!
========
First, lets see how to set up your Paypal account in order to build a seamless customer experience
with Odoo.
Your configuration is ready to roll. Make sure *Production* mode is
on. Then publish the payment method by clicking the *Published* button right next to it.
Log in and open the settings. Go to :menuselection:`Your account menu --> Account settings -->
Product & Services --> Website payments` and click **Update** on **Website preferences**.
.. image:: media/paypal11.png
:align: center
Auto Return
-----------
.. image:: media/paypal12.png
:align: Center
*Auto Return* automatically redirects your customers to Odoo once the payment is processed. Check
*Auto Return* and enter your domain name with the suffix ``/shop/confirmation`` as *Return URL*
(e.g. `https://yourcompany.odoo.com/shop/confirmation`).
Paypal is now available in your payment form available in eCommerce,
Sales and Invoicing apps. Customers are redirected to Paypal website
when hitting *Pay Now*. They get back to a confirmation page in Odoo
once the payment is processed.
This URL is requested in Paypal but not used in practice as Odoo transmits it at each transaction.
Dont worry if you manage several sales channels or Odoo databases.
Payment Data Transfer (PDT)
---------------------------
*Payment Data Transfer* delivers the payment confirmation to Odoo as soon as it is processed.
Without it, Odoo cannot end the sales flow. This setting must be activated as well. When saving, an
*Identity Token* is generated. You will be later requested to enter it in Odoo.
Paypal Account Optional
-----------------------
We advise you to not prompt customers to log in with a Paypal account when they get to pay. Let them
pay with debit/credit cards as well, or you might lose some deals. Make sure this setting is turned
on.
Instant Payment Notification (IPN)
----------------------------------
PDT sends order confirmations once and only once. As a result, your site must be running when it
happens; otherwise, it will never receive the message. Thats why we advise to activate the *Instant
Payment Notification* (IPN) on top. With IPN, delivery of order confirmations is virtually
guaranteed since IPN resends a confirmation until your site acknowledges receipt.
| To activate IPN, get back to *Website payments* menu and click *Update* in *Instant Payment
Notification*.
| The *Notification URL* to set is your domain name + “payment/paypal/ipn” (e.g.
`https://yourcompany.odoo.com/payment/paypal/ipn`).
Payment Messages Format
-----------------------
If you use accented characters (or anything else than basic Latin characters) for your customer
names, addresses... you MUST configure the encoding format of the payment request sent by Odoo to
Paypal.
.. danger::
If you don't configure this setting, some transactions fail without notice.
To do so, open:
- `this page for a test account <https://sandbox.paypal.com/cgi-bin/customerprofileweb?cmd=_profile-language-encoding>`_
- `this page for a production account <https://www.paypal.com/cgi-bin/customerprofileweb?cmd=_profile-language-encoding>`_
Then, click *More Options* and set the two default encoding formats as **UTF-8**.
Your Paypal account is ready!
.. tip::
For Encrypted Website Payments & EWP_SETTINGS error, please check the `Paypal documentation
<https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/
encryptedwebpayments#encrypted-website-payments-ewp>`_.
.. image:: media/paypal13.png
:align: center
Test environment
================
@@ -133,10 +195,13 @@ This will create two sandbox accounts:
- A default personal account (to use as shopper, e.g. `pp.merch01-buyer@example.com <mailto:pp.merch01-buyer@example.com>`__).
Log in to Paypal Sandbox with the merchant account and follow the same configuration instructions.
Enter your sandbox credentials in Odoo and make sure Paypal is still set on *Test Mode*. We
recommend doing this on a test Odoo database, rather than on your main database.
Enter your sandbox credentials in Odoo and make sure Paypal is still
set on *Test Environment*. Also, make sure the automatic invoicing
is not activated in your eCommerce settings, to not generate invoices
when a fictitious transaction is completed.
Run a test transaction from Odoo using the sandbox personal account.
.. seealso::
- :doc:`../payment_acquirers`
- :doc:`../../websites/ecommerce/shopper_experience/payment_acquirer`

View File

@@ -1,32 +0,0 @@
====
SIPS
====
`SIPS <https://sips.worldline.com/>`_ is an online payments solution from the multinational
Worldline.
Configuration
=============
.. seealso::
- :ref:`payment_acquirers/add_new`
Credentials tab
---------------
Odoo needs your **API Credentials** to connect with your SIPS account, which comprise:
- **Merchant ID**: The ID solely used to identify the merchant account with SIPS.
- **Secret Key**: The key to sign the merchant account with SIPS.
- **Secret Key Version**: The version of the key, pre-filled.
- **Interface Version**: Pre-filled, don't change it.
You can copy your credentials from your SIPS environment info documentation, in the section
**PROD**, and paste them in the related fields under the **Credentials** tab.
.. important::
If you are trying SIPS as a test, with the *TEST* credentials, change the **State** to *Test
Mode*. We recommend doing this on a test Odoo database, rather than on your main database.
.. seealso::
- :doc:`../payment_acquirers`

View File

@@ -2,48 +2,31 @@
Stripe
======
`Stripe <https://stripe.com/>`_ is a United States-based online payment solution provider, allowing
businesses to accept **credit cards** and other payment methods.
`Stripe <https://stripe.com/>`_ is a United States-based online payment solution
provider, allowing businesses to accept **credit cards** and other payment methods.
Configuration
=============
Enable Local Payment Methods
============================
.. seealso::
- :ref:`payment_acquirers/add_new`
Local payment methods are payment methods that are only available for certain merchants
and customers countries and currencies.
Credentials tab
---------------
The Stripe connector in Odoo supports the following local payment methods:
Odoo needs your **API Credentials** to connect with your Stripe account, which comprise:
- Bancontact
- EPS
- Giropay
- iDeal:
- Przelewy24 (P24)
- Publishable Key: The key solely used to identify the account with Stripe.
- Secret Key: The key to sign the merchant account with Stripe.
- Webhook Signing Secret: If a webhook is enabled on your Stripe account
(:menuselection:`Developers --> webhooks`), this signing secret must be set to authenticate the
messages sent from Stripe to Odoo.
To retrieve the publishable and secret keys, log into your Stripe dashboard and go to
:menuselection:`Developers --> API Keys --> Standard Keys`
.. important::
If you are trying Stripe as a test, in the **test mode**, change the **State** to *Test
Mode*. We recommend doing this on a test Odoo database, rather than on your main database.
Enable local payment methods
****************************
Local payment methods are payment methods that are only available for certain merchants and
customers countries and currencies.
To enable specific local payment methods with Stripe, list them as supported payment icons. To do
so, go to :menuselection:`Payment Acquirers --> Stripe --> Configuration` and add the desired
payment methods in the **Supported Payment Icons** field. If the desired payment method is already
listed, you don't have anything to do. If a payment icon record doesn't exist in the database, its
related payment method is considered enabled with Stripe.
To enable specific Local Payment Methods with Stripe, list them as supported payment icons.
To do so, go to :menuselection:`Payment Acquirers --> Stripe --> Configuration` and add the desired payment methods in
the **Supported Payment Icons** field. If the desired payment method is already listed, you don't have anything to do.
.. image:: media/stripe_enable_local_payment_method.png
:align: center
:alt: Select and add icons of the payment methods you want to enable
:alt: Select and add icons of payment methods you want to enable
.. seealso::
- :doc:`../payment_acquirers`
.. note::
If a payment method icon doesn't exist at all in the database, the corresponding local payment method is always offered
to customers.

View File

@@ -2,38 +2,41 @@
How to get paid with wire transfers
=======================================
**Wire Transfer** is the default payment method available. The aim is providing your customers with
your bank details so they can pay on their own. This is very easy to start with but slow and
inefficient process-wise. Opt for payment acquirers as soon as you can!
**Wire Transfer** is the default payment method available.
The aim is providing your customers with your bank details
so they can pay on their own.
This is very easy to start with but slow and inefficient process-wise.
Opt for payment acquirers as soon as you can!
How to provide customers with payment instructions
==================================================
Put your payment instructions in the **Thanks Message** of your payment method.
.. image:: media/payment_instructions.png
:align: center
:align: center
They will appear to the customers when they place an order.
.. image:: media/payment_customer_instructions.png
:align: center
:align: center
How to manage an order once you get paid
========================================
Whenever a customer pays by wire transfer, the order stays in an intermediary stage **Quotation
Sent** (i.e. unpaid order). When you get paid, you confirm the order manually to launch the
delivery.
Whenever a customer pays by wire transfer, the order stays in an
intermediary stage **Quotation Sent** (i.e. unpaid order).
When you get paid,
you confirm the order manually to launch the delivery.
How to create other manual payment methods
==========================================
If you manage a B2B business, you can create other manually-processed payment methods like paying by
check. To do so, just rename *Wire Transfer* or duplicate it.
If you manage a B2B business, you can create other manually-processed
payment methods like paying by check.
To do so, just rename *Wire Transfer* or duplicate it.
.. image:: media/payment_check.png
:align: center
.. seealso::
- :doc:`../payment_acquirers`
:align: center

View File

@@ -9,5 +9,4 @@ Productivity
productivity/discuss
productivity/iot
productivity/mail_plugins
productivity/studio

View File

@@ -1,54 +0,0 @@
:show-content:
============
Mail Plugins
============
.. toctree::
:titlesonly:
mail_plugins/outlook
mail_plugins/gmail
Mail Plugins are connectors that bridge your mailbox with your Odoo database. With them, you can
interact with your Odoo database directly from your mailbox by:
- Creating leads and centralizing prospects' emails into the CRM app.
- Generating tasks in any Odoo project.
- Creating tickets in the Helpdesk app.
- Searching and storing insights on your contacts.
.. _mail_plugins/pricing:
Pricing
=======
Mail Plugins are **free** to install and use.
However, they can provide **Lead Enrichment**, which is part of a paid service known as **Lead
Generation**.
Mail plugins allow you to test Lead Enrichment for free, whether you connect the plugins to a
database or not. After a while, the plugins ask you to buy :doc:`../general/in_app_purchase`
credits if you would like to keep using this service.
.. _mail_plugins/lead-generation:
Lead Generation IAP service
---------------------------
Lead Enrichment uses the *Lead Generation IAP service*. Each request consumes one *Lead Generation
credit*.
To buy credits, go to :menuselection:`Settings --> CRM --> Lead Enrichment --> Buy credits` and
select a package.
.. note::
- If you are out of credits, the only information populated when clicking on the suggested
company is its website link and logo.
- Check out the `Lead Generation IAP service Privacy Policy
<https://iap.odoo.com/privacy#header_3>`_.
.. seealso::
- :doc:`../general/in_app_purchase`
- `Odoo Tutorials: Lead Enrichment <https://www.odoo.com/r/p73>`_

View File

@@ -1,95 +0,0 @@
============
Gmail Plugin
============
Configuration
=============
The Odoo-Gmail :doc:`Mail Plugin <../mail_plugins>` needs to be configured both on Odoo and Gmail.
.. _mail-plugin/gmail/enable-mail-plugin:
Enable Mail Plugin
------------------
First, you need to enable the *Mail Plugin* feature in your database. Go to :menuselection:`Settings
--> General Settings --> Integrations`, enable *Mail Plugin*, and *Save* the configuration.
.. _mail-plugin/gmail/install-plugin:
Install the Odoo-Gmail Plugin
-----------------------------
#. Open the `Gmail Plugin Apps Script project
<https://script.google.com/d/1n7cxtaR4fGXKcP0RwinNQmL8S4FhVqpo-ZZ_cUAhYuuDpZAP_CnHE_7q/edit>`_.
#. Verify you are logged in using the Google account you want to install the plugin on.
#. Click on *Publish* then *Deploy from manifest...*
.. image:: gmail/deploy-from-manifest.png
:align: center
:alt: Deploying from manifest the Gmail Plugin from the Apps Script project
.. important::
Make sure you are using the legacy editor, otherwise the *Deploy from manifest* functionality
may not be available.
.. image:: gmail/legacy-editor.png
:align: center
:alt: Using the legacy editor in the Gmail Plugin Apps Script project
#. Click on *Install add-on*. A "Deployment installed" notification should appear. You can then
click on *Close*.
.. image:: gmail/install-add-on.png
:align: center
:alt: Installing the Gmail Plugin from the Apps Script project
.. _mail-plugin/gmail/configure-mailbox:
Configure your Gmail mailbox
----------------------------
#. Open any email in your Gmail mailbox. On the right-side panel, click on the Odoo icon and then
*Authorize Access*.
.. image:: gmail/authorize-access.png
:align: center
:alt: Authorizing access to the Gmail Plugin
#. Choose the right Google account.
.. image:: gmail/choose-account.png
:align: center
:alt: Choosing your Google account
#. Allow the Gmail Plugin to access some of your data.
.. image:: gmail/allow-permissions.png
:align: center
:alt: Allowing the Gmail Plugin to access Google data
#. The right-side panel can now display **Company Insights**. At the bottom, click on *Login*.
.. image:: gmail/panel-login.png
:align: center
:alt: Logging in your Odoo database
.. note::
Only a limited amount of *Company Insights* (*Lead Enrichment*) requests are available as a
trial. This feature requires :ref:`prepaid credits <mail_plugins/pricing>`.
#. Enter your Odoo database URL and click on *Login*.
.. image:: gmail/database-url.png
:align: center
:alt: Entering your Odoo database URL
#. If you aren't logged into your database, enter your credentials.
#. Click on *Allow* to let the Odoo-Gmail Plugin connect to your database.
.. image:: gmail/odoo-permission.png
:align: center
:alt: Allowing the Gmail Plugin to connect to a database

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

View File

@@ -1,123 +0,0 @@
==============
Outlook Plugin
==============
Configuration
=============
The Odoo-Outlook :doc:`Mail Plugin <../mail_plugins>` needs to be configured both on Odoo and
Outlook.
.. _mail-plugin/outlook/enable-mail-plugin:
Enable Mail Plugin
------------------
First, you need to enable the *Mail Plugin* feature in your database. Go to :menuselection:`Settings
--> General Settings --> Integrations`, enable *Mail Plugin*, and *Save* the configuration.
.. _mail-plugin/outlook/install-plugin:
Install the Outlook Plugin
--------------------------
#. Open your Outlook mailbox and select any email.
#. Click on the *More actions* button and select *Get Add-ins*.
.. image:: outlook/more-actions.png
:align: center
:alt: More actions button in Outlook
#. Select the *My add-ins* tab.
.. image:: outlook/my-add-ins.png
:align: center
:alt: My add-ins in Outlook
#. Under *Custom add-ins*, click on *+ Add a custom add-in*, and then on *Add from URL...*
.. image:: outlook/custom-add-ins.png
:align: center
:alt: Custom add-ins in Outlook
#. Enter the following URL `https://download.odoo.com/plugins/outlook/manifest.xml` and press
*OK*.
.. image:: outlook/enter-add-in-url.png
:align: center
:alt: Entering the add-in URL in Outlook
#. Read the warning and click on *Install*.
.. image:: outlook/add-in-warning.png
:align: center
:alt: Custom add-in installation warning in Outlook
.. _mail-plugin/outlook/connect-database:
Connect your database
---------------------
#. Open any email in your Outlook mailbox, click on the *More actions* button, and select *Odoo for
Outlook*.
.. image:: outlook/odoo-for-outlook.png
:align: center
:alt: Odoo for Outlook add-in button
#. The right-side panel can now display **Company Insights**. At the bottom, click on *Login*.
.. image:: outlook/panel-login.png
:align: center
:alt: Logging in your Odoo database
.. note::
Only a limited amount of *Company Insights* (*Lead Enrichment*) requests are available as a
trial. This feature requires :ref:`prepaid credits <mail_plugins/pricing>`.
#. Enter your Odoo database URL and click on *Login*.
.. image:: outlook/enter-database-url.png
:align: center
:alt: Entering your Odoo database URL
#. Click on *Allow* to open the pop-up window.
.. image:: outlook/new-window-warning.png
:align: center
:alt: New window pop-up warning
#. If you aren't logged into your database, enter your credentials.
#. Click on *Allow* to let the Outlook Plugin connect to your database.
.. image:: outlook/odoo-permission.png
:align: center
:alt: Allowing the Outlook Plugin to connect to a database
.. _mail-plugin/outlook/add-shortcut:
Add a shortcut to the plugin
----------------------------
By default, the Outlook Plugin can be opened from the *More actions* menu. However, to save
time, it's possible to add it next to the other default actions.
#. In your Outlook mailbox, click on *Settings*, then on *View all Outlook settings*.
.. image:: outlook/all-outlook-settings.png
:align: center
:alt: Viewing all Outlook settings
#. Select *Customize actions* under *Mail*, click on *Odoo for Outlook*, and then *Save*.
.. image:: outlook/customize-actions.png
:align: center
:alt: Odoo for Outlook customized action
#. Open any email and the shortcut should be displayed.
.. image:: outlook/odoo-outlook-shortcut.png
:align: center
:alt: Odoo for Outlook customized action

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

View File

@@ -8,4 +8,5 @@ Optimize your Day-to-Day work
:titlesonly:
optimize/partner_autocomplete
optimize/outlook_extension
optimize/gamification

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

@@ -0,0 +1,175 @@
=================
Outlook Extension
=================
The **Odoo CRM Extension** is a connector that bridges your Outlook mailbox with your Odoo database.
This extension allows you to:
- Create leads from emails sent to your mailbox.
- Centralize Prospects' emails into a CRM.
- Search and store insights on your contacts.
.. image:: media/outlook-extension-overview.png
:align: center
:alt: Overview of the Outlook Extension in Outlook
.. note::
This extension is compatible with the Web version of Outlook as well as the desktop apps.
.. important::
The Outlook Extension uses *Partner Autocomplete IAP credits* to search and store insights on
your contacts. See the :ref:`Pricing section <outlook_extension/pricing>` below for more
information.
.. _outlook_extension/configuration:
Configuration
=============
The Outlook Extension requires to be configured both in Odoo and in Outlook.
.. _outlook_extension/enable-feature:
Enable the feature on your database
-----------------------------------
To enable this feature on your Odoo database, go to :menuselection:`CRM --> Configuration --> Lead
Generation`, enable **Outlook CRM Extension**, and click on *Save*.
.. _outlook_extension/add-in-installation:
Install the add-in on Outlook
-----------------------------
You can install the Outlook Extension as a **Custom Add-in**. To do so, follow these steps:
.. important::
| URL of the **Odoo for Outlook** add-in's manifest file:
| ``https://download.odoo.com/plugins/outlook/manifest.xml``
.. todo:: add copy button when the feature is added to the doc
#. Connect to your Outlook mailbox, open any email, and click on the *More actions* button,
displayed as three little dots.
.. image:: media/outlook-extension-more-actions.png
:align: center
:alt: The button "More actions" in Outlook
#. Click on *Get add-ins*.
.. image:: media/outlook-extension-get-add-ins.png
:align: center
:alt: List of actions in Outlook, including the installation of new add-ins
#. In the new window, select the tab named *My add-ins*, click on *+ Add a custom add-in*, and then
on *Add from URL...*
.. image:: media/outlook-extension-custom-add-ins.png
:align: center
:alt: Installation of a custom add-in in Outlook
#. | Outlook prompts you to **enter the URL of the add-in's manifest file**. To do so, copy the
following URL, paste it in the box, and click on *OK*.
| ``https://download.odoo.com/plugins/outlook/manifest.xml``
.. image:: media/outlook-extension-add-in-url.png
:align: center
:alt: Getting a custom add-in in Outlook by providing the manifest file's URL
#. Outlook warns you that Microsoft hasnt verified the add-in. Click on *Install* to complete the
installation.
.. note::
The *Odoo for Outlook* add-in is not listed yet on Outlook's add-ins list. This is why it is
currently necessary to install it as a *custom add-in*.
.. _outlook_extension/connection:
Add a shortcut to open the extension
------------------------------------
By default, you can open the **Odoo for Outlook** extension from the *More actions* menu. This
section explains how to move the launcher next to the other default actions.
.. image:: media/outlook-extension-default-actions.png
:align: center
:alt: Odoo for Outlook extension as a default action in the mailbox
#. In your Outlook mailbox, click on *Settings*, then on *View all Outlook settings*.
#. Go to :menuselection:`Settings --> Mail --> Customize actions --> Message surface`, select
*Odoo for Outlook*, and click on *Save*.
.. image:: media/outlook-extension-customize-actions.png
:align: center
:alt: add Odoo for Outlook extension as a default action in the message surface
Connect to your database
------------------------
#. Open **Odoo for Outlook** from any email. This opens the extension as a panel on the right side of
your screen.
#. Click on *login* at the bottom of the extension.
#. Insert your database's URL then click on *Login*.
.. image:: media/outlook-extension-database-url.png
:align: center
:alt: Connection to an Odoo database from the Outlook extension
#. Log into your database by entering your credentials. Skip this step if you are already logged in
with this browser.
#. A message asks you if you want to let Outlook access your Odoo database. Click on *Allow* to
complete the connection.
.. important::
Make sure first to :ref:`enable the feature on your database
<outlook_extension/enable-feature>`. Failing to do so would result in an *error 404 message*.
.. note::
The extension displays some information, even if you do not connect it to any Odoo database.
Note that only a limited amount of contact enrichment requests are available as a trial, as this
feature requires prepaid credits. See the :ref:`Pricing section <outlook_extension/pricing>`
below for more information.
.. _outlook_extension/pricing:
Pricing
=======
The extension is **free** and doesn't require any purchase to be installed and used.
However, this extension provides you with *Lead Enrichment* in the **Company Insights** section.
This service is part of a paid service known as **Lead Generation**.
The extension allows you to test this service for free, whether you connect the extension to a
database or not. After a while, the extension asks you to buy credits to keep using this additional
service.
.. image:: media/outlook-extension-credits-message.png
:align: center
:alt: "Could not auto-complete the company: not enough credits!" warning message in the Outlook
extension
.. tip::
You can buy more *Lead Generation* credits to keep using this service or disregard this message
and keep using the extension for free without *Lead Enrichment*.
In-App Purchase
---------------
| *Lead Generation* is an *In-App Purchase (IAP)* service, which requires prepaid credits to be
used. Each request consumes one credit.
| To buy credits, go to :menuselection:`Settings --> Contacts --> Partner Autocomplete or Odoo IAP -->
View My Services` and select a package.
.. note::
- If you run out of credits, the only information populated when clicking on the suggested
company is the website link and logo.
- If you are on Odoo Online (SAAS) and have the Enterprise version, you benefit from free
trial credits to test the feature.
- Learn about our *Privacy Policy* `here <https://iap.odoo.com/privacy#header_2>`_.
.. seealso::
- :doc:`../../../general/in_app_purchase`
- `Odoo Tutorials: Lead Enrichment <https://www.odoo.com/r/p73>`_

View File

@@ -9,4 +9,3 @@ Overview
overview/getting_started
overview/register
overview/https

View File

@@ -1,30 +0,0 @@
===========
Using HTTPS
===========
By default, POS loading is done in HTTP
if "direct devices" are selected. (ePos printer or six terminal)
Create a system key to force the POS in HTTPS
=============================================
Load you domain in debug mode to allow you to edit system parameter
Please refer to the :doc:`Developer Mode </applications/general/developer_mode>`.
To add a key for the system, go to :menuselection:`Settings --> Technical --> Parameters --> System Parameters`
.. image:: media/https01.png
:align: center
Create a new key:
**Key**: ``point_of_sale.enforce_https``
**Value**: ``True``
and save it.
.. image:: media/https02.png
:align: center
Now your POS will be loaded in HTTPS.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -70,8 +70,12 @@ Use the GitHub interface
#. Verify that you are browsing the documentation in the version that you intend to change. The
version can be selected from the dropdown in the top menu.
.. image:: documentation/version-selector.png
#. Head over to the page that you want to change and click on the **Edit on GitHub** button in the
top right corner of the page.
bottom of the left menu.
.. image:: documentation/edit-on-github.png
#. If you do not have edit rights on the repository (`odoo/documentation
<https://github.com/odoo/documentation>`_), you need to fork it by clicking on the appropriate

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -653,7 +653,7 @@ Database Population
.. program:: odoo-bin populate
Odoo CLI supports database population features. If the feature is
:ref:`implemented on a given model <reference/testing/populate/methods>`, it allows automatic data
:ref:`implemented on a given model <reference/performances/populate/methods>`, it allows automatic data
generation of the model's records to test your modules in databases containing non-trivial amounts of records.
.. code-block:: console
@@ -672,7 +672,7 @@ generation of the model's records to test your modules in databases containing n
.. seealso::
:ref:`reference/testing/populate`
:ref:`reference/performances/populate`
Cloc

View File

@@ -14,6 +14,7 @@ Server Addons
addons/module
addons/reports
addons/security
addons/performances
addons/testing
addons/http
addons/mixins

View File

@@ -0,0 +1,264 @@
.. _reference/performances:
============
Performances
============
How to make a piece of code with some behavior run as fast as possible? This page will hopefully give some tips and tools to achieve this goal.
Good practices
==============
Batch operation when you can
----------------------------
When working with record set, its is always better to do operations in batch.
A typical mistake is execute sql in a loop (with a search for example)
.. code-block:: python
# DON'T
def _compute_count(self):
for record in self:
domain = [('related_id', '=', record.id)]
record.count = other_model.search_count(domain)
This will perform an sql query for each record. In this kind of example, we can replace search_count
with a read_group
.. code-block:: python
# DO
def _compute_calendar_event_count(self):
if self.ids:
domain = [('related_id', 'in', self.ids)]
counts_data = other_model.read_group(domain, ['related_id'], ['related_id'])
mapped_data = {
count['opportunity_id'][0]: count['opportunity_id_count'] for count in counts_data
}
else:
mapped_data = {}
for record in self:
record.count = mapped_data.get(record.id, 0)
Trying to group sql queries will avoid the added cost of contacting the database and help postgresql
to optimise the query plan when possible.
Another example is the record creation.
The orm offers the possibility to create record in batch. Since version 13.0 this has no impact in most cases but creating record in batch and keeping create override compatible
api.model_create_multi will help orm to optimize field computation, and give opportunity to optimise create overrides in some cases.
.. code-block:: python
create_values = []
for name in ['foo', 'bar']:
create_values.append({'name': name})
records = model.create(create_values)
Another possible issue is to miss the possible batch prefetching when reading on a single browsed record inside a loop.
.. code-block:: python
# DON'T
for record_id in record_ids:
model.browse(record_id)
record.foo # this will trigger one query per record_id
.. code-block:: python
# DO
records = model.browse(record_ids)
for record in records:
record.foo # this will trigger one query for all record_ids
In this last example the prefetch_ids of the recordset will indicate that each record_id is part of record_ids, and thus they will be managed togethers. When reading the first record, the orm will prefetch all record at once.
In the rare cases where browsing all records together is unpractical, the with_prefetch metod can help to achieve the same goal.
.. code-block:: python
for values in values_list:
message = self.browse(values['id']).with_prefetch(self.ids)
Algorithmic complexity (basics)
--------------------------------------
Algorithmic complexity is a measure of how long an algorithm would take to complete given an input of size n
In some cases the straightforward algorithm will imply two nested loops. It can be justified in some cases but it should be thought twice. In some cases it can be avoided by preparing data the right way.
.. code-block:: python
# DON'T
for record in self:
for result in results:
if results['id'] == record.id:
record.foo = results['foo']
break
else:
record.foo = 0 # default value
This simple (an naive) example is # O(n²) and can be simply optimized by preparing data in a dict.
Assuming that all result have a different id:
.. code-block:: python
# DO
mapped_result = {result['id']: result for result in results}
for record in self:
record.foo = results.get(record.id)['foo']
This kind of changes is not always as obvious as this one, it sometimes needs so thought. Don't hesitate to ask your colleague if you are not sure about your algorithm.
Correct usage of data structures is important too. In the last example using a dict will allow accessing an element in O(1), but sometime quadratic complexity can be hidden.
.. code-block:: python
# DON'T
invalid_ids = self.search(domain).ids
for record in self:
if record.id in invalid_ids:
...
If invalid_ids is a list like the result of a search, the complexity may be quadratic. In this cases
we will prefer set operations, like casting invalid_ids in a set.
Depending on your input, you can either cast the list into a set outside of the loop, or prefer recordset operations.
.. code-block:: python
# DO
invalid_ids = self.search(domain)
for record in self - invalid_ids:
...
or
.. code-block:: python
# DO
invalid_ids = set(invalid_ids)
for record in self:
if record.id in invalid_ids:
...
Index critical column
---------------------
If your code perform search on some criteria or if the user will need to search on a field, it may
be a good idea to index the column.
.. code-block:: python
name = fields.Char(string="Name", index=True)
But be careful to not index everything, index consume space and have performances drawback on INSERT, UPDATE and DELETE.
.. _reference/performances/profiling:
Profiling
=========
The first step when trying to optimize some flow is to understand where the code spends time.
Odoo provides integrated profiling tools, allowing to save all executed queries and/or stack_traces during execution.
Profiling tools can either be used to profile all request made to the server for a specific user session, or be used manually by a developer to profile some part of the code.
In both cases, different collectors are available. A collector is specialized to collect some piece of information in a standard format. (sql, thought, ...)
Even if the profiling tools are think to be as light as possible, they still can have impact on performance and must be used wisely, and result must me interpreted carefully.
Profiling requests from the user interface
------------------------------------------
This is the easier way to profile in odoo but is only focus on web flows since only requests can be profiled this way.
The first thing to know is that enabling profiling on a request may impact server load since each request will have extra work processing.
.. todo: runbot stats
.. _reference/performances/populate:
Database population
===================
Odoo CLI offers a :ref:`database population<reference/cmdline/populate>` feature.
.. code-block:: console
odoo-bin populate
Instead of the tedious manual, or programmatic, specification of test data,
one can use this feature to fill a database on demand with the desired number of test data.
This can be used to detect diverse bugs or performance issues in tested flows.
.. _reference/performances/populate/methods:
To specify this feature for a given model, the following methods and attributes can be defined.
.. currentmodule:: odoo.models
.. autoattribute:: Model._populate_sizes
.. autoattribute:: Model._populate_dependencies
.. automethod:: Model._populate
.. automethod:: Model._populate_factories
.. note::
You have to define at least :meth:`~odoo.models.Model._populate` or :meth:`~odoo.models.Model._populate_factories`
on the model to enable database population.
Example model
-------------
.. code-block:: python
from odoo.tools import populate
class CustomModel(models.Model)
_inherit = "custom.some_model"
_populate_sizes = {"small": 100, "medium": 2000, "large": 10000}
_populate_dependencies = ["custom.some_other_model"]
def _populate_factories(self):
# Record ids of previously populated models are accessible in the registry
some_other_ids = self.env.registry.populated_models["custom.some_other_model"]
def get_some_field(values=None, random=None, **kwargs):
""" Choose a value for some_field depending on other fields values.
:param dict values:
:param random: seeded :class:`random.Random` object
"""
field_1 = values['field_1']
if field_1 in [value2, value3]:
return random.choice(some_field_values)
return False
return [
("field_1", populate.randomize([value1, value2, value3])),
("field_2", populate.randomize([value_a, value_b], [0.5, 0.5])),
("some_other_id", populate.randomize(some_other_ids)),
("some_field", populate.compute(get_some_field, seed="some_field")),
('active', populate.cartesian([True, False])),
]
def _populate(self, size):
records = super()._populate(size)
# If you want to update the generated records
# E.g setting the parent-child relationships
records.do_something()
return records
Population tools
----------------
Multiple population tools are available to easily create
the needed data generators.
.. automodule:: odoo.tools.populate
:members: cartesian, compute, constant, iterate, randint, randomize

View File

@@ -544,90 +544,6 @@ you can use the :meth:`~odoo.tests.common.BaseCase.assertQueryCount` method, int
with self.assertQueryCount(11):
do_something()
.. _reference/testing/populate:
Database population
-------------------
Odoo CLI offers a :ref:`database population<reference/cmdline/populate>` feature.
.. code-block:: console
odoo-bin populate
Instead of the tedious manual, or programmatic, specification of test data,
one can use this feature to fill a database on demand with the desired number of test data.
This can be used to detect diverse bugs or performance issues in tested flows.
.. _reference/testing/populate/methods:
To specify this feature for a given model, the following methods and attributes can be defined.
.. currentmodule:: odoo.models
.. autoattribute:: Model._populate_sizes
.. autoattribute:: Model._populate_dependencies
.. automethod:: Model._populate
.. automethod:: Model._populate_factories
.. note::
You have to define at least :meth:`~odoo.models.Model._populate` or :meth:`~odoo.models.Model._populate_factories`
on the model to enable database population.
Example model
^^^^^^^^^^^^^
.. code-block:: python
from odoo.tools import populate
class CustomModel(models.Model)
_inherit = "custom.some_model"
_populate_sizes = {"small": 100, "medium": 2000, "large": 10000}
_populate_dependencies = ["custom.some_other_model"]
def _populate_factories(self):
# Record ids of previously populated models are accessible in the registry
some_other_ids = self.env.registry.populated_models["custom.some_other_model"]
def get_some_field(values=None, random=None, **kwargs):
""" Choose a value for some_field depending on other fields values.
:param dict values:
:param random: seeded :class:`random.Random` object
"""
field_1 = values['field_1']
if field_1 in [value2, value3]:
return random.choice(some_field_values)
return False
return [
("field_1", populate.randomize([value1, value2, value3])),
("field_2", populate.randomize([value_a, value_b], [0.5, 0.5])),
("some_other_id", populate.randomize(some_other_ids)),
("some_field", populate.compute(get_some_field, seed="some_field")),
('active', populate.cartesian([True, False])),
]
def _populate(self, size):
records = super()._populate(size)
# If you want to update the generated records
# E.g setting the parent-child relationships
records.do_something()
return records
Population tools
^^^^^^^^^^^^^^^^
Multiple population tools are available to easily create
the needed data generators.
.. automodule:: odoo.tools.populate
:members: cartesian, compute, constant, iterate, randint, randomize
.. _qunit: https://qunitjs.com/
.. _qunit_config.js: https://github.com/odoo/odoo/blob/51ee0c3cb59810449a60dae0b086b49b1ed6f946/addons/web/static/tests/helpers/qunit_config.js#L49
.. _web.tests_assets: https://github.com/odoo/odoo/blob/51ee0c3cb59810449a60dae0b086b49b1ed6f946/addons/web/views/webclient_templates.xml#L594

View File

@@ -6087,7 +6087,7 @@ msgid "Database Population"
msgstr ""
#: ../../content/developer/reference/cmdline.rst:567
msgid "Odoo CLI supports database population features. If the feature is :ref:`implemented on a given model <reference/testing/populate/methods>`, it allows automatic data generation of the model's records to test your modules in databases containing non-trivial amounts of records."
msgid "Odoo CLI supports database population features. If the feature is :ref:`implemented on a given model <reference/performances/populate/methods>`, it allows automatic data generation of the model's records to test your modules in databases containing non-trivial amounts of records."
msgstr ""
#: ../../content/developer/reference/cmdline.rst:577
@@ -6099,7 +6099,7 @@ msgid "population size, the actual records number depends on the model's `_popul
msgstr ""
#: ../../content/developer/reference/cmdline.rst:587
msgid ":ref:`reference/testing/populate`"
msgid ":ref:`reference/performances/populate`"
msgstr ""
#: ../../content/developer/reference/cmdline.rst:591

View File

@@ -280,5 +280,3 @@ purchase/replenishment/flows/setup_stock_rule.rst applications/inventory_and_mrp
purchase/replenishment/multicompany/setup.rst applications/general/multi_companies/manage_multi_companies.rst # (#814)
# Redirections introduced in 15.0 :
sales/crm/optimize/outlook_extension.rst productivity/mail_plugins/outlook.rst