Compare commits

..

20 Commits

Author SHA1 Message Date
Jonathan Castillo (jcs)
a37abb431f [IMP] accounting: bank statements in the transactions page
task-3264491
2023-04-05 21:51:17 +02:00
“Audrey
0a384a2a35 [IMP] payment_providers/flutterwave: recommend ticking all checkboxes
task-3254461

closes odoo/documentation#4014

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-04-04 17:08:30 +02:00
Loredana Perazzo
a350dd76f0 [ADD] pos: how to add/modify customer notes from POS UI
Task ID: 2622090

closes odoo/documentation#4010

X-original-commit: 3a0e23f3f9
Signed-off-by: Platteau Xavier (xpl) <xpl@odoo.com>
Signed-off-by: Perazzo Loredana (lrpz) <lrpz@odoo.com>
2023-04-04 17:08:22 +02:00
fdardenne
7e4435deb8 [IMP] create JavaScript howtos
The JavaScript cheatsheet is outdated, we therefore remove it and
replace it by multiple howtos:

- Create a view from scratch
- Extending an existing view
- Create a field from scratch
- Extend an existing field
- Create a client action

There is other subjects to introduce as the web framework is big. Other
future contributions will cover them.

closes odoo/documentation#3969

Signed-off-by: Dardenne Florent (dafl) <dafl@odoo.com>
2023-04-04 16:06:19 +02:00
Tom Aarab (toaa)
4c623b69b1 [ADD] ecommerce: performance monitoring
Adding a doc page on performance monitoring and analysis for eCommerce
websites

closes odoo/documentation#3866

Taskid: 3246984
Signed-off-by: Platteau Xavier (xpl) <xpl@odoo.com>
2023-04-04 16:06:16 +02:00
Zuzanna Luczynska
78c9a7f26d [ADD] field service: default warehouse
task-2948598

closes odoo/documentation#3996

X-original-commit: 40ef1a26f9
Signed-off-by: zulu-odoo <zulu@odoo.com>
Signed-off-by: Castillo Jonathan (jcs) <jcs@odoo.com>
2023-04-03 19:40:57 +02:00
oskarenablebanking
cc194eb979 [ADD] accounting: enablebanking
task-3232701

closes odoo/documentation#3993

Signed-off-by: Castillo Jonathan (jcs) <jcs@odoo.com>
2023-04-03 18:42:44 +02:00
Jonathan Castillo (jcs)
d694c6c9f5 [MOV] accounting: structure of bank sync docs
Part-of: odoo/documentation#3993
2023-04-03 18:42:44 +02:00
Benoit Socias
ee8341402a [IMP] tutorials: add warning about mutable global variables
The whole concept of multi-tenancy is not really approached within the
tutorial.

This commit adds a warning about never using mutable global variables
within odoo to seed the idea in the reader's mind.

task-3059110

closes odoo/documentation#3988

X-original-commit: 1ce7166f49
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2023-04-03 15:42:15 +02:00
Felicious
c4bbd54c5a [IMP]: add manual valuation section
Add images and manual valuation

add ref tag and retitle doc to sentence case

Remove trailing whitespaces

update explanation

closes odoo/documentation#3981

X-original-commit: 71ede7a3d4
Signed-off-by: Zachary Straub (zst) <zst@odoo.com>
2023-04-02 21:00:46 +02:00
Odoo Translation Bot
ca72e32e98 [I18N] Update translation terms from Transifex 2023-04-02 00:40:29 +02:00
“Audrey
67bada80e6 [IMP] Website: review website translation page
task-3255779

closes odoo/documentation#3973

Signed-off-by: auva-odoo <auva@odoo.com>
2023-03-31 18:37:51 +02:00
Xavier
cde27305ee [ADD] attendances: hr and attendances categories + hardware page
Task ID: 3251124

closes odoo/documentation#3956

X-original-commit: 0124878dd4
Signed-off-by: Castillo Jonathan (jcs) <jcs@odoo.com>
2023-03-29 16:05:34 +02:00
Loan (lse)
cd1f3e4510 [IMP] ePoS: vulgarise the SSL ePos issue
SSL/HTTPS topic is complicated for most of
Odoo customers as it is quite technical.

This PR should help them guide them to better
understand the issue and how to fix it themselves.

Support can't be provided to each device, browsers and OS.
But we did add some guides regarding the more
"popular" ones and some "keyword" to search
online for the others.

closes odoo/documentation#3922

X-original-commit: 415a817c57
Signed-off-by: Platteau Xavier (xpl) <xpl@odoo.com>
Signed-off-by: Castillo Jonathan (jcs) <jcs@odoo.com>
Co-authored-by: Loredana Perazzo <lrpz@odoo.com>
2023-03-29 16:05:25 +02:00
Tom Aarab (toaa)
9b0a54b7f2 [IMP] Adyen: additional minimum requirements for users
Adding requirements for users to use Adyen. Forward to master.

closes odoo/documentation#3952

Taskid: 3159712
X-original-commit: 0b234fe203
Signed-off-by: Aarab Tom (toaa) <toaa@odoo.com>
2023-03-29 14:56:57 +02:00
Melanie Nguyen (meng)
a1fce64ce5 [IMP] mail plugins: add instructions to gmail plugin
closes odoo/documentation#3944

X-original-commit: 404d524deb
Signed-off-by: Zachary Straub (zst) <zst@odoo.com>
2023-03-29 04:42:41 +02:00
Melanie Nguyen (meng)
fa90d23a90 [IMP] sales: menuselection fix
Fixed a menuselection error and deleted instances of second-person pov
Closes task 3116083

closes odoo/documentation#3939

X-original-commit: f30f6d2003
Signed-off-by: Zachary Straub (zst) <zst@odoo.com>
2023-03-29 03:41:01 +02:00
Timothy Kukulka (tiku)
098ecbcb99 [IMP] General: Oauth seemore additions
closes odoo/documentation#3934

X-original-commit: aa4e5d7a01
Signed-off-by: Zachary Straub (zst) <zst@odoo.com>
2023-03-29 03:40:58 +02:00
Loredana Perazzo
4a7acf8c02 [IMP] pos: update fiscal positions page
Task ID: 2862506

closes odoo/documentation#3876

Signed-off-by: Castillo Jonathan (jcs) <jcs@odoo.com>
2023-03-28 16:39:16 +02:00
Anita (anko)
de8db5a6a0 [IMP] paypal: remove deleted field
Removing no longer used Merchant Account ID field.
task-2854184

closes odoo/documentation#3833

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-03-28 13:17:24 +02:00
140 changed files with 9749 additions and 3507 deletions

View File

@@ -11,6 +11,10 @@ personal email address or an address created by a custom domain.
`Microsoft Learn: Register an application with the Microsoft identity platform
<https://learn.microsoft.com/azure/active-directory/develop/quickstart-register-app>`_
.. seealso::
- :doc:`/applications/general/auth/azure`
- :doc:`/applications/general/calendars/outlook/outlook_calendar`
Setup in Microsoft Azure Portal
===============================

View File

@@ -11,6 +11,10 @@ email address or an address created by a custom domain.
For more information, visit `Google's documentation
<https://support.google.com/cloud/answer/6158849>`_ on setting up OAuth.
.. seealso::
- :doc:`/applications/general/auth/google`
- :doc:`/applications/general/calendars/google/google_calendar_credentials`
Setup in Google
===============

View File

@@ -18,6 +18,7 @@ Discover our user guides and configuration tutorials per application.
applications/sales
applications/websites
applications/inventory_and_mrp
applications/hr
applications/marketing
applications/services
applications/productivity

View File

@@ -8,6 +8,7 @@ Bank and cash
:titlesonly:
bank/setup
bank/feeds
bank/bank_synchronization
bank/transactions
bank/reconciliation
bank/interbank

View File

@@ -1,6 +1,8 @@
======================================
Bank synchronization: automatic import
======================================
:show-content:
====================
Bank synchronization
====================
Odoo can synchronize directly with your bank institution to get all bank statements imported
automatically into your database.
@@ -15,9 +17,12 @@ To connect to the banks, Odoo uses multiple web-services:
- **Plaid**: United States of America and Canada
- **Yodlee**: Worldwide
- **Salt Edge**: Europe (:doc:`more information <saltedge>`)
- **Ponto**: Europe (:doc:`more information <ponto>`)
- **EnableBanking**: Scandinavian countries
- :doc:`Salt Edge <bank_synchronization/saltedge>`: Europe
- :doc:`Ponto <bank_synchronization/ponto>`: Europe
- :doc:`Enable Banking <bank_synchronization/enablebanking>`: Scandinavian countries
.. seealso::
:doc:`transactions`
Configuration
=============
@@ -196,7 +201,9 @@ You can update your credentials by going to :menuselection:`Accounting Dashboard
Configuration --> Accounting: Online Synchronization`,open the connection you want to update your
credentials and click on the :guilabel:`Update Credentials` button.
.. seealso::
* :doc:`transactions`
* :doc:`ponto`
* :doc:`saltedge`
.. toctree::
:titlesonly:
bank_synchronization/saltedge
bank_synchronization/ponto
bank_synchronization/enablebanking

View File

