Compare commits

..

1 Commits

Author SHA1 Message Date
Antoine Vandevenne (anv)
90bfdb90a4 poc 2022-04-12 16:22:29 +02:00
2289 changed files with 4848 additions and 7255 deletions

2
.gitattributes vendored
View File

@@ -1,2 +0,0 @@
# Include RST files in language statistics on GitHub.
*.rst linguist-detectable

3
.gitignore vendored
View File

@@ -1,7 +1,6 @@
*.pyc
*.mo
.*
!.gitattributes
*.mo
# Sphinx build files
_build/

View File

@@ -19,8 +19,6 @@ SPHINXOPTS = -D project_root=$(ROOT) -D canonical_version=$(CANONICAL_VERSIO
-D versions=$(VERSIONS) -D languages=$(LANGUAGES) -D language=$(CURRENT_LANG) \
-D is_remote_build=$(IS_REMOTE_BUILD) \
-A google_analytics_key=$(GOOGLE_ANALYTICS_KEY) \
-A plausible_script=$(PLAUSIBLE_SCRIPT) \
-A plausible_domain=$(PLAUSIBLE_DOMAIN) \
-j $(WORKERS)
SOURCE_DIR = content

108
conf.py
View File

@@ -1,12 +1,9 @@
import re
import os
import shutil
import sys
from pathlib import Path
import docutils
from pygments.lexers import JsonLexer, XmlLexer
from sphinx.ext import graphviz
from sphinx.util import logging
import sphinx
@@ -51,20 +48,11 @@ exclude_patterns = [
# See https://docutils.sourceforge.io/docs/ref/rst/roles.html#standard-roles for other roles.
default_role = 'literal'
# Whether scaled down images should be be wrapped in a `<a/>` tag linking to the image file or not.
html_scaled_image_link = False
# If true, '()' will be appended to :func: etc. cross-reference text
add_function_parentheses = True
#=== Extensions configuration ===#
source_read_replace_vals = {
'GITHUB_PATH': f'https://github.com/odoo/odoo/blob/{version}',
'GITHUB_ENT_PATH': f'https://github.com/odoo/enterprise/blob/{version}',
}
# Add extensions directory to PYTHONPATH
extension_dir = Path('extensions')
sys.path.insert(0, str(extension_dir.absolute()))
@@ -86,14 +74,11 @@ if not odoo_sources_dirs:
{'dir_list': '\n'.join([f'\t- {d.resolve()}' for d in odoo_sources_candidate_dirs])},
)
else:
if (3, 6) < sys.version_info < (3, 7):
# Running odoo needs python 3.7 min but monkey patch version_info to be compatible with 3.6.
sys.version_info = (3, 7, 0)
odoo_dir = odoo_sources_dirs[0].resolve()
source_read_replace_vals['ODOO_RELPATH'] = '/../' + str(odoo_sources_dirs[0])
sys.path.insert(0, str(odoo_dir))
import odoo.addons
odoo.addons.__path__.append(str(odoo_dir) + '/addons')
if (3, 6) < sys.version_info < (3, 7):
# Running odoo needs python 3.7 min but monkey patch version_info to be compatible with 3.6
sys.version_info = (3, 7, 0)
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 = 'master' if 'alpha' in odoo_release.version else odoo_version
@@ -113,18 +98,12 @@ else:
)
odoo_dir_in_path = True
# Mapping between odoo models related to master data and the declaration of the
# data. This is used to point users to available xml_ids when giving values for
# a field with the autodoc_field extension.
model_references = {
'account.account.type': 'addons/account/data/data_account_type.xml',
'res.country': 'odoo/addons/base/data/res_country_data.xml',
'res.currency': 'odoo/addons/base/data/res_currency_data.xml',
}
# The Sphinx extensions to use, as module names.
# They can be extensions coming with Sphinx (named 'sphinx.ext.*') or custom ones.
extensions = [
# Parse Python docstrings (autodoc, automodule, autoattribute directives)
'sphinx.ext.autodoc' if odoo_dir_in_path else 'autodoc_placeholder',
# Link sources in other projects (used to build the reference doc)
'sphinx.ext.intersphinx',
@@ -154,15 +133,7 @@ if odoo_dir_in_path:
extensions += [
'sphinx.ext.linkcode',
'github_link',
# Parse Python docstrings (autodoc, automodule, autoattribute directives)
'sphinx.ext.autodoc',
'autodoc_field',
]
else:
extensions += [
'autodoc_placeholder',
]
extensions.append('sphinx.ext.graphviz' if shutil.which('dot') else 'graphviz_placeholder')
todo_include_todos = False
@@ -188,6 +159,7 @@ sphinx.transforms.i18n.docname_to_domain = (
versions_names = {
'master': "Master",
'saas-15.2': "Odoo Online",
'saas-15.1': "Odoo Online",
'15.0': "Odoo 15",
'14.0': "Odoo 14",
'13.0': "Odoo 13",
@@ -196,18 +168,18 @@ versions_names = {
# The language names that should be shown in the language switcher, if the config option `languages`
# is populated. If a language is passed to `languages` but is not listed here, it will not be shown.
languages_names = {
'de': 'DE',
'en': 'EN',
'es': 'ES',
'fr': 'FR',
'nl': 'NL',
'pt_BR': 'PT',
'uk': 'UA',
'zh_CN': 'ZH',
'de': 'Deutsch',
'en': 'English',
'es': 'Español',
'fr': 'Français',
'nl': 'Nederlands',
'pt_BR': 'Português (BR)',
'uk': 'українська',
'zh_CN': '简体中文',
}
# The directory in which files holding redirect rules used by the 'redirects' extension are listed.
redirects_dir = 'redirects/'
# The specifications of redirect rules used by the redirects extension.
redirects_file = 'redirects.txt'
sphinx_tabs_disable_tab_closing = True
sphinx_tabs_disable_css_loading = True
@@ -231,12 +203,12 @@ html_favicon = os.path.join(html_theme_path[0], html_theme, 'static', 'img', 'fa
# They are copied after the builtin static files, so a file named "default.css" will overwrite the
# builtin "default.css".
html_static_path = ['static']
html_permalinks = True
html_add_permalinks = '' # Sphinx < 3.5
html_permalinks = True # Sphinx >= 3.5
# Additional JS & CSS files that can be imported with the 'custom-js' and 'custom-css' metadata.
# Lists are empty because the files are specified in extensions/themes.
html_js_files = []
html_css_files = []
html_css_files = ["css/js.css"]
# PHP lexer option to not require <?php
highlight_options = {
@@ -254,7 +226,7 @@ latex_elements = {
'tableofcontents': '', # no TOC
# Output manually in latex docs
'releasename': release,
'releasename': '14.0',
}
latex_additional_files = ['static/latex/odoo.sty']
@@ -294,22 +266,6 @@ latex_logo = 'static/img/odoo_logo.png'
# If true, show URL addresses after external links.
latex_show_urls = 'True'
# https://github.com/sphinx-doc/sphinx/issues/4054#issuecomment-329097229
def source_read_replace(app, docname, source):
"""Substitute parts of strings with computed values.
Since the RST substitution is not working everywhere, i.e. in directives'
options, we need to be able to input those values when reading the sources.
This is using the config `source_read_replace_vals`, mapping a name to its
replacement. This will look for the name surrounded by curly braces in the source.
Meant to be connected to the `source-read` event.
"""
result = source[0]
for key in app.config.source_read_replace_vals:
result = result.replace(f"{{{key}}}", app.config.source_read_replace_vals[key])
source[0] = result
def setup(app):
# Generate all alternate URLs for each document
@@ -318,34 +274,12 @@ def setup(app):
app.add_config_value('versions', None, 'env')
app.add_config_value('languages', None, 'env')
app.add_config_value('is_remote_build', None, 'env') # Whether the build is remotely deployed
app.add_config_value('source_read_replace_vals', {}, 'env')
app.connect('source-read', source_read_replace)
app.add_lexer('json', JsonLexer)
app.add_lexer('xml', XmlLexer)
app.connect('html-page-context', _generate_alternate_urls)
# Add a `condition` option on directives to ignore them based on config values
app.add_config_value('odoo_dir_in_path', None, 'env')
def context_eval(expr):
return eval(expr, {confval.name: confval.value for confval in app.config})
def patch(to_patch):
to_patch.option_spec['condition'] = context_eval
original_run = to_patch.run
def new_run(self):
if not self.options.get('condition', True):
return []
return original_run(self)
to_patch.run = new_run
for to_patch in (
sphinx.directives.code.LiteralInclude,
docutils.parsers.rst.directives.tables.CSVTable,
):
patch(to_patch)
def _generate_alternate_urls(app, pagename, templatename, context, doctree):
""" Add keys of required alternate URLs for the current document in the rendering context.

View File

@@ -388,112 +388,20 @@ The solutions to support livechat/motifications in a WSGI application are:
with ``/longpolling/`` to
:option:`the longpolling port <odoo-bin --longpolling-port>`.
.. _deploy/streaming:
Serving Static Files
====================
Serving static files and attachments
====================================
For development convenience, Odoo directly serves all static files in its
modules. This may not be ideal when it comes to performances, and static
files should generally be served by a static HTTP server.
For development convenience, Odoo directly serves all static files and attachments in its modules.
This may not be ideal when it comes to performances, and static files should generally be served by
a static HTTP server.
Serving static files
--------------------
Odoo static files are located in each module's :file:`static/` folder, so static files can be served
by intercepting all requests to :samp:`/{MODULE}/static/{FILE}`, and looking up the right module
(and file) in the various addons paths.
.. example::
Say Odoo has been installed via the **debian packages** for Community and Enterprise, the addons
paths is :file:`/usr/lib/python3/dist-packages/odoo/addons`. Using the above NGINX (https)
configuration, the following location block should be added to serve static files via NGINX.
.. code-block:: nginx
location @odoo {
# copy-paste the content of the / location block
}
# Serve static files right away
location ~ ^/[^/]+/static/.+$ {
root /usr/lib/python3/dist-packages/odoo/addons;
try_files $uri @odoo;
expires 24h;
}
.. example::
Say Odoo has been installed via the **source**, and the two git repositories for Community and
Enterprise has been cloned in :file:`/opt/odoo` and :file:`/opt/odoo-enterprise` respectively.
The addons paths is ``/opt/odoo/odoo,/opt/odoo/addons,/opt/odoo-enterprise``. Using the above
NGINX (https) configuragion, the following location block should be added to serve static files
via NGINX.
.. code-block:: nginx
location @odoo {
# copy-paste the content of the / location block
}
# Serve static files right away
location ~ ^/[^/]+/static/.+$ {
try_files /static-base$uri /static-addons$uri /static-enterprise$uri @odoo$uri;
expires 24h;
}
location /static-base {
internal;
alias /opt/odoo/odoo/addons;
}
location /static-addons {
internal;
alias /opt/odoo/addons;
}
location /static-enterprise {
internal;
alias /opt/odoo-enterprise;
}
.. warning::
The actual NGINX configuration you need is highly dependent on your own installation. The two
above snippets only highlight two possible configurations and may not be used as-is.
Serving attachments
-------------------
Attachments are files stored in the filestore which access is regulated by Odoo. They cannot be
directly accessed via a static web server as accessing them requires multiple lookups in the
database to determine where the files are stored and whether the current user can access them or
not.
Nevertheless, once the file has been located and the access rights verified by Odoo, it is a good
idea to serve the file using the static web server instead of Odoo. For Odoo to delegate serving
files to the static web server, the `X-Sendfile <https://tn123.org/mod_xsendfile/>`_ (apache) or
`X-Accel <https://www.nginx.com/resources/wiki/start/topics/examples/x-accel/>`_ (nginx) extensions
must be enabled and configured on the static web server. Once it is set up, start Odoo with the
:option:`--x-sendfile <odoo-bin --x-sendfile>` CLI flag (this unique flag is used for both
X-Sendfile and X-Accel).
.. note::
- The X-Sendfile extension for apache (and compatible web servers) does not require any
supplementary configuration.
- The X-Accel extension for NGINX **does** require the following additionnal configuration:
.. code-block:: nginx
location /web/filestore {
internal;
alias /path/to/odoo/data-dir/filestore;
}
In case you don't know what is the path to your filestore, start Odoo with the
:option:`--x-sendfile <odoo-bin --x-sendfile>` option and navigate to the ``/web/filestore`` URL
directly via Odoo (don't navigate to the URL via NGINX). This logs a warnings, the message
contains the configuration you need.
Odoo static files live in each module's ``static/`` folder, so static files
can be served by intercepting all requests to :samp:`/{MODULE}/static/{FILE}`,
and looking up the right module (and file) in the various addons paths.
.. todo:: test whether it would be interesting to serve filestored attachments
via this, and how (e.g. possibility of mapping ir.attachment id to
filestore hash in the database?)
.. _security:

View File

@@ -669,7 +669,7 @@ A typical way to run the server would be:
database to serve on `localhost:8069`.
.. seealso::
- :doc:`The exhaustive list of arguments for odoo-bin </developer/cli>`.
- :doc:`The exhaustive list of arguments for odoo-bin </developer/misc/other/cmdline>`.
.. _setup/install/docker:

View File

@@ -7,7 +7,6 @@ Maintain
.. toctree::
maintain/domain_names
maintain/google_oauth
maintain/update
maintain/enterprise
maintain/hosting_changes

View File

@@ -21,11 +21,6 @@ You can use a custom domain name to access your Odoo database and websites:
databases for one year. Visitors can then access your website with an address such as
``www.example.com`` rather than the default ``example.odoo.com``.
.. seealso::
- `Odoo Tutorials: Register a Free Domain Name
<https://www.odoo.com/slides/slide/register-a-free-domain-name-1663>`_
- `Odoo Quick Tips: Get a free domain name! <https://www.youtube.com/watch?v=eAfgeNOHLP4>`_
.. _domain-name/about:
About domain names

View File

@@ -1,192 +0,0 @@
========================================
Connect Gmail to Odoo using Google OAuth
========================================
Odoo is compatible with Google's OAuth for Gmail. In order to send secure emails from a custom
domain, all that is required is to configure a few settings on Google's *Workspace* platform, as
well as on the back end of the Odoo database. This configuration works by using either a personal
email address or an address created by a custom domain.
.. tip::
For more information, visit `Google's documentation
<https://support.google.com/cloud/answer/6158849>`_ on setting up OAuth.
Setup in Google
===============
Create a new project
--------------------
To get started, go to the `Google API Platform
<https://console.cloud.google.com/apis/credentials/consent>`_. Log in with your *Google Workspace*
account if you have one, otherwise log in with your personal Gmail account (this should match the
email address you want to configure in Odoo).
After that, click on :guilabel:`Create Project`, located on the far right of the OAuth consent
screen. If a project has already been created in this account, then the :guilabel:`New Project`
option will be located on the top left under the :guilabel:`Select a project` drop-down menu.
On the :guilabel:`New Project` screen, rename the :guilabel:`Project name` to `Odoo` and browse for
the :guilabel:`Location`. Set the :guilabel:`Location` as the `Google Workspace` organization. If
you are using a personal Gmail account, then leave the :guilabel:`Location` as `No Organization`.
.. image:: google_oauth/new-project.png
:align: center
:alt: Project Name and Location for Google Oauth.
Click on :guilabel:`Create` to finish this step. On the next screen, :guilabel:`User Type` options,
select the :guilabel:`External` option, and then click on :guilabel:`Create` again, which will
finally navigate to the :guilabel:`Edit app registration` page.
Edit app registration
---------------------
- On the :guilabel:`Oauth consent screen` step, under the :guilabel:`App information` section,
enter `Odoo` in the :guilabel:`App name` field. Select the organization's email address under the
:guilabel:`User support` email field.
- Next, under :menuselection:`App Domain --> Authorized domains`, click on :guilabel:`Add Domain`
and enter `odoo.com`.
- After that, under the :guilabel:`Developer contact information` section, enter the organization's
email address. Google uses this email address to notify the organization about any changes to
your project.
- Next, click on the :guilabel:`Save and Continue` button.
- Then, skip the :guilabel:`Scopes` page by scrolling to the bottom and clicking on
:guilabel:`Save and Continue`.
- Next, add the email being configured under the :guilabel:`Test users` step by clicking on
:guilabel:`Add Users` and then the :guilabel:`Save and Continue` button. A summary of the
:guilabel:`App registration` appears.
- Finally, scroll to the bottom and click on :guilabel:`Back to Dashboard`.
Create Credentials
------------------
Now that you have set up the project, you need to create credentials, which includes the
:guilabel:`Client ID` and :guilabel:`Client Secret`. First, click on :guilabel:`Credentials` in the
left sidebar menu.
Then, click on :guilabel:`Create Credentials` in the top menu and select
:guilabel:`OAuth client ID` from the dropdown menu.
- Under :guilabel:`Application Type`, select :guilabel:`Web Application` from the dropdown menu.
- In the :guilabel:`Client ID` field, enter `Odoo`.
- Under the :guilabel:`Authorized redirect URIs` label, click the button :guilabel:`ADD URI`, and
then input `https://yourdbname.odoo.com/google_gmail/confirm` in the :guilabel:`URIs 1` field. Be
sure to replace the *yourdbname* part of the URL with your actual Odoo database name.
- Next, click on :guilabel:`Create` to generate an OAuth :guilabel:`Client ID` and
:guilabel:`Client Secret`. Finally, copy each generated value for later use when configuring in
Odoo, and then navigate to the Odoo database.
.. image:: google_oauth/client-credentials.png
:align: center
:alt: Client ID and Client Secret for Google OAuth.
Setup in Odoo
=============
Enter Google Credentials
------------------------
First, open Odoo and navigate to the :guilabel:`Apps` module. Then, remove the :guilabel:`Apps`
filter from the search bar and type in `Google`. Install the module called :guilabel:`Google Gmail`.
Next, navigate to :menuselection:`Settings --> General Settings`, and under the :guilabel:`Discuss`
section, ensure that the checkbox for :guilabel:`Custom Email Servers` is checked. This populates a
new option for :guilabel:`Gmail Credentials`. Then, copy and paste the :guilabel:`Client ID` and
:guilabel:`Client Secret` into the respective fields and :guilabel:`Save` the settings.
Configure outgoing email server
-------------------------------
After that, on the :guilabel:`General Settings` page, under :guilabel:`Custom Email Servers`, click
:guilabel:`Outgoing Email Servers` to configure the external Gmail account.
.. image:: google_oauth/outgoing-servers.png
:align: center
:alt: Configure Outgoing Email Servers in Odoo.
Then, :guilabel:`Create` a new email server and select the option for :guilabel:`Gmail`. Next, fill
in the :guilabel:`Description` (can be anything) and the email :guilabel:`Username` and click on
:guilabel:`Connect your Gmail account`.
A new window from :guilabel:`Google` opens to complete the authorization process. Select the
appropriate email address that is being configured in Odoo.
If the email address is a personal account, an extra step pops up, click :guilabel:`Continue` to
allow the verification and connect the Gmail account to Odoo.
Then, allow Odoo to access the Google account by clicking on :guilabel:`Continue` or
:guilabel:`Allow`. After that, the page navigates back to the newly configured outgoing email
server in Odoo. The configuration automatically loads the token in Odoo, and a tag stating
:guilabel:`Gmail Token Valid` appears in green.
.. image:: google_oauth/green-token.png
:align: center
:alt: Configure Outgoing Email Servers in Odoo.
Finally, save the settings and :guilabel:`Test the Connection`. A confirmation message should
appear. The Odoo database can now send safe, secure emails through Google using OAuth
authentication.
Google OAuth FAQ
================
Production VS Testing Publishing Status
---------------------------------------
Choosing :guilabel:`Production` as the :guilabel:`Publishing Status` (instead of Testing) will
display the following warning message:
.. image:: google_oauth/published-status.png
:align: center
:alt: OAuth is Limited to 100 Sensitive Scope Logins.
To correct this warning, navigate to the `Google API Platform
<https://console.cloud.google.com/apis/credentials/consent>`_. If the :guilabel:`Publishing status`
is :guilabel:`In Production`, click :guilabel:`Back to Testing` to correct the issue.
No Test Users Added
-------------------
If no test users are added to the OAuth consent screen, then a 403 access denied error will
populate.
.. image:: google_oauth/403-error.png
:align: center
:alt: 403 Access Denied Error.
To correct this error, return to the :guilabel:`OAuth consent screen` under
:guilabel:`APIs & Services` and add test user(s) to the app. Add the email that you are configuring
in Odoo.
Gmail Module not updated
------------------------
If the :guilabel:`Gmail Module` in Odoo has not been updated to the latest version, then a
:guilabel:`Forbidden` error message populates.
.. image:: google_oauth/forbidden-error.png
:align: center
:alt: Forbidden you don't have the permission to access the requested resource.
To correct this error, go to the :guilabel:`Apps` module and clear out the search terms. Then,
search for `Gmail` or `Google` and upgrade the :guilabel:`Google Gmail` module. Finally, click on
the three dots on the upper right of the module and select :guilabel:`Upgrade`.
Application Type
----------------
When creating the :guilabel:`Credentials` (OAuth Client ID and Client Secret), if
:guilabel:`Desktop App` is selected for the :guilabel:`Application Type`, an
:guilabel:`Authorization Error` appears.
.. image:: google_oauth/error-400.png
:align: center
:alt: Error 400 Redirect URI Mismatch.
To correct this error, delete the credentials already created and create new credentials, selecting
:guilabel:`Web Application` for the :guilabel:`Application Type`. Then, under
:guilabel:`Authorized redirect URIs`, click :guilabel:`ADD URI` and type:
`https://yourdbname.odoo.com/google_gmail/confirm` in the field.
.. note::
Replace *yourdbname* in the URL with the Odoo database name.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

View File

@@ -11,6 +11,8 @@ Depending on the platforms, you have to do it by yourself or contact our support
From on-premises to Odoo Online
===============================
.. warning:: Odoo Online is not compatible with **non-standard apps**.
1. Create a :ref:`duplicate <duplicate_premise>` of your database: in this duplicate, uninstall all the **non-standard apps**.
2. Grab a "dump with filestore" of your database by using the Database Manager.
3. **If you have time constraints, contact us earlier to schedule the transfer.**
@@ -18,11 +20,6 @@ From on-premises to Odoo Online
5. We will make sure your database is compatible and upload it to our cloud. In case of technical issues, we will get in touch with you.
6. It's done!
.. important::
- Odoo Online is not compatible with **non-standard apps**.
- The database you are moving to Odoo Online must be in a :doc:`supported version
<supported_versions>`.
From on-premises to Odoo.sh
===========================
@@ -48,37 +45,13 @@ From Odoo Online to Odoo.sh
From Odoo.sh to Odoo Online
===========================
#. Uninstall all the **non-standard apps**.
#. `Create a support ticket <https://www.odoo.com/help>`_ and include the following:
.. warning:: Odoo Online is not compatible with **non-standard apps**.
- Your subscription number
- The URL you want to use for your database (e.g., `example.odoo.com`)
- Which brand you want to migrate
- In which region you want to be hosted:
- Americas
- Europe
- Asia
- Which user(s) will be the administrator(s)
- When (and in which timezone) you want the database to be up and running
#. We will make sure your database is compatible and upload it to our cloud. In case of technical
issues, we will get in touch with you.
#. All done!
.. important::
- Odoo Online is not compatible with **non-standard apps**.
- Make sure to uninstall all the **non-standard apps** in a staging build before doing it in your
production build.
.. note::
- Make sure you select the **region** that is closest to your users to reduce latency.
- The future **administrator(s)** must have an odoo.com account.
- The specific **date and time** at which you want the database to be up and running are mainly
helpful to organize the switch from the odoo.sh server to the Odoo Online servers.
- Databases are **not reachable** during their migration.
- **If you have time constraints, contact us earlier to schedule the transfer**.
1. Uninstall all the **non-standard apps**: test it in a staging build first, then do it in your production build.
2. **If you have time constraints, contact us earlier to schedule the transfer.**
3. `Create a support ticket <https://www.odoo.com/help>`_ and include your subscription number and the URL you want to use for your database (e.g.: my-company.odoo.com).
4. We will make sure your database is compatible and upload it to our cloud. In case of technical issues, we will get in touch with you.
5. It's done!
From Odoo.sh to on-premises
===========================

View File

@@ -68,13 +68,14 @@ This matrix shows the support status of every version.
🏁 Future version, not released yet
.. |green| raw:: html
.. This is an awful way to display colored circles but "Large Green Circle Emoji" was only released
in 2019 (see https://unicode-table.com/en/1F7E2/). Let's wait a few more years...
<span class="text-success" style="font-size: 32px; line-height: 0.5">●</span>
.. |green| image:: data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMzIuMTkgMjMyLjE5Ij48Y2lyY2xlIGN4PSIxMTYuMDkiIGN5PSIxMTYuMDkiIHI9IjExNi4wOSIgc3R5bGU9ImZpbGw6IzAwYTcwMCIvPjwvc3ZnPg==
:width: 15
.. |red| raw:: html
<span class="text-danger" style="font-size: 32px; line-height: 0.5">●</span>
.. |red| image:: data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMzIuMTkgMjMyLjE5Ij48Y2lyY2xlIGN4PSIxMTYuMDkiIGN5PSIxMTYuMDkiIHI9IjExNi4wOSIgc3R5bGU9ImZpbGw6I2QwMDAwMCIvPjwvc3ZnPg==
:width: 15
I run an older version of Odoo/OpenERP/TinyERP
==============================================

View File

@@ -167,7 +167,7 @@ In the above commands, the argument:
* ``--stop-after-init`` will immediately shutdown the server instance after it completed the operations you asked.
More options are available and detailed in the
:doc:`CLI documentation </developer/cli>`.
:doc:`CLI documentation </developer/misc/other/cmdline>`.
You can find in the logs (*~/logs/odoo.log*) the addons path used by Odoo.sh to run your server.
Look for "*odoo: addons paths*":
@@ -232,6 +232,6 @@ Save the file and then run the Odoo Shell:
Finally, *via* the Odoo Shell, you can trigger the piece of code/function/method
you want to debug.
.. image:: containers/pdb_sh.png
.. image:: ./media/pdb_sh.png
:align: center
:alt: Console screenshot showing ``pdb`` running in an Odoo.sh shell.

View File

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

View File

@@ -44,7 +44,7 @@ On Odoo.sh, in the branches view of your project, choose the branch in which you
In the upper right corner, click on the *Submodule* button, and then on *Run*.
.. image:: submodules/advanced-submodules-button.png
.. image:: ./media/advanced-submodules-button.png
:align: center
A dialog with a form is shown. Fill the inputs as follows:
@@ -53,12 +53,12 @@ A dialog with a form is shown. Fill the inputs as follows:
* Branch: The branch you want to use.
* Path: The folder in which you want to add this submodule in your branch.
.. image:: submodules/advanced-submodules-dialog.png
.. image:: ./media/advanced-submodules-dialog.png
:align: center
On Github, you can get the repository URL with the *Clone or download* button of the repository. Make sure to *use SSH*.
.. image:: submodules/advanced-submodules-github-sshurl.png
.. image:: ./media/advanced-submodules-github-sshurl.png
:align: center
.. _odoosh-advanced-submodules-withgit:

View File

@@ -8,7 +8,7 @@ Overview
The branches view gives you an overview of the different branches your repository has.
.. image:: branches/interface-branches.png
.. image:: ./media/interface-branches.png
:align: center
.. _odoosh-gettingstarted-branches-stages:
@@ -20,7 +20,7 @@ Odoo.sh offers three different stages for your branches: production, staging and
You can change the stage of a branch by drag and dropping it into the stage section title.
.. image:: branches/interface-branches-stagechange.png
.. image:: ./media/interface-branches-stagechange.png
:align: center
.. _stage_production:
@@ -42,7 +42,7 @@ instance will be held temporarily unavailable for maintenance reason.
This method is equivalent to perform an upgrade of the module through the Apps menu,
or through the :code:`-u` switch of
:doc:`the command line </developer/cli>`.
:doc:`the command line </developer/misc/other/cmdline>`.
In the case the changes in the commit prevent the server to restart,
or if the modules update fails,
@@ -109,7 +109,7 @@ Merging your branches
---------------------
You can merge your branches easily by drag and dropping them into each other.
.. image:: branches/interface-branches-merge.png
.. image:: ./media/interface-branches-merge.png
:align: center
When you want to test the changes of your development branches with the production data,
@@ -156,7 +156,7 @@ An overview of your branch history:
* The messages of the commits and their authors,
* The various events linked to the platform, such as stage changes, database imports, backup restores.
.. image:: branches/interface-branches-history.png
.. image:: ./media/interface-branches-history.png
:align: center
For each event, a status is displayed in the top right-hand corner.
@@ -172,7 +172,7 @@ This tab contains the mail catcher. It displays an overview of the emails sent b
The mail catcher is available for your development and
staging branches as the emails of your production database are really sent instead of being intercepted.
.. image:: branches/interface-branches-mails.png
.. image:: ./media/interface-branches-mails.png
:align: center
:scale: 50%
@@ -181,7 +181,7 @@ Shell
A shell access to your container. You can perform basic linux commands (:code:`ls`, :code:`top`)
and open a shell on your database by typing :code:`psql`.
.. image:: branches/interface-branches-shell.png
.. image:: ./media/interface-branches-shell.png
:align: center
You can open multiple tabs and drag-and-drop them to arrange the layout as you wish,
@@ -197,7 +197,7 @@ Editor
An online integrated development environment (IDE) to edit the source code.
You can also open terminals, Python consoles and even Odoo Shell consoles.
.. image:: branches/interface-branches-editor.png
.. image:: ./media/interface-branches-editor.png
:align: center
You can open multiple tabs and drag-and-drop them to arrange the layout as you wish,
@@ -207,7 +207,7 @@ Monitoring
----------
This link contains various monitoring metrics of the current build.
.. image:: branches/interface-branches-monitoring.png
.. image:: ./media/interface-branches-monitoring.png
:align: center
You can zoom, change the time range or select a specific metric on each graph.
@@ -219,7 +219,7 @@ Logs
----
A viewer to have a look to your server logs.
.. image:: branches/interface-branches-logs.png
.. image:: ./media/interface-branches-logs.png
:align: center
Different logs are available:
@@ -243,7 +243,7 @@ Backups
A list of the backups available for download and restore, the ability to perform a manual backup and to import a
database.
.. image:: branches/interface-branches-backups.png
.. image:: ./media/interface-branches-backups.png
:align: center
Odoo.sh makes daily backups of the production database. It keeps 7 daily, 4 weekly and 3 monthly backups.
@@ -285,7 +285,7 @@ Settings
--------
Here you can find a couple of settings that only apply to the currently selected branch.
.. image:: branches/interface-branches-settings.jpg
.. image:: ./media/interface-branches-settings.jpg
:align: center
**Behaviour upon new commit**
@@ -302,7 +302,7 @@ back from staging to development will automatically be set to 'Do nothing'.
Choose the modules to install automatically for your development builds.
.. image:: branches/interface-settings-modulesinstallation.png
.. image:: ./media/interface-settings-modulesinstallation.png
:align: center
* *Install only my modules* will install the modules of the branch only. This is the default option.
@@ -397,7 +397,7 @@ Shell commands
==============
In the top right-hand corner of the view, different shell commands are available.
.. image:: branches/interface-branches-shellcommands.png
.. image:: ./media/interface-branches-shellcommands.png
:align: center
Each command can be copied in the clipboard to be used in a terminal,
@@ -466,12 +466,12 @@ To do so, follow these steps:
(only apply the step 1)
#. Paste the copied content to your profile SSH keys and press "Add"
.. image:: branches/SSH-key-pasting.png
.. image:: ./media/SSH-key-pasting.png
:align: center
#. The key should appear below
.. image:: branches/SSH-key-appearing.png
.. image:: ./media/SSH-key-appearing.png
:align: center
Connection
@@ -485,7 +485,7 @@ To connect to your builds using ssh use the following command in a terminal:
You will find a shortcut for this command into the SSH tab in the upper right corner.
.. image:: branches/SSH-panel.png
.. image:: ./media/SSH-panel.png
:align: center
Provided you have the :ref:`correct access rights <odoosh-gettingstarted-settings-collaborators>` on the project,

View File

@@ -13,7 +13,7 @@ In Odoo.sh, a build is considered as a database loaded by an Odoo server
running on a specific revision of your project repository in a containerized environment.
Its purpose is to test the well-behavior of the server, the database and the features with this revision.
.. image:: builds/interface-builds.png
.. image:: ./media/interface-builds.png
:align: center
In this view, a row represents a branch, and a cell of a row represents a build of this branch.
@@ -95,7 +95,7 @@ Features
The production branch will always appear first,
and then the other branches are ordered by last build created. You can filter out the branches.
.. image:: builds/interface-builds-branches.png
.. image:: ./media/interface-builds-branches.png
:align: center
For each branch, you can access the last build's database using the *Connect* link and jump to the branch code using
@@ -103,7 +103,7 @@ the *Github* link. For other branches than the production, you can create a new
of the branch using the link *rebuild*. This last link is not available when there is already a build in progress for
the branch.
.. image:: builds/interface-builds-build.png
.. image:: ./media/interface-builds-build.png
:align: center
For each build, you can access the revision changes using the button with the Github icon.
@@ -113,7 +113,7 @@ in the dropdown menu of the *Connect* button.
.. _odoosh-gettingstarted-builds-download-dump:
.. image:: builds/interface-builds-build-dropdown.png
.. image:: ./media/interface-builds-build-dropdown.png
:align: center
.. _odoosh-gettingstarted-builds-dropdown-menu:

View File

@@ -10,7 +10,7 @@ Deploy your platform
Go to `Odoo.sh <https://www.odoo.sh/>`_ and hit the *Deploy your platform* button.
.. image:: create/deploy.png
.. image:: ./media/deploy.png
:align: center
Sign in with Github
@@ -18,7 +18,7 @@ Sign in with Github
Sign in with your Github account. If you do not have an account yet, hit the *Create an account* link.
.. image:: create/github-signin.png
.. image:: ./media/github-signin.png
:align: center
Authorize Odoo.sh
@@ -26,7 +26,7 @@ Authorize Odoo.sh
Grant Odoo.sh the required accesses to your account by clicking the *Authorize* button.
.. image:: create/github-authorize.png
.. image:: ./media/github-authorize.png
:align: center
Odoo.sh basically needs:
@@ -62,7 +62,7 @@ When submitting the form, if you are notified your subscription is not valid, it
In case of doubt with your subscription, please contact the `Odoo support <https://www.odoo.com/help>`_.
.. image:: create/deploy-form.png
.. image:: ./media/deploy-form.png
:align: center
You're done !
@@ -70,7 +70,7 @@ You're done !
You can start using Odoo.sh. Your first build is about to be created. You will soon be able to connect to your first database.
.. image:: create/deploy-done.png
.. image:: ./media/deploy-done.png
:align: center
.. _odoo_sh_import_your_database:
@@ -113,12 +113,12 @@ Access the URL :file:`/web/database/manager` of your on-premise database and dow
You will need the master password of your database server. If you do not have it, contact your system administrator.
.. image:: create/create-import-onpremise-backup.png
.. image:: ./media/create-import-onpremise-backup.png
:align: center
Choose a zip including the filestore as the backup format.
.. image:: create/create-import-onpremise-backup-dialog.png
.. image:: ./media/create-import-onpremise-backup-dialog.png
:align: center
Odoo Online databases
@@ -126,7 +126,7 @@ Odoo Online databases
`Access your databases manager <https://accounts.odoo.com/my/databases/manage>`_ and download a backup of your database.
.. image:: create/create-import-online-backup.png
.. image:: ./media/create-import-online-backup.png
:align: center
.. Warning::
@@ -138,12 +138,12 @@ Upload the backup
Then, in your Odoo.sh project, in the backups tab of your production branch, import the backup you just downloaded.
.. image:: create/create-import-production.png
.. image:: ./media/create-import-production.png
:align: center
Once the backup imported, you can access the database using the *Connect* button in the history of the branch.
.. image:: create/create-import-production-done.png
.. image:: ./media/create-import-production-done.png
:align: center
Check your outgoing email servers

View File

@@ -37,20 +37,20 @@ In the branches view:
|pic1| |pic2|
.. |pic1| image:: first_module/firstmodule-development-+.png
.. |pic1| image:: ./media/firstmodule-development-+.png
:width: 45%
.. |pic2| image:: first_module/firstmodule-development-fork.png
.. |pic2| image:: ./media/firstmodule-development-fork.png
:width: 45%
Once the build created, you can access the editor and browse to the folder *~/src/user* to access
to the code of your development branch.
.. image:: first_module/firstmodule-development-editor.png
.. image:: ./media/firstmodule-development-editor.png
:align: center
.. image:: first_module/firstmodule-development-editor-interface.png
.. image:: ./media/firstmodule-development-editor-interface.png
:align: center
From your computer
@@ -95,7 +95,7 @@ Or, from your computer, if you have an :ref:`installation of Odoo <setup/install
$ ./odoo-bin scaffold my_module ~/src/odoo-addons/
If you do not want to bother installing Odoo on your computer,
you can also :download:`download this module structure template <first_module/my_module.zip>` in which you replace every occurrences of
you can also :download:`download this module structure template <media/my_module.zip>` in which you replace every occurrences of
*my_module* to the name of your choice.
The below structure will be generated:
@@ -201,19 +201,19 @@ Test your module
Your branch should appear in your development branches in your project.
.. image:: first_module/firstmodule-test-branch.png
.. image:: ./media/firstmodule-test-branch.png
:align: center
In the branches view of your project,
you can click on your branch name in the left navigation panel to access its history.
.. image:: first_module/firstmodule-test-branch-history.png
.. image:: ./media/firstmodule-test-branch-history.png
:align: center
You can see here the changes you just pushed, including the comment you set.
Once the database ready, you can access it by clicking the *Connect* button.
.. image:: first_module/firstmodule-test-database.png
.. image:: ./media/firstmodule-test-database.png
:align: center
If your Odoo.sh project is configured to install your module automatically,
@@ -234,12 +234,12 @@ You can either:
* Make your development branch a staging branch, by drag and dropping it onto the *staging* section title.
.. image:: first_module/firstmodule-test-devtostaging.png
.. image:: ./media/firstmodule-test-devtostaging.png
:align: center
* Merge it in an existing staging branch, by drag and dropping it onto the given staging branch.
.. image:: first_module/firstmodule-test-devinstaging.png
.. image:: ./media/firstmodule-test-devinstaging.png
:align: center
You can also use the :code:`git merge` command to merge your branches.
@@ -247,7 +247,7 @@ You can also use the :code:`git merge` command to merge your branches.
This will create a new staging build, which will duplicate the production database and make it run using a server
updated with your latest changes of your branch.
.. image:: first_module/firstmodule-test-mergedinstaging.png
.. image:: ./media/firstmodule-test-mergedinstaging.png
:align: center
Once the database ready, you can access it using the *Connect* button.
@@ -267,12 +267,12 @@ Your module may not appear directly in your apps to install either, you need to
* in the apps menu, click the *Update Apps List* button,
* in the dialog that appears, click the *Update* button.
.. image:: first_module/firstmodule-test-updateappslist.png
.. image:: ./media/firstmodule-test-updateappslist.png
:align: center
Your module will then appear in the list of available apps.
.. image:: first_module/firstmodule-test-mymoduleinapps.png
.. image:: ./media/firstmodule-test-mymoduleinapps.png
:align: center
Deploy in production
@@ -283,7 +283,7 @@ and believe it is ready for production, you can merge your branch in the product
Drag and drop your staging branch on the production branch.
.. image:: first_module/firstmodule-test-mergeinproduction.png
.. image:: ./media/firstmodule-test-mergeinproduction.png
:align: center
You can also use the :code:`git merge` command to merge your branches.
@@ -291,7 +291,7 @@ You can also use the :code:`git merge` command to merge your branches.
This will merge the latest changes of your staging branch in the production branch,
and update your production server with these latest changes.
.. image:: first_module/firstmodule-test-mergedinproduction.png
.. image:: ./media/firstmodule-test-mergedinproduction.png
:align: center
Once the database ready, you can access it using the *Connect* button.
@@ -411,7 +411,7 @@ Or, from your computer terminal:
The platform will then create a new build for the branch *feature-1*.
.. image:: first_module/firstmodule-test-addachange-build.png
.. image:: ./media/firstmodule-test-addachange-build.png
:align: center
Once you tested your changes, you can merge your changes in the production branch, for instance by drag-and-dropping the

View File

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -12,7 +12,7 @@ The online editor allows you to edit the source code of your builds from a web b
It also gives you the possibility to open terminals, Python consoles, Odoo Shell consoles and
`Notebooks <https://jupyterlab.readthedocs.io/en/stable/user/notebook.html>`_.
.. image:: online-editor/interface-editor.png
.. image:: ./media/interface-editor.png
:align: center
You can access the editor of a build through
@@ -37,6 +37,7 @@ The working directory is composed of the following folders:
│ │ ├── enterprise Odoo Enterprise source code
│ │ ├── themes Odoo Themes source code
│ │ └── user Your repository branch source code
│ ├── repositories The Git repositories used by your project
│ ├── data
│ │ ├── filestore database attachments, as well as the files of binary fields
│ │ └── sessions visitors and users sessions
@@ -65,20 +66,20 @@ server is not a good practice.
To open a file in the editor, just double-click on it in the file browser panel on the left.
.. image:: online-editor/interface-editor-open-file.png
.. image:: ./media/interface-editor-open-file.png
:align: center
You can then begin to make your changes. You can save your changes with the menu
:menuselection:`File --> Save .. File` or by hitting the :kbd:`Ctrl+S` shortcut.
.. image:: online-editor/interface-editor-save-file.png
.. image:: ./media/interface-editor-save-file.png
:align: center
If you save a Python file which is under your Odoo server addons path,
Odoo will detect it and reload automatically so your changes are reflected immediately,
without having to restart the server manually.
.. image:: online-editor/interface-editor-automaticreload.gif
.. image:: ./media/interface-editor-automaticreload.gif
:align: center
However, if the change is a data stored in database, such as the label of a field, or a view,
@@ -87,7 +88,7 @@ You can update the module of the currently opened file by using the menu
:menuselection:`Odoo --> Update current module`. Note that the file considered as currently opened
is the file focused in the text editor, not the file highlighted in the file browser.
.. image:: online-editor/interface-editor-update-current-module.png
.. image:: ./media/interface-editor-update-current-module.png
:align: center
You can also open a terminal and execute the command:
@@ -117,7 +118,7 @@ In this last command,
* <branch> must be replaced by the name of the branch to which you want to push the changes,
most-likely the current branch if you work in a development build.
.. image:: online-editor/interface-editor-commit-push.png
.. image:: ./media/interface-editor-commit-push.png
:align: center
.. Note::
@@ -159,7 +160,7 @@ Thanks to this, you will be able to display objects in HTML.
You can for instance display cells of a CSV file using
`pandas <https://pandas.pydata.org/pandas-docs/stable/tutorials.html>`_.
.. image:: online-editor/interface-editor-console-python-read-csv.png
.. image:: ./media/interface-editor-console-python-read-csv.png
:align: center
You can also open an Odoo Shell console to play around
@@ -188,12 +189,12 @@ to easily display lists and dicts in a pretty way, using the
`rich display <https://ipython.readthedocs.io/en/stable/config/integrating.html#rich-display>`_
mentioned above.
.. image:: online-editor/interface-editor-console-odoo-pretty.png
.. image:: ./media/interface-editor-console-odoo-pretty.png
:align: center
You can also use
`pandas <https://pandas.pydata.org/pandas-docs/stable/tutorials.html>`_
to display graphs.
.. image:: online-editor/interface-editor-console-odoo-graph.png
.. image:: ./media/interface-editor-console-odoo-graph.png
:align: center

View File

@@ -8,7 +8,7 @@ Overview
The settings allow you to manage the configuration of your project.
.. image:: settings/interface-settings.png
.. image:: ./media/interface-settings.png
:align: center
Project name
@@ -16,7 +16,7 @@ Project name
The name of your project.
.. image:: settings/interface-settings-projectname.png
.. image:: ./media/interface-settings-projectname.png
:align: center
This defines the address that will be used to access your production database.
@@ -31,7 +31,7 @@ Collaborators
Manage the Github users who can access your project.
.. image:: settings/interface-settings-collaborators.png
.. image:: ./media/interface-settings-collaborators.png
:align: center
There are two levels of users:
@@ -87,7 +87,7 @@ Public Access
Allow public access to your development builds.
.. image:: settings/interface-settings-public.png
.. image:: ./media/interface-settings-public.png
:align: center
If activated, this option exposes the Builds page publicly, allowing visitors to connect to your development builds.
@@ -117,7 +117,7 @@ as submodules in your branches to allow Odoo.sh to download them.
If you are looking on how to set up your submodules,
instructions are available in the chapter :ref:`Submodules <odoosh-advanced-submodules>` of this documentation.
.. image:: settings/interface-settings-submodules.png
.. image:: ./media/interface-settings-submodules.png
:align: center
When a repository is private, it is not possible to publicly download its branches and revisions.
@@ -148,7 +148,7 @@ Storage Size
This section shows the storage size used by your project.
.. image:: settings/interface-settings-storage.png
.. image:: ./media/interface-settings-storage.png
:align: center
Storage size is computed as follows:
@@ -170,7 +170,7 @@ Additional database workers can be configured here. More workers help increase t
production database is able to handle. If you add more, it will automatically be synchronized
with your subscription.
.. image:: settings/interface-settings-workers.png
.. image:: ./media/interface-settings-workers.png
:align: center
.. Warning::
@@ -185,7 +185,7 @@ Staging Branches
Additional staging branches allow you to develop and test more features at the same time. If you
add more, it will automatically be synchronized with your subscription.
.. image:: settings/interface-settings-staging-branches.png
.. image:: ./media/interface-settings-staging-branches.png
:align: center
Activation
@@ -193,5 +193,5 @@ Activation
Shows the status of the project's activation. You can change the project's activation code if needed.
.. image:: settings/interface-settings-activation.png
.. image:: ./media/interface-settings-activation.png
:align: center

View File

@@ -8,5 +8,5 @@ Overview
The status page shows statistics regarding the servers your project uses. It includes the servers availability.
.. image:: status/interface-status.png
.. image:: ./media/interface-status.png
:align: center

View File

@@ -15,6 +15,7 @@ development with features such as AI-powered invoice recognition, synchronizatio
accounts, smart matching suggestions, etc.
.. seealso::
- `Odoo Tutorials: Invoicing <https://www.odoo.com/slides/invoicing-18>`_
- `Odoo Tutorials: Accounting <https://www.odoo.com/slides/accounting-19>`_
- :doc:`Accounting Cheat Sheet <accounting/getting_started/memento>`

View File

@@ -1,8 +1,8 @@
:nosearch:
=============
Bank and cash
=============
===========
Bank & Cash
===========
.. toctree::
:titlesonly:

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