Compare commits
18 Commits
master-mas
...
master-pat
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
c88784f516 |
adding ACL clarification for the readers.
X-original-commit:
|
||
|
|
768ab1b586 |
[IMP] email_communication: can't use Odoo STMP with another mail server
Customer may want to use their own SMTP for email marketing, and Odoo default SMTP for everything else. There is no good way to do this. Previously we suggested adding Odoo SMTP as an outgoing email server but we don't want to share credentials anymore.
R&D is working on a solution (e.g. showing the Odoo default email server in the list rather than keeping it as an "hidden feature") but for the time being, if you use an outgoing email server, you give up using the Odoo default SMTP.
closes odoo/documentation#2771
X-original-commit:
|
||
|
|
7424e4176c |
[IMP] website: register domain name menu path
closes odoo/documentation#2766
X-original-commit:
|
||
|
|
8287c88bd4 |
[IMP] MRP: updated Variants BOM Management rst content
closes odoo/documentation#2764
X-original-commit:
|
||
|
|
53e7277b6a |
[FIX]: fix odoo_version detection
Right now if the version is not "final (and not alpha)"
documentation will say 16.0beta != 16.0
closes odoo/documentation#2748
X-original-commit:
|
||
|
|
2c7d61f938 |
[FIX] accounting: grammar fix in ponto
closes odoo/documentation#2759
X-original-commit:
|
||
|
|
cdb71bb807 |
[IMP] accounting: update + merge of multiple multi-currency pages
task id: 2942040
closes odoo/documentation#2744
X-original-commit:
|
||
|
|
455f4a9359 |
[FIX] sales/crm: fix menu path and RST formatting
Cherry-pick of #2652:
>To view the Sales Team dashboard, go to `:menuselection:CRM --> Sales --> Teams.`
closes odoo/documentation#2739
X-original-commit:
|
||
|
|
fa5dcc6940 |
[ADD] Sales: adding doc about variants in orders
closes odoo/documentation#2735
Task: 2574874
X-original-commit:
|
||
|
|
33196968df |
[IMP] developer/howtos/rdtraining: Add missing information about module category.
Adds explanations and directive for module category creation, so it can be used correctly at res.groups creation.
closes odoo/documentation#2729
X-original-commit:
|
||
|
|
8e4dedc9a1 |
[ADD] web_gantt: add pill_label attribute in gantt_view
task-2672783 closes odoo/documentation#2649 Related: odoo/enterprise#28372 Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com> |
||
|
|
c260ecd39d |
[FW][IMP] developer/backend: correct filters attribute for calendar view fields
closes odoo/documentation#2724 Forward-port-of: odoo/documentation#2692 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com> |
||
|
|
10eee0fe7c |
[IMP] razorpay: warning for void not working
Fix payment flow + add information about the void not supported closes odoo/documentation#2663 Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com> |
||
|
|
b2b6ec698a |
[IMP] developer/api/external_api: XML-RPC in PHP8
Starting PHP8, the XML-RPC extension is not available by default
anymore and must be installed separately.
closes odoo/documentation#2719
Task: 2613818
X-original-commit:
|
||
|
|
0e6a41d6d5 |
[IMP] content/developer/webservices
It is hard to find and learn about RPC in Odoo, users hardly know about
JSON-RPC as the only place where we talk about it in deep down in the
*How to make a Module* tutorial.
In the commit, we isolated the tutorial about RPC in a dedicated file,
that file is better referenced thanks to cross-references in some others
places that are talking about RPC
Task: 2884559
X-original-commit:
|
||
|
|
db65871c39 |
[ADD] accounting: data inalterability check report
Task ID: 2977343
closes odoo/documentation#2716
X-original-commit:
|
||
|
|
ae172a8520 |
[IMP] Sales: updating product variants overview and config
closes odoo/documentation#2711
Task: 2055940
X-original-commit:
|
||
|
|
8f4c884f5f |
[IMP] mail: add documentation about the SSL SMTP authentication
Purpose
=======
Add the documentation about the SSL SMTP authentication
(2 new binary arguments) and also about the new from
filter binary argument.
The goal of those new arguments is to improve the score
of the emails sent by Odoo.
Task 2367946
See odoo/odoo/pull/61853
See odoo/upgrade/pull/1903
closes odoo/documentation#2706
X-original-commit:
|
2
conf.py
|
|
@@ -95,7 +95,7 @@ else:
|
|||
import odoo.addons
|
||||
odoo.addons.__path__.append(str(odoo_dir) + '/addons')
|
||||
from odoo import release as odoo_release # Don't collide with Sphinx's 'release' config option
|
||||
odoo_version = odoo_release.version.replace('~', '-') # Change saas~XX.Y to saas-XX.Y
|
||||
odoo_version = '.'.join(str(s) for s in odoo_release.version_info[:2]).replace('~', '-') # Change saas~XX.Y to saas-XX.Y
|
||||
odoo_version = 'master' if 'alpha' in odoo_release.version else odoo_version
|
||||
if release != odoo_version:
|
||||
_logger.warning(
|
||||
|
|
|
|||
|
|
@@ -62,11 +62,11 @@ database manager.
|
|||
- This offer doesn't include any mailbox. However, you can :ref:`configure your MX records
|
||||
<domain-name/odoo-manage>` to use your own email server or solution such as Google Workspace.
|
||||
|
||||
To do so, go to :menuselection:`Website --> Go to website --> Promote --> Domain Name`.
|
||||
Alternatively, open your `database manager <https://www.odoo.com/my/databases>`_, click on the
|
||||
:guilabel:`settings` button next to your database, then on :guilabel:`Domain names`.
|
||||
To do so, go to :menuselection:`Website --> Domain Name`. Alternatively, open your `database manager
|
||||
<https://www.odoo.com/my/databases>`_, click on the :guilabel:`settings` button next to your
|
||||
database, then on :guilabel:`Domain names`.
|
||||
|
||||
.. image:: domain_names/register-promote.png
|
||||
.. image:: domain_names/register-menu.png
|
||||
:align: center
|
||||
:alt: Clicking on Domain Names from an Odoo website
|
||||
|
||||
|
|
|
|||
BIN
content/administration/maintain/domain_names/register-menu.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 38 KiB |
|
|
@@ -64,8 +64,8 @@ Link your Ponto account with your Odoo database
|
|||
#. Finish the flow.
|
||||
|
||||
.. note::
|
||||
You have to authorize all the accounts you want to access in Odoo but, Odoo will filter the
|
||||
accounts based on the institution you selected at the second step.
|
||||
You have to authorize all the accounts you want to access in Odoo, but Odoo will filter the
|
||||
accounts based on the institution you selected in the second step.
|
||||
|
||||
Update your synchronization credentials
|
||||
---------------------------------------
|
||||
|
|
|
|||
|
|
@@ -232,9 +232,8 @@ directly to its services and get the currency rate either automatically or manua
|
|||
:align: center
|
||||
:alt: Bank of Peru is displayed in Multicurrency Service option
|
||||
|
||||
Please refer to the next section in our documentation for more information about :doc:`multicurrency
|
||||
<../../others/multicurrencies/how_it_works>`.
|
||||
|
||||
Please refer to the next section in our documentation for more information about
|
||||
:doc:`multicurrencies <../../others/multi_currency>`.
|
||||
|
||||
Configure Master data
|
||||
---------------------
|
||||
|
|
|
|||
|
|
@@ -7,7 +7,7 @@ Others
|
|||
.. toctree::
|
||||
:titlesonly:
|
||||
|
||||
others/multi_currency
|
||||
others/analytic
|
||||
others/adviser
|
||||
others/multicurrencies
|
||||
others/inventory
|
||||
|
|
@@ -0,0 +1,167 @@
|
|||
=====================
|
||||
Multi-currency system
|
||||
=====================
|
||||
|
||||
Odoo allows you to issue invoices, receive bills, and record transactions in currencies other than
|
||||
the main currency configured for your company. You can also set up bank accounts in other currencies
|
||||
and run reports on your foreign currency activities.
|
||||
|
||||
.. seealso::
|
||||
- :doc:`../bank/setup/foreign_currency`
|
||||
|
||||
.. _multi-currency/config:
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
||||
.. _multi-currency/config-main-currency:
|
||||
|
||||
Main currency
|
||||
-------------
|
||||
|
||||
The **main currency** is defined by default according to the company's country. You can change it by
|
||||
going to :menuselection:`Accounting --> Configuration --> Settings --> Currencies` and changing the
|
||||
currency in the :guilabel:`Main Currency` setting.
|
||||
|
||||
.. _multi-currency/config-enable:
|
||||
|
||||
Enable foreign currencies
|
||||
-------------------------
|
||||
|
||||
Go to :menuselection:`Accounting --> Configuration --> Currencies`, and enable the currencies you
|
||||
wish to use by toggling the :guilabel:`Active` button.
|
||||
|
||||
.. image:: multi_currency/enable-foreign-currencies.png
|
||||
:align: center
|
||||
:alt: Enable the currencies you wish to use.
|
||||
|
||||
.. _multi-currency/config-rates:
|
||||
|
||||
Currency rates
|
||||
--------------
|
||||
|
||||
Manual update
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
To manually create and set a currency rate, go to :menuselection:`Accounting --> Configuration -->
|
||||
Currencies`, click on the currency you wish to change the rate of, and under the :guilabel:`Rates`
|
||||
tab, click :guilabel:`Add a line` to create a new rate.
|
||||
|
||||
.. image:: multi_currency/manual-rate-update.png
|
||||
:align: center
|
||||
:alt: Create or modify the currency rate.
|
||||
|
||||
Automatic update
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
When you activate a second currency for the first time, :guilabel:`Automatic Currency Rates` appears
|
||||
under :menuselection:`Accounting Dashboard --> Configuration --> Settings --> Currencies`. By
|
||||
default, you have to click on the **Update now** button (:guilabel:`🗘`) to update the rates.
|
||||
|
||||
Odoo can update the rates at regular intervals. To do so, change the :guilabel:`Interval` from
|
||||
:guilabel:`Manually` to :guilabel:`Daily`, :guilabel:`Weekly`, or :guilabel:`Monthly`. You can also
|
||||
select the web service from which you want to retrieve the latest currency rates by clicking on the
|
||||
:guilabel:`Service` field.
|
||||
|
||||
.. _multi-currency/config-exch-diff:
|
||||
|
||||
Exchange difference entries
|
||||
---------------------------
|
||||
|
||||
Odoo automatically records exchange differences entries on dedicated accounts, in a dedicated
|
||||
journal.
|
||||
|
||||
You can define which journal and accounts to use to **post exchange difference entries** by
|
||||
going to :menuselection:`Accounting --> Configuration --> Settings --> Default Accounts` and editing
|
||||
the :guilabel:`Journal`, :guilabel:`Gain Account`, and :guilabel:`Loss Account`.
|
||||
|
||||
.. example::
|
||||
If you receive a payment for a customer invoice one month after it was issued, the exchange rate
|
||||
has likely changed since. Therefore, this fluctuation implies some profit or loss due to the
|
||||
exchange difference, which Odoo automatically records in the default **Exchange Difference**
|
||||
journal.
|
||||
|
||||
.. _multi-currency/config-coa:
|
||||
|
||||
Chart of accounts
|
||||
-----------------
|
||||
|
||||
Each account can have a set currency. By doing so, all moves relevant to the account are forced to
|
||||
have that account's currency.
|
||||
|
||||
To do so, go to :menuselection:`Accounting --> Configuration --> Charts of Accounts` and select a
|
||||
currency in the field :guilabel:`Account Currency`. If left empty, all active currencies are handled
|
||||
instead of just one.
|
||||
|
||||
.. _multi-currency/config-journals:
|
||||
|
||||
Journals
|
||||
--------
|
||||
|
||||
If a currency is set on a **journal**, that journal only handles transactions in that currency.
|
||||
|
||||
To do so, go to :menuselection:`Accounting --> Configuration --> Journals`, open the journal you
|
||||
want to edit, and select a currency in the field :guilabel:`Currency`. If left empty, all active
|
||||
currencies are handled instead of just one.
|
||||
|
||||
.. image:: multi_currency/journal-currency.png
|
||||
:align: center
|
||||
:alt: Select the currency for the journal to handle.
|
||||
|
||||
.. _multi-currency/mca:
|
||||
|
||||
Multi-currency accounting
|
||||
=========================
|
||||
|
||||
.. _multi-currency/mca-documents:
|
||||
|
||||
Invoices, bills, and other documents
|
||||
------------------------------------
|
||||
|
||||
For all documents, you can select the currency and journal to use for the transaction.
|
||||
|
||||
.. image:: multi_currency/currency-field.png
|
||||
:align: center
|
||||
:alt: Select the currency and journal to use.
|
||||
|
||||
.. _multi-currency/mca-payment:
|
||||
|
||||
Payment registration
|
||||
--------------------
|
||||
|
||||
To register a payment in a currency other than your company's main currency, click on the
|
||||
:guilabel:`Register Payment` payment button of your document and, in the pop-up window, select a
|
||||
**currency** in the :guilabel:`Amount` field.
|
||||
|
||||
.. image:: multi_currency/register-payment.png
|
||||
:align: center
|
||||
:alt: Select the currency and journal to use before registering the payment.
|
||||
|
||||
.. _multi-currency/mca-statements:
|
||||
|
||||
Bank statements
|
||||
---------------
|
||||
|
||||
When creating or importing bank statements, the amount is in the company's main currency. To see
|
||||
additional fields related to foreign currencies, click on the **columns dropdown button**
|
||||
(:guilabel:`⋮`) next to :guilabel:`Amount`, and check :guilabel:`Amount Currency` and
|
||||
:guilabel:`Foreign Currency`.
|
||||
|
||||
.. image:: multi_currency/foreign-fields.png
|
||||
:align: center
|
||||
:alt: The extra fields related to foreign currencies.
|
||||
|
||||
When reconciling, Odoo displays both the foreign currency amount and the equivalent amount in your
|
||||
company's main currency.
|
||||
|
||||
.. _multi-currency/mca-exch-entries:
|
||||
|
||||
Exchange rate journal entries
|
||||
-----------------------------
|
||||
|
||||
To see **exchange difference journal entries**, go to :menuselection:`Accounting Dashboard -->
|
||||
Accounting --> Journals: Miscellaneous`.
|
||||
|
||||
.. image:: multi_currency/exchange-journal-currency.png
|
||||
:align: center
|
||||
:alt: Exchange rate journal entry.
|
||||
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 7.2 KiB |
|
|
@@ -1,12 +0,0 @@
|
|||
:nosearch:
|
||||
|
||||
=============
|
||||
Multicurrency
|
||||
=============
|
||||
|
||||
.. toctree::
|
||||
:titlesonly:
|
||||
|
||||
multicurrencies/how_it_works
|
||||
multicurrencies/invoices_payments
|
||||
multicurrencies/exchange
|
||||
|
|
@@ -1,112 +0,0 @@
|
|||
=================================
|
||||
Record exchange rates at payments
|
||||
=================================
|
||||
|
||||
Overview
|
||||
========
|
||||
|
||||
Any company doing international trade faces the case where the payments
|
||||
are in a different currency.
|
||||
|
||||
After receiving their payments, you have the option to convert the
|
||||
amount into your company currency. Multi currency payment implies rates
|
||||
fluctuations. The rate differences are automatically recorded by Odoo.
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
||||
Enable multi-currencies
|
||||
-----------------------
|
||||
|
||||
In the accounting module, Go to :menuselection:`Configuration --> Settings`
|
||||
and flag **Allow multi currencies**, then click on **apply**.
|
||||
|
||||
.. image:: exchange/exchange_rate03.png
|
||||
:align: center
|
||||
|
||||
Configure the currency rates in :menuselection:`Configuration --> Currencies`.
|
||||
Write down the rate and make sure the currency is active.
|
||||
|
||||
.. image:: exchange/exchange_rate02.png
|
||||
:align: center
|
||||
|
||||
In this document, the base currency is **Euro** and we will record payments
|
||||
in **Dollars**.
|
||||
|
||||
.. image:: exchange/exchange_rate08.png
|
||||
:align: center
|
||||
|
||||
.. tip::
|
||||
You can automatically fetch the currency rates from the **European
|
||||
Central Bank** or from **Yahoo**. Please read the document :
|
||||
:doc:`how_it_works`.
|
||||
|
||||
Configure your journal
|
||||
----------------------
|
||||
|
||||
In order to register payments in other currencies, you have to **remove
|
||||
the currency constraint** on the journal. Go to the accounting
|
||||
application, Click on **More** on the journal and **Settings**.
|
||||
|
||||
.. image:: exchange/exchange_rate06.png
|
||||
:align: center
|
||||
|
||||
Check if the **Currency** field is empty or in the foreign currency in which
|
||||
you will register the payments. If a currency is filled in, it means
|
||||
that you can register payments only in this currency.
|
||||
|
||||
.. image:: exchange/exchange_rate10.png
|
||||
:align: center
|
||||
|
||||
Record a payment in a different currency
|
||||
========================================
|
||||
|
||||
In the **Accounting** application, go to :menuselection:`Sales --> Payments`.
|
||||
Register the payment and indicate that it was done in the foreign currency. Then
|
||||
click on **confirm**.
|
||||
|
||||
.. image:: exchange/exchange_rate05.png
|
||||
:align: center
|
||||
|
||||
The journal entry has been posted but not allocated.
|
||||
|
||||
Go back to your invoice (:menuselection:`Sales --> Customer Invoices`) and click on
|
||||
**Add** to allocate the payment.
|
||||
|
||||
.. image:: exchange/exchange_rate04.png
|
||||
:align: center
|
||||
|
||||
Record a bank statement in a different currency
|
||||
===============================================
|
||||
|
||||
Create or import the bank statement of your payment. The **Amount** is in
|
||||
the company currency. There are two complementary fields, the **Amount currency**,
|
||||
which is the amount that was actually paid and the **Currency** in which it was paid.
|
||||
|
||||
.. image:: exchange/exchange_rate07.png
|
||||
:align: center
|
||||
|
||||
When reconciling it, Odoo will directly match the payment with the right
|
||||
**Invoice**. You will get the invoice price in the invoice currency and the
|
||||
amount in your company currency.
|
||||
|
||||
.. image:: exchange/exchange_rate09.png
|
||||
:align: center
|
||||
|
||||
Check the exchange rate differences
|
||||
===================================
|
||||
|
||||
Go to :menuselection:`Adviser --> Journal Entries` and look for the **Exchange difference**
|
||||
journal entries. All the exchange rates differences are recorded in it.
|
||||
|
||||
.. image:: exchange/exchange_rate01.png
|
||||
:align: center
|
||||
|
||||
.. tip::
|
||||
The Exchange difference journal can be changed in your accounting settings.
|
||||
|
||||
.. include:: exchange/full_reconcile_warning.rst
|
||||
|
||||
.. seealso::
|
||||
* :doc:`../../bank/reconciliation/reconciliation_models`
|
||||
* :doc:`../../bank/reconciliation/use_cases`
|
||||
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 7.4 KiB |
|
|
@@ -1,7 +0,0 @@
|
|||
.. warning::
|
||||
In order for an exchange difference entry to be created automatically, the
|
||||
corresponding invoices and payments need to be fully reconciled. This means
|
||||
the invoices are fully paid and the payments are fully spent on invoices.
|
||||
If you partially pay 3 invoices from 2 payments, and the last invoice still
|
||||
has an amount due, there will be no exchange difference entry for any of
|
||||
them until that final amount is paid.
|
||||
|
|
@@ -1,171 +0,0 @@
|
|||
============================
|
||||
Odoo's multi-currency system
|
||||
============================
|
||||
|
||||
Overview
|
||||
========
|
||||
|
||||
Choosing to use the multi-currency option in Odoo will allow you to send
|
||||
sales invoices, quotes and purchase orders or receive bills and payments
|
||||
in currencies other than your own. With multi-currency, you can also set
|
||||
up bank accounts in other currencies and run reports on your foreign
|
||||
currency activities.
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
||||
Turn on multi-currency
|
||||
----------------------
|
||||
|
||||
In the accounting module, Go to :menuselection:`Configuration --> Settings` and flag
|
||||
**Allow multi currencies**, then click on **Apply**.
|
||||
|
||||
.. image:: how_it_works/works01.png
|
||||
:align: center
|
||||
|
||||
Exchange Rate Journal
|
||||
---------------------
|
||||
|
||||
The **Rate Difference Journal** records the differences between the payment
|
||||
registration and the expected amount. For example, if a payment is paid
|
||||
1 month after the invoice was issued, the exchange rate has probably
|
||||
changed. The fluctuation implies some loss or profit that are recorded
|
||||
by Odoo.
|
||||
|
||||
You can change it in the settings:
|
||||
|
||||
.. image:: how_it_works/works02.png
|
||||
:align: center
|
||||
|
||||
View or edit rate being used
|
||||
----------------------------
|
||||
|
||||
You can manually configure the currency rates in :menuselection:`Configuration -->
|
||||
Currencies`. Open the currencies you want to use in Odoo and edit it.
|
||||
Make sure the currency is active.
|
||||
|
||||
.. image:: how_it_works/works03.png
|
||||
:align: center
|
||||
|
||||
Click on **View Rates** to edit it and to see the history :
|
||||
|
||||
.. image:: how_it_works/works04.png
|
||||
:align: center
|
||||
|
||||
Click on **Create** to add the rate. Fill in the date and the rate.
|
||||
Click on **Save** when you are done.
|
||||
|
||||
.. image:: how_it_works/works05.png
|
||||
:align: center
|
||||
|
||||
Live Currency Rate
|
||||
------------------
|
||||
|
||||
By default, the currencies need to be updated manually. But you can
|
||||
synchronize it with `Yahoo <https://finance.yahoo.com/currency-converter/>`__ or
|
||||
the `European Central Bank <http://www.ecb.europa.eu>`__. In
|
||||
:menuselection:`Configuration --> Settings`, go to the **Live Currency Rate** section.
|
||||
|
||||
Choose the interval : Manually, Daily, Weekly or Monthly. You can always
|
||||
force the update by clicking on **Update Now**. Select the provider, and you
|
||||
are set !
|
||||
|
||||
.. image:: how_it_works/works06.png
|
||||
:align: center
|
||||
|
||||
.. note::
|
||||
Only the **active** currencies are updated
|
||||
|
||||
Configure your charts of account
|
||||
--------------------------------
|
||||
|
||||
In the accounting application, go to :menuselection:`Adviser --> Charts of Accounts`.
|
||||
On each account, you can set a currency. It will force all moves for
|
||||
this account to have the account currency.
|
||||
|
||||
If you leave it empty, it means that it can handle all currencies that
|
||||
are Active.
|
||||
|
||||
.. image:: how_it_works/works07.png
|
||||
:align: center
|
||||
|
||||
Configure your journals
|
||||
-----------------------
|
||||
|
||||
In order to register payments in other currencies, you have to remove
|
||||
the currency constraint on the journal. Go to the accounting
|
||||
application, Click on **More** on the journal and **Settings**.
|
||||
|
||||
.. image:: how_it_works/works08.png
|
||||
:align: center
|
||||
|
||||
Check if the currency field is empty or in the foreign currency in which
|
||||
you will register the payments. If a currency is filled in, it means
|
||||
that you can register payments only in this currency.
|
||||
|
||||
.. image:: how_it_works/works09.png
|
||||
:align: center
|
||||
|
||||
How is Odoo's multi-currency working?
|
||||
=====================================
|
||||
|
||||
Now that you are working in a multi-currency environment, all
|
||||
accountable items will be linked to a currency, domestic or foreign.
|
||||
|
||||
Sales Orders and Invoices
|
||||
-------------------------
|
||||
|
||||
You are now able to set a different currency than the company one on
|
||||
your sale orders and on your invoices. The currency is set for the whole
|
||||
document.
|
||||
|
||||
.. image:: how_it_works/works10.png
|
||||
:align: center
|
||||
|
||||
Purchases orders and Vendor Bills
|
||||
---------------------------------
|
||||
|
||||
You are now able to set a different currency than the company one on
|
||||
your purchase orders and on your vendor bills. The currency is set for
|
||||
the whole document.
|
||||
|
||||
.. image:: how_it_works/works11.png
|
||||
:align: center
|
||||
|
||||
Payment Registrations
|
||||
---------------------
|
||||
|
||||
In the accounting application, go to :menuselection:`Sales --> Payments`. Register the payment and
|
||||
set the currency.
|
||||
|
||||
.. image:: how_it_works/works12.png
|
||||
:align: center
|
||||
|
||||
Bank Statements
|
||||
---------------
|
||||
|
||||
When creating or importing bank statements, the amount is in the company
|
||||
currency. But there are now two complementary fields, the amount that
|
||||
was actually paid and the currency in which it was paid.
|
||||
|
||||
.. image:: how_it_works/works13.png
|
||||
:align: center
|
||||
|
||||
When reconciling it, Odoo will directly match the payment with the right
|
||||
Invoice. You will get the invoice price in the invoice currency and the
|
||||
amount in your company currency.
|
||||
|
||||
Exchange Rate Journal
|
||||
---------------------
|
||||
|
||||
Go to :menuselection:`Adviser --> Journal Entries` and look for the Exchange difference
|
||||
journal entries. All the exchange rates differences are recorded in it.
|
||||
|
||||
.. image:: how_it_works/works14.png
|
||||
:align: center
|
||||
|
||||
.. include:: exchange/full_reconcile_warning.rst
|
||||
|
||||
.. seealso::
|
||||
* :doc:`invoices_payments`
|
||||
* :doc:`exchange`
|
||||
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
|
@@ -1,121 +0,0 @@
|
|||
==================================================
|
||||
Manage invoices and payment in multiple currencies
|
||||
==================================================
|
||||
|
||||
Overview
|
||||
========
|
||||
|
||||
Odoo provides multi-currency support with automatic currency gross or
|
||||
loss entry adjustment. There are a few things Odoo has been to ease the
|
||||
user's life.
|
||||
|
||||
All the account transactions will be done using the company currency.
|
||||
However you can see two extra fields with the journal entry where
|
||||
secondary currency and amount will visible. You can create
|
||||
multi-currency journals of force a specific currency.
|
||||
|
||||
When creating an invoice, the currency can be changed very easily;
|
||||
however Odoo takes the company currency as a default assignment. It will
|
||||
convert all the amounts automatically using that currency.
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
||||
Enable Multi-Currency
|
||||
---------------------
|
||||
|
||||
For information about enabling Multi-Currency, please read the document:
|
||||
:doc:`how_it_works`
|
||||
|
||||
Configure your journal
|
||||
----------------------
|
||||
|
||||
In order to register payments in other currencies, you have to remove
|
||||
the currency constraint on the journal. Go to the accounting
|
||||
application, on the journal, click on :menuselection:`More --> Settings`.
|
||||
|
||||
.. image:: invoices_payments/invoice01.png
|
||||
:align: center
|
||||
|
||||
Check if the currency field is empty or in the foreign currency in which
|
||||
you will register the payments. If a currency is filled in, it means
|
||||
that you can register payments only in this currency.
|
||||
|
||||
.. image:: invoices_payments/invoice02.png
|
||||
:align: center
|
||||
|
||||
Multi-currency invoices & Vendor Bills
|
||||
======================================
|
||||
|
||||
Now that you are working in a multi-currency environment, all
|
||||
accountable items will be linked to a currency, domestic or foreign.
|
||||
|
||||
Invoices
|
||||
--------
|
||||
|
||||
You are now able to set a different currency than the company one on
|
||||
your sale orders and on your invoices. The currency is set for the whole
|
||||
document.
|
||||
|
||||
.. image:: invoices_payments/invoice03.png
|
||||
:align: center
|
||||
|
||||
Vendor Bills
|
||||
------------
|
||||
|
||||
You are now able to set a different currency than the company one on
|
||||
your purchase orders and on your vendor bills. The currency is set for
|
||||
the whole document.
|
||||
|
||||
.. image:: invoices_payments/invoice04.png
|
||||
:align: center
|
||||
|
||||
Multi-currency Payments
|
||||
=======================
|
||||
|
||||
In the accounting application, go to :menuselection:`Sales --> Payments`. Register the
|
||||
payment and indicate that it was done in the foreign currency. Then
|
||||
click on **Confirm**.
|
||||
|
||||
.. image:: invoices_payments/invoice05.png
|
||||
:align: center
|
||||
|
||||
The journal entry has been posted but not allocated.
|
||||
|
||||
Go back to your invoice (:menuselection:`Sales --> Customer Invoices`) and click on
|
||||
**Add** to allocate the payment.
|
||||
|
||||
.. image:: invoices_payments/invoice06.png
|
||||
:align: center
|
||||
|
||||
Multi- Currency Bank Statements
|
||||
===============================
|
||||
|
||||
When creating or importing bank statements, the amount is in the company
|
||||
currency. But there are now two complementary fields, the amount that
|
||||
was actually paid and the currency in which it was paid.
|
||||
|
||||
.. image:: invoices_payments/invoice07.png
|
||||
:align: center
|
||||
|
||||
When reconciling it, Odoo will directly match the payment with the right
|
||||
invoice. You will get the invoice price in the invoice currency and the
|
||||
amount in your company currency.
|
||||
|
||||
.. image:: invoices_payments/invoice08.png
|
||||
:align: center
|
||||
|
||||
Exchange Rate Journal
|
||||
=====================
|
||||
|
||||
Go to :menuselection:`Adviser --> Journal Entries` and look for the **Exchange
|
||||
Difference** journal entries. All the exchange rates differences are recorded in it.
|
||||
|
||||
.. image:: invoices_payments/invoice09.png
|
||||
:align: center
|
||||
|
||||
.. include:: exchange/full_reconcile_warning.rst
|
||||
|
||||
.. seealso::
|
||||
* :doc:`how_it_works`
|
||||
* :doc:`exchange`
|
||||
|
Before Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
|
@@ -8,4 +8,5 @@ Overview
|
|||
:titlesonly:
|
||||
|
||||
overview/main_reports
|
||||
overview/customize
|
||||
overview/customize
|
||||
overview/data_inalterability
|
||||
|
|
@@ -0,0 +1,63 @@
|
|||
================================
|
||||
Data inalterability check report
|
||||
================================
|
||||
|
||||
Tax authorities in some countries require companies to **prove their posted accounting entries are
|
||||
inalterable**, meaning that once an entry has been posted, it can no longer be changed.
|
||||
|
||||
To do so, Odoo can use the **SHA-256 algorithm** to create a unique fingerprint for each posted
|
||||
entry. This fingerprint is called a hash. The hash is generated by taking an entry's essential data
|
||||
(the values of the `date`, `journal_id`, `company_id`, `debit`, `credit`, `account_id`, and
|
||||
`partner_id` fields), concatenating it, and inputting it to the SHA-256 hash function, which then
|
||||
outputs a fixed size (256-bit) string of characters. The hash function is deterministic (:dfn:`the
|
||||
same input always creates the same output`): any minor modification to the original data would
|
||||
completely change the resulting hash. Consequently, the SHA-256 algorithm is often used, among
|
||||
others, for data integrity verification purposes.
|
||||
|
||||
In addition, the previous entry's hash is always added to the next entry to form a **hash chain**.
|
||||
This is used to ensure a new entry is not added afterward between two posted entries, as doing so
|
||||
would break the hash chain.
|
||||
|
||||
.. note::
|
||||
Hashes generated by the SHA-256 algorithm are theoretically not unique, as there is a finite
|
||||
number of possible values. However, this number is exceptionally high: 2²⁵⁶, which is a lot
|
||||
bigger than the number of atoms in the known universe. This is why hashes are considered unique
|
||||
in practice.
|
||||
|
||||
.. _data-inalterability/lock:
|
||||
|
||||
Lock posted entries with hash
|
||||
=============================
|
||||
|
||||
To start using the hashing function, go to :menuselection:`Accounting --> Configuration > Journals`.
|
||||
Open the journal for which you want to activate the feature, go to the :guilabel:`Advanced Settings`
|
||||
tab, and enable :guilabel:`Lock Posted Entries with Hash`.
|
||||
|
||||
.. warning::
|
||||
Once you post an entry on a locked journal, you cannot disable the feature anymore, nor edit any
|
||||
posted entry.
|
||||
|
||||
.. _data-inalterability/report:
|
||||
|
||||
Report download
|
||||
===============
|
||||
|
||||
To download the data inalterability check report, go to :menuselection:`Accounting --> Configuration
|
||||
--> Settings --> Reporting` and click on :guilabel:`Download the Data Inalterability Check Report`.
|
||||
|
||||
The report's first section is an overview of all your journals and their configuration. Under the
|
||||
inalterability check column, you can see whether or not a journal's posted entries are locked with
|
||||
a hash (V) or not (X). The coverage column tells you when a journal's posted entries started being
|
||||
locked.
|
||||
|
||||
.. image:: data_inalterability/journal-overview.png
|
||||
:align: center
|
||||
:alt: Configuration report for two journals
|
||||
|
||||
The second section gives you the result of the data consistency check for each hashed journal. You
|
||||
can view the first hashed entry and its corresponding hash and the last hashed entry and its
|
||||
corresponding hash.
|
||||
|
||||
.. image:: data_inalterability/data-consistency-check.png
|
||||
:align: center
|
||||
:alt: Data consistency check report for a journal
|
||||
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
|
@@ -123,7 +123,7 @@ Online payment providers
|
|||
-
|
||||
-
|
||||
* - :doc:`Razorpay <payment_providers/razorpay>`
|
||||
- Payment from Odoo
|
||||
- Payment from the provider website
|
||||
-
|
||||
- Full only
|
||||
- Full and partial
|
||||
|
|
|
|||
|
|
@@ -36,12 +36,11 @@ Configuration on Odoo
|
|||
#. Configure the rest of the options to your liking.
|
||||
|
||||
.. important::
|
||||
- If you configure Odoo to capture amounts manually, make sure to set the
|
||||
:guilabel:`Manual Capture` to :guilabel:`manual` on Razorpay. Otherwise, the transaction
|
||||
would be blocked in the authorized state in Odoo. To do so, go to your Razorpay Dashboard and
|
||||
then to :menuselection:`Settings --> Configuration`.
|
||||
- After **five days**, if the transaction hasn't been captured yet, the customer has the right
|
||||
to **revoke** it.
|
||||
If you configure Odoo to capture amounts manually:
|
||||
|
||||
- Be aware that the **manual voiding** of a transaction is not supported by Razorpay.
|
||||
- After **five days**, if the transaction hasn't been captured yet, it'll automatically be
|
||||
**voided**.
|
||||
|
||||
.. seealso::
|
||||
- :doc:`../payment_providers`
|
||||
|
|
|
|||
|
|
@@ -1,240 +1,210 @@
|
|||
====================================================
|
||||
Send and Receive Emails in Odoo with an Email Server
|
||||
Send and receive emails in Odoo with an email server
|
||||
====================================================
|
||||
|
||||
If you are a user of Odoo Online or Odoo.sh...
|
||||
==============================================
|
||||
Odoo Online or Odoo.sh users
|
||||
============================
|
||||
|
||||
You have nothing to do! **Odoo sets up its own mail servers for your database.**
|
||||
Outgoing and incoming emails work out-of-the-box!
|
||||
|
||||
Unless you plan to send large batches of mass mailing that could require the
|
||||
use of an external mail server, simply enjoy your new Odoo database.
|
||||
Since **Odoo sets up its own mail servers for the database**, outgoing and incoming emails already
|
||||
work out-of-the-box. So for **Odoo Online** and **Odoo.sh** customers, nothing needs to be done!
|
||||
|
||||
Unless an external mail server is required to send large batches of mass mailing, simply use the
|
||||
standard online Odoo database normally since it has already been preconfigured for email.
|
||||
|
||||
Scope of this documentation
|
||||
===========================
|
||||
|
||||
This document is **mainly dedicated to Odoo on-premise users** who don't
|
||||
benefit from an out-of-the-box solution to send and receive emails in Odoo,
|
||||
unlike `Odoo Online <https://www.odoo.com/trial>`_ & `Odoo.sh <https://www.odoo.sh>`_.
|
||||
This document is **mainly dedicated to Odoo on-premise users** who don't benefit from an
|
||||
out-of-the-box solution to send and receive emails in Odoo, unlike `Odoo Online <https://www.odoo.
|
||||
com/trial>`_ and `Odoo.sh <https://www.odoo.sh>`_.
|
||||
|
||||
The following sections below contain information on how to integrate an external email server with
|
||||
Odoo.
|
||||
|
||||
.. warning::
|
||||
If no one in your company is used to manage email servers, we strongly recommend that
|
||||
you opt for those Odoo hosting solutions. Their email system
|
||||
works instantly and is monitored by professionals.
|
||||
Nevertheless you can still use your own email servers if you want
|
||||
to manage your email server's reputation yourself.
|
||||
If no one in the company is used to managing email servers, Odoo Online and Odoo.sh are strongly
|
||||
recommended. Those Odoo hosting types' email systems work instantly and are monitored by
|
||||
professionals. Nevertheless, a company can use their own email server if they want to manage the
|
||||
email server's reputation themselves.
|
||||
|
||||
You will find here some useful
|
||||
information on how to integrate your own email solution with Odoo.
|
||||
.. note::
|
||||
Office 365 email servers don't easily allow the sending of external emails from hosts like Odoo.
|
||||
Refer to `Microsoft's documentation <https://support.office.com/en-us/article/How-to-set-up-a-
|
||||
multifunction-device-or-application-to-send-email-using-Office-365-69f58e99-c550-4274-ad18-
|
||||
c805d654b4c4>`_ to make it work.
|
||||
|
||||
.. note::
|
||||
Office 365 email servers don't easily allow to send external emails from hosts like Odoo. Refer
|
||||
to `Microsoft's documentation <https://support.office.com/en-us/article/How-to-set-up-a-multifunction-device-or-application-to-send-email-using-Office-365-69f58e99-c550-4274-ad18-c805d654b4c4>`_
|
||||
to make it work.
|
||||
Manage outbound messages
|
||||
========================
|
||||
|
||||
How to manage outbound messages
|
||||
===============================
|
||||
As a system admin, go to :menuselection:`Settings --> General Settings`
|
||||
and check *External Email Servers*. Then, click *Outgoing Mail Servers* to create one and reference
|
||||
the SMTP data of your email server. Once all the information has been filled out, click on
|
||||
*Test Connection*.
|
||||
As a system admin, go to :menuselection:`Settings --> General Settings --> Discuss` in Odoo, and
|
||||
enable the :guilabel:`External Email Servers` option. Then, click :guilabel:`Save`. Next, click
|
||||
:guilabel:`Outgoing Email Servers` and click :guilabel:`Create` to create a new outgoing mail
|
||||
server record in Odoo. Reference the SMTP data of the external email server. Once all the
|
||||
information has been filled out, click :guilabel:`Test Connection`.
|
||||
|
||||
Here is a typical configuration for a G Suite server.
|
||||
|
||||
.. image:: email_servers/outgoing-server.png
|
||||
:align: center
|
||||
:align: center
|
||||
:alt: The typical G Suite configuration on Odoo.
|
||||
|
||||
Then set your email domain name in the General Settings.
|
||||
Then, go back to :menuselection:`Settings --> General Settings --> Discuss` and set the email
|
||||
domain name in the :guilabel:`Alias Domain` name. Finally, click :guilabel:`Save` to finish setting
|
||||
up the email server.
|
||||
|
||||
.. note::
|
||||
If you get a ``[AUTHENTICATIONFAILED] Invalid credentials (Failure)`` warning when you *Test
|
||||
Connection* on a Gmail address, activate the *Less secure app access* option. A direct link can
|
||||
be `accessed here <https://myaccount.google.com/lesssecureapps?pli=1>`_.
|
||||
If an `[AUTHENTICATION FAILED] Invalid credentials (Failure)` warning appears when
|
||||
:guilabel:`Test Connection` is clicked for a Gmail address, activate the :guilabel:`Less secure
|
||||
app access` option. A direct link can be `accessed here <https://myaccount.google.com/
|
||||
lesssecureapps?pli=1>`_.
|
||||
|
||||
In addition to that, enable the IMAP setting on your Gmail account.
|
||||
In addition to that, enable the :guilabel:`IMAP setting` on the Gmail account.
|
||||
|
||||
Use an Office 365 server
|
||||
------------------------
|
||||
|
||||
Can I use an Office 365 server
|
||||
------------------------------
|
||||
You can use an Office 365 server if you run Odoo on-premise.
|
||||
Office 365 SMTP relays are not compatible with Odoo Online unless you configure
|
||||
Odoo to :ref:`force the outgoing "From" address <email_communication/default_from>` .
|
||||
An Office 365 server can be used if the database's hosting type is **Odoo on-premise**. Office 365
|
||||
SMTP relays are not compatible with Odoo Online or Odoo.sh unless Odoo is configured to
|
||||
:ref:`force the outgoing "From" address <email_communication/default_from>`.
|
||||
|
||||
Please refer to `Microsoft's documentation
|
||||
<https://support.office.com/en-us/article/How-to-set-up-a-multifunction-device-or-application-to-send-email-using-Office-365-69f58e99-c550-4274-ad18-c805d654b4c4>`_
|
||||
to configure a SMTP relay for your Odoo's IP address.
|
||||
Please refer to `Microsoft's documentation <https://support.office.com/en-us/article/How-to-set-up-
|
||||
a-multifunction-device-or-application-to-send-email-using-Office-365-69f58e99-c550-4274-ad18-
|
||||
c805d654b4c4>`_ to configure an SMTP relay for the Odoo database's IP address.
|
||||
|
||||
How to use a G Suite server
|
||||
---------------------------
|
||||
You can use an G Suite server for any Odoo hosting type.
|
||||
To do so you need to setup the SMTP relay service. The configuration steps are explained in
|
||||
`Google documentation <https://support.google.com/a/answer/2956491?hl=en>`__.
|
||||
Use a G Suite server
|
||||
--------------------
|
||||
|
||||
A G Suite server can be used for any Odoo hosting type. To do so, set up the SMTP relay service.
|
||||
The configuration steps are explained in `Google documentation <https://support.google.com
|
||||
/a/answer/2956491?hl=en>`__.
|
||||
|
||||
Restriction
|
||||
-----------
|
||||
Please note that port 25 is blocked for security reasons on our SaaS and Odoo.sh platform. Try using
|
||||
465, 587, or 2525.
|
||||
|
||||
Please note that port 25 is blocked for security reasons on the SaaS and Odoo.sh platforms. Try
|
||||
using ports 465, 587, or 2525 instead.
|
||||
|
||||
.. _email_communication/default_from:
|
||||
|
||||
Use a default "From" email address
|
||||
----------------------------------
|
||||
|
||||
Sometimes, an email's "From" (outgoing) address can belong to a
|
||||
different domain, and that can be a problem.
|
||||
Sometimes, an email's "From" (outgoing) address can belong to a different domain, and that can be a
|
||||
problem.
|
||||
|
||||
For example, if a customer with address *mary@customer.example.com* responds to
|
||||
a message, Odoo will try to redistribute that same email to other subscribers
|
||||
in the thread. But if the domain *customer.example.com* forbids that kind of
|
||||
usage for security, the Odoo's redistributed email would get
|
||||
rejected by some recipients' mail servers.
|
||||
For example, if a customer with the email address *mary\@customer.example.com* responds to a
|
||||
message, Odoo will try to redistribute that same email to the other subscribers in the thread.
|
||||
However, if the domain *customer.example.com* forbids that kind of usage for security, the email
|
||||
that Odoo is trying to redistribute would get rejected by some recipients' email servers.
|
||||
|
||||
To avoid those kind of problems, you should make sure all emails use a "From"
|
||||
address from your authorized domain.
|
||||
To avoid that problem, make sure all emails use a "From" address from the same authorized domain.
|
||||
|
||||
If your MTA supports `SRS (Sender Rewriting Scheme)
|
||||
<https://en.wikipedia.org/wiki/Sender_Rewriting_Scheme>`_, you can enable it
|
||||
to handle these situations. However, that is more complex and requires more
|
||||
technical knowledge that is not meant to be covered by this documentation.
|
||||
If the MTA supports `SRS (Sender Rewriting Scheme) <https://en.wikipedia.org/wiki/Sender_Rewriting
|
||||
_Scheme>`_, SRS can be enabled to handle these situations. However, that is more complex and
|
||||
requires more technical knowledge that is not meant to be covered by this documentation.
|
||||
|
||||
Instead, you can also configure Odoo to do something similar by itself:
|
||||
Instead, Odoo can be configured to do something similar by itself:
|
||||
|
||||
#. Set your domain name in the General Settings.
|
||||
#. Set the :guilabel:`Alias Domain` name in the :menuselection:`Settings --> General Settings
|
||||
--> Discuss`.
|
||||
|
||||
.. image:: email_servers/alias-domain.png
|
||||
:align: center
|
||||
.. image:: email_servers/alias-domain.png
|
||||
:alt: Setting the domain alias configuration on Odoo.
|
||||
|
||||
#. Click on *Outgoing Mail Servers*
|
||||
#. Turn on :doc:`developer mode </applications/general/developer_mode>`.
|
||||
#. Go to :menuselection:`Settings --> Technical --> Parameters --> System Parameters`.
|
||||
#. Add one system parameter from the following list:
|
||||
|
||||
#. Create a new one.
|
||||
|
||||
#. Fill its *From Filter*.
|
||||
|
||||
.. image:: email_servers/outgoing_server_from_filter.png
|
||||
:align: center
|
||||
|
||||
* Use a domain (such as ``mycompany.example.com``) to keep the original "From"
|
||||
address for mails that come from that domain.
|
||||
|
||||
* Use an address (such as ``outgoing@mycompany.example.com``) to allow only
|
||||
that outgoing address.
|
||||
|
||||
* Keep it empty to use this server for any email address.
|
||||
|
||||
With this configuration in place, if Odoo sends an email that doesn't match any
|
||||
of the *from filters*, it will alter the email's "From" before sending it to
|
||||
the MTA.
|
||||
|
||||
It will use the default outgoing email address, composed like this:
|
||||
``{mail.default.from}@{mail.catchall.domain}``.
|
||||
|
||||
#. In developer mode, go to :menuselection:`Settings --> Technical -->
|
||||
Parameters --> System Parameters`.
|
||||
|
||||
#. Add these system parameters:
|
||||
|
||||
* ``mail.default.from``: local part of default outgoing email address.
|
||||
|
||||
* ``mail.catchall.domain``: domain part of default outgoing email address.
|
||||
* To use the same "From" address for *all* outgoing messages, use the key `mail.force.smtp.from`
|
||||
and set that address as value (such as `outgoing@mycompany.example.com`).
|
||||
* To keep the original "From" address for emails that use the same domain, but change it for
|
||||
emails that use a different domain, use the key `mail.dynamic.smtp.from` and set the value as
|
||||
the email address that should be used in those cases (such as `outgoing@mycompany.example.com`
|
||||
).
|
||||
|
||||
.. _email_communication/inbound_messages:
|
||||
|
||||
How to manage inbound messages
|
||||
==============================
|
||||
Manage inbound messages
|
||||
=======================
|
||||
|
||||
Odoo relies on generic email aliases to fetch incoming messages.
|
||||
|
||||
* **Reply messages** of messages sent from Odoo are routed to their original
|
||||
discussion thread (and to the inbox of all its followers) by the
|
||||
catchall alias (**catchall@**).
|
||||
|
||||
* **Bounced messages** are routed to **bounce@** in order to track them in Odoo.
|
||||
This is especially used in `Odoo Email Marketing <https://www.odoo.com/page/email-marketing>`__
|
||||
to opt-out invalid recipients.
|
||||
|
||||
* **Original messages**: Several business objects have their own alias to
|
||||
create new records in Odoo from incoming emails:
|
||||
* **Reply messages** of messages sent from Odoo are routed to their original discussion thread (and
|
||||
to the inbox of all its followers) by the catchall alias (**catchall@**).
|
||||
* **Bounced messages** are routed to **bounce@** in order to track them in Odoo. This is especially
|
||||
used in `Odoo Email Marketing <https://www.odoo.com/page/email-marketing>`__ to opt-out invalid
|
||||
recipients.
|
||||
* **Original messages**: Several business objects have their own alias to create new records in
|
||||
Odoo from incoming emails:
|
||||
|
||||
* Sales Channel (to create Leads or Opportunities in `Odoo CRM <https://www.odoo.com/page/crm>`__),
|
||||
|
||||
* Support Channel (to create Tickets in `Odoo Helpdesk <https://www.odoo.com/page/helpdesk>`__),
|
||||
|
||||
* Projects (to create new Tasks in `Odoo Project <https://www.odoo.com/page/project-management>`__),
|
||||
|
||||
* Job Positions (to create Applicants in `Odoo Recruitment <https://www.odoo.com/page/recruitment>`__),
|
||||
|
||||
* Projects (to create new Tasks in `Odoo Project <https://www.odoo.com/page
|
||||
/project-management>`__),
|
||||
* Job Positions (to create Applicants in `Odoo Recruitment <https://www.odoo.com/page
|
||||
/recruitment>`__),
|
||||
* etc.
|
||||
|
||||
Depending on your mail server, there might be several methods to fetch emails.
|
||||
The easiest and most recommended method is to manage one email address per Odoo
|
||||
alias in your mail server.
|
||||
Depending on the mail server, there might be several methods to fetch emails. The easiest and most
|
||||
recommended method is to manage one email address per Odoo alias in the mail server.
|
||||
|
||||
* Create the corresponding email addresses in your mail server
|
||||
(catchall@, bounce@, sales@, etc.).
|
||||
* Set your domain name in the General Settings.
|
||||
* Create the corresponding email addresses in the mail server (catchall@, bounce@, sales@, etc.).
|
||||
* Set the :guilabel:`Alias Domain` name in :menuselection:`Settings --> General Settings -->
|
||||
Discuss`.
|
||||
|
||||
.. image:: email_servers/alias-domain.png
|
||||
* If the database's hosting type is Odoo on-premise, create an :guilabel:`Incoming Mail Server` in
|
||||
Odoo for each alias. This can be done from the General Settings as well. Fill out the form
|
||||
according to the email provider's settings. Leave the :guilabel:`Actions to Perform on Incoming
|
||||
Mails` field blank. Once all the information has been filled out, click on :guilabel:`TEST &
|
||||
CONFIRM`.
|
||||
|
||||
.. image:: email_servers/incoming-server.png
|
||||
:align: center
|
||||
:alt: Incoming mail server configuration on Odoo.
|
||||
|
||||
* If the database's hosting type is Odoo Online or Odoo.sh, redirecting incoming messages to Odoo's
|
||||
domain name instead of the external email server is recommended. That way, incoming messages can
|
||||
be received without delay. Odoo Online only fetches incoming messages of external servers once
|
||||
every hour. Redirections for all email addresses should be set to Odoo's domain name in the email
|
||||
server (e.g. *catchall\@mydomain.ext* to *catchall\@mycompany.odoo.com*).
|
||||
|
||||
All the aliases are customizable in Odoo. Object aliases can be edited from their respective
|
||||
configuration view.
|
||||
|
||||
.. tip::
|
||||
To edit catchall and bounce aliases, first activate the :ref:`developer mode <developer-mode>`.
|
||||
Then, go to :menuselection:`Settings --> Technical --> Parameters --> System Parameters` to
|
||||
customize the aliases (*mail.catchall.alias* & *mail.bounce.alias*).
|
||||
|
||||
.. image:: email_servers/system-parameters.png
|
||||
:align: center
|
||||
:alt: System parameters with catchall configuration in Odoo.
|
||||
|
||||
* If you use Odoo on-premise, create an *Incoming Mail Server* in Odoo for each alias.
|
||||
You can do it from the General Settings as well. Fill out the form according
|
||||
to your email provider’s settings.
|
||||
Leave the *Actions to Perform on Incoming Mails* blank. Once all the
|
||||
information has been filled out, click on *TEST & CONFIRM*.
|
||||
By default, inbound messages are fetched every 5 minutes in Odoo on-premise.
|
||||
|
||||
.. image:: email_servers/incoming-server.png
|
||||
:align: center
|
||||
|
||||
* If you use Odoo Online or Odoo.sh, We do recommend to redirect incoming messages
|
||||
to Odoo's domain name rather than exclusively use your own email server.
|
||||
That way you will receive incoming messages without delay. Indeed, Odoo Online is fetching
|
||||
incoming messages of external servers once per hour only.
|
||||
You should set redirections for all the email addresses to Odoo's domain name in your
|
||||
email server (e.g. *catchall@mydomain.ext* to *catchall@mycompany.odoo.com*).
|
||||
|
||||
.. tip:: All the aliases are customizable in Odoo.
|
||||
Object aliases can be edited from their respective configuration view.
|
||||
To edit catchall and bounce aliases, you first need to activate the
|
||||
:ref:`developer mode <developer-mode>`.
|
||||
|
||||
Then go to :menuselection:`Settings --> Technical --> Parameters --> System Parameters`
|
||||
to customize the aliases (*mail.catchall.alias* & * mail.bounce.alias*).
|
||||
|
||||
.. image:: email_servers/system-parameters.png
|
||||
:align: center
|
||||
|
||||
.. note:: By default inbound messages are fetched every 5 minutes in Odoo on-premise.
|
||||
You can change this value in :ref:`developer mode <developer-mode>`.
|
||||
Go to :menuselection:`Settings --> Technical --> Automation -->
|
||||
Scheduled Actions` and look for *Mail: Fetchmail Service*.
|
||||
|
||||
.. note::
|
||||
This value can be changed in :ref:`developer mode <developer-mode>`. Go to
|
||||
:menuselection:`Settings --> Technical --> Automation --> Scheduled Actions` and look for
|
||||
:guilabel:`Mail: Fetchmail Service`.
|
||||
|
||||
Set up different dedicated servers for transactional and mass mails
|
||||
===================================================================
|
||||
|
||||
Odoo is subject to a :ref:`daily email limit <email_communication/daily_limit_mail>` to prevent abuse.
|
||||
However, if needed, you can use a separate Mail Transfer Agent (MTA) servers for transactional
|
||||
e-mails and mass mailings.
|
||||
Example: use Odoo's own mail server for transactional e-mails, and Sendgrid, Amazon SES, or Mailgun
|
||||
for mass mailings. Another alternative is to use Postmark for transactional e-mails, and Amazon SES
|
||||
or Sendgrid for mass mailings.
|
||||
In Odoo a separate Mail Transfer Agent (MTA) server can be used for transactional emails and mass
|
||||
mailings. Example: Use Postmark or SendinBlue for transactional emails, and Amazon SES, Mailgun or
|
||||
Sendgrid for mass mailings.
|
||||
|
||||
.. note::
|
||||
A default outgoing email server is already configured. You should not create an alternative one
|
||||
unless you want to use a specific external outgoing email server for technical reasons.
|
||||
.. tip::
|
||||
A default outgoing email server is already configured. Do not create an alternative one unless a
|
||||
specific external outgoing email server is needed for technical reasons.
|
||||
|
||||
To do this, you should first activate the :ref:`developer mode <developer-mode>` and then go to
|
||||
:menuselection:`Settings --> Technical --> Outgoing` e-mail servers. There you have to create two
|
||||
e-mail MTA server settings. One for transactional e-mails and one for mass mail servers. Be sure to
|
||||
mark the priority of transactional e-mail servers as low as the mass email servers.
|
||||
To do this, first activate the :ref:`developer mode <developer-mode>`, and then go to
|
||||
:menuselection:`Settings --> Technical --> Outgoing` email servers. There, create two email MTA
|
||||
server settings; one for the transactional emails and one for the mass mailing server. Make sure
|
||||
to give priority to the transactional server over the mass mailing server by providing a lower
|
||||
priority number for the transactional MTA server.
|
||||
|
||||
Now, go to :menuselection:`Email Marketing --> Settings` and enable *Dedicated Server*.
|
||||
Now, go to :menuselection:`Email Marketing --> Settings` and enable :guilabel:`Dedicated Server`.
|
||||
With these settings, Odoo uses the server with the lower priority for transactional emails, and the
|
||||
server here selected for mass mails.
|
||||
Note that in this case, you have to set your domain's Sender Policy Framework (SPF) records to
|
||||
include both transactional and mass mail servers. If your server resides with xxxx.odoo.com, the
|
||||
available options are Sendinblue and Mailchimp, as your e-mails would be originated from the
|
||||
xxxx.odoo.com domain.
|
||||
server here selected for mass mails. Note that in this case, the domain's Sender Policy Framework
|
||||
(SPF) records must be set to include both transactional and mass mail servers.
|
||||
|
|
|
|||
|
|
@@ -131,4 +131,4 @@ at an invoice/bills level or at a sales/purchase orders level.
|
|||
|
||||
.. seealso::
|
||||
- :doc:`Multi-company Guidelines </developer/howtos/company>`
|
||||
- :doc:`../../finance/accounting/others/multicurrencies/how_it_works`
|
||||
- :doc:`../../finance/accounting/others/multi_currency`
|
||||
|
|
@@ -1,35 +1,45 @@
|
|||
=======================
|
||||
Variants BOM Management
|
||||
=======================
|
||||
==================================
|
||||
Managing BoMs for product variants
|
||||
==================================
|
||||
|
||||
Odoo allows you to use one bill of materials for multiple variants of
|
||||
the same product. To activate variants, simply go to :menuselection:`Configuration --> Settings
|
||||
--> Variants`.
|
||||
Odoo allows one bill of materials (BoM) to be used for multiple variants of the same product.
|
||||
Having a consolidated BoM for a product with variants saves time by preventing the need to manage
|
||||
multiple BoMs.
|
||||
|
||||
.. image:: product_variants/bom-variants1.png
|
||||
:align: center
|
||||
Activate product variants
|
||||
=========================
|
||||
|
||||
You will then be able to specify which BOM component lines are to be used in
|
||||
the manufacture of each product variant. You may specify multiple
|
||||
variants for each line. If no variant is specified on a component line,
|
||||
then this component will be used in the BOM of all variants.
|
||||
To activate variants, simply navigate to :menuselection:`Inventory --> Configuration --> Settings
|
||||
--> Products`, and then enable the :guilabel:`Variants` option. After that, click :guilabel:`Save`
|
||||
to apply the setting. For more information on configuring product variants, refer to :doc:`this
|
||||
page <../../../sales/sales/products_prices/products/variants>`.
|
||||
|
||||
When defining variant BoMs on a line-item-basis, the **Product
|
||||
Variant** field in the main section of the BoM should be left blank as shown
|
||||
below. This field is used when creating a BoM for one specific variant
|
||||
of a product only.
|
||||
.. image:: product_variants/inventory-variants-settings.png
|
||||
:align: center
|
||||
:alt: Selecting "Variants" from Inventory app settings.
|
||||
|
||||
Apply BoM components to product variants
|
||||
========================================
|
||||
|
||||
.. image:: product_variants/kit-bom1.png
|
||||
:align: center
|
||||
Next, create a new BoM or edit an existing one by going to :menuselection:`Manufacturing -->
|
||||
Products --> Bills of Materials`. Then, click :guilabel:`Edit`. The :guilabel:`Apply on Variants`
|
||||
option to assign components to specific product variants on the BoM is available once the
|
||||
:guilabel:`Variants` setting is activated from the :guilabel:`Inventory` application. If the
|
||||
:guilabel:`Apply on Variants` field is not immediately visible, activate it from the additional
|
||||
options menu.
|
||||
|
||||
Note that the same principle applies for the configuration
|
||||
of operations.
|
||||
.. image:: product_variants/variants-kebab-menu.png
|
||||
:align: center
|
||||
:alt: "Apply on Variants" option on the additional options menu.
|
||||
|
||||
.. image:: product_variants/kit-bom2.png
|
||||
:align: center
|
||||
Each component can be assigned to multiple variants. Components with no variants specified are used
|
||||
in every variant of the product. The same principle applies when configuring operations and
|
||||
by-products.
|
||||
|
||||
And for the production of by-products.
|
||||
When defining variant BoMs by component assignment, the :guilabel:`Product Variant` field in the
|
||||
main section of the BoM should be left blank, as shown below. This field is used only when creating
|
||||
a BoM specifically for one product variant.
|
||||
|
||||
.. image:: product_variants/kit-bom3.png
|
||||
:align: center
|
||||
.. image:: product_variants/apply-on-variants-bom.png
|
||||
:align: center
|
||||
:alt: Applying components to multiple variants.
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 62 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
|
@@ -9,40 +9,42 @@ sales processes, using *Sales Teams*.
|
|||
Create a new Sales Team
|
||||
=======================
|
||||
|
||||
To create a new Sales Team, go to :menuselection:`CRM --> Configuration --> Sales Teams` then
|
||||
click **Create**.
|
||||
To create a new Sales Team, go to :menuselection:`CRM --> Sales --> Teams` then click
|
||||
:guilabel:`Create`.
|
||||
|
||||
On the creation page, set an *Email Alias* to automatically generate a lead/opportunity for this
|
||||
Sales Team every time a message is sent to that unique email address. You can also choose whether
|
||||
to accept emails from *Everyone*, *Authenticated Partners*, or *Followers Only*.
|
||||
On the creation page, set an :guilabel:`Email Alias` to automatically generate a lead/opportunity
|
||||
for this Sales Team every time a message is sent to that unique email address. You can also choose
|
||||
whether to accept emails from :guilabel:`Everyone`, :guilabel:`Authenticated Partners`, or
|
||||
:guilabel:`Followers Only`.
|
||||
|
||||
Set a *Domain* to assign leads/opportunities to this Sales Team based on specific filters, such as
|
||||
country, language, or campaign. Set an *Invoicing Target* if this team has specific monthly revenue
|
||||
goals.
|
||||
Set a :guilabel:`Domain` to assign leads/opportunities to this Sales Team based on specific
|
||||
filters, such as country, language, or campaign. Set an :guilabel:`Invoicing Target` if this team
|
||||
has specific monthly revenue goals.
|
||||
|
||||
.. image:: multi_sales_team/sales-team-creation.png
|
||||
:align: center
|
||||
:alt: Creating a Sales Team
|
||||
:alt: Create a Sales Team in Odoo CRM.
|
||||
|
||||
Add members to a Sales Team
|
||||
---------------------------
|
||||
|
||||
To add team members, click **Add** under the Assignment tab when editing the Sales Team's
|
||||
To add team members, click :guilabel:`Add` under the Assignment tab when editing the Sales Team's
|
||||
configuration page. Select a salesperson from the dropdown menu or create new salesperson. Set a
|
||||
maximum number of leads that can be assigned to this salesperson in a 30-day period to ensure that
|
||||
they do not overwork.
|
||||
|
||||
.. image:: multi_sales_team/add-a-salesperson.png
|
||||
:align: center
|
||||
:alt: Adding a Salesperson
|
||||
:alt: Add a Salesperson inside Odoo CRM.
|
||||
|
||||
One person can be added as a team member or Team Leader to multiple Sales Teams, allowing them to access all of the pipelines that they need to.
|
||||
One person can be added as a team member or Team Leader to multiple Sales Teams, allowing them to
|
||||
access all of the pipelines that they need to.
|
||||
|
||||
Sales Team dashboard
|
||||
====================
|
||||
|
||||
To view the Sales Team dashboard, go to :menuselection:`CRM --> Configuration --> Sales Teams`. Any
|
||||
teams you are a part of will appear as dashboard tiles.
|
||||
To view the Sales Team dashboard, go to :menuselection:`CRM --> Sales --> Teams`. Any teams you are
|
||||
a part of will appear as dashboard tiles.
|
||||
|
||||
Each tile gives an overview of the Sales Team's open opportunities, quotations, sales orders, and
|
||||
expected revenue, as well as a bar graph of new opportunities per week and an invoicing progress
|
||||
|
|
@@ -50,7 +52,7 @@ bar.
|
|||
|
||||
.. image:: multi_sales_team/sales-team-overview.png
|
||||
:align: center
|
||||
:alt: Sales Team Overview
|
||||
:alt: Sales Team Overview dashboard in Odoo CRM.
|
||||
|
||||
Click on the three dots in the corner of a tile to open a navigational menu that lets you quickly
|
||||
view documents or reports, create new quotations or opportunities, pick a color for this team, or
|
||||
|
|
@@ -58,8 +60,6 @@ access its configuration page.
|
|||
|
||||
.. image:: multi_sales_team/team-overview-three-dot-menu.png
|
||||
:align: center
|
||||
:alt: Three Dot Menu
|
||||
|
||||
Click on the **Pipeline** button to go directly to that team's CRM pipeline.
|
||||
|
||||
:alt: Click the Three Dot Menu in Odoo CRM dashboard to view documents and create opportunities.
|
||||
|
||||
Click on the :guilabel:`Pipeline` button to go directly to that team's CRM pipeline.
|
||||
|
|
|
|||
|
|
@@ -1,225 +1,187 @@
|
|||
======================
|
||||
Using product variants
|
||||
======================
|
||||
================
|
||||
Product variants
|
||||
================
|
||||
|
||||
Product variants are used to manage products having different
|
||||
variations, like size, color, etc. It allows managing the product at the
|
||||
template level (for all variations) and at the variant level (specific
|
||||
attributes).
|
||||
Product variants are used to give single products a variety of different characteristics, such as
|
||||
size and color. Products using variants can be managed at the product template level (for all
|
||||
attributes and variants of that product), and/or at the variant level (for individual variants).
|
||||
|
||||
As an example, a company selling t-shirts may have the following
|
||||
product:
|
||||
As an example, a company selling t-shirts may have the following product:
|
||||
|
||||
- B&C T-shirt
|
||||
- T-shirt
|
||||
|
||||
- Sizes: S, M, L, XL, XXL
|
||||
- Colors: Blue, Red, White, Black
|
||||
- Color: Blue, Red, White, Black
|
||||
- Size: S, M, L, XL, XXL
|
||||
|
||||
In this example, **B&C T-Shirt** is called the product template and
|
||||
**B&C T-Shirt, S, Blue** is a variant. Sizes and color are
|
||||
**attributes**.
|
||||
In this example, the **T-Shirt** is the product template, and **T-Shirt, S, Blue** is a product
|
||||
variant. **Color** and **size** are the attributes. **S** and **Blue** are values.
|
||||
|
||||
The above example has a total of 20 different products (5 sizes x 4
|
||||
colors). Each one of these products has its own inventory, sales, etc.
|
||||
|
||||
Impact of variants
|
||||
==================
|
||||
|
||||
- **Barcode**: the code and barcode is associated to a variant, not the
|
||||
template. Every variant may have its own barcode / SKU.
|
||||
|
||||
- **Price**: every product variant has its own public price that is
|
||||
computed based on the template price ($20) with an optional extra
|
||||
for every variant (+$3 for color red). However, you can define
|
||||
pricelist rules that apply on the template or the variant.
|
||||
|
||||
- **Inventory**: the inventory is managed by product variant. You don't
|
||||
own t-shirts, you only own "T-shirts, S, Red", or "T-Shirts, M,
|
||||
Blue". For information purpose, on the product template form, you
|
||||
get the inventory that is the sum of every variant. (but the
|
||||
actual inventory is computed by variant)
|
||||
|
||||
- **Picture**: the picture is related to the variant, every variation
|
||||
of a product may have its own primary picture.
|
||||
|
||||
- **Other fields**: most of the other fields belongs to the product
|
||||
template. If you update them, it updates automatically all the
|
||||
variants. (example: Income Account, Taxes)
|
||||
|
||||
Should you use variants?
|
||||
========================
|
||||
|
||||
When should you use variants?
|
||||
-----------------------------
|
||||
|
||||
Using variants has the following impacts:
|
||||
|
||||
- **eCommerce**: in your online shop, the customer will only see
|
||||
product templates in the catalog page. Once the visitor click on
|
||||
such a product, he will have options to choose amongst the
|
||||
variants (colors, sizes, …)
|
||||
|
||||
- **Manufacturing**: Using variants allows to define only one bill of
|
||||
material for a product template and slight variations for some of
|
||||
the variants. Example: instead of creating a Bill of Material for
|
||||
"T-shirt, Red, S", you create a bill of material for "T-shirt"
|
||||
and add some lines that are specific to the dimension S, and
|
||||
other lines specific to the color Red.
|
||||
|
||||
- **Pricing**: The default price of a product is computed using the
|
||||
price of the product template and add the optional extra price on
|
||||
each dimension of the variant. This way, variant prices are
|
||||
easier to maintain since you don't have to set the price for
|
||||
every variant. However, it's possible to create pricelist rules
|
||||
to fix price per variants too.
|
||||
|
||||
When should you avoid using variants?
|
||||
-------------------------------------
|
||||
|
||||
Using variants may add a level of complexity on the way you use Odoo.
|
||||
You should consider using variants only if you need it to reduce the
|
||||
complexity of managing lots of products that are similars.
|
||||
|
||||
As an example, importing your initial product catalog is more complex if
|
||||
you use variants. You can't just import a list of products, you must
|
||||
import product templates and all their related variations.
|
||||
|
||||
In addition to that, you should also carefully select the dimensions
|
||||
that you manage as separate product templates and those as variants. As
|
||||
an example, a company having these products:
|
||||
|
||||
- Quality: T-Shirts, Polos, Shirts
|
||||
|
||||
- Color: Red, Blue
|
||||
|
||||
- Size: S, M, L, XL
|
||||
|
||||
In such a use case, you could create 1 template with three dimensions of
|
||||
variants (Layout, T-Shirts, Polos). But, it's recommended to create two
|
||||
different product templates as T-shirts may highly differ from polos or
|
||||
shirts and customer expect to see these as two different products in the
|
||||
e-Commerce:
|
||||
|
||||
- Product Template: T-shirt
|
||||
|
||||
- Color: Red, Blue
|
||||
- Size: S, M, L, XL
|
||||
|
||||
- Product Template: Polos
|
||||
|
||||
- Color: Red, Blue
|
||||
- Size: S, M, L, XL
|
||||
The above example has a total of 20 different product variants (5 sizes x 4 colors). Each one of
|
||||
these has its own inventory, sales, etc.
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
||||
Activate the variant feature
|
||||
----------------------------
|
||||
Activating product variants
|
||||
---------------------------
|
||||
|
||||
Before you can use product variants, you must first activate the product
|
||||
variants in the settings. To do so, you must go to the Sales app. In the
|
||||
menu :menuselection:`Configuration --> Settings`, locate the **Products Variants** line,
|
||||
and tick the option **Products can have several attributes**, then click
|
||||
on **Apply**.
|
||||
To use product variants, go to :menuselection:`Sales --> Configuration --> Settings -->
|
||||
Product Catalog`, and enable the :guilabel:`Variants` feature. Finally, click :guilabel:`Save` to
|
||||
apply the setting.
|
||||
|
||||
.. image:: variants/variant01.png
|
||||
.. image:: variants/activating-variants-setting.png
|
||||
:align: center
|
||||
:alt: Activating product variants.
|
||||
|
||||
Creating products with variants
|
||||
-------------------------------
|
||||
Creating attributes
|
||||
-------------------
|
||||
|
||||
Once you have activated the variant option, you can add variants to your
|
||||
products. To do so, go to the Sales module, :menuselection:`Sales --> Products`.
|
||||
It is also accessible from the Purchase and inventory modules.
|
||||
Attributes need to be created before product variants can be set up. Attributes can be accessed
|
||||
via :menuselection:`Sales --> Configuration --> Products --> Attributes`.
|
||||
|
||||
Now, click on the product you wish to add variants to.
|
||||
.. note::
|
||||
The order of attributes on the :guilabel:`Attributes` page dictates how they appear on the
|
||||
:guilabel:`Product Configurator`, :guilabel:`Point of Sale` dashboard, and :guilabel:`eCommerce`
|
||||
pages.
|
||||
|
||||
In the product page, a new tab called Variants has appeared. The number
|
||||
in purple written on top is the number of variants this product
|
||||
currently has. To add new variants, click on the tile. In the new
|
||||
window, click on **Create**.
|
||||
To create a new attribute, click :guilabel:`Create`. First, choose an attribute name, such as
|
||||
"Color" or "Size."
|
||||
|
||||
In **Attributes**, click on the rolldown menu and select the type of
|
||||
variance you wish to add. If the variant does not yet exist, you can
|
||||
create it on the fly by clicking on Create and edit…
|
||||
|
||||
.. image:: variants/variant02.png
|
||||
.. image:: variants/attribute-creation.png
|
||||
:align: center
|
||||
:alt: Attribute creation window.
|
||||
|
||||
In the Attributes window, the **Value** field is the description of the
|
||||
attribute such as Green, Plastic or 32GB. The **Attribute** field is the
|
||||
type of variant such as Color, Material or Memory.
|
||||
Then, select a :guilabel:`Display Type`, which determines how this product will be shown on the
|
||||
:guilabel:`eCommerce` page, :guilabel:`Point of Sale` dashboard, and :guilabel:`Product
|
||||
Configurator`.
|
||||
|
||||
.. image:: variants/variant03.png
|
||||
- :guilabel:`Radio`: options appear in a bullet style list.
|
||||
- :guilabel:`Select`: options appear in a dropdown menu.
|
||||
- :guilabel:`Color`: options appear as small colored squares, which reflect any HTML color codes
|
||||
set.
|
||||
|
||||
.. image:: variants/display-types.png
|
||||
:align: center
|
||||
:alt: Display Types on Product Configurator.
|
||||
|
||||
You can add a cost for the variant on the fly by adding it in the
|
||||
**Attribute Price Extra** field, or choose to modify it later. Click on
|
||||
**Save**.
|
||||
The :guilabel:`Variants Creation Mode` informs Odoo when to automatically create a new variant once
|
||||
an attribute is added to a product.
|
||||
|
||||
You can also add a different barcode and internal reference to the
|
||||
variant.
|
||||
- :guilabel:`Instantly`: creates all possible variants as soon as attributes and values are added
|
||||
to a product template.
|
||||
- :guilabel:`Dynamically`: creates variants only when corresponding attributes and values are added
|
||||
to a sales order.
|
||||
- :guilabel:`Never`: never automatically creates variants.
|
||||
|
||||
When you have entered all the specifications of the variant, click on
|
||||
**Save**.
|
||||
.. note::
|
||||
Once added to a product, an attribute's :guilabel:`Variants Creation Mode` cannot be edited.
|
||||
|
||||
Managing Product Variants
|
||||
=========================
|
||||
Values should be added to an attribute before saving, but more values can be added at any time,
|
||||
if needed. To add a value, click :guilabel:`Add a line`. From there, you can:
|
||||
|
||||
Introduction
|
||||
------------
|
||||
#. Type in the value's name.
|
||||
#. Check a box to indicate whether or not the value is custom (i.e. the customer provides unique
|
||||
specifications).
|
||||
#. Specifically for colors, add an HTML color code to make it even easier for salespeople and
|
||||
customers to know what they're selecting.
|
||||
|
||||
The examples below are all based on this product template that has two
|
||||
variant attributes :
|
||||
A color code can be selected either by dragging the slider around or by entering a specific HTML
|
||||
color code (e.g. #FF0077).
|
||||
|
||||
- T-Shirt B&C
|
||||
|
||||
- Color: Red, Blue, White
|
||||
|
||||
- Size: S, M, L, XL, XXL
|
||||
|
||||
Managing combination possibilities
|
||||
----------------------------------
|
||||
|
||||
By default, with the above product template, you get 15 different
|
||||
products (3 colors, 5 sizes). If the XXL size only exists for red and
|
||||
blue t-shirts, you can deactivate the white product variant.
|
||||
|
||||
To do this, click on the **Variants** button, select the XXL, White
|
||||
T-shirt. From the product form, uncheck the **Active** box of the T-shirt
|
||||
White, XXL.
|
||||
|
||||
.. image:: variants/variant04.png
|
||||
.. image:: variants/picking-a-color.png
|
||||
:align: center
|
||||
:alt: Selecting a color.
|
||||
|
||||
Finally, click :guilabel:`Save` to finish creating the attribute.
|
||||
|
||||
.. tip::
|
||||
Attributes can also be created directly from the product template by adding a new line and
|
||||
typing the name into the :guilabel:`Variants` tab.
|
||||
|
||||
That deactivating a product is different than having an inventory of 0.
|
||||
After an attribute is added to a product, a new tab appears on the attribute's page called
|
||||
:guilabel:`Related Products`. This tab lists every product in the database that is currently using
|
||||
the attribute.
|
||||
|
||||
Creating product variants
|
||||
-------------------------
|
||||
|
||||
After creating an attribute, use the attribute to create a product variant by going to
|
||||
:menuselection:`Sales --> Products --> Products`. Then, select an existing product and click
|
||||
:guilabel:`Edit`, or create a new product by clicking :guilabel:`Create`.
|
||||
|
||||
The :guilabel:`Variants` smart button at the top of the product template indicates the number of
|
||||
currently configured variants on the product.
|
||||
|
||||
To add a new variant, click on the :guilabel:`Variants` tab, then click on :guilabel:`Add a line`
|
||||
to add any attributes and values. When all the attributes and values have been added, click
|
||||
:guilabel:`Save`.
|
||||
|
||||
.. tip::
|
||||
Similar product variant creation processes are accessible through the Purchase, Inventory, and
|
||||
eCommerce applications.
|
||||
|
||||
Managing product exclusions
|
||||
---------------------------
|
||||
|
||||
The following examples are all based on a product template that has two attributes:
|
||||
|
||||
- T-Shirt
|
||||
|
||||
- Color: Blue, Red, White
|
||||
- Size: S, M, L, XL, XXL
|
||||
|
||||
With the above product template, there are 15 different t-shirt variants in three different colors
|
||||
and five different sizes. If the white t-shirts are not available in the XXL size, then that
|
||||
variant can be deactivated.
|
||||
|
||||
To deactivate a particular product variant, go to :menuselection:`Sales --> Products --> Products`
|
||||
and select the relevant product. Next, click on the :guilabel:`Configure Variants` button, open the
|
||||
relevant product variant attribute value form (in this example, the :guilabel:`White Color`
|
||||
attribute), and then click on :guilabel:`Edit`.
|
||||
|
||||
In the :guilabel:`Exclude for` section, click :guilabel:`Add a line` and select any product(s)
|
||||
and/or specific attribute values that are currently unavailable. Finally, click :guilabel:`Save` to
|
||||
apply the setting, and Odoo will automatically show the product variant as unavailable on the
|
||||
eCommerce page.
|
||||
|
||||
.. image:: variants/attributes-exclusions.png
|
||||
:align: center
|
||||
:alt: Excluding attributes.
|
||||
|
||||
Setting a price per variant
|
||||
---------------------------
|
||||
|
||||
You can add a cost over the main price for some of the variants of a
|
||||
product.
|
||||
Extra costs can be added to a product's standard price for specific product variants.
|
||||
|
||||
Once you have activated the variant option, you can add variants to your
|
||||
products. To do so, go to the Sales module, open :menuselection:`Sales --> Products`
|
||||
and click on the product you want to modify. Click on the **Variant Prices**
|
||||
button to access the list of variant values.
|
||||
To do this, open :menuselection:`Sales --> Products --> Products`, and click on the relevant
|
||||
product. Next, click on :guilabel:`Configure Variants` to access the list of product variant
|
||||
values.
|
||||
|
||||
.. image:: variants/variant05.png
|
||||
Then, click on a variant value, and :guilabel:`Edit`. In the :guilabel:`Value Price Extra` field,
|
||||
type in the additional cost for this particular value. This amount is added to the standard price.
|
||||
Finally, click :guilabel:`Save` to apply the extra price to the value.
|
||||
|
||||
.. image:: variants/value-price-extra.png
|
||||
:align: center
|
||||
:alt: Value Price Extra setting.
|
||||
|
||||
Click on the variant name you wish to add a value to, to make the 3
|
||||
fields editable. In the **Attribute Price Extra** field, add the cost of
|
||||
the variant that will be added to the original price.
|
||||
Impact of variants
|
||||
==================
|
||||
|
||||
.. image:: variants/variant06.png
|
||||
:align: center
|
||||
- :guilabel:`Barcode`: barcodes are associated with each variant instead of the product template.
|
||||
Each individual variant can have its own unique barcode/SKU.
|
||||
|
||||
When you have entered all the extra values, click on **Save**.
|
||||
- :guilabel:`Price`: every product variant has its own public price, which is the sum of the
|
||||
product template price and any extra charges for particular attributes. For example, a red
|
||||
shirt's cost is $23 because the shirt's template price is $20, plus an additional $3 for the red
|
||||
color variant. Pricelist rules can be configured to apply to the product template or to the
|
||||
variant.
|
||||
|
||||
.. seealso::
|
||||
- `Accounting Memento: Details of Journal Entries
|
||||
</applications/finance/accounting/overview/main_concepts/memento.html#journal-entries>`_
|
||||
- :doc:`/applications/finance/accounting/getting_started/process_overview/supplier_bill`
|
||||
- :guilabel:`Inventory`: inventory is counted for each individual product variant. On the product
|
||||
template form, the inventory reflects the sum of all variants, but the actual inventory is
|
||||
computed by individual variants.
|
||||
|
||||
- :guilabel:`Picture`: each product variant can have its own specific picture.
|
||||
|
||||
.. note::
|
||||
Changes to the product template automatically apply to every variant of that product.
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
|
@@ -14,3 +14,4 @@ Send Quotations
|
|||
send_quotations/deadline
|
||||
send_quotations/different_addresses
|
||||
send_quotations/terms_and_conditions
|
||||
send_quotations/orders_and_variants
|
||||
|
|
|
|||
|
|
@@ -0,0 +1,79 @@
|
|||
===================================================
|
||||
Use product variants on quotations and sales orders
|
||||
===================================================
|
||||
|
||||
Product variants can be added to quotations and sales orders using the Product Configurator,
|
||||
Variant Grid Entry, or both.
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
||||
To enable product variants on quotations and sales orders, go to :menuselection:`Sales -->
|
||||
Configuration --> Settings --> Product Catalog` and activate one or both of the
|
||||
:guilabel:`Product Configurator` and :guilabel:`Variant Grid Entry` settings. Finally, click
|
||||
:guilabel:`Save` to apply the settings.
|
||||
|
||||
.. image:: orders_and_variants/activating-entry-type-settings.png
|
||||
:align: center
|
||||
:alt: Activating entry type settings.
|
||||
|
||||
After saving the settings, configure the product form. Head over to :menuselection:`Sales -->
|
||||
Products --> Products` and select any product (or click :guilabel:`Create` to create a new one).
|
||||
On the product form, click :guilabel:`Edit`, and then click on the :guilabel:`Variants` tab. Under
|
||||
:guilabel:`Sales Variant Selection`, choose either :guilabel:`Product Configurator` or
|
||||
:guilabel:`Order Grid Entry`. This selection determines which method is used to add the product to
|
||||
quotations or sales orders. Finally, click :guilabel:`Save` to apply the setting.
|
||||
|
||||
.. image:: orders_and_variants/sales-variant-selection.png
|
||||
:align: center
|
||||
:alt: Sales variant selection.
|
||||
|
||||
.. note::
|
||||
The product must have at least two variants (one attribute with two values) created in order for
|
||||
the :guilabel:`Sales Variant Selection` option to appear. Click :guilabel:`Add a line` under
|
||||
:guilabel:`Attribute` to add attributes and values to this product and create product variants.
|
||||
|
||||
Use the Product Configurator
|
||||
============================
|
||||
|
||||
The :guilabel:`Product Configurator` appears on a quotation or sales order when products are added
|
||||
that have both variants configured and the :guilabel:`Product Configurator` option selected.
|
||||
|
||||
The :guilabel:`Product Configurator` lets salespeople choose exactly which product variant to add
|
||||
to the quotation or sales order using a format similar to online shopping. Color options display
|
||||
any HTML color codes set up in the :guilabel:`Color` attribute. Features with an additional cost
|
||||
will display the additional cost next to their name. Once the desired product variant attributes
|
||||
are selected, click :guilabel:`Add` to add the product variant to the quotation or sales order.
|
||||
|
||||
.. image:: orders_and_variants/configurator-price-extras.png
|
||||
:align: center
|
||||
:alt: Product Configurator and Price Extras.
|
||||
|
||||
By default, the product variant attributes are displayed on the quotation or sales order in the
|
||||
:guilabel:`Description` column, but the :guilabel:`Product Variant` column can be added through the
|
||||
additional options menu (3 vertical dots icon).
|
||||
|
||||
Use Variant Grid Entries
|
||||
========================
|
||||
|
||||
:guilabel:`Variant Grid Entries` appear on a quotation or sales order when products are added that
|
||||
have both variants configured and the :guilabel:`Order Grid Entry` option selected. Grid entry can
|
||||
streamline the process of creating large, varied quotations by letting salespeople enter exact
|
||||
quantities of each product variant all at once.
|
||||
|
||||
:guilabel:`Variant Grid Entry` displays a grid of every variant available for the selected product.
|
||||
Choose the exact quantities of each product variant for a quotation or sales order by typing in the
|
||||
number or using the arrows. :guilabel:`Not Available` is displayed when a particular variant has
|
||||
been deactivated in the database. Once all the product variants and their quantities have been set,
|
||||
click :guilabel:`Confirm` to add them to the quotation or sales order.
|
||||
|
||||
.. image:: orders_and_variants/grid-entry-popup-amounts.png
|
||||
:align: center
|
||||
:alt: Variant Grid Entry pop-up.
|
||||
|
||||
Each product variant appears as an individual line item on the quotation or sales order, because
|
||||
each of these items has its own stock.
|
||||
|
||||
.. image:: orders_and_variants/grid-variants-line-items.png
|
||||
:align: center
|
||||
:alt: Line items for grid variants.
|
||||
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 7.6 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 55 KiB |
|
|
@@ -7,6 +7,14 @@ all of its data are also available from the outside for external analysis or
|
|||
integration with various tools. Part of the :ref:`reference/orm/model` API is
|
||||
easily available over XML-RPC_ and accessible from a variety of languages.
|
||||
|
||||
.. important::
|
||||
Starting with PHP8, the XML-RPC extension may not be available by default.
|
||||
Check out the `manual <https://www.php.net/manual/en/xmlrpc.installation.php>`_
|
||||
for the installation steps.
|
||||
|
||||
.. seealso::
|
||||
- :doc:`Tutorial on web services <../howtos/web_services>`
|
||||
|
||||
Connection
|
||||
==========
|
||||
|
||||
|
|
|
|||
|
|
@@ -292,9 +292,11 @@ Emails
|
|||
|
||||
.. option:: --from-filter <address or domain>
|
||||
|
||||
Email address or domain that the mail server is configured for. If the
|
||||
email of the sender does not match this value, it might be encapsulated
|
||||
into ``mail.default.from``.
|
||||
Define which email address the SMTP configuration will apply to. The field can be a domain name
|
||||
or an entire email address, or it can remain empty. If the sender's email address does not
|
||||
match this set filter, then the email will be encapsulated using a combination of the two
|
||||
system parameters: ``mail.default.from`` and ``mail.catchall.domain``. For example, "Admin"
|
||||
<admin\@example.com> => "Admin" <notifications\@mycompany.com>.
|
||||
|
||||
.. option:: --smtp <server>
|
||||
|
||||
|
|
@@ -316,11 +318,12 @@ Emails
|
|||
|
||||
.. option:: --smtp-ssl-certificate-filename <path/to/cert.pem>
|
||||
|
||||
SSL certificate used for SMTP authentication
|
||||
An SSL certificate is to be used for authentication. If set, then `smtp-ssl-private-key` is
|
||||
required.
|
||||
|
||||
.. option:: --smtp-ssl-private-key-filename <path/to/key.pem>
|
||||
|
||||
SSL private key used for SMTP authentication
|
||||
An SSL private key is used for authentication. If set, then `smtp-ssl-certificate` is required.
|
||||
|
||||
.. _reference/cmdline/server/internationalisation:
|
||||
|
||||
|
|
|
|||
|
|
@@ -11,6 +11,7 @@ Tutorials
|
|||
howtos/themes
|
||||
howtos/website
|
||||
howtos/backend
|
||||
howtos/web_services
|
||||
howtos/profilecode
|
||||
howtos/company
|
||||
howtos/accounting_localization
|
||||
|
|
|
|||
|
|
@@ -1369,151 +1369,6 @@ Dashboards
|
|||
and automatically displayed in the web client when the OpenAcademy main
|
||||
menu is selected.
|
||||
|
||||
WebServices
|
||||
===========
|
||||
|
||||
The web-service module offer a common interface for all web-services :
|
||||
|
||||
- XML-RPC
|
||||
- JSON-RPC
|
||||
|
||||
Business objects can also be accessed via the distributed object
|
||||
mechanism. They can all be modified via the client interface with contextual
|
||||
views.
|
||||
|
||||
Odoo is accessible through XML-RPC/JSON-RPC interfaces, for which libraries
|
||||
exist in many languages.
|
||||
|
||||
XML-RPC Library
|
||||
---------------
|
||||
|
||||
The following example is a Python 3 program that interacts with an Odoo
|
||||
server with the library ``xmlrpc.client``::
|
||||
|
||||
import xmlrpc.client
|
||||
|
||||
root = 'http://%s:%d/xmlrpc/' % (HOST, PORT)
|
||||
|
||||
uid = xmlrpc.client.ServerProxy(root + 'common').login(DB, USER, PASS)
|
||||
print("Logged in as %s (uid: %d)" % (USER, uid))
|
||||
|
||||
# Create a new note
|
||||
sock = xmlrpc.client.ServerProxy(root + 'object')
|
||||
args = {
|
||||
'color' : 8,
|
||||
'memo' : 'This is a note',
|
||||
'create_uid': uid,
|
||||
}
|
||||
note_id = sock.execute(DB, uid, PASS, 'note.note', 'create', args)
|
||||
|
||||
.. exercise:: Add a new service to the client
|
||||
|
||||
Write a Python program able to send XML-RPC requests to a PC running
|
||||
Odoo (yours, or your instructor's). This program should display all
|
||||
the sessions, and their corresponding number of seats. It should also
|
||||
create a new session for one of the courses.
|
||||
|
||||
.. only:: solutions
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import functools
|
||||
import xmlrpc.client
|
||||
HOST = 'localhost'
|
||||
PORT = 8069
|
||||
DB = 'openacademy'
|
||||
USER = 'admin'
|
||||
PASS = 'admin'
|
||||
ROOT = 'http://%s:%d/xmlrpc/' % (HOST,PORT)
|
||||
|
||||
# 1. Login
|
||||
uid = xmlrpc.client.ServerProxy(ROOT + 'common').login(DB,USER,PASS)
|
||||
print("Logged in as %s (uid:%d)" % (USER,uid))
|
||||
|
||||
call = functools.partial(
|
||||
xmlrpc.client.ServerProxy(ROOT + 'object').execute,
|
||||
DB, uid, PASS)
|
||||
|
||||
# 2. Read the sessions
|
||||
sessions = call('openacademy.session','search_read', [], ['name','seats'])
|
||||
for session in sessions:
|
||||
print("Session %s (%s seats)" % (session['name'], session['seats']))
|
||||
# 3.create a new session
|
||||
session_id = call('openacademy.session', 'create', {
|
||||
'name' : 'My session',
|
||||
'course_id' : 2,
|
||||
})
|
||||
|
||||
Instead of using a hard-coded course id, the code can look up a course
|
||||
by name::
|
||||
|
||||
# 3.create a new session for the "Functional" course
|
||||
course_id = call('openacademy.course', 'search', [('name','ilike','Functional')])[0]
|
||||
session_id = call('openacademy.session', 'create', {
|
||||
'name' : 'My session',
|
||||
'course_id' : course_id,
|
||||
})
|
||||
|
||||
JSON-RPC Library
|
||||
----------------
|
||||
|
||||
The following example is a Python 3 program that interacts with an Odoo server
|
||||
with the standard Python libraries ``urllib.request`` and ``json``. This
|
||||
example assumes the **Productivity** app (``note``) is installed::
|
||||
|
||||
import json
|
||||
import random
|
||||
import urllib.request
|
||||
|
||||
HOST = 'localhost'
|
||||
PORT = 8069
|
||||
DB = 'openacademy'
|
||||
USER = 'admin'
|
||||
PASS = 'admin'
|
||||
|
||||
def json_rpc(url, method, params):
|
||||
data = {
|
||||
"jsonrpc": "2.0",
|
||||
"method": method,
|
||||
"params": params,
|
||||
"id": random.randint(0, 1000000000),
|
||||
}
|
||||
req = urllib.request.Request(url=url, data=json.dumps(data).encode(), headers={
|
||||
"Content-Type":"application/json",
|
||||
})
|
||||
reply = json.loads(urllib.request.urlopen(req).read().decode('UTF-8'))
|
||||
if reply.get("error"):
|
||||
raise Exception(reply["error"])
|
||||
return reply["result"]
|
||||
|
||||
def call(url, service, method, *args):
|
||||
return json_rpc(url, "call", {"service": service, "method": method, "args": args})
|
||||
|
||||
# log in the given database
|
||||
url = "http://%s:%s/jsonrpc" % (HOST, PORT)
|
||||
uid = call(url, "common", "login", DB, USER, PASS)
|
||||
|
||||
# create a new note
|
||||
args = {
|
||||
'color': 8,
|
||||
'memo': 'This is another note',
|
||||
'create_uid': uid,
|
||||
}
|
||||
note_id = call(url, "object", "execute", DB, uid, PASS, 'note.note', 'create', args)
|
||||
|
||||
Examples can be easily adapted from XML-RPC to JSON-RPC.
|
||||
|
||||
.. note::
|
||||
|
||||
There are a number of high-level APIs in various languages to access Odoo
|
||||
systems without *explicitly* going through XML-RPC or JSON-RPC, such as:
|
||||
|
||||
* https://github.com/akretion/ooor
|
||||
* https://github.com/OCA/odoorpc
|
||||
* https://github.com/nicolas-van/openerp-client-lib
|
||||
* http://pythonhosted.org/OdooRPC
|
||||
* https://github.com/abhishek-jaiswal/php-openerp-lib
|
||||
|
||||
.. [#autofields] it is possible to :ref:`disable the automatic creation of some
|
||||
fields <reference/fields/automatic/log_access>`
|
||||
.. [#rawsql] writing raw SQL queries is possible, but requires care as it
|
||||
|
|
|
|||
|
|
@@ -4,6 +4,8 @@
|
|||
Advanced B: ACL and Record Rules
|
||||
================================
|
||||
|
||||
ACL stands for "Access Control List"
|
||||
|
||||
.. warning::
|
||||
|
||||
This tutorial assumes you have completed the :ref:`Core Training
|
||||
|
|
@@ -89,27 +91,27 @@ the ``res.groups`` model. They are normally part of a module's :ref:`master data
|
|||
|
||||
As simple example `can be found here <https://github.com/odoo/odoo/blob/532c083cbbe0ee6e7a940e2bdc9c677bd56b62fa/addons/hr/security/hr_security.xml#L9-L14>`_.
|
||||
|
||||
.. admonition:: what is the *category_id*?
|
||||
|
||||
``category_id`` a *module category*, it is automatically generated from the
|
||||
:ref:`category defined in module manifest files <howto/rdtraining/03_newapp>`.
|
||||
|
||||
.. todo:: the demo module needs to have the category set, to
|
||||
*Real Estate/Brokerage*, ideally the newapp part would already do
|
||||
that
|
||||
|
||||
.. exercise::
|
||||
|
||||
Create the ``security.xml`` file in the appropriate folder and add it to the
|
||||
``__manifest__.py`` file.
|
||||
#. Create the ``security.xml`` file in the appropriate folder and add it to the ``__manifest__.py`` file.
|
||||
|
||||
Add a record creating a group with the id ``estate_group_user``, the name
|
||||
"Agent" and the category ``base.module_category_real_estate_brokerage``.
|
||||
#. If not already, add a ``'category'`` field to your ``__manifest__.py`` with value ``Real Estate/Brokerage``.
|
||||
|
||||
Below that, add a record creating a group with the id
|
||||
``estate_group_manager``, the name "Manager" and the category
|
||||
``base.module_category_real_estate_brokerage``. The ``estate_group_manager``
|
||||
group needs to imply ``estate_group_user``.
|
||||
#. Add a record creating a group with the id ``estate_group_user``, the name "Agent"
|
||||
and the category ``base.module_category_real_estate_brokerage``.
|
||||
|
||||
#. Below that, add a record creating a group with the id ``estate_group_manager``,
|
||||
the name "Manager" and the category ``base.module_category_real_estate_brokerage``.
|
||||
The ``estate_group_manager`` group needs to imply ``estate_group_user``.
|
||||
|
||||
.. note::
|
||||
|
||||
Where does that **category** comes from ? It's a *module category*.
|
||||
Here we used the category id ``base.module_category_real_estate_brokerage``
|
||||
which was automatically generated by Odoo based on the `category` set in the ``__manifest__.py`` of the module.
|
||||
You can also find here the list of
|
||||
`default module categories <https://github.com/odoo/odoo/blob/71da80deb044852a2af6b111d695f94aad7803ac/odoo/addons/base/data/ir_module_category_data.xml>`_
|
||||
provided by Odoo.
|
||||
|
||||
.. tip::
|
||||
|
||||
|
|
|
|||
148
content/developer/howtos/web_services.rst
Normal file
|
|
@@ -0,0 +1,148 @@
|
|||
============
|
||||
Web Services
|
||||
============
|
||||
|
||||
The web-service module offer a common interface for all web-services :
|
||||
|
||||
- XML-RPC
|
||||
- JSON-RPC
|
||||
|
||||
Business objects can also be accessed via the distributed object
|
||||
mechanism. They can all be modified via the client interface with contextual
|
||||
views.
|
||||
|
||||
Odoo is accessible through XML-RPC/JSON-RPC interfaces, for which libraries
|
||||
exist in many languages.
|
||||
|
||||
XML-RPC Library
|
||||
---------------
|
||||
|
||||
The following example is a Python 3 program that interacts with an Odoo
|
||||
server with the library ``xmlrpc.client``::
|
||||
|
||||
import xmlrpc.client
|
||||
|
||||
root = 'http://%s:%d/xmlrpc/' % (HOST, PORT)
|
||||
|
||||
uid = xmlrpc.client.ServerProxy(root + 'common').login(DB, USER, PASS)
|
||||
print("Logged in as %s (uid: %d)" % (USER, uid))
|
||||
|
||||
# Create a new note
|
||||
sock = xmlrpc.client.ServerProxy(root + 'object')
|
||||
args = {
|
||||
'color' : 8,
|
||||
'memo' : 'This is a note',
|
||||
'create_uid': uid,
|
||||
}
|
||||
note_id = sock.execute(DB, uid, PASS, 'note.note', 'create', args)
|
||||
|
||||
.. exercise:: Add a new service to the client
|
||||
|
||||
Write a Python program able to send XML-RPC requests to a PC running
|
||||
Odoo (yours, or your instructor's). This program should display all
|
||||
the sessions, and their corresponding number of seats. It should also
|
||||
create a new session for one of the courses.
|
||||
|
||||
.. only:: solutions
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import functools
|
||||
import xmlrpc.client
|
||||
HOST = 'localhost'
|
||||
PORT = 8069
|
||||
DB = 'openacademy'
|
||||
USER = 'admin'
|
||||
PASS = 'admin'
|
||||
ROOT = 'http://%s:%d/xmlrpc/' % (HOST,PORT)
|
||||
|
||||
# 1. Login
|
||||
uid = xmlrpc.client.ServerProxy(ROOT + 'common').login(DB,USER,PASS)
|
||||
print("Logged in as %s (uid:%d)" % (USER,uid))
|
||||
|
||||
call = functools.partial(
|
||||
xmlrpc.client.ServerProxy(ROOT + 'object').execute,
|
||||
DB, uid, PASS)
|
||||
|
||||
# 2. Read the sessions
|
||||
sessions = call('openacademy.session','search_read', [], ['name','seats'])
|
||||
for session in sessions:
|
||||
print("Session %s (%s seats)" % (session['name'], session['seats']))
|
||||
# 3.create a new session
|
||||
session_id = call('openacademy.session', 'create', {
|
||||
'name' : 'My session',
|
||||
'course_id' : 2,
|
||||
})
|
||||
|
||||
Instead of using a hard-coded course id, the code can look up a course
|
||||
by name::
|
||||
|
||||
# 3.create a new session for the "Functional" course
|
||||
course_id = call('openacademy.course', 'search', [('name','ilike','Functional')])[0]
|
||||
session_id = call('openacademy.session', 'create', {
|
||||
'name' : 'My session',
|
||||
'course_id' : course_id,
|
||||
})
|
||||
|
||||
.. seealso::
|
||||
- :doc:`../api/external_api`: The in-depth tutorial on XML-RPC with examples spanning multiple programming languages.
|
||||
|
||||
JSON-RPC Library
|
||||
----------------
|
||||
|
||||
The following example is a Python 3 program that interacts with an Odoo server
|
||||
with the standard Python libraries ``urllib.request`` and ``json``. This
|
||||
example assumes the **Productivity** app (``note``) is installed::
|
||||
|
||||
import json
|
||||
import random
|
||||
import urllib.request
|
||||
|
||||
HOST = 'localhost'
|
||||
PORT = 8069
|
||||
DB = 'openacademy'
|
||||
USER = 'admin'
|
||||
PASS = 'admin'
|
||||
|
||||
def json_rpc(url, method, params):
|
||||
data = {
|
||||
"jsonrpc": "2.0",
|
||||
"method": method,
|
||||
"params": params,
|
||||
"id": random.randint(0, 1000000000),
|
||||
}
|
||||
req = urllib.request.Request(url=url, data=json.dumps(data).encode(), headers={
|
||||
"Content-Type":"application/json",
|
||||
})
|
||||
reply = json.loads(urllib.request.urlopen(req).read().decode('UTF-8'))
|
||||
if reply.get("error"):
|
||||
raise Exception(reply["error"])
|
||||
return reply["result"]
|
||||
|
||||
def call(url, service, method, *args):
|
||||
return json_rpc(url, "call", {"service": service, "method": method, "args": args})
|
||||
|
||||
# log in the given database
|
||||
url = "http://%s:%s/jsonrpc" % (HOST, PORT)
|
||||
uid = call(url, "common", "login", DB, USER, PASS)
|
||||
|
||||
# create a new note
|
||||
args = {
|
||||
'color': 8,
|
||||
'memo': 'This is another note',
|
||||
'create_uid': uid,
|
||||
}
|
||||
note_id = call(url, "object", "execute", DB, uid, PASS, 'note.note', 'create', args)
|
||||
|
||||
Examples can be easily adapted from XML-RPC to JSON-RPC.
|
||||
|
||||
.. note::
|
||||
|
||||
There are a number of high-level APIs in various languages to access Odoo
|
||||
systems without *explicitly* going through XML-RPC or JSON-RPC, such as:
|
||||
|
||||
* https://github.com/akretion/ooor
|
||||
* https://github.com/OCA/odoorpc
|
||||
* https://github.com/nicolas-van/openerp-client-lib
|
||||
* http://pythonhosted.org/OdooRPC
|
||||
* https://github.com/abhishek-jaiswal/php-openerp-lib
|
||||
|
|
@@ -478,7 +478,7 @@ calendar view are:
|
|||
you can add a filter and save the result in the defined model, the
|
||||
filter is added in the sidebar. The ``filter_field`` is optional and allows
|
||||
you to specify the field that will hold the status of the filter.
|
||||
``filter`` and ``color``
|
||||
``filters`` and ``color``
|
||||
use "True" to add this field in filter in the sidebar. You can specify
|
||||
a ``color`` field used to colorize the checkbox.
|
||||
|
||||
|
|
@@ -1164,6 +1164,10 @@ take the following attributes:
|
|||
if set to true, the gantt view will start at the first record,
|
||||
instead of starting at the beginning of the year/month/day.
|
||||
|
||||
``pill_label``
|
||||
If set to true, the time appears in the pill label when the scale is set on week or month. (e.g.
|
||||
`7:00 AM - 11:00 AM (4h) - DST Task 1`)
|
||||
|
||||
``thumbnails``
|
||||
This allows to display a thumbnail next to groups name if the group is a relationnal field.
|
||||
This expects a python dict which keys are the name of the field on the active model.
|
||||
|
|
|
|||
|
|
@@ -1,5 +1,8 @@
|
|||
# applications/finance
|
||||
|
||||
applications/finance/accounting/others/multicurrencies/exchange.rst applications/finance/accounting/others/multi_currency.rst # /multicurrencies/* -> multi_currency
|
||||
applications/finance/accounting/others/multicurrencies/how_it_works.rst applications/finance/accounting/others/multi_currency.rst # /multicurrencies/* -> multi_currency
|
||||
applications/finance/accounting/others/multicurrencies/invoices_payments.rst applications/finance/accounting/others/multi_currency.rst # /multicurrencies/* -> multi_currency
|
||||
applications/finance/accounting/payables/supplier_bills/ocr.rst applications/finance/accounting/payables/supplier_bills/invoice_digitization.rst # ocr --> invoice_digitization
|
||||
|
||||
# applications/general
|
||||
|
|
|
|||