@@ -0,0 +1,36 @@
==============
Enable Banking
==============
**Enable Banking** is a third-party provider aggregating banking information from bank accounts all
in one place. It offers non-intrusive connectivity to ASPSPs' official APIs across Europe without
storing data.
.. image:: enablebanking/enablebanking.png
:align: center
:alt: Enable Banking logo
**Odoo** synchronizes directly with banks to get access to all bank transactions and automatically
import them into your database.
.. seealso::
- :doc:`../bank_synchronization`
- `Enable Banking website <https://enablebanking.com/>`_
Configuration
=============
Link bank accounts with Odoo
----------------------------
#. Start synchronization by clicking on :menuselection:`Accounting --> Configuration -->
Add a Bank Account`;
#. Select your bank;
#. Make sure you give your consent to share your account information with Odoo by clicking
:guilabel:`Continue authentication`;
.. image:: enablebanking/enablebankingauth.png
:align: center
:alt: Enable Banking authentication page
#. Finally, you are redirected to your bank's login page.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -1,6 +1,6 @@
======================================
Ponto as bank synchronization provider
======================================
=====
Ponto
=====
**Ponto** is a service that allows companies and professionals to aggregate their accounts in one
place and directly see all their transactions within one app. It is a third-party solution that is
@@ -16,9 +16,9 @@ into your database.
Ponto is a paid third-party provider that can handle the synchronization between your bank accounts
and Odoo. `Its pricing is 4€/month per account/integration <https://myponto.com/en#pricing>`_.
.. note::
You can find more information about bank synchronization :doc:`on this page
<bank_synchronization>`.
.. seealso::
- :doc:`../bank_synchronization`
- :doc:`../transactions`
Configuration
=============
@@ -115,10 +115,3 @@ and we advise you to contact Ponto directly.
.. important::
Using an institution in beta is beneficial for Ponto, it allows them to have real
feedback on the connection with the institution.
.. seealso::
* :doc:`bank_synchronization`
* :doc:`saltedge`
* :doc:`transactions`

View File

@@ -1,6 +1,6 @@
==========================================
Salt Edge as bank synchronization provider
==========================================
=========
Salt Edge
=========
**Salt Edge** is a third-party provider that aggregates banking information
from your bank accounts. It supports ~5000 institutions in more than 50
@@ -8,12 +8,15 @@ countries.
.. image:: saltedge/saltedge-logo.png
:align: center
:width: 50%
:alt: Salt Edge Logo
Odoo can synchronize directly with your bank to get all bank statements imported
automatically into your database.
Salt Edge is a free third-party provider.
.. seealso::
- :doc:`../bank_synchronization`
- :doc:`../transactions`
Configuration
=============
@@ -103,9 +106,3 @@ In case you already have a connection with the same credentials present on your
and this synchronization was created with Odoo, you will normally be able to find it by going to
:menuselection:`Accounting --> Configuration --> Online Synchronization`. Please make sure to do an
*Update Credentials* to reactivate the connection.
.. seealso::
* :doc:`bank_synchronization`
* :doc:`ponto`
* :doc:`transactions`

View File

@@ -1,13 +0,0 @@
:nosearch:
==========
Bank feeds
==========
.. toctree::
:titlesonly:
feeds/transactions
feeds/bank_synchronization
feeds/ponto
feeds/saltedge

View File

@@ -1,46 +0,0 @@
============
Transactions
============
Importing transactions from your bank statements allows keeping track of bank account transactions
and reconciling them with the ones recorded in your accounting.
:doc:`Bank synchronization <bank_synchronization>` automates the process. However, if you do not
want to use it or if your bank is not yet supported, other options exist:
- :ref:`Import bank transactions <import-statements>` delivered by your bank;
- :ref:`Register bank transactions <register-transactions>` manually.
.. _import-statements:
Import transactions
===================
Odoo supports multiple file formats to import transactions:
- SEPA recommended Cash Management format (CAMT.053);
- Comma-separated values (.CSV);
- Open Financial Exchange (.OFX);
- Quicken Interchange Format (.QIF);
- Belgium: Coded Statement of Account (.CODA).
To import a file, go to the :guilabel:`Accounting Dashboard`, and in the :guilabel:`Bank` journal,
click on :guilabel:`Import Transactions`.
.. image:: transactions/import-transactions.png
:align: center
:alt: Import bank transactions from bank journal
Next, select the file and upload it.
After setting the necessary formatting options and mapping the needed columns, you can run a
:guilabel:`Test` and :guilabel:`Import` your bank transactions.
.. _register-transactions:
Register bank transactions manually
===================================
You can also record your bank transactions manually. To do so, go to :guilabel:`Accounting
Dashboard`, click on the :guilabel:`Bank` journal, and then on :guilabel:`New`. Make sure to fill
out the :guilabel:`Partner` and :guilabel:`Label` fields to ease the reconciliation process.

View File

@@ -91,7 +91,7 @@ Manage and reconcile bank statements
------------------------------------
The next step is to book the bank statements to finalize the transaction by creating,
:doc:`importing <feeds/transactions>`, or :doc:`synchronizing <feeds/bank_synchronization>` your
:doc:`importing <transactions>`, or :doc:`synchronizing <bank_synchronization>` your
:guilabel:`Transactions lines`. Fill in the :guilabel:`Ending balance` and click on the
:guilabel:`Reconcile` button.

View File

@@ -125,5 +125,5 @@ line*.
.. seealso::
- :doc:`use_cases`
- :doc:`../feeds/bank_synchronization`
- :doc:`../bank_synchronization`
- :doc:`../../receivables/customer_invoices/cash_discounts`

View File

@@ -102,4 +102,4 @@ right and validate all related payments :
:align: center
.. seealso::
* :doc:`../feeds/bank_synchronization`
:doc:`../bank_synchronization`

View File

@@ -4,7 +4,7 @@ Bank and cash accounts
You can manage as many bank or cash accounts as needed on your database. Configuring them well
allows you to have all your banking data up-to-date and ready for :doc:`reconciliation
<../../bank/reconciliation/use_cases>` with your journal entries.
<../reconciliation/use_cases>` with your journal entries.
In Odoo Accounting, each bank account has a dedicated journal set to post all entries in a dedicated
account. Both the journal and the account are automatically created and configured whenever you add
@@ -33,7 +33,7 @@ To connect your bank account to your database, go to :menuselection:`Accounting
follow the instructions.
.. seealso::
:doc:`../../bank/feeds/bank_synchronization`
:doc:`../bank_synchronization`
Create a bank account
---------------------
@@ -83,7 +83,7 @@ You can edit the accounting information and bank account number according to you
.. seealso::
- :doc:`../../others/multi_currency`
- :doc:`../../bank/feeds/transactions`
- :doc:`../transactions`
- :doc:`../../bank/setup/outstanding_accounts`
Suspense account
@@ -132,5 +132,5 @@ Bank feeds
with your database.
.. seealso::
- :doc:`../../bank/feeds/bank_synchronization`
- :doc:`../../bank/feeds/transactions`
- :doc:`../bank_synchronization`
- :doc:`../transactions`

View File

@@ -0,0 +1,94 @@
============
Transactions
============
Importing transactions from your bank statements allows keeping track of bank account transactions
and reconciling them with the ones recorded in your accounting.
:doc:`Bank synchronization <bank_synchronization>` automates the process. However, if you do not
want to use it or if your bank is not yet supported, other options exist:
- :ref:`Import bank transactions <transactions/import>` delivered by your bank;
- :ref:`Register bank transactions <transactions/register>` manually.
.. note::
:ref:`Grouping transactions by statement <transactions/statements>` is optional.
.. _transactions/import:
Import transactions
===================
Odoo supports multiple file formats to import transactions:
- SEPA recommended Cash Management format (CAMT.053);
- Comma-separated values (.CSV);
- Open Financial Exchange (.OFX);
- Quicken Interchange Format (.QIF);
- Belgium: Coded Statement of Account (.CODA).
To import a file, go to the :guilabel:`Accounting Dashboard`, and in the :guilabel:`Bank` journal,
click on :guilabel:`Import Transactions`.
.. image:: transactions/import-transactions.png
:alt: Import bank transactions from the bank journal
Next, select the file and upload it.
After setting the necessary formatting options and mapping the file columns with their related Odoo
fields, you can run a :guilabel:`Test` and :guilabel:`Import` your bank transactions.
.. seealso::
:doc:`/applications/general/export_import_data`
.. _transactions/register:
Register bank transactions manually
===================================
You can also record your bank transactions manually. To do so, go to :guilabel:`Accounting
Dashboard`, click on the :guilabel:`Bank` journal, and then on :guilabel:`New`. Make sure to fill
out the :guilabel:`Partner` and :guilabel:`Label` fields to ease the reconciliation process.
.. _transactions/statements:
Statements
==========
A **bank statement** is a document provided by a bank or financial institution that lists the
transactions that have occurred in a particular bank account over a specified period of time.
In Odoo Accounting, it is optional to group transactions by their related statement, but depending
on your business flow, you may want to record them for control purposes.
.. important::
If you want to compare the ending balances of your bank statements with the ending balances of
your financial records, *don't forget to create an opening transaction* to record the bank
account balance as of the date you begin synchronizing or importing transactions. This is
necessary to ensure the accuracy of your accounting.
To access a list of statements, go to your :guilabel:`Accounting Dashboard`, click on the vertical
ellipsis (:guilabel:`⋮`) button next to the bank or cash journal you want to check, then on
:guilabel:`Statements`
Statement creation from the kanban view
---------------------------------------
Open the bank reconciliation view by clicking on the name of the bank journal, and identify the
transaction corresponding to the last transaction of your bank statement. Click on the
:guilabel:`STATEMENT` button when hovering on the upper separator line.
.. image:: transactions/statements-kanban.png
:alt: A "STATEMENT" button is visible when hovering on the line separating two transactions.
Fill out the statement's details and save. The newly created statement includes the previous
transactions following the last statement.
Statement creation from the list view
-------------------------------------
Open the list of transactions by clicking on the name of the bank journal and switching to the list
view. Select all the transactions corresponding to the bank statement, and, in the
:guilabel:`Statement` column, select an existing statement or create a new one by typing its
reference, clicking on :guilabel:`Create and edit...`, filling out the statement's details, and
saving.

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -55,7 +55,7 @@ Connect your bank account to your database and have your bank statements synced
so, find your bank in the list, click on *Connect*, and follow the instructions on-screen.
.. note::
:doc:`Click here <../../bank/feeds/bank_synchronization>` for more information about this feature.
:doc:`Click here <../../bank/bank_synchronization>` for more information about this feature.
If your Bank Institution cant be synchronized automatically, or if you prefer not to sync it with
your database, you may also configure your bank account manually by clicking on *Create it*, and
@@ -188,6 +188,6 @@ Send yourself a sample invoice by email to make sure everything is correctly con
.. seealso::
* :doc:`../../bank/setup/bank_accounts`
* :doc:`chart_of_accounts`
* :doc:`../../bank/feeds/bank_synchronization`
* :doc:`../../bank/bank_synchronization`
* :doc:`../../../fiscal_localizations`
* `Odoo Tutorials: Accounting Basics <https://www.odoo.com/r/lsZ>`_

View File

@@ -26,6 +26,8 @@ They can be applied in various ways:
Configuration
=============
.. _fiscal_positions/mapping:
Tax and Account Mapping
-----------------------

View File

@@ -5,6 +5,14 @@ Adyen
`Adyen <https://www.adyen.com/>`_ is a Dutch company that offers several online payment
possibilities.
.. seealso::
- :ref:`payment_providers/add_new`
- :doc:`../payment_providers`
.. note::
Adyen works only with customers processing **more** than **10 million annually** or invoicing a
**minimum** of **1.000** transactions **per month**.
Configuration
=============

View File

@@ -17,9 +17,12 @@ Configuration on Flutterwave Dashboard
`/payment/flutterwave/webhook` in the :guilabel:`URL` text field.
| For example: `https://yourcompany.odoo.com/payment/flutterwave/webhook`.
#. Fill the :guilabel:`Secret hash` with a password that you generate and save its value for later.
#. Make sure all the remaining checkboxes are ticked.
#. Make sure *all* the remaining checkboxes are ticked.
#. Click on **Save** to finalize the configuration.
.. image:: flutterwave/flutterwave-settings.png
:alt: Flutterwave settings
.. _payment_providers/flutterwave/configure_odoo:
Configuration on Odoo

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -19,7 +19,6 @@ Credentials tab
Odoo needs your **API Credentials** to connect with your PayPal account, which comprise:
- **Email**: your login email address in Paypal.
- **Merchant Account ID**: the code of the merchant account used to identify your Paypal account.
- **PDT Identity Token**: the key used to verify the authenticity of transactions.
- **Use IPN**: whether you want to use Instant Payment Notification. Already checked, you don't have
to change it.
@@ -27,8 +26,6 @@ Odoo needs your **API Credentials** to connect with your PayPal account, which c
You can copy your credentials from your Paypal account and paste them into the related fields under
the **Credentials** tab.
To retrieve the **Merchant Account ID**, log into your Paypal account and go to
:menuselection:`Account menu --> Account Settings --> Business information`.
To set the **PDT Identity Token**, switch to :ref:`developer mode <developer-mode>` and retrieve the
token by following the configuration step :ref:`paypal/enable-pdt`.

View File

@@ -1,6 +1,10 @@
=====
OAuth
=====
======================================
Microsoft Azure sign-in authentication
======================================
Due to specific requirements in Azure's OAuth implementation,
Microsoft Azure OAuth identification is NOT compatible with Odoo at the moment.
Due to specific requirements in Azure's OAuth implementation, Microsoft Azure OAuth identification
is NOT compatible with Odoo at the moment.
.. seealso::
- :doc:`/applications/general/calendars/outlook/outlook_calendar`
- :doc:`/administration/maintain/azure_oauth`

View File

@@ -8,6 +8,10 @@ with their Google account.
This is particularly helpful if your organization uses Google Workforce and you want the employees
within your organization to connect to Odoo with their Google Accounts.
.. seealso::
- :doc:`/applications/general/calendars/google/google_calendar_credentials`
- :doc:`/administration/maintain/google_oauth`
.. _google-sign-in/configuration:
Configuration
@@ -42,7 +46,7 @@ OAuth consent screen
:align: center
:alt: Google oauth consent selection menu
#. Choose one of the options **(Internal / External)** as instructed, and click on *Create*.
#. Choose the option for :guilabel:`internal`, and click on :guilabel:`Create`.
.. image:: google/consent.png
:align: center

View File

@@ -5,6 +5,10 @@ Synchronize Google Calendar with Odoo
Synchronize Google Calendar with Odoo to see and manage meetings from both platforms (updates go
in both directions). This integration helps organize your schedule so you never miss a meeting.
.. seealso::
- :doc:`/applications/general/auth/google`
- :doc:`/administration/maintain/google_oauth`
Setup in Google
===============

View File

@@ -5,6 +5,10 @@ Synchronize Outlook Calendar with Odoo
Synchronizing a user's Outlook Calendar with Odoo is useful for keeping track of their tasks and
appointments across all related applications.
.. seealso::
- :doc:`/applications/general/auth/azure`
- :doc:`/administration/maintain/azure_oauth`
Register the application with Microsoft Azure
=============================================

View File

@@ -0,0 +1,9 @@
:nosearch:
===============
Human resources
===============
.. toctree::
hr/attendances

View File

@@ -0,0 +1,19 @@
:nosearch:
:show-content:
:hide-page-toc:
:show-toc:
===========
Attendances
===========
**Odoo Attendances** functions as a time clock. Employees check in and check out of work, while
managers can see who is available at any given time.
.. seealso::
`Odoo Tutorials: Attendances <https://www.odoo.com/slides/slide/attendances-684>`_
.. toctree::
:titlesonly:
attendances/hardware

View File

@@ -0,0 +1,57 @@
========
Hardware
========
Kiosk management
================
A kiosk is a self-service station that allows employees to check in and check out for work shifts.
There are two ways to set up a kiosk:
- **Laptop and desktop PC**
Running a kiosk in a web browser is the cheapest and most flexible option. You can print employee
badges with any thermal or inkjet printer compatible with your web browser.
- **Tablet and mobile phone (Android or iOS)**
Tablets and mobile phones take up much less space, and their touchscreens are easy to use.
Consider putting them in a secure stand at the front desk or mounting them securely on a wall.
.. tip::
We recommend using an iPad together with the `Heckler Design WindFall Stand
<https://hecklerdesign.com/products/windfall-stand-for-ipad>`_
RFID key fob readers
====================
Employees can scan personal RFID key fobs with an RFID reader to manage check-ins and check-outs
quickly and easily.
.. image:: hardware/rfid-reader.jpg
:align: center
:width: 40%
:alt: An RFID key fob is placed on an RFID reader
.. tip::
We recommend using the `Neuftech USB RFID Reader <https://neuftech.net/Neuftech-USB-RFID-Reader-ID-Kartenleseger%C3%A4t-Kartenleser-Kontaktlos-Card-Reader-f%C3%BCr-EM4100>`_.
.. note::
An IoT box is **not** required.
Barcode scanners
================
Employees can scan the barcode on their employee badges to manage check-ins and check-outs quickly
and easily. The kiosk mode works with most USB barcode scanners connected directly to a computer.
Bluetooth barcode scanners are also supported natively.
.. tip::
We recommend using the `Honeywell product line
<https://sps.honeywell.com/us/en/products/productivity/barcode-scanners>`_. If the barcode
scanner is connected directly to a computer, it must be configured to use the computer's keyboard
layout.
.. note::
An IoT box is **not** required.

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@@ -11,4 +11,3 @@ Valuation Methods
reporting/inventory_valuation_config
reporting/using_inventory_valuation
reporting/integrating_landed_costs
/applications/finance/accounting/others/inventory/avg_price_valuation

View File

@@ -1,7 +1,9 @@
=================================
Inventory Valuation Configuration
Inventory valuation configuration
=================================
.. _inventory/inventory_valuation_config:
All of a company's stock on-hand contributes to the valuation of its inventory. That value should
be reflected in the company's accounting records to accurately show the value of the company and
all of its assets.
@@ -27,32 +29,32 @@ between locations in a company's inventory.
need to be periodically checked to ensure accuracy, and adjustments may be needed on an ongoing
basis depending on the needs and priorities of the business.
Types of Accounting
Types of accounting
-------------------
Accounting entries will depend on the accounting mode: Continental or Anglo-Saxon.
Accounting entries will depend on the accounting mode: *Continental* or *Anglo-Saxon*.
.. tip::
Verify the accounting mode by activating the :ref:`developer-mode`
and navigating to :menuselection:`Accounting --> Configuration --> Settings`.
Verify the accounting mode by activating the :ref:`developer-mode` and navigating to
:menuselection:`Accounting --> Configuration --> Settings`.
In Anglo-Saxon accounting, the costs of goods sold (COGS) are reported when products are sold or
In *Anglo-Saxon* accounting, the costs of goods sold (COGS) are reported when products are sold or
delivered. This means that the cost of a good is only recorded as an expense when a customer is
invoiced for a product. Interim Stock Accounts are used for the input and output accounts, and are
both Asset Accounts in the Balance Sheet.
invoiced for a product. *Interim Stock Accounts* are used for the input and output accounts, and are
both *Asset Accounts* in the balance sheet.
In Continental accounting, the cost of a good is reported as soon as a product is received into
stock. Additionally, a *single* Expense account is used for both input and output accounts in
the Balance Sheet.
In *Continental* accounting, the cost of a good is reported as soon as a product is received into
stock. Additionally, a single *Expense* account is used for both input and output accounts in
the balance sheet.
Costing Methods
Costing methods
---------------
Below are the three costing methods that can be used in Odoo for inventory valuation.
- **Standard Price**: is the default costing method in Odoo. The cost of the product is manually
defined on the product form, and this cost is used to compute the valuation. Even if the purchase
price on a Purchase Order differs, the valuation will still use the cost defined on the product
price on a purchase order differs, the valuation will still use the cost defined on the product
form.
- **Average Cost (AVCO)**: calculates the valuation of a product based on the average cost of that
product, divided by the total number of available stock on-hand. With this costing method,
@@ -81,10 +83,11 @@ valuation method should apply.
Under the :guilabel:`Inventory Valuation` heading are two labels: :guilabel:`Costing Method` and
:guilabel:`Inventory Valuation`. Pick the desired :guilabel:`Costing Method` using the drop-down
menu (e.g. :guilabel:`Standard`, :guilabel:`Average Cost (AVCO)`, or :guilabel:`First In First Out
(FIFO)` and switch the :guilabel:`Inventory Valuation` to :guilabel:`Automated`.
(FIFO)`) and switch the :guilabel:`Inventory Valuation` to :guilabel:`Automated`.
.. seealso::
:doc:`Using the inventory valuation <using_inventory_valuation>`
:doc:`Using the inventory valuation
</applications/inventory_and_mrp/inventory/management/reporting/using_inventory_valuation>`
.. note::
When choosing :guilabel:`Average Cost (AVCO)` as the :guilabel:`Costing Method`, the numerical

View File

@@ -1,77 +1,130 @@
=============================
Using the inventory valuation
=============================
=========================
Using inventory valuation
=========================
Inventory valuation refers to how you value your stock. Its a very
important aspect of a business as the inventory can be the biggest asset
of a company.
*Inventory valuation* is a quintessential accounting procedure that calculates the value of on-hand
stock. Once determined, the inventory valuation amount is then incorporated into a company's overall
value.
In this documentation, we will explain how the inventory valuation works
in Odoo.
In Odoo, this process can be conducted manually— by warehouse employees physically counting the
products— or automatically through the database.
Inventory valuation: the basics
===============================
.. seealso::
:ref:`Inventory valuation configuration <inventory/inventory_valuation_config>`
Understand the basics of inventory valuation
============================================
In order to understand how moving products in and out of stock affects the company's overall value,
consider the following product and stock moves scenario below.
Receive a product
-----------------
Each time a product enters or leaves your stock, the value of your
inventory is impacted. The way it is impacted depends on the
configuration of your product (more info here).
For example, consider an physical product, a simple *table*, which is categorized as `Office
Furniture` in the product form's :guilabel:`Product Category` field.
Lets take an example with a product - a table - configured with a
*FIFO costing method* and an automated inventory valuation.
I purchase 10 tables at a cost of $10.
.. image:: using_inventory_valuation/use_inventory_valuation_01.png
:align: center
When Ill confirm the receipt of the products, the value of my inventory
will be impacted. If I want to know what this impact is, I can click on
the valuation stat button.
Navigate to the the product category itself by going to :menuselection:`Inventory app -->
Configuration --> Product Categories`, and on the form, set the :guilabel:`Costing Method` as `First
In First Out (FIFO)` and the :guilabel:`Inventory Valuation` field as `Automated`.
.. tip::
The consignment feature allows you to set owners on your stock (discover
more about the consignment feature). When you receive products that are
owned by another company, they are not taken into account in your
inventory valuation.
Alternatively access the :guilabel:`Product Categories` dashboard by clicking on the
:guilabel:`internal link` arrow on the individual product's form, by hovering over the
:guilabel:`Product Category` field.
.. image:: using_inventory_valuation/use_inventory_valuation_02.png
Next, assume 10 tables are purchased at a price of $10.00, each. The :abbr:`PO (Purchase Order)` for
those tables will show the subtotal of the purchase as $100, plus any additional costs or taxes.
.. image:: using_inventory_valuation/purchase-order.png
:align: center
:alt: Purchase order with 10 tables products valued at $10 each.
.. note::
You need access rights on the accounting module to see that button.
After selecting :guilabel:`Validate` on the :abbr:`PO (Purchase Order)`, use the
:guilabel:`Valuation` smart button to view how the value of inventory was impacted.
In this case, I can see that the 10 tables entered the stock for a total
value of $100.
.. image:: using_inventory_valuation/use_inventory_valuation_03.png
.. image:: using_inventory_valuation/valuation-smart-button.png
:align: center
:alt: Valuation smart button on a receipt.
I can also easily access the accounting entry that has been generated
(in case of automated inventory valuation).
.. important::
:ref:`Developer mode <developer-mode>` must be turned on to see the *Valuation* smart button.
.. image:: using_inventory_valuation/use_inventory_valuation_04.png
.. tip::
The :doc:`consignment </applications/inventory_and_mrp/inventory/management/misc/owned_stock>`
feature allows ownership to items in stock. Thus, products owned by other companies are not
accounted for in the host company's inventory valuation.
The :guilabel:`Stock Valuation` dashboard then displays valuation of all products in the shipment,
along with their quantities and valuation. In the example of 10 tables being purchased, the
:guilabel:`Total Value` column of the dashboard would display a calculated valuation of $100.
.. image:: using_inventory_valuation/stock-valuation-product.png
:align: center
:alt: Stock valuation page depicting the products within a shipment.
In Odoo, automatic inventory valuation records are also recorded in the *Accounting* app. To access
these accounting entries, navigate to :menuselection:`Accounting --> Journal Entries`, and look for
inventory valuation entries with the `STJ` prefix in the :guilabel:`Journal` and :guilabel:`Number`
columns, respectively.
.. image:: using_inventory_valuation/inventory-valuation-entry.png
:align: center
:alt: Accounting entry for the inventory valuation of 10 tables.
Deliver a product
-----------------
In the same logic, when a table will be delivered, the stock valuation
will be impacted and you will have access to a similar information.
In the same logic, when a table is shipped to a customer and leaves the warehouse, the stock
valuation decreases. The :guilabel:`Valuation` smart button on the :abbr:`DO (Delivery Order)`,
likewise, displays the stock valuation record as it does on a :abbr:`PO (Purchase Order)`
.. image:: using_inventory_valuation/use_inventory_valuation_05.png
.. image:: using_inventory_valuation/decreased-stock-valuation.png
:align: center
:alt: Decreased stock valuation after a product is shipped.
The inventory valuation report
------------------------------
The summary of this is accessible via the inventory valuation report
(accessible from :menuselection:`Inventory --> Reporting --> Inventory Valuation`). It gives
you, product per product, the value of your stock. By clicking on the
button *Inventory At Date*, you can have the same information for a
past date.
To view the current value of all products in the warehouse, go to :menuselection:`Inventory app -->
Reporting --> Inventory Valuation`. The records in the table are organized by product, and selecting
a product's drop-down menu displays detailed records with the :guilabel:`Date`,
:guilabel:`Quantity`, and :guilabel:`Total Value` of the inventory.
.. image:: using_inventory_valuation/use_inventory_valuation_06.png
.. image:: using_inventory_valuation/inventory-valuation-products.png
:align: center
:alt: Inventory valuation report showing multiple products.
.. note::
The :guilabel:`Inventory At Date` button, located in the top-left corner of the :guilabel:`Stock
Valuation` dashboard, shows the inventory valuation of products available during a prior
specified date.
Update product unit price
~~~~~~~~~~~~~~~~~~~~~~~~~
For any company: lead times, supply chain failures, and other risk factors can contribute to
invisible costs. Although Odoo attempts to accurately represent the stock value, *manual valuation*
serves as an additional tool to update the unit price of products.
.. important::
Manual valuation is intended for products that can be purchased and received for a cost greater
than 0, or have product categories set with :guilabel:`Costing Method` set as either `Average
Cost (AVCO)` or `First In First Out (FIFO)`.
.. image:: using_inventory_valuation/add-manual-valuation.png
:align: center
:alt: Add manual valuation of stock value to a product.
Create manual valuation entries on the :guilabel:`Stock Valuation` dashboard by first navigating to
:menuselection:`Inventory app --> Reporting --> Inventory Valuation`, and then click the little gray
drop-down icon to the left of a product's name, to then reveal stock valuation line items below as
well as a teal :guilabel:`+ (plus)` button on the right.
Click the teal :guilabel:`+ (plus)` button to open up the :guilabel:`Product Revaluation` form,
where updates to the calculation of inventory valuation can be made, by increasing or decreasing the
unit price of each product.
.. image:: using_inventory_valuation/product-revaluation.png
:align: center
:alt: Product revaluation form adding a value of $1.00 with the reason being inflation.

View File

@@ -89,6 +89,8 @@ Area*. Then, once the quality check is done, move them to their *Storage Locatio
orders and their products are grouped in one transfer, whereas the packing operation respects the
grouping per customer order.
.. _use-routes/routes-rules:
Use routes and rules
====================

View File

@@ -116,15 +116,18 @@ Delete the following three lines of text from the :file:`login.ts` file:
This removes the `odoo.com` domain constraint from the Gmail Plugin program.
Next, in the ZIP file, go to :menuselection:`mail-client-extensions-master --> gmail`, and open the
file called :guilabel:`README`. Follow the instructions in the :guilabel:`README` file to push the
Gmail Plugin files as a Google Project.
file called :guilabel:`appsscript.json`. In the :guilabel:`urlFetchWhitelist` section, replace all
the references to `odoo.com` with the Odoo customer's unique server domain.
Then, in the same :guilabel:`gmail` folder, open the file called :guilabel:`README.md`. Follow the
instructions in the :guilabel:`README.md` file to push the Gmail Plugin files as a Google Project.
.. note::
The computer must be able to run Linux commands in order to follow the instructions on the
:guilabel:`README` file.
:guilabel:`README.md` file.
After that, share the Google Project with the Gmail account that the user wishes to connect to
Odoo. Then, click :guilabel:`Publish` and :guilabel:`Deploy from manifest`. Lastly, click
After that, share the Google Project with the Gmail account that the user wishes to connect to Odoo.
Then, click :guilabel:`Publish` and :guilabel:`Deploy from manifest`. Lastly, click
:guilabel:`Install the add-on` to install the Gmail Plugin.
Configure the Odoo database
@@ -132,8 +135,7 @@ Configure the Odoo database
The :guilabel:`Mail Plugin` feature must be enabled in the Odoo database in order to use the Gmail
Plugin. To enable the feature, go to :menuselection:`Settings --> General Settings`. Under the
:guilabel:`Integrations` section, activate :guilabel:`Mail Plugin`, and then click
:guilabel:`Save`.
:guilabel:`Integrations` section, activate :guilabel:`Mail Plugin`, and then click :guilabel:`Save`.
.. image:: gmail/mail-plugin-setting.png
:align: center

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 39 KiB

View File

@@ -2,61 +2,61 @@
Multiple sales teams
====================
Odoo lets you manage several sales teams, departments, or channels, each with their own unique
sales processes, using *Sales Teams*.
Use the *Sales Teams* feature to manage several sales teams, departments, or channels, each with
their own unique sales processes.
Create a new Sales Team
Create a new sales team
=======================
To create a new Sales Team, go to :menuselection:`CRM --> Sales --> Teams` then click
:guilabel:`Create`.
To create a new sales team, go to :menuselection:`CRM --> Configuration --> Sales Teams`, then
click :guilabel:`Create`.
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`.
for this sales team every time a message is sent to that unique email address. Choose whether to
accept emails from :guilabel:`Everyone`, :guilabel:`Authenticated Partners`, or :guilabel:`Followers
Only`.
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.
Set an :guilabel:`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.
.. image:: multi_sales_team/sales-team-creation.png
:align: center
:alt: Create a Sales Team in Odoo CRM.
:alt: Create a sales team in Odoo CRM.
Add members to a Sales Team
Add members to a sales team
---------------------------
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.
To add team members, click :guilabel:`Add` under the :guilabel:`Members` tab when editing the sales
team's configuration page. Select a salesperson from the drop-down 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: Add a Salesperson inside Odoo CRM.
:alt: Add a salesperson in 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 :guilabel:`Team Leader` to multiple sales teams,
allowing them to access all of the pipelines that they need to.
Sales Team dashboard
Sales team dashboard
====================
To view the Sales Team dashboard, go to :menuselection:`CRM --> 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`. Odoo users will
see any teams that they are a part of as dashboard tiles.
Each tile gives an overview of the Sales Team's open opportunities, quotations, sales orders, and
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
bar.
.. image:: multi_sales_team/sales-team-overview.png
:align: center
:alt: Sales Team Overview dashboard in Odoo CRM.
: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
Click on the three dots in the corner of a tile to open a navigational menu that lets users quickly
view documents or reports, create new quotations or opportunities, pick a color for this team, or
access its configuration page.
access the team's configuration page.
.. image:: multi_sales_team/team-overview-three-dot-menu.png
:align: center

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

@@ -8,6 +8,7 @@ Overview
:titlesonly:
overview/getting_started
overview/customer_note
overview/register
overview/https
overview/epos_ssc

View File

@@ -0,0 +1,38 @@
=============
Customer note
=============
The **Customer note** feature allows you to provide customers with further information on a specific
product. For instance, to provide cleaning and maintenance tips. They can also be used to track a
customers particular request, such as not wanting the product to be assembled for them.
Add a customer note
===================
You can add notes directly from an open :ref:`POS session <pos/start-session>`. To do so, click
:guilabel:`Customer Note` on the pad. Doing so opens a pop-up window in which you can add content
for the note.
.. note::
Product notes from an :doc:`imported SO <../shop/sales_order>` are displayed identically in the
cart.
.. image:: customer_notes/customer-notes-ui.png
:align: center
:alt: customer note button and notes (SO and POS session) on products in the cart
Modify a customer note
======================
Select the product from the cart to modify an existing note and click :guilabel:`Customer Note`.
Doing so reopens the previous pop-up window. Alter the text and click :guilabel:`Add`.
Receipts and invoices
=====================
Customer notes appear on customers' receipts and invoices similarly to how they appear in the cart,
meaning under the related product.
.. image:: customer_notes/notes-receipt.png
:align: center
:alt: customer receipt with notes from an SO and from the customer note feature

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -1,18 +1,16 @@
.. _epos_ssc/ePOS printers:
=========================================
Self-signed certificate for ePOS printers
=========================================
ePos printers are designed specifically to work with your Point of Sale system, which sends the
tickets directly to the printer.
Some models don't require an IoT box, but the connection between your web browser and the printer
may require a :doc:`secure connection with the HTTPS protocol <https>`. If so, a self-signed
certificate is necessary to use your printer.
ePOS printers are designed to work seamlessly with Point of Sale systems. Once connected, the two
devices automatically share information, enabling the direct printing of tickets from the POS system
to the ePOS printer.
.. note::
Please check the following list of compatible `Epson ePOS printers
<https://c4b.epson-biz.com/modules/community/index.php?content_id=91>`_. This list includes the
following models:
These `Epson ePOS printers
<https://c4b.epson-biz.com/modules/community/index.php?content_id=91>`_ are compatible with Odoo:
- TM-H6000IV-DT (Receipt printer only)
- TM-T70II-DT
@@ -31,56 +29,191 @@ certificate is necessary to use your printer.
- TM-P60II (Peeler: Wi-Fi® model)
- TM-P80 (Wi-Fi® model)
Generate a Self-signed certificate
==================================
To work with Odoo, some models that can be used without an
:doc:`IoT box <../../../productivity/iot/config/connect>` may require :doc:`the HTTPS protocol
<https>` to establish a secure connection between the browser and the printer. However, trying to
reach the printer's IP address using HTTPS leads to a warning page on most web browsers.
Access your ePOS printer's settings with your web browser by navigating to its IP address, for
example, `http://192.168.1.25`.
.. figure:: epos_ssc/browser-https-insecure.png
:align: center
:alt: warning page about the connection privacy on Google Chrome
Warning page on Google Chrome, Windows 10
In that case, you can temporarily force the connection by clicking :guilabel:`Advanced` and
:guilabel:`Proceed to [IP address] (unsafe)`. Doing so allows you to reach the page in HTTPS and use
the ePOS printer in Odoo as long as the browser window stays open.
.. note::
- The printer automatically prints the IP address during startup.
- We recommend assigning a **fixed IP address** to the printer from the network router.
The previous instructions apply to Google Chrome but are similar to other browsers.
Go to :menuselection:`Authentication --> Certificate List` and create a new **Self-Signed
Certificate**.
.. warning::
The connection is lost after closing the browser window. Therefore, this method should only be
used as a **workaround** or as a pre-requisite for the :ref:`following instructions
<epos_ssc/instructions>`.
- **Common Name**: the IP address of the ePos Printer, for example, `192.168.1.25`
- **Validity Period**: `10`
.. _epos_ssc/instructions:
Create and reboot the printer, go to :menuselection:`Security --> SSL/TLS`, and check if
**Selfsigned Certificate** is selected.
Generate, export, and import self-signed certificates
=====================================================
Export the Self-signed certificate
==================================
For a long-term solution, you must generate a **self-signed certificate**. Then, export and import
it into your browser.
To avoid having to accept the self-signed certificate several times, you can export it and then
import it to your web browser or mobile device.
.. important::
**Generating** an SSL certificate should only be done **once**. If you create another
certificate, devices using the previous one will lose HTTPS access.
To do so, access your ePOS printer's settings with your web browser by navigating to its IP address,
for example, `https://192.168.1.25`. Then, accept the self-signed certificate.
.. tabs::
.. note::
Note that the protocol is now **HTTPS**.
.. tab:: Windows 10 & Linux OS
Click on :menuselection:`Connection is not secure --> Certificate is not valid`.
.. tabs::
.. tab:: Generate a self-signed certificate
After forcing the connection, sign in using your printer credentials to access the ePOS
printer settings. To sign in, enter `epson` in the :guilabel:`ID` field and your printer
serial number in the :guilabel:`Password` field.
Click :guilabel:`Certificate List` in the :guilabel:`Authentication` section, and click
:guilabel:`create` to generate a new **Self-Signed Certificate**. The :guilabel:`Common
Name` should be automatically filled out. If not, fill it in with the printer IP address
number. Select the years the certificate will be valid in the :guilabel:`Validity
Period` field, click :guilabel:`Create`, and :guilabel:`Reset` or manually restart the
printer.
The self-signed certificate is generated. Reload the page and click :guilabel:`SSL/TLS`
in the :guilabel:`Security` section to ensure **Selfsigned Certificate** is correctly
selected in the :guilabel:`Server Certificate` section.
.. tab:: Export a self-signed certificate
The export process is heavily dependent on the :abbr:`OS (Operating System)` and the
browser. Start by accessing your ePOS printer settings on your web browser by navigating
to its IP address, for example, `https://192.168.1.25`. Then, force the connection as
explained in the :ref:`introduction <epos_ssc/ePOS printers>`.
If you are using **Google Chrome**,
#. click :guilabel:`Not secure` next to the search bar, and :guilabel:`Certificate is
not valid`;
.. image:: epos_ssc/browser-warning.png
:align: center
:alt: The web browser indicates that the connection to the printer is not secure.
:alt: Connection to the printer not secure button in Google Chrome browser.
Go to the :guilabel:`Details` tab and click on :guilabel:`Export` Select X.509 in base 64 and save it.
#. go to the :guilabel:`Details` tab and click :guilabel:`Export`;
#. add `.crt` at the end of the file name to ensure it has the correct extension;
#. select :guilabel:`Base64-encoded ASCII, single certificate`, at the bottom of the
pop-up window;
#. save, and the certificate is exported.
Import the Self-signed certificate to Windows (Using Chrome)
============================================================
.. warning::
Make sure that the certificate ends with the extension `.crt`. Otherwise, some
browsers might not see the file during the import process.
In your Chrome browser, go to :menuselection:`Settings --> Privacy and security --> Security -->
Manage certificates`
If you are using **Mozilla Firefox**,
Go to the :guilabel:`Authorities` tab and click on :guilabel:`Import` and select
your previous file. Accept all warnings and restart your browser.
#. click the **lock-shaped** icon on the left of the address bar;
#. go to :menuselection:`Connection not secure --> More information --> Security tab
--> View certificate`;
Import the Self-signed certificate to your Android device
=========================================================
.. image:: epos_ssc/mozilla-not-secure.png
:align: center
:alt: Connection is not secure button in Mozilla Firefox browser
On your Android device, open the settings and search for *certificate*. Then, click on **Certificate
AC** (Install from device storage), and select the certificate.
#. scroll down to the :guilabel:`Miscellaneous` section;
#. click :guilabel:`PEM (cert)` in the :guilabel:`Download` section;
#. save, and the certificate is exported.
.. tab:: Import a self-signed certificate
The import process is heavily dependent on the :abbr:`OS (Operating System)` and the
browser.
.. tabs::
.. tab:: Windows 10
Windows 10 manages certificates, which means that self-signed certificates must be
imported from the certification file rather than the browser. To do so,
#. open the Windows File Explorer and locate the downloaded certification file;
#. right-click on the certification file and click :guilabel:`Install
Certificate`;
#. select where to install the certificate and for whom - either for the
:guilabel:`Current User` or all users (:guilabel:`Local Machine`). Then, click
:guilabel:`Next`;
#. on the `Certificate Store` screen, tick :guilabel:`Place all certificates in
the following store`, click :guilabel:`Browse...`, and select
:guilabel:`Trusted Root Certification Authorities`;
.. image:: epos_ssc/win-cert-wizard-store.png
:align: center
#. click :guilabel:`Finish`, accept the pop-up security window;
#. restart the computer to make sure that the changes are applied.
.. tab:: Linux
If you are using **Google Chrome**,
#. open Chrome;
#. go to :menuselection:`Settings --> Privacy and security --> Security -->
Manage certificates`;
#. go to the :guilabel:`Authorities` tab, click :guilabel:`Import`, and select
the exported certification file;
#. accept all warnings;
#. click :guilabel:`ok`;
#. restart your browser.
If you are using **Mozilla Firefox**,
#. open Firefox;
#. go to :menuselection:`Settings --> Privacy & Security --> Security --> View
Certificates... --> Import`;
#. select the exported certification file;
#. tick the checkboxes and validate;
#. restart your browser.
.. tab:: Mac OS
To secure the connection on a Mac:
#. open Safari and navigate to your printer's IP address. Doing so leads to a warning page;
#. on the warning page, go to :menuselection:`Show Details --> visit this website --> Visit
Website`, validate;
#. reboot the printer so you can use it with any other browser.
.. tab:: Android OS
To import an SSL certificate into an Android device, first create and export it from a
computer. Next, transfer the `.crt` file to the device using email, Bluetooth, or USB. Once
the file is on the device,
#. open the settings and search for `certificate`;
#. click :guilabel:`Certificate AC` (Install from device storage);
#. select the certificate file to install it on the device.
.. Note::
The specific steps for installing a certificate may vary depending on the version of
Android and the device manufacturer.
.. important::
- If you need to export SSL certificates from an operating system or web browser that has not
been mentioned, search for `export SSL certificate` + `the name of your browser or operating
system` in your preferred search engine.
- Similarly, to import SSL certificates from an unmentioned OS or browser, search for `import SSL
certificate root authority` + `the name of your browser or operating system` in your preferred
search engine.
Check if the certificate was imported correctly
===============================================
To confirm your printer's connection is secure, connect to its IP address using HTTPS. For example,
navigate to `https://192.168.1.25` in your browser. If the SSL certificate has been applied
correctly, you should no longer see a warning page, and the address bar should display a padlock
icon, indicating that the connection is secure.

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@@ -1,43 +1,51 @@
============================
Tax rates (fiscal positions)
============================
=================================
Flexible taxes (fiscal positions)
=================================
In Odoo, *Fiscal Positions* let you apply different taxes based on
the customer location. In a *Point of Sale*, such as a restaurant, it can
be used to apply different taxes depending if the customer eats in or
takes away.
When running a business, you may need to apply different taxes and record transactions on various
accounts based on the location and type of business of your customers and providers.
Set up fiscal positions for PoS
===============================
The **fiscal positions** feature enables you to establish rules that automatically select the right
taxes and accounts used for each transaction.
To enable this feature, go to :menuselection:`Point of Sale --> Configuration --> Point of Sale`
and check *Fiscal Position per Order*. Now, you can choose the fiscal positions
you want for your *PoS*.
.. seealso::
- :doc:`../../../finance/accounting/taxation/taxes/fiscal_positions`
- :doc:`../../../finance/accounting/taxation/taxes/taxes`
.. image:: fiscal_position/fiscal_position_01.png
Configuration
=============
To enable the feature, go to :menuselection:`Point of Sale --> Configuration --> Settings`, scroll
down to the :guilabel:`Accounting` section, and enable :guilabel:`Flexible Taxes`.
Then, set a default fiscal position that should be applied to all sales in the selected POS in the
:guilabel:`Default` field. You can also add more fiscal positions to choose from in the
:guilabel:`Allowed` field.
.. image:: fiscal_position/flexible-taxes-setting.png
:align: center
According to the :doc:`fiscal localization package <../../../finance/fiscal_localizations>`
activated, several fiscal positions are preconfigured and can be set and used in POS. However, you
can also :ref:`create new fiscal positions <fiscal_positions/mapping>`.
.. note::
If you do not set a fiscal position, the tax remains as defined in the **customer taxes** field
on the product form.
Use fiscal positions
====================
Open a :ref:`POS session <pos/start-session>` to use one of the allowed fiscal positions. Then,
click the :guilabel:`Tax` button next to the **book-shaped** icon and select a fiscal position from
the list. Doing so applies the defined rules automatically to all the products subject to the chosen
fiscal position's regulations.
.. image:: fiscal_position/set-tax.png
:align: center
.. note::
You need to create your fiscal positions before using this feature.
If a default fiscal position is set, the tax button displays the name of the fiscal position.
Using fiscal positions
======================
Once on your *PoS* interface, click on the *Tax* button.
Now, choose the fiscal position you need for the current order.
.. image:: fiscal_position/fiscal_position_02.png
:align: center
Set up a default fiscal position
================================
If you want to use a default fiscal position, meaning that a preexisting value is always
automatically assigned, go to :menuselection:`Point of Sale --> Configuration
--> Point of Sale` and enable *Fiscal Position*. Now, choose one to set as the default one.
.. image:: fiscal_position/fiscal_position_03.png
:align: center
.. note::
Now, the *tax* button is replaced by a *on site* button when on the *PoS* interface.
.. seealso::
:doc:`../../../finance/accounting/taxation/taxes/fiscal_positions`

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -15,3 +15,4 @@ Field Service
fsm/sales
fsm/helpdesk
fsm/default_warehouse

View File

@@ -0,0 +1,42 @@
======================
User default warehouse
======================
Setting up a **default warehouse** can be useful for field technicians who keep a supply in their
van or those who always resupply from the same warehouse.
Products in sales orders created during field interventions are always pulled from the same
warehouse, keeping the inventory accurate with the default warehouse feature.
.. seealso::
:doc:`../../inventory_and_mrp/inventory`
Configuration
=============
To set up a user default warehouse, the :doc:`storage locations
<../../inventory_and_mrp/inventory/management/warehouses/warehouses_locations>` and :ref:`multi-step
routes <use-routes/routes-rules>` features need to be activated. It is also necessary to have more
than one warehouse in your database.
.. seealso::
- :doc:`../../inventory_and_mrp/inventory/management/warehouses/warehouses_locations`
- :doc:`../../inventory_and_mrp/inventory/routes/concepts/use_routes`
User account
------------
To set up a default warehouse for a specific user, go to :menuselection:`Settings --> Users -->
Manage users`, open a user, then go to the :guilabel:`Preferences` tab, scroll down to
:guilabel:`Inventory`, and select the default warehouse from the drop-down menu.
.. image:: default_warehouse/user-default.png
:alt: Selection of a default warehouse on a user profile.
Default warehouse in field service tasks
========================================
Once a default warehouse has been configured for a user, the materials used for a sales order linked
to a Field Service task are pulled from that specific warehouse. In the sales order, go to the
:guilabel:`Other Info` tab, then scroll down to :guilabel:`Delivery`. The default warehouse is
applied correctly.

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

@@ -10,3 +10,4 @@ eCommerce management
ecommerce_management/order_handling
ecommerce_management/customer_accounts
ecommerce_management/customer_interaction
ecommerce_management/performance

View File

@@ -0,0 +1,50 @@
======================
Performance monitoring
======================
Odoo integrates a variety of tools to analyze and improve the performance of your eCommerce
website.
Performance analysis tools
==========================
Data monitoring
---------------
**Website** allows monitoring and analysis of the sales performance of your eCommerce. To access the
**reporting view**, go to :menuselection:`Website --> Reporting`. This dashboard helps you monitor
everything related to sales, such as sales performance per product, category, day, etc.
.. image:: reporting/reporting.png
:align: center
:alt: Performance reporting of eCommerce
By clicking :guilabel:`Measures`, you can select the type of measurement used, such as:
- :guilabel:`Margin`;
- :guilabel:`Qty Invoiced`;
- :guilabel:`Untaxed Total`;
- :guilabel:`Volume`;
- ...
Other options include **multiple views (Pivot, etc.), comparison** by periods or years, and directly
:guilabel:`insert in spreadsheet`, etc.
Analytics
---------
It is possible to link your Odoo website with Google Analytics. To do so, go to
:menuselection:`Website --> Configuration --> Settings` and scroll to the :guilabel:`SEO` section.
Then, enter your **ID** in the :guilabel:`Measurement ID` field.
If you are still using **Universal Analytics**, it can directly be added by injecting the code in
the HTML header and body using the website builder. All metrics from Google Analytics and Universal
Analytics can be seen directly within Odoo.
Alternatively, Odoo offers the possibility to use another service, **Plausible.io**. Plausible.io is
a simple and privacy-friendly alternative to Google Analytics. Everything can be managed directly in
Odoo, there is no need to visit Plausible.io's website to access your metrics.
.. seealso::
- :doc:`/applications/websites/website/optimize/google_analytics`
- :doc:`/applications/websites/website/optimize/plausible`

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

View File

@@ -1,39 +1,95 @@
===========================
How to translate my website
===========================
===================
Website translation
===================
Overview
========
The contents of your website pages (i.e., text strings) can be translated into different languages
directly on your website.
In addition to creating great modern websites, Odoo gives you the
possibility to translate it in different languages.
Your website is displayed in the language that matches the visitor's browser's language, unless that
particular language has not been installed. In this case, the website is displayed in the
:ref:`default language <translate/default-language>`. The visitor can still select another language
in the language menu.
Process
=======
Installing languages
====================
Once your website is created, you have the opportunity to translate it
in as many different languages as you want.
To translate your website, you first have to add the required languages:
You can only translate your website manually, follow the next step.
#. Go to your website.
#. Scroll to the bottom of the page to the **language menu**.
#. Click the language and select :guilabel:`Add a language`.
Now go to your website. On the bottom right corner of the page, click on
**Add a language**.
.. image:: translate/website-add-language.png
:alt: Add a language to your website.
.. image:: translate/translate_website01.png
:align: center
#. Click the :guilabel:`Languages` field and select the required language from the drop-down list.
Repeat this step for each additional language.
#. Click the :guilabel:`Add` button.
Choose the language in which you want to translate your website and then
click on **Load.**
.. tip::
You can also edit your website's languages from the backend, in the :guilabel:`Settings`. Go to
:menuselection:`Website > Configuration > Settings` and add/remove the required languages in
the :guilabel:`Languages` field, in the :guilabel:`Website info` section.
.. image:: translate/translate_website02.png
:align: center
.. _translate/default-language:
You will see that Now, next to English there is also French, which means
that the page for the translation has been created. You can also see
that some of the text has been translated automatically.
Default language
----------------
.. image:: translate/translate_website03.png
:align: center
If the language of the visitor's browser is not installed on your website, the content is displayed
in the default language.
To translate the content of the website, click on **Translate** (here
**Traduire** since we want to translate the website in French).
To define a default language, go to :menuselection:`Website > Configuration > Settings`, and
select a language in the :guilabel:`Default` field.
.. note::
This field is visible only if multiple languages are already configured for your website.
Translating the contents
========================
Once the languages have been added, you can translate the contents of your website. To do so, go to
your website, select the language from the language menu and click the :guilabel:`Translate` button
on the right part of the task bar to activate the **translation mode**.
.. image:: translate/translate-button.png
:alt: Translate button
As a result:
- Text strings that have already been translated are highlighted in green;
- Text strings that need to be translated are highlighted in yellow.
.. image:: translate/website-translation-yellow.png
:alt: Text to be translated highlighted in yellow
You can then replace the original text with the translation by clicking the block, editing its
contents and saving.
.. tip::
- Once the languages have been installed, you can also translate some items (e.g.,
the product's name and description) from the backend (e.g., in the product template). To do so,
click the language code (e.g., :guilabel:`EN`) next to the text you want to translate (e.g.,
the product name) and add the translation.
.. image:: translate/product-translation.png
:alt: Translate product-related items.
- You can also :doc:`export/import translations <../../../../developer/howtos/translations>`
to translate multiple items (e.g., product names and descriptions) in one go.
Language selector menu
======================
To add a language selector menu:
#. Go to your website and click :guilabel:`Edit`.
#. Select the block where you want to add the language selector menu (e.g., the header).
#. Select the :guilabel:`Customize` tab.
#. In the :guilabel:`Navbar` section, set the :guilabel:`Language selector` field to either
:guilabel:`Dropdown` or :guilabel:`Inline`.
.. image:: translate/language-selector.png
:alt: Add a language selector menu.
#. Click :guilabel:`Save`.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -9,6 +9,9 @@ How-to guides
:titlesonly:
howtos/scss_tips
howtos/javascript_field
howtos/javascript_view
howtos/javascript_client_action
howtos/web_services
howtos/company
howtos/accounting_localization
@@ -23,6 +26,21 @@ How-to guides
Follow this guide to keep the technical debt of your CSS code under control.
.. card:: Customize a field
:target: howtos/javascript_field
Learn how to customize field components in the Odoo JavaScript web framework.
.. card:: Customize a view type
:target: howtos/javascript_view
Learn how to customize view types in the Odoo JavaScript web framework.
.. card:: Create a client action
:target: howtos/javascript_client_action
Learn how to create client actions in the Odoo JavaScript web framework.
.. card:: Web services
:target: howtos/web_services

View File

@@ -0,0 +1,46 @@
======================
Create a client action
======================
A client action triggers an action that is entirely implemented in the client side.
One of the benefits of using a client action is the ability to create highly customized interfaces
with ease. A client action is typically defined by an OWL component; we can also use the web
framework and use services, core components, hooks,...
#. Create the :ref:`client action <reference/actions/client>`, don't forget to
make it accessible.
.. code-block:: xml
<record model="ir.actions.client" id="my_client_action">
<field name="name">My Client Action</field>
<field name="tag">my_module.MyClientAction</field>
</record>
#. Create a component that represents the client action.
.. code-block:: js
:caption: :file:`my_client_action.js`
/** @odoo-module **/
import { registry } from "@web/core/registry";
import { Component } from "@odoo/owl";
class MyClientAction extends Component {}
MyClientAction.template = "my_module.clientaction";
// remember the tag name we put in the first step
registry.category("actions").add("my_module.MyClientAction", MyClientAction);
.. code-block:: xml
:caption: :file:`my_client_action.xml`
<?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve">
<t t-name="awesome_tshirt.clientaction" owl="1">
Hello world
</t>
</templates>

View File

@@ -0,0 +1,107 @@
=================
Customize a field
=================
Subclass an existing field component
====================================
Let's take an example where we want to extends the `BooleanField` to create a boolean field
displaying "Late!" in red whenever the checkbox is checked.
#. Create a new widget component extending the desired field component.
.. code-block:: javascript
:caption: :file:`late_order_boolean_field.js`
/** @odoo-module */
import { registry } from "@web/core/registry";
import { BooleanField } from "@web/views/fields/boolean/boolean_field";
import { Component, xml } from "@odoo/owl";
class LateOrderBooleanField extends BooleanField {}
LateOrderBooleanField.template = "my_module.LateOrderBooleanField";
#. Create the field template.
The component uses a new template with the name `my_module.LateOrderBooleanField`. Create it by
inheriting the current template of the `BooleanField`.
.. code-block:: xml
:caption: :file:`late_order_boolean_field.xml`
<?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve">
<t t-name="my_module.LateOrderBooleanField" t-inherit="web.BooleanField" owl="1">
<xpath expr="//CheckBox" position="after">
<span t-if="props.value" class="text-danger"> Late! </span>
</xpath>
</t>
</templates>
#. Register the component to the fields registry.
.. code-block::
:caption: :file:`late_order_boolean_field.js`
registry.category("fields").add("late_boolean", LateOrderBooleanField);
#. Add the widget in the view arch as an attribute of the field.
.. code-block:: xml
<field name="somefield" widget="late_boolean"/>
Create a new field component
============================
Assume that we want to create a field that displays a simple text in red.
#. Create a new Owl component representing our new field
.. code-block:: js
:caption: :file:`my_text_field.js`
/** @odoo-module */
import { standardFieldProps } from "@web/views/fields/standard_field_props";
import { Component, xml } from "@odoo/owl";
import { registry } from "@web/core/registry";
export class MyTextField extends Component {
/**
* @param {boolean} newValue
*/
onChange(newValue) {
this.props.update(newValue);
}
}
MyTextField.template = xml`
<input t-att-id="props.id" class="text-danger" t-att-value="props.value" onChange.bind="onChange" />
`;
MyTextField.props = {
...standardFieldProps,
};
MyTextField.supportedTypes = ["char"];
The imported `standardFieldProps` contains the standard props passed by the `View` such as
the `update` function to update the value, the `type` of the field in the model, the
`readonly` boolean, and others.
#. In the same file, register the component to the fields registry.
.. code-block:: js
:caption: :file:`my_text_field.js`
registry.category("fields").add("my_text_field", MyTextField);
This maps the widget name in the arch to its actual component.
#. Add the widget in the view arch as an attribute of the field.
.. code-block:: xml
<field name="somefield" widget="my_text_field"/>

View File

@@ -0,0 +1,262 @@
=====================
Customize a view type
=====================
Subclass an existing view
=========================
Assume we need to create a custom version of a generic view. For example, a kanban view with some
extra ribbon-like widget on top (to display some specific custom information). In that case, this
can be done in a few steps:
#. Extend the kanban controller/renderer/model and register it in the view registry.
.. code-block:: js
:caption: :file:`custom_kanban_controller.js`
/** @odoo-module */
import { KanbanController } from "@web/views/kanban/kanban_controller";
import { kanbanView } from "@web/views/kanban/kanban_view";
import { registry } from "@web/core/registry";
// the controller usually contains the Layout and the renderer.
class CustomKanbanController extends KanbanController {
// Your logic here, override or insert new methods...
// if you override setup(), don't forget to call super.setup()
}
CustomKanbanController.template = "my_module.CustomKanbanView";
export const customKanbanView = {
...kanbanView, // contains the default Renderer/Controller/Model
Controller: CustomKanbanController,
};
// Register it to the views registry
registry.category("views").add("custom_kanban", customeKanbanView);
In our custom kanban, we defined a new template. We can either inherit the kanban controller
template and add our template pieces or we can define a completely new template.
.. code-block:: xml
:caption: :file:`custom_kanban_controller.xml`
<?xml version="1.0" encoding="UTF-8" ?>
<templates>
<t t-name="my_module.CustomKanbanView" t-inherit="web.KanbanView" owl="1">
<xpath expr="//Layout" position="before">
<div>
Hello world !
</div>
</xpath>
</t>
</templates>
#. Use the view with the `js_class` attribute in arch.
.. code-block:: xml
<kanban js_class="custom_kanban">
<templates>
<t t-name="kanban-box">
<!--Your comment-->
</t>
</templates>
</kanban>
The possibilities for extending views are endless. While we have only extended the controller
here, you can also extend the renderer to add new buttons, modify how records are presented, or
customize the dropdown, as well as extend other components such as the model and `buttonTemplate`.
Create a new view from scratch
==============================
Creating a new view is an advanced topic. This guide highlight only the essential steps.
#. Create the controller.
The primary role of a controller is to facilitate the coordination between various components
of a view, such as the Renderer, Model, and Layout.
.. code-block:: js
:caption: :file:`beautiful_controller.js`
/** @odoo-module */
import { Layout } from "@web/search/layout";
import { useService } from "@web/core/utils/hooks";
import { Component, onWillStart, useState} from "@odoo/owl";
export class BeautifulController extends Component {
setup() {
this.orm = useService("orm");
// The controller create the model and make it reactive so whenever this.model is
// accessed and edited then it'll cause a rerendering
this.model = useState(
new this.props.Model(
this.orm,
this.props.resModel,
this.props.fields,
this.props.archInfo,
this.props.domain
)
);
onWillStart(async () => {
await this.model.load();
});
}
}
BeautifulController.template = "my_module.View";
BeautifulController.components = { Layout };
The template of the Controller displays the control panel with Layout and also the
renderer.
.. code-block:: xml
:caption: :file:`beautiful_controller.xml`
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="my_module.View" owl="1">
<Layout display="props.display" className="'h-100 overflow-auto'">
<t t-component="props.Renderer" records="model.records" propsYouWant="'Hello world'"/>
</Layout>
</t>
</templates>
#. Create the renderer.
The primary function of a renderer is to generate a visual representation of data by rendering
the view that includes records.
.. code-block:: js
:caption: :file:`beautiful_renderer.js`
import { Component } from "@odoo/owl";
export class BeautifulRenderer extends Component {}
BeautifulRenderer.template = "my_module.Renderer";
.. code-block:: xml
:caption: :file:`beautiful_renderer.xml`
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="my_module.Renderer" owl="1">
<t t-esc="props.propsYouWant"/>
<t t-foreach="props.records" t-as="record" t-key="record.id">
// Show records
</t>
</t>
</templates>
#. Create the model.
The role of the model is to retrieve and manage all the necessary data in the view.
.. code-block:: js
:caption: :file:`beautiful_model.js`
/** @odoo-module */
import { KeepLast } from "@web/core/utils/concurrency";
export class BeautifulModel {
constructor(orm, resModel, fields, archInfo, domain) {
this.orm = orm;
this.resModel = resModel;
// We can access arch information parsed by the beautiful arch parser
const { fieldFromTheArch } = archInfo;
this.fieldFromTheArch = fieldFromTheArch;
this.fields = fields;
this.domain = domain;
this.keepLast = new KeepLast();
}
async load() {
// The keeplast protect against concurrency call
const { length, records } = await this.keepLast.add(
this.orm.webSearchRead(this.resModel, this.domain, [this.fieldsFromTheArch], {})
);
this.records = records;
this.recordsLength = length;
}
}
.. note::
For advanced cases, instead of creating a model from scratch, it is also possible to use
`RelationalModel`, which is used by other views.
#. Create the arch parser.
The role of the arch parser is to parse the arch view so the view has access to the information.
.. code-block:: js
:caption: :file:`beautiful_arch_parser.js`
/** @odoo-module */
import { XMLParser } from "@web/core/utils/xml";
export class BeautifulArchParser extends XMLParser {
parse(arch) {
const xmlDoc = this.parseXML(arch);
const fieldFromTheArch = xmlDoc.getAttribute("fieldFromTheArch");
return {
fieldFromTheArch,
};
}
}
#. Create the view and combine all the pieces together, then register the view in the views
registry.
.. code-block:: js
:caption: :file:`beautiful_view.js`
/** @odoo-module */
import { registry } from "@web/core/registry";
import { BeautifulController } from "./beautiful_controller";
import { BeautifulArchParser } from "./beautiful_arch_parser";
import { BeautifylModel } from "./beautiful_model";
import { BeautifulRenderer } from "./beautiful_renderer";
export const beautifulView = {
type: "beautiful",
display_name: "Beautiful",
icon: "fa fa-picture-o", // the icon that will be displayed in the Layout panel
multiRecord: true,
Controller: BeautifulController,
ArchParser: BeautifulArchParser,
Model: BeautifulModel,
Renderer: BeautifulRenderer,
props(genericProps, view) {
const { ArchParser } = view;
const { arch } = genericProps;
const archInfo = new ArchParser().parse(arch);
return {
...genericProps,
Model: view.Model,
Renderer: view.Renderer,
archInfo,
};
},
};
registry.category("views").add("beautifulView", beautifulView);
#. Use the view in an arch.
.. code-block:: xml
...
<beautiful fieldFromTheArch="res.partner"/>
...

View File

@@ -15,7 +15,6 @@ JavaScript framework
frontend/services
frontend/hooks
frontend/patching_code
frontend/javascript_cheatsheet
frontend/javascript_reference
frontend/mobile
frontend/qweb

Some files were not shown because too many files have changed in this diff Show More