Compare commits

..

1 Commits

Author SHA1 Message Date
Antoine Vandevenne (anv) dba4ba5f39 test 2021-07-26 10:30:53 +02:00
7050 changed files with 375343 additions and 5697966 deletions
-2
View File
@@ -1,2 +0,0 @@
# Include RST files in language statistics on GitHub.
*.rst linguist-detectable
+11
View File
@@ -0,0 +1,11 @@
# All changes to technical files (build environment and Sphinx extensions) have to be approved
/extensions/ @odoo/doc-review
.gitignore @odoo/doc-review
commit_template.txt @odoo/doc-review
conf.py @odoo/doc-review
Makefile @odoo/doc-review
requirements.txt @odoo/doc-review
# All changes to legal material have to be approved
/content/legal/ @odoo/legal
/content/legal.rst @odoo/legal
+2 -2
View File
@@ -1,10 +1,10 @@
*.pyc
*.mo
.*
!.gitattributes
*.mo
# Sphinx build files
_build/
extensions/odoo_theme/static/style.css
# Dependencies
odoo
+49 -138
View File
@@ -1,152 +1,63 @@
[main]
host = https://www.transifex.com
type = PO
[o:odoo:p:odoo-17-doc:r:administration]
file_filter = locale/<lang>/LC_MESSAGES/administration.po
source_file = locale/sources/administration.pot
type = POT
minimum_perc = 0
resource_name = administration
replace_edited_strings = false
keep_translations = false
source_lang = en
[odoo-14-doc.applications]
file_filter = locale/<lang>/LC_MESSAGES/applications.po
source_file = locale/sources/applications.pot
source_lang = en
[o:odoo:p:odoo-17-doc:r:applications]
file_filter = locale/<lang>/LC_MESSAGES/applications.po
source_file = locale/sources/applications.pot
type = POT
minimum_perc = 0
resource_name = applications
replace_edited_strings = false
keep_translations = false
source_lang = en
[odoo-14-doc.finance]
file_filter = locale/<lang>/LC_MESSAGES/finance.po
source_file = locale/sources/finance.pot
source_lang = en
[o:odoo:p:odoo-17-doc:r:essentials]
file_filter = locale/<lang>/LC_MESSAGES/essentials.po
source_file = locale/sources/essentials.pot
type = POT
minimum_perc = 0
resource_name = essentials
replace_edited_strings = false
keep_translations = false
source_lang = en
[odoo-14-doc.general]
file_filter = locale/<lang>/LC_MESSAGES/general.po
source_file = locale/sources/general.pot
source_lang = en
[o:odoo:p:odoo-17-doc:r:finance]
file_filter = locale/<lang>/LC_MESSAGES/finance.po
source_file = locale/sources/finance.pot
type = POT
minimum_perc = 0
resource_name = finance
replace_edited_strings = false
keep_translations = false
source_lang = en
[odoo-14-doc.index]
file_filter = locale/<lang>/LC_MESSAGES/index.po
source_file = locale/sources/index.pot
source_lang = en
[o:odoo:p:odoo-17-doc:r:general]
file_filter = locale/<lang>/LC_MESSAGES/general.po
source_file = locale/sources/general.pot
type = POT
minimum_perc = 0
resource_name = general
replace_edited_strings = false
keep_translations = false
source_lang = en
[odoo-14-doc.inventory_and_mrp]
file_filter = locale/<lang>/LC_MESSAGES/inventory_and_mrp.po
source_file = locale/sources/inventory_and_mrp.pot
source_lang = en
[o:odoo:p:odoo-17-doc:r:hr]
file_filter = locale/<lang>/LC_MESSAGES/hr.po
source_file = locale/sources/hr.pot
type = POT
minimum_perc = 0
resource_name = hr
replace_edited_strings = false
keep_translations = false
source_lang = en
[odoo-14-doc.marketing]
file_filter = locale/<lang>/LC_MESSAGES/marketing.po
source_file = locale/sources/marketing.pot
source_lang = en
[o:odoo:p:odoo-17-doc:r:index]
file_filter = locale/<lang>/LC_MESSAGES/index.po
source_file = locale/sources/index.pot
type = POT
minimum_perc = 0
resource_name = index
replace_edited_strings = false
keep_translations = false
source_lang = en
[odoo-14-doc.productivity]
file_filter = locale/<lang>/LC_MESSAGES/productivity.po
source_file = locale/sources/productivity.pot
source_lang = en
[o:odoo:p:odoo-17-doc:r:inventory_and_mrp]
file_filter = locale/<lang>/LC_MESSAGES/inventory_and_mrp.po
source_file = locale/sources/inventory_and_mrp.pot
type = POT
minimum_perc = 0
resource_name = inventory_and_mrp
replace_edited_strings = false
keep_translations = false
source_lang = en
[odoo-14-doc.sales]
file_filter = locale/<lang>/LC_MESSAGES/sales.po
source_file = locale/sources/sales.pot
source_lang = en
[o:odoo:p:odoo-17-doc:r:marketing]
file_filter = locale/<lang>/LC_MESSAGES/marketing.po
source_file = locale/sources/marketing.pot
type = POT
minimum_perc = 0
resource_name = marketing
replace_edited_strings = false
keep_translations = false
source_lang = en
[odoo-14-doc.services]
file_filter = locale/<lang>/LC_MESSAGES/services.po
source_file = locale/sources/services.pot
source_lang = en
[o:odoo:p:odoo-17-doc:r:productivity]
file_filter = locale/<lang>/LC_MESSAGES/productivity.po
source_file = locale/sources/productivity.pot
type = POT
minimum_perc = 0
resource_name = productivity
replace_edited_strings = false
keep_translations = false
source_lang = en
[odoo-14-doc.theme]
file_filter = locale/<lang>/LC_MESSAGES/sphinx.po
source_file = locale/sources/sphinx.pot
source_lang = en
[o:odoo:p:odoo-17-doc:r:sales]
file_filter = locale/<lang>/LC_MESSAGES/sales.po
source_file = locale/sources/sales.pot
type = POT
minimum_perc = 0
resource_name = sales
replace_edited_strings = false
keep_translations = false
source_lang = en
[odoo-14-doc.user_settings]
file_filter = locale/<lang>/LC_MESSAGES/settings.po
source_file = locale/sources/settings.pot
source_lang = en
[o:odoo:p:odoo-17-doc:r:services]
file_filter = locale/<lang>/LC_MESSAGES/services.po
source_file = locale/sources/services.pot
type = POT
minimum_perc = 0
resource_name = services
replace_edited_strings = false
keep_translations = false
source_lang = en
[o:odoo:p:odoo-17-doc:r:user_settings]
file_filter = locale/<lang>/LC_MESSAGES/settings.po
source_file = locale/sources/settings.pot
type = POT
minimum_perc = 0
resource_name = settings
replace_edited_strings = false
keep_translations = false
source_lang = en
[o:odoo:p:odoo-17-doc:r:studio]
file_filter = locale/<lang>/LC_MESSAGES/studio.po
source_file = locale/sources/studio.pot
type = POT
minimum_perc = 0
resource_name = studio
replace_edited_strings = false
keep_translations = false
source_lang = en
[o:odoo:p:odoo-17-doc:r:websites]
file_filter = locale/<lang>/LC_MESSAGES/websites.po
source_file = locale/sources/websites.pot
type = POT
minimum_perc = 0
resource_name = websites
replace_edited_strings = false
keep_translations = false
source_lang = en
[odoo-14-doc.websites]
file_filter = locale/<lang>/LC_MESSAGES/websites.po
source_file = locale/sources/websites.pot
source_lang = en
-13
View File
@@ -1,13 +0,0 @@
Most of the files are
Copyright (c) 2004-2023 Odoo S.A.
Some files may also contain contributions from third
parties. In this case the original copyright of
the contributions can be traced through the
history of the source version control system.
When that is not the case, the files contain a prominent
notice stating the original copyright and applicable
license, or come with their own dedicated COPYRIGHT
and/or LICENSE file.
-428
View File
@@ -1,428 +0,0 @@
Attribution-ShareAlike 4.0 International
=======================================================================
Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client or
other relationship. Creative Commons makes its licenses and related
information available on an "as-is" basis. Creative Commons gives no
warranties regarding its licenses, any material licensed under their
terms and conditions, or any related information. Creative Commons
disclaims all liability for damages resulting from their use to the
fullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and
conditions that creators and other rights holders may use to share
original works of authorship and other material subject to copyright
and certain other rights specified in the public license below. The
following considerations are for informational purposes only, are not
exhaustive, and do not form part of our licenses.
Considerations for licensors: Our public licenses are
intended for use by those authorized to give the public
permission to use material in ways otherwise restricted by
copyright and certain other rights. Our licenses are
irrevocable. Licensors should read and understand the terms
and conditions of the license they choose before applying it.
Licensors should also secure all rights necessary before
applying our licenses so that the public can reuse the
material as expected. Licensors should clearly mark any
material not subject to the license. This includes other CC-
licensed material, or material used under an exception or
limitation to copyright. More considerations for licensors:
wiki.creativecommons.org/Considerations_for_licensors
Considerations for the public: By using one of our public
licenses, a licensor grants the public permission to use the
licensed material under specified terms and conditions. If
the licensor's permission is not necessary for any reason--for
example, because of any applicable exception or limitation to
copyright--then that use is not regulated by the license. Our
licenses grant only permissions under copyright and certain
other rights that a licensor has authority to grant. Use of
the licensed material may still be restricted for other
reasons, including because others have copyright or other
rights in the material. A licensor may make special requests,
such as asking that all changes be marked or described.
Although not required by our licenses, you are encouraged to
respect those requests where reasonable. More considerations
for the public:
wiki.creativecommons.org/Considerations_for_licensees
=======================================================================
Creative Commons Attribution-ShareAlike 4.0 International Public
License
By exercising the Licensed Rights (defined below), You accept and agree
to be bound by the terms and conditions of this Creative Commons
Attribution-ShareAlike 4.0 International Public License ("Public
License"). To the extent this Public License may be interpreted as a
contract, You are granted the Licensed Rights in consideration of Your
acceptance of these terms and conditions, and the Licensor grants You
such rights in consideration of benefits the Licensor receives from
making the Licensed Material available under these terms and
conditions.
Section 1 -- Definitions.
a. Adapted Material means material subject to Copyright and Similar
Rights that is derived from or based upon the Licensed Material
and in which the Licensed Material is translated, altered,
arranged, transformed, or otherwise modified in a manner requiring
permission under the Copyright and Similar Rights held by the
Licensor. For purposes of this Public License, where the Licensed
Material is a musical work, performance, or sound recording,
Adapted Material is always produced where the Licensed Material is
synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright
and Similar Rights in Your contributions to Adapted Material in
accordance with the terms and conditions of this Public License.
c. BY-SA Compatible License means a license listed at
creativecommons.org/compatiblelicenses, approved by Creative
Commons as essentially the equivalent of this Public License.
d. Copyright and Similar Rights means copyright and/or similar rights
closely related to copyright including, without limitation,
performance, broadcast, sound recording, and Sui Generis Database
Rights, without regard to how the rights are labeled or
categorized. For purposes of this Public License, the rights
specified in Section 2(b)(1)-(2) are not Copyright and Similar
Rights.
e. Effective Technological Measures means those measures that, in the
absence of proper authority, may not be circumvented under laws
fulfilling obligations under Article 11 of the WIPO Copyright
Treaty adopted on December 20, 1996, and/or similar international
agreements.
f. Exceptions and Limitations means fair use, fair dealing, and/or
any other exception or limitation to Copyright and Similar Rights
that applies to Your use of the Licensed Material.
g. License Elements means the license attributes listed in the name
of a Creative Commons Public License. The License Elements of this
Public License are Attribution and ShareAlike.
h. Licensed Material means the artistic or literary work, database,
or other material to which the Licensor applied this Public
License.
i. Licensed Rights means the rights granted to You subject to the
terms and conditions of this Public License, which are limited to
all Copyright and Similar Rights that apply to Your use of the
Licensed Material and that the Licensor has authority to license.
j. Licensor means the individual(s) or entity(ies) granting rights
under this Public License.
k. Share means to provide material to the public by any means or
process that requires permission under the Licensed Rights, such
as reproduction, public display, public performance, distribution,
dissemination, communication, or importation, and to make material
available to the public including in ways that members of the
public may access the material from a place and at a time
individually chosen by them.
l. Sui Generis Database Rights means rights other than copyright
resulting from Directive 96/9/EC of the European Parliament and of
the Council of 11 March 1996 on the legal protection of databases,
as amended and/or succeeded, as well as other essentially
equivalent rights anywhere in the world.
m. You means the individual or entity exercising the Licensed Rights
under this Public License. Your has a corresponding meaning.
Section 2 -- Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License,
the Licensor hereby grants You a worldwide, royalty-free,
non-sublicensable, non-exclusive, irrevocable license to
exercise the Licensed Rights in the Licensed Material to:
a. reproduce and Share the Licensed Material, in whole or
in part; and
b. produce, reproduce, and Share Adapted Material.
2. Exceptions and Limitations. For the avoidance of doubt, where
Exceptions and Limitations apply to Your use, this Public
License does not apply, and You do not need to comply with
its terms and conditions.
3. Term. The term of this Public License is specified in Section
6(a).
4. Media and formats; technical modifications allowed. The
Licensor authorizes You to exercise the Licensed Rights in
all media and formats whether now known or hereafter created,
and to make technical modifications necessary to do so. The
Licensor waives and/or agrees not to assert any right or
authority to forbid You from making technical modifications
necessary to exercise the Licensed Rights, including
technical modifications necessary to circumvent Effective
Technological Measures. For purposes of this Public License,
simply making modifications authorized by this Section 2(a)
(4) never produces Adapted Material.
5. Downstream recipients.
a. Offer from the Licensor -- Licensed Material. Every
recipient of the Licensed Material automatically
receives an offer from the Licensor to exercise the
Licensed Rights under the terms and conditions of this
Public License.
b. Additional offer from the Licensor -- Adapted Material.
Every recipient of Adapted Material from You
automatically receives an offer from the Licensor to
exercise the Licensed Rights in the Adapted Material
under the conditions of the Adapter's License You apply.
c. No downstream restrictions. You may not offer or impose
any additional or different terms or conditions on, or
apply any Effective Technological Measures to, the
Licensed Material if doing so restricts exercise of the
Licensed Rights by any recipient of the Licensed
Material.
6. No endorsement. Nothing in this Public License constitutes or
may be construed as permission to assert or imply that You
are, or that Your use of the Licensed Material is, connected
with, or sponsored, endorsed, or granted official status by,
the Licensor or others designated to receive attribution as
provided in Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not
licensed under this Public License, nor are publicity,
privacy, and/or other similar personality rights; however, to
the extent possible, the Licensor waives and/or agrees not to
assert any such rights held by the Licensor to the limited
extent necessary to allow You to exercise the Licensed
Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this
Public License.
3. To the extent possible, the Licensor waives any right to
collect royalties from You for the exercise of the Licensed
Rights, whether directly or through a collecting society
under any voluntary or waivable statutory or compulsory
licensing scheme. In all other cases the Licensor expressly
reserves any right to collect such royalties.
Section 3 -- License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the
following conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified
form), You must:
a. retain the following if it is supplied by the Licensor
with the Licensed Material:
i. identification of the creator(s) of the Licensed
Material and any others designated to receive
attribution, in any reasonable manner requested by
the Licensor (including by pseudonym if
designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of
warranties;
v. a URI or hyperlink to the Licensed Material to the
extent reasonably practicable;
b. indicate if You modified the Licensed Material and
retain an indication of any previous modifications; and
c. indicate the Licensed Material is licensed under this
Public License, and include the text of, or the URI or
hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any
reasonable manner based on the medium, means, and context in
which You Share the Licensed Material. For example, it may be
reasonable to satisfy the conditions by providing a URI or
hyperlink to a resource that includes the required
information.
3. If requested by the Licensor, You must remove any of the
information required by Section 3(a)(1)(A) to the extent
reasonably practicable.
b. ShareAlike.
In addition to the conditions in Section 3(a), if You Share
Adapted Material You produce, the following conditions also apply.
1. The Adapter's License You apply must be a Creative Commons
license with the same License Elements, this version or
later, or a BY-SA Compatible License.
2. You must include the text of, or the URI or hyperlink to, the
Adapter's License You apply. You may satisfy this condition
in any reasonable manner based on the medium, means, and
context in which You Share Adapted Material.
3. You may not offer or impose any additional or different terms
or conditions on, or apply any Effective Technological
Measures to, Adapted Material that restrict exercise of the
rights granted under the Adapter's License You apply.
Section 4 -- Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that
apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
to extract, reuse, reproduce, and Share all or a substantial
portion of the contents of the database;
b. if You include all or a substantial portion of the database
contents in a database in which You have Sui Generis Database
Rights, then the database in which You have Sui Generis Database
Rights (but not its individual contents) is Adapted Material,
including for purposes of Section 3(b); and
c. You must comply with the conditions in Section 3(a) if You Share
all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
c. The disclaimer of warranties and limitation of liability provided
above shall be interpreted in a manner that, to the extent
possible, most closely approximates an absolute disclaimer and
waiver of all liability.
Section 6 -- Term and Termination.
a. This Public License applies for the term of the Copyright and
Similar Rights licensed here. However, if You fail to comply with
this Public License, then Your rights under this Public License
terminate automatically.
b. Where Your right to use the Licensed Material has terminated under
Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided
it is cured within 30 days of Your discovery of the
violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any
right the Licensor may have to seek remedies for Your violations
of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the
Licensed Material under separate terms or conditions or stop
distributing the Licensed Material at any time; however, doing so
will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
License.
Section 7 -- Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different
terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the
Licensed Material not stated herein are separate from and
independent of the terms and conditions of this Public License.
Section 8 -- Interpretation.
a. For the avoidance of doubt, this Public License does not, and
shall not be interpreted to, reduce, limit, restrict, or impose
conditions on any use of the Licensed Material that could lawfully
be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is
deemed unenforceable, it shall be automatically reformed to the
minimum extent necessary to make it enforceable. If the provision
cannot be reformed, it shall be severed from this Public License
without affecting the enforceability of the remaining terms and
conditions.
c. No term or condition of this Public License will be waived and no
failure to comply consented to unless expressly agreed to by the
Licensor.
d. Nothing in this Public License constitutes or may be interpreted
as a limitation upon, or waiver of, any privileges and immunities
that apply to the Licensor or You, including from the legal
processes of any jurisdiction or authority.
=======================================================================
Creative Commons is not a party to its public
licenses. Notwithstanding, Creative Commons may elect to apply one of
its public licenses to material it publishes and in those instances
will be considered the “Licensor.” The text of the Creative Commons
public licenses is dedicated to the public domain under the CC0 Public
Domain Dedication. Except for the limited purpose of indicating that
material is shared under a Creative Commons public license or as
otherwise permitted by the Creative Commons policies published at
creativecommons.org/policies, Creative Commons does not authorize the
use of the trademark "Creative Commons" or any other trademark or logo
of Creative Commons without its prior written consent including,
without limitation, in connection with any unauthorized modifications
to any of its public licenses or any other arrangements,
understandings, or agreements concerning use of licensed material. For
the avoidance of doubt, this paragraph does not form part of the
public licenses.
Creative Commons may be contacted at creativecommons.org.
+10 -30
View File
@@ -9,25 +9,19 @@ ifndef BUILD_DIR
BUILD_DIR = _build
endif
ifndef CURRENT_LANG
CURRENT_LANG = en
endif
SPHINX_BUILD = sphinx-build
CONFIG_DIR = .
SPHINXOPTS = -D project_root=$(ROOT) -D canonical_version=$(CANONICAL_VERSION) \
-D versions=$(VERSIONS) -D languages=$(LANGUAGES) -D language=$(CURRENT_LANG) \
-D is_remote_build=$(IS_REMOTE_BUILD) \
-T \
-A google_analytics_key=$(GOOGLE_ANALYTICS_KEY) \
-A plausible_script=$(PLAUSIBLE_SCRIPT) \
-A plausible_domain=$(PLAUSIBLE_DOMAIN) \
-j $(WORKERS)
SOURCE_DIR = content
HTML_BUILD_DIR = $(BUILD_DIR)/html
ifdef VERSIONS
HTML_BUILD_DIR := $(HTML_BUILD_DIR)/17.0
HTML_BUILD_DIR := $(HTML_BUILD_DIR)/master
endif
ifneq ($(CURRENT_LANG),en)
HTML_BUILD_DIR := $(HTML_BUILD_DIR)/$(CURRENT_LANG)
@@ -43,21 +37,20 @@ help:
@echo " html to build the documentation to HTML"
@echo " fast to build the documentation to HTML with shallow menu (faster)"
@echo " clean to delete the build files"
@echo " test to run the guidelines tests"
clean:
@echo "Cleaning build files..."
rm -rf $(BUILD_DIR)/*
@echo "Cleaning finished."
html: $(HTML_BUILD_DIR)/_static/style.css
html: $(BUILD_DIR)/html/_static/style.css
@echo "Starting build..."
$(SPHINX_BUILD) -c $(CONFIG_DIR) -b html $(SPHINXOPTS) $(SOURCE_DIR) $(HTML_BUILD_DIR)
@echo "Build finished."
# To call *after* `make html`
# Binary dependencies (Debian): texlive-fonts-recommended texlive-latex-extra
# texlive-fonts-extra
# texlive-generic-recommended texlive-fonts-extra
latexpdf:
@echo "Starting build..."
$(SPHINX_BUILD) -c $(CONFIG_DIR) -b latex $(SPHINXOPTS) $(SOURCE_DIR) $(BUILD_DIR)/latex
@@ -70,10 +63,10 @@ gettext:
$(SPHINX_BUILD) -c $(CONFIG_DIR) -b gettext $(SOURCE_DIR) locale/sources
@echo "Generation finished."
$(HTML_BUILD_DIR)/_static/style.css: extensions/odoo_theme/static/style.scss extensions/odoo_theme/static/scss/*.scss
$(BUILD_DIR)/html/_static/style.css: extensions/odoo_theme/static/style.scss extensions/odoo_theme/static/scss/*.scss
@echo "Compiling stylesheets..."
mkdir -p $(HTML_BUILD_DIR)/_static
python3 -m pysassc extensions/odoo_theme/static/style.scss $(HTML_BUILD_DIR)/_static/style.css
mkdir -p $(BUILD_DIR)/html/_static
pysassc extensions/odoo_theme/static/style.scss $(BUILD_DIR)/html/_static/style.css
@echo "Compilation finished."
#=== Development and debugging rules ===#
@@ -81,19 +74,6 @@ $(HTML_BUILD_DIR)/_static/style.css: extensions/odoo_theme/static/style.scss ext
fast: SPHINXOPTS += -A collapse_menu=True
fast: html
static: $(HTML_BUILD_DIR)/_static/style.css
cp -r extensions/odoo_theme/static/* $(HTML_BUILD_DIR)/_static/
cp -r static/* $(HTML_BUILD_DIR)/_static/
# Called by runbot for the ci/documentation_guideline check.
test:
@python tests/main.py $(SOURCE_DIR)/administration $(SOURCE_DIR)/applications $(SOURCE_DIR)/contributing $(SOURCE_DIR)/developer redirects
# Similar as `test`, but called only manually by content reviewers to trigger extra checks.
review:
@read -p "Enter relative content path: " path; read -p "Enter max line length (default: 100): " line_length; \
if [ -z "$$path" ]; then echo "Error: Path cannot be empty"; exit 1; fi; \
if echo $$path | grep -q 'content/'; then path=`echo $$path | sed 's|content/||'`; fi; \
if [ -z "$$line_length" ]; then line_length=100; fi; \
export REVIEW=1; \
python tests/main.py --max-line-length=$$line_length $(SOURCE_DIR)/$$path
static: $(BUILD_DIR)/static/style.css
cp -r extensions/odoo_theme/static/* $(BUILD_DIR)/html/_static/
cp -r static/* $(BUILD_DIR)/html/_static/
+27 -15
View File
@@ -4,35 +4,47 @@
### Requirements
- Git
- Python 3.6, 3.7, or 3.8
- Python dependencies listed in the file `requirements.txt`.
- Make
- A local copy of the [odoo/odoo repository](https://github.com/odoo/odoo) (optional)
- A local copy of the [odoo/upgrade-util repository](https://github.com/odoo/upgrade-util) (optional)
- [Git](https://www.odoo.com/documentation/master/contributing/documentation.html#install-git)
- [Python 3.6, 3.7, or 3.8](https://www.odoo.com/documentation/master/contributing/documentation.html#python)
- Python dependencies listed in the file [`requirements.txt`](https://github.com/odoo/documentation/tree/master/requirements.txt).
- [Make](https://www.odoo.com/documentation/master/contributing/documentation.html#make)
- A local copy of the [odoo/odoo repository in master](https://github.com/odoo/odoo/tree/master) (Optional)
### Instructions
1. In a terminal, navigate to the root directory of the documentation and build it `make`.
1. In a terminal, navigate to the root directory and compile the documentation to HTML with the
following command:
```sh
make
```
Additional commands are available with `make help`.
2. Open the file `documentation/_build/html/index.html` in your web browser.
3. See [this guide](https://www.odoo.com/documentation/latest/contributing/documentation.html)
2. Open the file `documentation/_build/html/index.html` in your web browser to display the render.
3. See [this guide](https://www.odoo.com/documentation/master/contributing/documentation.html#preview-your-changes)
for more detailed instructions.
Optional: place your local copy of the `odoo/odoo` and `odoo/upgrade-util` repositories in
the parent directory or in the root directory of the documentation to build the latter
with the documented Python docstrings.
Optional: to fully build the developer documentation with inline docstrings for documented Python
functions, place your local copy of the `odoo/odoo` repository in the root directory. Alternatively,
create a symbolic link with `odoo` as link name. If the Odoo sources are not found, a warning will
be shown.
## Contribute to the documentation
For contributions to the content of the documentation, please refer to the
[Introduction Guide](https://www.odoo.com/documentation/latest/contributing/documentation.html).
[Introduction Guide](https://www.odoo.com/documentation/master/contributing/documentation.html).
To **report a content issue**, **request new content** or **ask a question**, use the
[repository's issue tracker](https://github.com/odoo/documentation/issues).
[repository's issue tracker](https://github.com/odoo/documentation-user/issues) as usual.
If you have a pull request that is ready for review, request one from the
[odoo/doc-review](https://github.com/orgs/odoo/teams/doc-review) team.
## Learn More
To learn more about Odoo, in addition to the documentation, have a look at
[the official eLearning](https://odoo.com/slides) and
[Scale-up, The Business Game](https://www.odoo.com/page/scale-up-business-game).
[Scale-up, The Business Game](https://www.odoo.com/page/scale-up-business-game).
+1 -1
View File
@@ -16,4 +16,4 @@
# [REM] = Removal
# [REF] = Refactoring (restructuring)
# [MOV] = Move/rename
#
#
+66 -259
View File
@@ -1,14 +1,11 @@
import os
import re
import shutil
import os
import sys
from pathlib import Path
import docutils
import sphinx
from pygments.lexers import JsonLexer, XmlLexer
from sphinx.ext import graphviz
from sphinx.util import logging
import sphinx
_logger = logging.getLogger(__name__)
@@ -19,24 +16,10 @@ _logger = logging.getLogger(__name__)
project = 'Odoo'
copyright = 'Odoo S.A.'
# `version` is the version info for the project being documented, acts as replacement for |version|,
# `version` if the version info for the project being documented, acts as replacement for |version|,
# also used in various other places throughout the built documents.
# `release` is the full version, including alpha/beta/rc tags. Acts as replacement for |release|.
version = release = '17.0'
# `current_branch` is the technical name of the current branch.
# E.g., saas-15.4 -> saas-15.4; 12.0 -> 12.0, master -> master (*).
current_branch = version
# `current_version` is the Odoo version linked to the current branch.
# E.g., saas-15.4 -> 15.4; 12.0 -> 12; master -> master (*).
current_version = current_branch.replace('saas-', '').replace('.0', '')
# `current_major_branch` is the technical name of the major branch before the current branch.
# E.g., saas-15.4 -> 15.0; 12.0 -> 12.0; master -> master (*).
current_major_branch = re.sub(r'\.\d', '.0', current_branch.replace('saas-', ''))
# `current_major_version` is the Odoo version linked to the current major branch.
# E.g., saas-15.4 -> 15; 12.0 -> 12; master -> master (*).
current_major_version = current_major_branch.replace('.0', '')
# (*): We don't care for master.
version = release = 'master'
# The minimal Sphinx version required to build the documentation.
needs_sphinx = '3.0.0'
@@ -65,104 +48,52 @@ 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 = {
'BRANCH': current_branch,
'CURRENT_BRANCH': current_branch,
'CURRENT_VERSION': current_version,
'CURRENT_MAJOR_BRANCH': current_major_branch,
'CURRENT_MAJOR_VERSION': current_major_version,
'GITHUB_PATH': f'https://github.com/odoo/odoo/blob/{version}',
'GITHUB_ENT_PATH': f'https://github.com/odoo/enterprise/blob/{version}',
'OWL_PATH': f'https://github.com/odoo/owl/blob/master',
}
# Add extensions directory to PYTHONPATH
extension_dir = Path('extensions')
sys.path.insert(0, str(extension_dir.absolute()))
# Search for the directory of odoo sources to know whether autodoc should be used on the dev doc
odoo_sources_candidate_dirs = (Path('odoo'), Path('../odoo'))
odoo_sources_dirs = [
d for d in odoo_sources_candidate_dirs if d.is_dir() and (d / 'odoo-bin').exists()
]
odoo_dir = Path('odoo')
odoo_dir_in_path = False
if not odoo_sources_dirs:
if not odoo_dir.is_dir():
parent_odoo_dir = Path('../odoo')
if parent_odoo_dir.is_dir():
_logger.info('Using parent dir to find odoo sources')
odoo_dir = parent_odoo_dir
if not odoo_dir.is_dir():
_logger.warning(
"Could not find Odoo sources directory in neither of the following folders:\n"
"%(dir_list)s\n"
"The 'Developer' documentation will be built but autodoc directives will be skipped.\n"
"In order to fully build the 'Developer' documentation, clone the repository with "
"`git clone https://github.com/odoo/odoo` or create a symbolic link.",
{'dir_list': '\n'.join([f'\t- {d.resolve()}' for d in odoo_sources_candidate_dirs])},
f"Could not find Odoo sources directory at {odoo_dir.absolute()}.\n"
f"The 'Developer' documentation will be built but autodoc directives will be skipped.\n"
f"In order to fully build the 'Developer' documentation, clone the repository with "
f"`git clone https://github.com/odoo/odoo` or create a symbolink link."
)
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')
sys.path.insert(0, str(odoo_dir.absolute()))
from odoo import release as odoo_release # Don't collide with Sphinx's 'release' config option
odoo_version = '.'.join(str(s) for s in odoo_release.version_info[:2]).replace('~', '-') # Change saas~XX.Y to saas-XX.Y
odoo_version = 'master' if 'alpha' in odoo_release.version else odoo_version
odoo_version = odoo_release.version if 'alpha' not in odoo_release.version else 'master'
if release != odoo_version:
_logger.warning(
"Found Odoo sources in %(directory)s but with version '%(odoo_version)s' incompatible "
"with documentation version '%(doc_version)s'.\n"
"The 'Developer' documentation will be built but autodoc directives will be skipped.\n"
"In order to fully build the 'Developer' documentation, checkout the matching branch"
" with `cd odoo && git checkout %(doc_version)s`.",
{'directory': odoo_dir, 'odoo_version': odoo_version, 'doc_version': version},
f"Found Odoo sources directory but with version '{odoo_version}' incompatible with "
f"documentation version '{version}'.\n"
f"The 'Developer' documentation will be built but autodoc directives will be skipped.\n"
f"In order to fully build the 'Developer' documentation, checkout the matching branch"
f" with `cd odoo && git checkout {version}`."
)
else:
_logger.info(
"Found Odoo sources in %(directory)s matching documentation version '%(version)s'.",
{'directory': odoo_dir, 'version': release},
)
_logger.info(f"Found Odoo sources directory matching documentation version {release}.")
odoo_dir_in_path = True
if odoo_dir_in_path:
upgrade_util_dir = next(filter(Path.exists, [Path('upgrade-util'), Path('../upgrade-util')]), None)
if not upgrade_util_dir:
_logger.warning(
"Could not find Upgrade Utils sources directory in `upgrade_util`.\n"
"The developer documentation will be built but autodoc directives will be skipped.\n"
"In order to fully build the 'Developer' documentation, clone the repository with "
"`git clone https://github.com/odoo/upgrade-util` or create a symbolic link."
)
odoo_dir_in_path = False
else:
_logger.info(
"Found Upgrade Util sources in %(directory)s",
{'directory': upgrade_util_dir.resolve()},
)
from odoo import upgrade
upgrade.__path__.append(str((upgrade_util_dir / 'src').resolve()))
# 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',
@@ -175,45 +106,29 @@ extensions = [
# Youtube and Vimeo videos integration (youtube, vimeo directives)
'embedded_video',
'custom_admonitions',
'exercise_admonition',
# Redirection generator
'redirects',
# Content tabs
'sphinx_tabs.tabs',
# Cards
'cards',
# Spoilers
'spoilers',
# Code switcher (switcher and case directives)
'switcher',
# Strange html domain logic used in memento pages
'html_domain',
]
if odoo_dir_in_path:
# GitHub links generation
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
intersphinx_mapping = {
'pillow': ('https://pillow.readthedocs.io/en/stable/', None),
'python': ('https://docs.python.org/3/', None),
'werkzeug': ('https://werkzeug.palletsprojects.com/en/2.3.x/', None),
'werkzeug': ('https://werkzeug.palletsprojects.com/en/1.0.x/', None),
}
github_user = 'odoo'
@@ -227,47 +142,19 @@ sphinx.transforms.i18n.docname_to_domain = (
sphinx.util.i18n.docname_to_domain
) = lambda docname, compact: docname.split('/')[1 if docname.startswith('applications/') else 0]
# The version names that should be shown in the version switcher, if the config option `versions`
# is populated. If a version is passed to `versions` but is not listed here, it will not be shown.
versions_names = {
'master': "Master",
'18.0': "Odoo 18",
'saas-17.4': "Odoo Online",
'saas-17.2': "Odoo Online",
'17.0': "Odoo 17",
'16.0': "Odoo 16",
'15.0': "Odoo 15",
supported_languages = {
'de': 'Deutsch',
'en': 'English',
'es': 'Español',
'fr': 'Français',
'nl': 'Nederlands',
'pt_BR': 'Português (BR)',
'uk': 'українська',
'zh_CN': '简体中文',
}
# 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',
'es_419': 'ES (LATAM)',
'fr': 'FR',
'it': 'IT',
'ja': 'JA',
'ko': 'KR',
'nl': 'NL',
'pt_BR': 'PT',
'ro': 'RO',
'sv': 'SV',
'th': 'TH',
'uk': 'UA',
'zh_CN': 'ZH (CN)',
'zh_TW': 'ZH (TW)'
}
# The directory in which files holding redirect rules used by the 'redirects' extension are listed.
redirects_dir = 'redirects/'
sphinx_tabs_disable_tab_closing = True
sphinx_tabs_disable_css_loading = True
# Autodoc ordering
autodoc_member_order = 'bysource'
# The specifications of redirect rules used by the redirects extension.
redirects_file = 'redirects.txt'
#=== Options for HTML output ===#
@@ -288,8 +175,8 @@ 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 = []
@@ -311,7 +198,7 @@ latex_elements = {
'tableofcontents': '', # no TOC
# Output manually in latex docs
'releasename': release,
'releasename': '14.0',
}
latex_additional_files = ['static/latex/odoo.sty']
@@ -331,54 +218,26 @@ latex_documents = [
('legal/terms/i18n/partnership_tex_fr',
'odoo_partnership_agreement_fr.tex', 'Odoo Partnership Agreement (FR)', '', 'howto'),
('legal/terms/i18n/terms_of_sale_fr', 'terms_of_sale_fr.tex',
'Conditions Générales de Vente Odoo', '', 'howto'),
u'Conditions Générales de Vente Odoo', '', 'howto'),
('legal/terms/i18n/enterprise_tex_nl', 'odoo_enterprise_agreement_nl.tex',
'Odoo Enterprise Subscription Agreement (NL)', '', 'howto'),
('legal/terms/i18n/enterprise_tex_de', 'odoo_enterprise_agreement_de.tex',
'Odoo Enterprise Subscription Agreement (DE)', '', 'howto'),
('legal/terms/i18n/terms_of_sale_de', 'terms_of_sale_de.tex',
'Allgemeine Verkaufsbedingungen Odoo', '', 'howto'),
('legal/terms/i18n/enterprise_tex_es', 'odoo_enterprise_agreement_es.tex',
'Odoo Enterprise Subscription Agreement (ES)', '', 'howto'),
('legal/terms/i18n/partnership_tex_es',
'odoo_partnership_agreement_es.tex', 'Odoo Partnership Agreement (ES)', '', 'howto'),
('legal/terms/i18n/terms_of_sale_es', 'terms_of_sale_es.tex',
'Términos Generales de Venta Odoo', '', 'howto'),
('legal/terms/i18n/enterprise_tex_pt_BR', 'odoo_enterprise_agreement_pt_BR.tex',
'Odoo Enterprise Subscription Agreement (PT)', '', 'howto'),
]
# List of languages that have legal translations (excluding EN). The keys must be in
# `languages_names`. These translations will have a link to their versions of the legal
# contracts, instead of the default EN one. The main legal documents are not part of the
# translations since they have legal meaning.
legal_translations = ['de', 'es', 'fr', 'nl', 'pt_BR']
# The name of an image file (relative to this directory) to place at the top of the title page.
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
@@ -387,37 +246,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)
# TODO uncomment after moving to >= v7.2.5 to also substitute placeholders in included files.
# See https://github.com/sphinx-doc/sphinx/commit/ff1831
# app.connect('include-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.
@@ -449,18 +283,15 @@ def _generate_alternate_urls(app, pagename, templatename, context, doctree):
The entry 'version' is added by Sphinx in the rendering context.
"""
context['version_display_name'] = versions_names[version]
# If the list of versions is not set, assume the project has no alternate version
_provided_versions = app.config.versions and app.config.versions.split(',') or []
# Map alternate versions to their display names and URLs.
context['alternate_versions'] = []
for _alternate_version, _display_name in versions_names.items():
if _alternate_version in _provided_versions and _alternate_version != version:
context['alternate_versions'].append(
(_display_name, _build_url(_alternate_version))
)
# If the list of versions is not set, assume that the project has no alternate version
_alternate_versions = app.config.versions and app.config.versions.split(',') or []
context['alternate_versions'] = [
(_alternate_version, _build_url(_version=_alternate_version))
for _alternate_version in sorted(_alternate_versions, reverse=True)
if _alternate_version != version and (
_alternate_version != 'master' or pagename.startswith('developer')
)
]
def _localize():
""" Add the pairs of (lang, code, url) for the current document in the rendering context.
@@ -470,28 +301,20 @@ def _generate_alternate_urls(app, pagename, templatename, context, doctree):
The entry 'language' is added by Sphinx in the rendering context.
"""
_current_lang = app.config.language or 'en'
# Replace the context value by its upper-cased value ("FR" instead of "fr")
context['language'] = languages_names.get(_current_lang, _current_lang.upper())
context['language_code'] = _current_lang
# Replace the context value by its translated description ("Français" instead of "french")
context['language'] = supported_languages.get(_current_lang)
# If the list of languages is not set, assume that the project has no alternate language
_provided_languages = app.config.languages and app.config.languages.split(',') or []
# Map alternate languages to their display names and URLs.
context['alternate_languages'] = []
for _alternate_lang, _display_name in languages_names.items():
if _alternate_lang in _provided_languages and _alternate_lang != _current_lang:
context['alternate_languages'].append(
(
_display_name,
_alternate_lang.split('_')[0] if _alternate_lang != 'en' else 'x-default',
_build_url(_lang=_alternate_lang),
)
)
# Dynamic generation of localized legal doc links
context['legal_translations'] = legal_translations
_alternate_languages = app.config.languages and app.config.languages.split(',') or []
context['alternate_languages'] = [
(
supported_languages.get(_alternate_lang),
_alternate_lang.split('_')[0] if _alternate_lang != 'en' else 'x-default',
_build_url(_lang=_alternate_lang),
)
for _alternate_lang in _alternate_languages
if _alternate_lang in supported_languages and _alternate_lang != _current_lang
]
def _build_url(_version=None, _lang=None):
if app.config.is_remote_build:
@@ -505,24 +328,8 @@ def _generate_alternate_urls(app, pagename, templatename, context, doctree):
_version = _version or app.config.version
_lang = _lang or app.config.language or 'en'
_canonical_page = f'{pagename}.html'
# legal translations have different URLs schemes as they are not managed on transifex
# e.g. FR translation of /terms/enterprise => /fr/terms/enterprise_fr
if pagename.startswith('legal/terms/'):
if _lang in legal_translations and not pagename.endswith(f"_{_lang}"):
# remove language code for current translation, set target one
_page = re.sub("_[a-z]{2}$", "", pagename)
if 'terms/i18n' not in _page:
_page = _page.replace("/terms/", "/terms/i18n/")
_canonical_page = f'{_page}_{_lang}.html'
elif _lang == 'en' and pagename.endswith(tuple(f"_{l}" for l in legal_translations)):
# remove language code for current translation, link to original EN one
_page = re.sub("_[a-z]{2}$", "", pagename)
_canonical_page = f'{_page.replace("/i18n/", "/")}.html'
if app.config.is_remote_build:
_canonical_page = _canonical_page.replace('index.html', '')
return f'{_root}' \
f'{f"/{_version}" if app.config.versions else ""}' \
f'{f"/{_lang}" if _lang != "en" else ""}' \
+6 -50
View File
@@ -3,63 +3,19 @@
:hide-page-toc:
:show-toc:
===================
Database management
===================
====================
Install and Maintain
====================
These guides provide instructions on how to install, maintain and upgrade Odoo databases.
.. seealso::
:doc:`History of Versions <administration/supported_versions>`
Installation
============
Depending on the intended use case, there are multiple ways to install Odoo - or not install it at
all.
- :doc:`Online <administration/odoo_online>` is the easiest way to use Odoo in production or to try it.
- :doc:`Packaged installers <administration/on_premise/packages>` are suitable for testing Odoo and
developing modules. They can be used for long-term production with additional deployment and
maintenance work.
- :doc:`Source install <administration/on_premise/source>` provides greater flexibility, as it
allows, for example, running multiple Odoo versions on the same system. It is adequate to develop
modules and can be used as a base for production deployment.
- A `Docker <https://hub.docker.com/_/odoo/>`_ base image is available for development or
deployment.
.. _install/editions:
Editions
========
There are two different editions.
**Odoo Community** is the free and open-source version of the software, licensed under the `GNU
LGPLv3 <https://github.com/odoo/odoo/blob/master/LICENSE>`_. It is the core upon which Odoo
Enterprise is built.
**Odoo Enterprise** is the shared source version of the software, giving access to more
functionalities, including functional support, upgrades, and hosting. `Pricing
<https://www.odoo.com/pricing-plan>`_ starts from one app free.
.. tip::
:doc:`Switch from Community to Enterprise <administration/on_premise/community_to_enterprise>` at
any time (except for the source install).
:doc:`History of Versions <administration/maintain/supported_versions>`
.. toctree::
:titlesonly:
administration/hosting
administration/odoo_online
administration/install
administration/maintain
administration/odoo_sh
administration/on_premise
administration/upgrade
administration/neutralized_database
administration/supported_versions
administration/mobile
administration/odoo_accounts
-121
View File
@@ -1,121 +0,0 @@
=======
Hosting
=======
.. _hosting/change-solution:
Change hosting solution
=======================
The instructions to change the hosting type of a database depend on the current solution used and to
which solution the database should be moved.
Transferring an on-premise database
===================================
To Odoo Online
--------------
.. important::
- Odoo Online is *not* compatible with **non-standard apps**.
- The database's current version must be :doc:`supported <supported_versions>`.
#. Create a :ref:`duplicate of the database <on-premise/duplicate>`.
#. In this duplicate, uninstall all **non-standard apps**.
#. Use the database manager to grab a *dump with filestore*.
#. `Submit a support ticket <https://www.odoo.com/help>`_ including the following:
- your **subscription number**,
- the **URL** you want to use for the database (e.g., `company.odoo.com`), and
- the **dump** as an attachment or as a link to the file (required for 60 MB+ files).
#. Odoo then makes sure the database is compatible before putting it online. In case of technical
issues during the process, Odoo might contact you.
.. note::
If you have time constraints, `submit a support ticket <https://www.odoo.com/help>`_ as soon as
possible to schedule the transfer.
To Odoo.sh
----------
Follow the instructions found in :ref:`the Import your database section
<odoo_sh_import_your_database>` of the Odoo.sh *Create your project* documentation.
Transferring an Odoo Online database
====================================
.. important::
Odoo Online's :ref:`intermediary versions <supported_versions>` are not supported by Odoo.sh or
on-premise. Therefore, if the database to transfer is running an intermediary version, it must be
upgraded first to the next :ref:`major version <supported_versions>`, waiting for its release if
necessary.
.. example::
Transferring an online database running on Odoo 16.3 would require first upgrading it to Odoo
17.0.
.. tip::
Click the gear icon (:guilabel:`⚙`) next to the database name on the `Odoo Online database
manager <https://www.odoo.com/my/databases/>`_ to display its version number.
.. warning::
If there is an active Odoo subscription linked to the database being migrated, reach out to
the Customer Service Manager or `submit a support ticket <https://www.odoo.com/help>`_ to
complete the subscription transfer.
To on-premise
-------------
#. Sign in to `the Odoo Online database manager <https://www.odoo.com/my/databases/>`_ and click the
gear icon (:guilabel:`⚙`) next to the database name to :guilabel:`Download` a backup. If the
download fails due to the file being too large, `contact Odoo support
<https://www.odoo.com/help>`_.
#. Restore the database from the database manager on your local server using the backup.
To Odoo.sh
----------
#. Sign in to `the Odoo Online database manager <https://www.odoo.com/my/databases/>`_ and click the
gear icon (:guilabel:`⚙`) next to the database name to :guilabel:`Download` a backup. If the
download fails due to the file being too large, `contact Odoo support
<https://www.odoo.com/help>`_.
#. Follow the instructions found in :ref:`the Import your database section
<odoo_sh_import_your_database>` of the Odoo.sh *Create your project* documentation.
Transferring an Odoo.sh database
================================
To Odoo Online
--------------
.. important::
Odoo Online is *not* compatible with **non-standard apps**.
#. Uninstall all **non-standard apps** in a staging build before doing it in the production build.
#. `Create a support ticket <https://www.odoo.com/help>`_ including the following:
- your **subscription number**,
- the **URL** you want to use for the database (e.g., `company.odoo.com`),
- which **branch** should be migrated,
- in which **region** you want the database to be hosted (Americas, Europe, or Asia),
- which user(s) will be the **administrator(s)**, and
- **when** (and in which timezone) you want the database to be up and running.
#. Odoo then makes sure the database is compatible before putting it online. In case of technical
issues during the process, Odoo might contact you.
.. note::
- If you have time constraints, `submit a support ticket <https://www.odoo.com/help>`_ as soon as
possible to schedule the transfer.
- Select the **region** closest to most of your users to reduce latency.
- Future **administrator(s)** must have an Odoo.com account.
- The **date and time** you want the database to be up and running are helpful to organize the
switch from the Odoo.sh server to the Odoo Online servers.
- Databases are **not reachable** during their migration.
To on-premise
-------------
#. Download a :ref:`backup of your Odoo.sh production database <odoo_sh_branches_backups>`.
#. Restore the database from the database manager on your local server using the backup.
+12
View File
@@ -0,0 +1,12 @@
:nosearch:
=======
Install
=======
.. toctree::
install/install
install/deploy
install/cdn
install/email_gateway
+80
View File
@@ -0,0 +1,80 @@
===========================================
Setting up a Content Delivery Network (CDN)
===========================================
.. _reference/cdn/keycdn:
Deploying with KeyCDN_
======================
.. sectionauthor:: Fabien Meghazi
This document will guide you through the setup of a KeyCDN_ account with your
Odoo powered website.
Step 1: Create a pull zone in the KeyCDN dashboard
--------------------------------------------------
.. image:: cdn/keycdn_create_a_pull_zone.png
:class: img-fluid
When creating the zone, enable the CORS option in the
:guilabel:`advanced features` submenu. (more on that later)
.. image:: cdn/keycdn_enable_CORS.png
:class: img-fluid
Once done, you'll have to wait a bit while KeyCDN_ is crawling your website.
.. image:: cdn/keycdn_progressbar.png
:class: img-fluid
.. note:: a new URL has been generated for your Zone, in this case it is
``http://pulltest-b49.kxcdn.com``
Step 2: Configure the odoo instance with your zone
--------------------------------------------------
In the Odoo back end, go to the :guilabel:`Website Settings`: menu, then
activate the CDN support and copy/paste your zone URL in the
:guilabel:`CDN Base URL` field. This field is only visible and configurable if
you have developer mode activated.
.. image:: cdn/odoo_cdn_base_url.png
:class: img-fluid
Now your website is using the CDN for the resources matching the
:guilabel:`CDN filters` regular expressions.
You can have a look to the HTML of your website in order to check if the CDN
integration is properly working.
.. image:: cdn/odoo_check_your_html.png
:class: img-fluid
Why should I activate CORS?
---------------------------
A security restriction in some browsers (Firefox and Chrome at time of writing)
prevents a remotely linked CSS file to fetch relative resources on this same
external server.
If you don't activate the CORS option in the CDN zone, the more obvious
resulting problem on a default Odoo website will be the lack of font-awesome
icons because the font file declared in the font-awesome CSS won't be loaded on
the remote server.
Here's what you would see on your homepage in such a case:
.. image:: cdn/odoo_font_file_not_loaded.png
:class: img-fluid
A security error message will also appear in the browser's console:
.. image:: cdn/odoo_security_message.png
:class: img-fluid
Enabling the CORS option in the CDN fixes this issue.
.. _KeyCDN: https://www.keycdn.com
Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

+660
View File
@@ -0,0 +1,660 @@
====================
System configuration
====================
This document describes basic steps to set up Odoo in production or on an
internet-facing server. It follows :ref:`installation <setup/install>`, and is
not generally necessary for a development systems that is not exposed on the
internet.
.. warning:: If you are setting up a public server, be sure to check our :ref:`security` recommandations!
.. _db_filter:
dbfilter
========
Odoo is a multi-tenant system: a single Odoo system may run and serve a number
of database instances. It is also highly customizable, with customizations
(starting from the modules being loaded) depending on the "current database".
This is not an issue when working with the backend (web client) as a logged-in
company user: the database can be selected when logging in, and customizations
loaded afterwards.
However it is an issue for non-logged users (portal, website) which aren't
bound to a database: Odoo needs to know which database should be used to load
the website page or perform the operation. If multi-tenancy is not used that is not an
issue, there's only one database to use, but if there are multiple databases
accessible Odoo needs a rule to know which one it should use.
That is one of the purposes of :option:`--db-filter <odoo-bin --db-filter>`:
it specifies how the database should be selected based on the hostname (domain)
that is being requested. The value is a `regular expression`_, possibly
including the dynamically injected hostname (``%h``) or the first subdomain
(``%d``) through which the system is being accessed.
For servers hosting multiple databases in production, especially if ``website``
is used, dbfilter **must** be set, otherwise a number of features will not work
correctly.
Configuration samples
---------------------
* Show only databases with names beginning with 'mycompany'
in ``/etc/odoo.conf`` set:
.. code-block:: ini
[options]
dbfilter = ^mycompany.*$
* Show only databases matching the first subdomain after ``www``: for example
the database "mycompany" will be shown if the incoming request
was sent to ``www.mycompany.com`` or ``mycompany.co.uk``, but not
for ``www2.mycompany.com`` or ``helpdesk.mycompany.com``.
in ``/etc/odoo.conf`` set:
.. code-block:: ini
[options]
dbfilter = ^%d$
.. note::
Setting a proper :option:`--db-filter <odoo-bin --db-filter>` is an important part
of securing your deployment.
Once it is correctly working and only matching a single database per hostname, it
is strongly recommended to block access to the database manager screens,
and to use the ``--no-database-list`` startup parameter to prevent listing
your databases, and to block access to the database management screens.
See also security_.
PostgreSQL
==========
By default, PostgreSQL only allows connection over UNIX sockets and loopback
connections (from "localhost", the same machine the PostgreSQL server is
installed on).
UNIX socket is fine if you want Odoo and PostgreSQL to execute on the same
machine, and is the default when no host is provided, but if you want Odoo and
PostgreSQL to execute on different machines [#different-machines]_ it will
need to `listen to network interfaces`_ [#remote-socket]_, either:
* Only accept loopback connections and `use an SSH tunnel`_ between the
machine on which Odoo runs and the one on which PostgreSQL runs, then
configure Odoo to connect to its end of the tunnel
* Accept connections to the machine on which Odoo is installed, possibly
over ssl (see `PostgreSQL connection settings`_ for details), then configure
Odoo to connect over the network
Configuration sample
--------------------
* Allow tcp connection on localhost
* Allow tcp connection from 192.168.1.x network
in ``/etc/postgresql/9.5/main/pg_hba.conf`` set:
.. code-block:: text
# IPv4 local connections:
host all all 127.0.0.1/32 md5
host all all 192.168.1.0/24 md5
in ``/etc/postgresql/9.5/main/postgresql.conf`` set:
.. code-block:: text
listen_addresses = 'localhost,192.168.1.2'
port = 5432
max_connections = 80
.. _setup/deploy/odoo:
Configuring Odoo
----------------
Out of the box, Odoo connects to a local postgres over UNIX socket via port
5432. This can be overridden using :ref:`the database options
<reference/cmdline/server/database>` when your Postgres deployment is not
local and/or does not use the installation defaults.
The :ref:`packaged installers <setup/install/packaged>` will automatically
create a new user (``odoo``) and set it as the database user.
* The database management screens are protected by the ``admin_passwd``
setting. This setting can only be set using configuration files, and is
simply checked before performing database alterations. It should be set to
a randomly generated value to ensure third parties can not use this
interface.
* All database operations use the :ref:`database options
<reference/cmdline/server/database>`, including the database management
screen. For the database management screen to work requires that the PostgreSQL user
have ``createdb`` right.
* Users can always drop databases they own. For the database management screen
to be completely non-functional, the PostgreSQL user needs to be created with
``no-createdb`` and the database must be owned by a different PostgreSQL user.
.. warning:: the PostgreSQL user *must not* be a superuser
Configuration sample
~~~~~~~~~~~~~~~~~~~~
* connect to a PostgreSQL server on 192.168.1.2
* port 5432
* using an 'odoo' user account,
* with 'pwd' as a password
* filtering only db with a name beginning with 'mycompany'
in ``/etc/odoo.conf`` set:
.. code-block:: ini
[options]
admin_passwd = mysupersecretpassword
db_host = 192.168.1.2
db_port = 5432
db_user = odoo
db_password = pwd
dbfilter = ^mycompany.*$
.. _postgresql_ssl_connect:
SSL Between Odoo and PostgreSQL
-------------------------------
Since Odoo 11.0, you can enforce ssl connection between Odoo and PostgreSQL.
in Odoo the db_sslmode control the ssl security of the connection
with value chosen out of 'disable', 'allow', 'prefer', 'require', 'verify-ca'
or 'verify-full'
`PostgreSQL Doc <https://www.postgresql.org/docs/current/static/libpq-ssl.html>`_
.. _builtin_server:
Builtin server
==============
Odoo includes built-in HTTP servers, using either multithreading or
multiprocessing.
For production use, it is recommended to use the multiprocessing server as it
increases stability, makes somewhat better use of computing resources and can
be better monitored and resource-restricted.
* Multiprocessing is enabled by configuring :option:`a non-zero number of
worker processes <odoo-bin --workers>`, the number of workers should be based
on the number of cores in the machine (possibly with some room for cron
workers depending on how much cron work is predicted)
* Worker limits can be configured based on the hardware configuration to avoid
resources exhaustion
.. warning:: multiprocessing mode currently isn't available on Windows
Worker number calculation
-------------------------
* Rule of thumb : (#CPU * 2) + 1
* Cron workers need CPU
* 1 worker ~= 6 concurrent users
memory size calculation
-----------------------
* We consider 20% of the requests are heavy requests, while 80% are simpler ones
* A heavy worker, when all computed field are well designed, SQL requests are well designed, ... is estimated to consume around 1GB of RAM
* A lighter worker, in the same scenario, is estimated to consume around 150MB of RAM
Needed RAM = #worker * ( (light_worker_ratio * light_worker_ram_estimation) + (heavy_worker_ratio * heavy_worker_ram_estimation) )
LiveChat
--------
In multiprocessing, a dedicated LiveChat worker is automatically started and
listening on :option:`the longpolling port <odoo-bin --longpolling-port>` but
the client will not connect to it.
Instead you must have a proxy redirecting requests whose URL starts with
``/longpolling/`` to the longpolling port. Other request should be proxied to
the :option:`normal HTTP port <odoo-bin --http-port>`
To achieve such a thing, you'll need to deploy a reverse proxy in front of Odoo,
like nginx or apache. When doing so, you'll need to forward some more http Headers
to Odoo, and activate the proxy_mode in Odoo configuration to have Odoo read those
headers.
Configuration sample
--------------------
* Server with 4 CPU, 8 Thread
* 60 concurrent users
* 60 users / 6 = 10 <- theoretical number of worker needed
* (4 * 2) + 1 = 9 <- theoretical maximal number of worker
* We'll use 8 workers + 1 for cron. We'll also use a monitoring system to measure cpu load, and check if it's between 7 and 7.5 .
* RAM = 9 * ((0.8*150) + (0.2*1024)) ~= 3Go RAM for Odoo
in ``/etc/odoo.conf``:
.. code-block:: ini
[options]
limit_memory_hard = 1677721600
limit_memory_soft = 629145600
limit_request = 8192
limit_time_cpu = 600
limit_time_real = 1200
max_cron_threads = 1
workers = 8
.. _https_proxy:
HTTPS
=====
Whether it's accessed via website/web client or web service, Odoo transmits
authentication information in cleartext. This means a secure deployment of
Odoo must use HTTPS\ [#switching]_. SSL termination can be implemented via
just about any SSL termination proxy, but requires the following setup:
* Enable Odoo's :option:`proxy mode <odoo-bin --proxy-mode>`. This should only be enabled when Odoo is behind a reverse proxy
* Set up the SSL termination proxy (`Nginx termination example`_)
* Set up the proxying itself (`Nginx proxying example`_)
* Your SSL termination proxy should also automatically redirect non-secure
connections to the secure port
Configuration sample
--------------------
* Redirect http requests to https
* Proxy requests to odoo
in ``/etc/odoo.conf`` set:
.. code-block:: ini
proxy_mode = True
in ``/etc/nginx/sites-enabled/odoo.conf`` set:
.. code-block:: nginx
#odoo server
upstream odoo {
server 127.0.0.1:8069;
}
upstream odoochat {
server 127.0.0.1:8072;
}
# http -> https
server {
listen 80;
server_name odoo.mycompany.com;
rewrite ^(.*) https://$host$1 permanent;
}
server {
listen 443;
server_name odoo.mycompany.com;
proxy_read_timeout 720s;
proxy_connect_timeout 720s;
proxy_send_timeout 720s;
# Add Headers for odoo proxy mode
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
# SSL parameters
ssl on;
ssl_certificate /etc/ssl/nginx/server.crt;
ssl_certificate_key /etc/ssl/nginx/server.key;
ssl_session_timeout 30m;
ssl_protocols TLSv1.2;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
ssl_prefer_server_ciphers off;
# log
access_log /var/log/nginx/odoo.access.log;
error_log /var/log/nginx/odoo.error.log;
# Redirect longpoll requests to odoo longpolling port
location /longpolling {
proxy_pass http://odoochat;
}
# Redirect requests to odoo backend server
location / {
proxy_redirect off;
proxy_pass http://odoo;
}
# common gzip
gzip_types text/css text/scss text/plain text/xml application/xml application/json application/javascript;
gzip on;
}
Odoo as a WSGI Application
==========================
It is also possible to mount Odoo as a standard WSGI_ application. Odoo
provides the base for a WSGI launcher script as ``odoo-wsgi.example.py``. That
script should be customized (possibly after copying it from the setup directory) to correctly set the
configuration directly in :mod:`odoo.tools.config` rather than through the
command-line or a configuration file.
However the WSGI server will only expose the main HTTP endpoint for the web
client, website and webservice API. Because Odoo does not control the creation
of workers anymore it can not setup cron or livechat workers
Cron Workers
------------
To run cron jobs for an Odoo deployment as a WSGI application requires
* A classical Odoo (run via ``odoo-bin``)
* Connected to the database in which cron jobs have to be run (via
:option:`odoo-bin -d`)
* Which should not be exposed to the network. To ensure cron runners are not
network-accessible, it is possible to disable the built-in HTTP server
entirely with :option:`odoo-bin --no-http` or setting ``http_enable = False``
in the configuration file
LiveChat
--------
The second problematic subsystem for WSGI deployments is the LiveChat: where
most HTTP connections are relatively short and quickly free up their worker
process for the next request, LiveChat require a long-lived connection for
each client in order to implement near-real-time notifications.
This is in conflict with the process-based worker model, as it will tie
up worker processes and prevent new users from accessing the system. However,
those long-lived connections do very little and mostly stay parked waiting for
notifications.
The solutions to support livechat/motifications in a WSGI application are:
* Deploy a threaded version of Odoo (instead of a process-based preforking
one) and redirect only requests to URLs starting with ``/longpolling/`` to
that Odoo, this is the simplest and the longpolling URL can double up as
the cron instance.
* Deploy an evented Odoo via ``odoo-gevent`` and proxy requests starting
with ``/longpolling/`` to
:option:`the longpolling port <odoo-bin --longpolling-port>`.
Serving Static Files
====================
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.
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:
Security
========
For starters, keep in mind that securing an information system is a continuous process,
not a one-shot operation. At any moment, you will only be as secure as the weakest link
in your environment.
So please do not take this section as the ultimate list of measures that will prevent
all security problems. It's only intended as a summary of the first important things
you should be sure to include in your security action plan. The rest will come
from best security practices for your operating system and distribution,
best practices in terms of users, passwords, and access control management, etc.
When deploying an internet-facing server, please be sure to consider the following
security-related topics:
- Always set a strong super-admin admin password, and restrict access to the database
management pages as soon as the system is set up. See :ref:`db_manager_security`.
- Choose unique logins and strong passwords for all administrator accounts on all databases.
Do not use 'admin' as the login. Do not use those logins for day-to-day operations,
only for controlling/managing the installation.
*Never* use any default passwords like admin/admin, even for test/staging databases.
- Do **not** install demo data on internet-facing servers. Databases with demo data contain
default logins and passwords that can be used to get into your systems and cause significant
trouble, even on staging/dev systems.
- Use appropriate database filters ( :option:`--db-filter <odoo-bin --db-filter>`)
to restrict the visibility of your databases according to the hostname.
See :ref:`db_filter`.
You may also use :option:`-d <odoo-bin -d>` to provide your own (comma-separated)
list of available databases to filter from, instead of letting the system fetch
them all from the database backend.
- Once your ``db_name`` and ``db_filter`` are configured and only match a single database
per hostname, you should set ``list_db`` configuration option to ``False``, to prevent
listing databases entirely, and to block access to the database management screens
(this is also exposed as the :option:`--no-database-list <odoo-bin --no-database-list>`
command-line option)
- Make sure the PostgreSQL user (:option:`--db_user <odoo-bin --db_user>`) is *not* a super-user,
and that your databases are owned by a different user. For example they could be owned by
the ``postgres`` super-user if you are using a dedicated non-privileged ``db_user``.
See also :ref:`setup/deploy/odoo`.
- Keep installations updated by regularly installing the latest builds,
either via GitHub or by downloading the latest version from
https://www.odoo.com/page/download or http://nightly.odoo.com
- Configure your server in multi-process mode with proper limits matching your typical
usage (memory/CPU/timeouts). See also :ref:`builtin_server`.
- Run Odoo behind a web server providing HTTPS termination with a valid SSL certificate,
in order to prevent eavesdropping on cleartext communications. SSL certificates are
cheap, and many free options exist.
Configure the web proxy to limit the size of requests, set appropriate timeouts,
and then enable the :option:`proxy mode <odoo-bin --proxy-mode>` option.
See also :ref:`https_proxy`.
- If you need to allow remote SSH access to your servers, make sure to set a strong password
for **all** accounts, not just `root`. It is strongly recommended to entirely disable
password-based authentication, and only allow public key authentication. Also consider
restricting access via a VPN, allowing only trusted IPs in the firewall, and/or
running a brute-force detection system such as `fail2ban` or equivalent.
- Consider installing appropriate rate-limiting on your proxy or firewall, to prevent
brute-force attacks and denial of service attacks. See also :ref:`login_brute_force`
for specific measures.
Many network providers provide automatic mitigation for Distributed Denial of
Service attacks (DDOS), but this is often an optional service, so you should consult
with them.
- Whenever possible, host your public-facing demo/test/staging instances on different
machines than the production ones. And apply the same security precautions as for
production.
- If your public-facing Odoo server has access to sensitive internal network resources
or services (e.g. via a private VLAN), implement appropriate firewall rules to
protect those internal resources. This will ensure that the Odoo server cannot
be used accidentally (or as a result of malicious user actions) to access or disrupt
those internal resources.
Typically this can be done by applying an outbound default DENY rule on the firewall,
then only explicitly authorizing access to internal resources that the Odoo server
needs to access.
`Systemd IP traffic access control <http://0pointer.net/blog/ip-accounting-and-access-lists-with-systemd.html>`_
may also be useful to implement per-process network access control.
- If your public-facing Odoo server is behind a Web Application Firewall, a load-balancer,
a transparent DDoS protection service (like CloudFlare) or a similar network-level
device, you may wish to avoid direct access to the Odoo system. It is generally
difficult to keep the endpoint IP addresses of your Odoo servers secret. For example
they can appear in web server logs when querying public systems, or in the headers
of emails posted from Odoo.
In such a situation you may want to configure your firewall so that the endpoints
are not accessible publicly except from the specific IP addresses of your WAF,
load-balancer or proxy service. Service providers like CloudFlare usually maintain
a public list of their IP address ranges for this purpose.
- If you are hosting multiple customers, isolate customer data and files from each other
using containers or appropriate "jail" techniques.
- Setup daily backups of your databases and filestore data, and copy them to a remote
archiving server that is not accessible from the server itself.
.. _login_brute_force:
Blocking Brute Force Attacks
----------------------------
For internet-facing deployments, brute force attacks on user passwords are very common, and this
threat should not be neglected for Odoo servers. Odoo emits a log entry whenever a login attempt
is performed, and reports the result: success or failure, along with the target login and source IP.
The log entries will have the following form.
Failed login::
2018-07-05 14:56:31,506 24849 INFO db_name odoo.addons.base.res.res_users: Login failed for db:db_name login:admin from 127.0.0.1
Successful login::
2018-07-05 14:56:31,506 24849 INFO db_name odoo.addons.base.res.res_users: Login successful for db:db_name login:admin from 127.0.0.1
These logs can be easily analyzed by an intrusion prevention system such as `fail2ban`.
For example, the following fail2ban filter definition should match a
failed login::
[Definition]
failregex = ^ \d+ INFO \S+ \S+ Login failed for db:\S+ login:\S+ from <HOST>
ignoreregex =
This could be used with a jail definition to block the attacking IP on HTTP(S).
Here is what it could look like for blocking the IP for 15 minutes when
10 failed login attempts are detected from the same IP within 1 minute::
[odoo-login]
enabled = true
port = http,https
bantime = 900 ; 15 min ban
maxretry = 10 ; if 10 attempts
findtime = 60 ; within 1 min /!\ Should be adjusted with the TZ offset
logpath = /var/log/odoo.log ; set the actual odoo log path here
.. _db_manager_security:
Database Manager Security
-------------------------
:ref:`setup/deploy/odoo` mentioned ``admin_passwd`` in passing.
This setting is used on all database management screens (to create, delete,
dump or restore databases).
If the management screens must not be accessible at all, you should set ``list_db``
configuration option to ``False``, to block access to all the database selection and
management screens.
.. warning::
It is strongly recommended to disable the Database Manager for any internet-facing
system! It is meant as a development/demo tool, to make it easy to quickly create
and manage databases. It is not designed for use in production, and may even expose
dangerous features to attackers. It is also not designed to handle large databases,
and may trigger memory limits.
On production systems, database management operations should always be performed by
the system administrator, including provisioning of new databases and automated backups.
Be sure to setup an appropriate ``db_name`` parameter
(and optionally, ``db_filter`` too) so that the system can determine the target database
for each request, otherwise users will be blocked as they won't be allowed to choose the
database themselves.
If the management screens must only be accessible from a selected set of machines,
use the proxy server's features to block access to all routes starting with ``/web/database``
except (maybe) ``/web/database/selector`` which displays the database-selection screen.
If the database-management screen should be left accessible, the
``admin_passwd`` setting must be changed from its ``admin`` default: this
password is checked before allowing database-alteration operations.
It should be stored securely, and should be generated randomly e.g.
.. code-block:: console
$ python3 -c 'import base64, os; print(base64.b64encode(os.urandom(24)))'
which will generate a 32 characters pseudorandom printable string.
Supported Browsers
==================
Odoo supports all the major desktop and mobile browsers available on the market,
as long as they are supported by their publishers.
Here are the supported browsers:
- Google Chrome
- Mozilla Firefox
- Microsoft Edge
- Apple Safari
.. warning:: Please make sure your browser is up-to-date and still supported by
its publisher before filing a bug report.
.. note::
Since Odoo 13.0, ES6 is supported. Therefore, IE support is dropped.
.. [#different-machines]
to have multiple Odoo installations use the same PostgreSQL database,
or to provide more computing resources to both software.
.. [#remote-socket]
technically a tool like socat_ can be used to proxy UNIX sockets across
networks, but that is mostly for software which can only be used over
UNIX sockets
.. [#switching]
or be accessible only over an internal packet-switched network, but that
requires secured switches, protections against `ARP spoofing`_ and
precludes usage of WiFi. Even over secure packet-switched networks,
deployment over HTTPS is recommended, and possible costs are lowered as
"self-signed" certificates are easier to deploy on a controlled
environment than over the internet.
.. _regular expression: https://docs.python.org/3/library/re.html
.. _ARP spoofing: https://en.wikipedia.org/wiki/ARP_spoofing
.. _Nginx termination example:
https://nginx.com/resources/admin-guide/nginx-ssl-termination/
.. _Nginx proxying example:
https://nginx.com/resources/admin-guide/reverse-proxy/
.. _socat: http://www.dest-unreach.org/socat/
.. _PostgreSQL connection settings:
.. _listen to network interfaces:
https://www.postgresql.org/docs/9.6/static/runtime-config-connection.html
.. _use an SSH tunnel:
https://www.postgresql.org/docs/9.6/static/ssh-tunnels.html
.. _WSGI: https://wsgi.readthedocs.org/
.. _POSBox: https://www.odoo.com/page/point-of-sale-hardware#part_2
@@ -4,22 +4,19 @@ Email gateway
The Odoo mail gateway allows you to inject directly all the received emails in Odoo.
Its principle is straightforward: your SMTP server executes the "mailgate" script for every new
incoming email.
Its principle is straightforward: your SMTP server executes the "mailgate" script for every new incoming email.
The script takes care of connecting to your Odoo database through XML-RPC, and send the emails via
the `MailThread.message_process()` feature.
Prerequisites
-------------
- Administrator access to the Odoo database.
- Your own mail server such as Postfix or Exim.
- Technical knowledge on how to configure an email server.
For Postfix
-----------
In you alias config (:file:`/etc/aliases`):
.. code-block:: text
@@ -33,9 +30,9 @@ In you alias config (:file:`/etc/aliases`):
- `Postfix aliases <http://www.postfix.org/aliases.5.html>`_
- `Postfix virtual <http://www.postfix.org/virtual.8.html>`_
For Exim
--------
.. code-block:: text
*: |/odoo-directory/addons/mail/static/scripts/odoo-mailgate.py -d <database-name> -u <userid> -p <password>
@@ -46,5 +43,5 @@ For Exim
- `Exim <https://www.exim.org/docs.html>`_
.. tip::
If you do not have access/manage your email server, use :ref:`incoming mail servers
<email-inbound-custom-domain-incoming-server>`.
If you don't have access/manage your email server, use :ref:`inbound messages
<discuss/email_servers/inbound_messages>`.
+782
View File
@@ -0,0 +1,782 @@
.. _setup/install:
===============
Installing Odoo
===============
There are multiple ways to install Odoo, or not install it at all, depending
on the intended use case.
This documents attempts to describe most of the installation options.
:ref:`setup/install/online`
The easiest way to use Odoo in production or to try it.
:ref:`setup/install/packaged`
Suitable for testing Odoo, developing modules and can be used for
long-term production use with additional deployment and maintenance work.
:ref:`setup/install/source`
Provides greater flexibility: e.g. allow multiple running Odoo versions on
the same system. Good for developing modules, can be used as base for
production deployment.
:ref:`setup/install/docker`
If you usually use docker_ for development or deployment, an official
docker_ base image is available.
.. _setup/install/editions:
Editions
========
There are two different Editions_ of Odoo: the Community and Enterprise versions.
Using the Enterprise version is possible on our SaaS_ and accessing the code is
restricted to Enterprise customers and partners. The Community version is freely
available to anyone.
If you already use the Community version and wish to upgrade to Enterprise, please
refer to :ref:`setup/enterprise` (except for :ref:`setup/install/source`).
.. _setup/install/online:
Online
======
Demo
----
To simply get a quick idea of Odoo, demo_ instances are available. They are
shared instances which only live for a few hours, and can be used to browse
around and try things out with no commitment.
Demo_ instances require no local installation, just a web browser.
SaaS
----
Trivial to start with, fully managed and migrated by Odoo S.A., Odoo's SaaS_
provides private instances and starts out free. It can be used to discover and
test Odoo and do non-code customizations (i.e. incompatible with custom modules
or the Odoo Apps Store) without having to install it locally.
Can be used for both testing Odoo and long-term production use.
Like demo_ instances, SaaS_ instances require no local installation, a web
browser is sufficient.
.. _setup/install/packaged:
Packaged installers
===================
Odoo provides packaged installers for Windows, deb-based distributions
(Debian, Ubuntu, …) and RPM-based distributions (Fedora, CentOS, RHEL, …) for
both the Community and Enterprise versions.
These packages automatically set up all dependencies (for the Community version),
but may be difficult to keep up-to-date.
Official Community packages with all relevant dependency requirements are
available on our nightly_ server. Both Communtiy and Enterprise packages can
be downloaded from our download_ page (you must to be logged in as a paying
customer or partner to download the Enterprise packages).
Windows
-------
#. Download the installer from our nightly_ server (Community only) or the Windows installer from
the download_ page (any edition).
#. Execute the downloaded file.
.. warning:: | On Windows 8 and later you may see a warning titled "Windows protected your PC".
| Click on **More Info** and then on **Run anyway**.
#. Accept the UAC_ prompt.
#. Go through the various installation steps.
Odoo will automatically be started at the end of the installation.
Linux
-----
Debian/Ubuntu
'''''''''''''
Odoo 13.0 'deb' package currently supports `Debian Buster`_, `Ubuntu 18.04`_ or above.
Prepare
^^^^^^^
Odoo needs a `PostgreSQL`_ server to run properly. The default configuration for
the Odoo 'deb' package is to use the PostgreSQL server on the same host as your
Odoo instance. Execute the following command in order to install the PostgreSQL server:
.. code-block:: console
$ sudo apt install postgresql -y
.. warning:: `wkhtmltopdf` is not installed through **pip** and must be installed manually in
version `0.12.5 <the wkhtmltopdf download page_>`_ for it to support headers and
footers. See our `wiki <https://github.com/odoo/odoo/wiki/Wkhtmltopdf>`_ for more
details on the various versions.
Repository
^^^^^^^^^^
Odoo S.A. provides a repository that can be used with Debian and Ubuntu distributions. It can be
used to install *Odoo Community Edition* by executing the following commands **as root**:
.. code-block:: console
# wget -O - https://nightly.odoo.com/odoo.key | apt-key add -
# echo "deb http://nightly.odoo.com/13.0/nightly/deb/ ./" >> /etc/apt/sources.list.d/odoo.list
# apt-get update && apt-get install odoo
You can then use the usual `apt-get upgrade` command to keep your installation up-to-date.
At this moment, there is no nightly repository for the Enterprise Edition.
Deb Package
^^^^^^^^^^^
Instead of using the repository as described above, the 'deb' packages for both the *Community* and
*Enterprise* editions can be downloaded from the `official download page <download_>`_.
Next, execute the following commands **as root**:
.. code-block:: console
# dpkg -i <path_to_installation_package> # this probably fails with missing dependencies
# apt-get install -f # should install the missing dependencies
# dpkg -i <path_to_installation_package>
This will install Odoo as a service, create the necessary PostgreSQL_ user
and automatically start the server.
.. warning:: The `python3-xlwt` Debian package does not exists in Debian Buster nor Ubuntu 18.04.
This python module is needed to export into xls format.
If you need the feature, you can install it manually with:
.. code-block:: console
$ sudo pip3 install xlwt
.. warning:: The `num2words` python package does not exists in Debian Buster nor Ubuntu 18.04.
Textual amounts will not be rendered by Odoo and this could cause problems with the
`l10n_mx_edi` module.
If you need this feature, you can install manually with:
.. code-block:: console
$ sudo pip3 install num2words
Fedora
''''''
Odoo 13.0 'rpm' package supports Fedora 30.
Prepare
^^^^^^^
Odoo needs a `PostgreSQL`_ server to run properly. Make sure that the `sudo` command is available
and well configured and, only then, execute the following command in order to install the PostgreSQL
server:
.. code-block:: console
$ sudo dnf install -y postgresql-server
$ sudo postgresql-setup --initdb --unit postgresql
$ sudo systemctl enable postgresql
$ sudo systemctl start postgresql
.. warning:: `wkhtmltopdf` is not installed through **pip** and must be installed manually in
version `0.12.5 <the wkhtmltopdf download page_>`_ for it to support headers and
footers. See our `wiki <https://github.com/odoo/odoo/wiki/Wkhtmltopdf>`_ for more
details on the various versions.
Repository
^^^^^^^^^^
Odoo S.A. provides a repository that can be used with the Fedora distributions.
It can be used to install *Odoo Community Edition* by executing the following
commands:
.. code-block:: console
$ sudo dnf config-manager --add-repo=https://nightly.odoo.com/13.0/nightly/rpm/odoo.repo
$ sudo dnf install -y odoo
$ sudo systemctl enable odoo
$ sudo systemctl start odoo
RPM package
^^^^^^^^^^^
Instead of using the repository as described above, the 'rpm' packages for both the *Community* and
*Enterprise* editions can be downloaded from the `official download page <download_>`_.
Once downloaded, the package can be installed using the 'dnf' package manager:
.. code-block:: console
$ sudo dnf localinstall odoo_13.0.latest.noarch.rpm
$ sudo systemctl enable odoo
$ sudo systemctl start odoo
.. _setup/install/source:
Source Install
==============
The source "installation" is really about not installing Odoo, and running it directly from source
instead.
This can be more convenient for module developers as the Odoo source is more easily accessible
than using packaged installation (for information or to build this documentation and have it
available offline).
It also makes starting and stopping Odoo more flexible and explicit than the services set up by the
packaged installations, and allows overriding settings using
:ref:`command-line parameters <reference/cmdline>` without needing to edit a configuration file.
Finally it provides greater control over the system's set up, and allows to more easily keep
(and run) multiple versions of Odoo side-by-side.
Windows
-------
Fetch the sources
'''''''''''''''''
There are two ways to obtain the source code of Odoo: as a zip **archive** or through **git**.
Archive
^^^^^^^
Community Edition:
* `Official download page <download_>`_
* `GitHub repository <community-repository_>`_
* `Nightly server <nightly_>`_
Enterprise Edition:
* `Official download page <download_>`_
* `GitHub repository <enterprise-repository_>`_
Git
^^^
The following requires git_ to be installed on your machine and that you have basic knowledge of
git commands.
Community Edition:
.. code-block:: doscon
C:\> git clone https://github.com/odoo/odoo.git
Enterprise Edition: (see :ref:`setup/install/editions` to get access)
.. code-block:: doscon
C:\> git clone https://github.com/odoo/enterprise.git
.. note:: **The Enterprise git repository does not contain the full Odoo source code**. It is only
a collection of extra add-ons. The main server code is in the Community version. Running
the Enterprise version actually means running the server from the Community version with
the addons-path option set to the folder with the Enterprise version. You need to clone
both the Community and Enterprise repository to have a working Odoo Enterprise
installation.
Prepare
'''''''
Python
^^^^^^
Odoo requires Python 3.6 or later to run. Visit `Python's download page <https://www.python.org/downloads/windows/>`_
to download and install the latest version of Python 3 on your machine.
During installation, check **Add Python 3 to PATH**, then click **Customize Installation** and make
sure that **pip** is checked.
.. note:: If Python 3 is already installed, make sure that the version is 3.6 or above, as previous
versions are not compatible with Odoo.
.. code-block:: doscon
C:\> python --version
Verify also that pip_ is installed for this version.
.. code-block:: doscon
C:\> pip --version
PostgreSQL
^^^^^^^^^^
Odoo uses PostgreSQL as database management system. `Download and install PostgreSQL <https://www.postgresql.org/download/windows/>`_
(supported version: 10.0 and later).
By default, the only user is `postgres` but Odoo forbids connecting as `postgres`, so you need to
create a new PostgreSQL user:
#. Add PostgreSQL's `bin` directory (by default: `C:\\Program Files\\PostgreSQL\\<version>\\bin`) to
your `PATH`.
#. Create a postgres user with a password using the pg admin gui:
1. Open **pgAdmin**.
2. Double-click the server to create a connection.
3. Select :menuselection:`Object --> Create --> Login/Group Role`.
4. Enter the username in the **Role Name** field (e.g. `odoo`).
5. Open the **Definition** tab and enter the password (e.g. ``odoo``), then click **Save**.
6. Open the **Privileges** tab and switch **Can login?** to `Yes` and **Create database?** to
`Yes`.
Dependencies
^^^^^^^^^^^^
Before installing the dependencies, you must download and install the
`Build Tools for Visual Studio <https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019>`_.
When prompted, select **C++ build tools** in the **Workloads** tab and install them.
Odoo dependencies are listed in the `requirements.txt` file located at the root of the Odoo
community directory.
.. tip:: It can be preferable to not mix python modules packages between different instances of Odoo
or with your system. You can use virtualenv_ to create isolated Python environments.
Navigate to the path of your Odoo Community installation (`CommunityPath`) and run **pip**
on the requirements file in a terminal **with Administrator privileges**:
.. code-block:: doscon
C:\> cd \CommunityPath
C:\> pip install setuptools wheel
C:\> pip install -r requirements.txt
.. warning:: `wkhtmltopdf` is not installed through **pip** and must be installed manually in
version `0.12.5 <the wkhtmltopdf download page_>`_ for it to support headers and
footers. See our `wiki <https://github.com/odoo/odoo/wiki/Wkhtmltopdf>`_ for more
details on the various versions.
For languages with right-to-left interface (such as Arabic or Hebrew), the package `rtlcss` is
needed:
#. Download and install `nodejs <https://nodejs.org/en/download/>`_.
#. Install `rtlcss`:
.. code-block:: doscon
C:\> npm install -g rtlcss
#. Edit the System Environment's variable `PATH` to add the folder where `rtlcss.cmd` is located
(typically: `C:\\Users\\<user>\\AppData\\Roaming\\npm\\`).
Running Odoo
''''''''''''
Once all dependencies are set up, Odoo can be launched by running `odoo-bin`, the
command-line interface of the server. It is located at the root of the Odoo Community directory.
To configure the server, you can either specify :ref:`command-line arguments <reference/cmdline/server>` or a
:ref:`configuration file <reference/cmdline/config>`.
.. tip:: For the Enterprise edition, you must add the path to the `enterprise` addons to the
`addons-path` argument. Note that it must come before the other paths in `addons-path` for
addons to be loaded correctly.
Common necessary configurations are:
* PostgreSQL user and password.
* Custom addon paths beyond the defaults, to load your own modules.
A typical way to run the server would be:
.. code-block:: doscon
C:\> cd CommunityPath/
C:\> python odoo-bin -r dbuser -w dbpassword --addons-path=addons -d mydb
Where `CommunityPath` is the path of the Odoo Community installation, `dbuser` is the
PostgreSQL login, `dbpassword` is the PostgreSQL password
and `mydb` is the default database to serve on `localhost:8069`. You can add other
directory paths separated by a comma to ``addons`` at the end of the addons-path option.
Linux
-----
Fetch the sources
'''''''''''''''''
There are two ways to obtain the source code of Odoo: as a zip **archive** or through **git**.
Archive
^^^^^^^
Community Edition:
* `Official download page <download_>`_
* `GitHub repository <community-repository_>`_
* `Nightly server <nightly_>`_
Enterprise Edition:
* `Official download page <download_>`_
* `GitHub repository <enterprise-repository_>`_
Git
^^^
The following requires git_ to be installed on your machine and that you have basic knowledge of
git commands.
Community Edition:
.. code-block:: console
$ git clone https://github.com/odoo/odoo.git
Enterprise Edition: (see :ref:`setup/install/editions` to get access)
.. code-block:: console
$ git clone https://github.com/odoo/enterprise.git
.. note:: **The Enterprise git repository does not contain the full Odoo source code**. It is only
a collection of extra add-ons. The main server code is in the Community version. Running
the Enterprise version actually means running the server from the Community version with
the addons-path option set to the folder with the Enterprise version. You need to clone
both the Community and Enterprise repository to have a working Odoo Enterprise
installation.
Prepare
'''''''
Python
^^^^^^
Odoo requires Python 3.6 or later to run. Use your package manager to download and install Python 3
on your machine if it is not already done.
.. note:: If Python 3 is already installed, make sure that the version is 3.6 or above, as previous
versions are not compatible with Odoo.
.. code-block:: console
$ python3 --version
Verify also that pip_ is installed for this version.
.. code-block:: console
$ pip3 --version
PostgreSQL
^^^^^^^^^^
Odoo uses PostgreSQL as database management system. Use your package manager to download and install
PostgreSQL (supported version: 10.0 and later).
On Debian/Unbuntu, it can be achieved by executing the following:
.. code-block:: console
$ sudo apt install postgresql postgresql-client
By default, the only user is `postgres` but Odoo forbids connecting as `postgres`, so you need to
create a new PostgreSQL user:
.. code-block:: console
$ sudo -u postgres createuser -s $USER
$ createdb $USER
.. note:: Because your PostgreSQL user has the same name as your Unix login, you will be able to
connect to the database without password.
Dependencies
^^^^^^^^^^^^
For libraries using native code, it is necessary to install development tools and native
dependencies before the Python dependencies of Odoo. They are available in `-dev` or `-devel`
packages for Python, PostgreSQL, libxml2, libxslt1, libevent, libsasl2 and libldap2.
On Debian/Unbuntu, the following command should install all the required libraries:
.. code-block:: console
$ sudo apt install python3-dev libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev \
libtiff5-dev libjpeg8-dev libopenjp2-7-dev zlib1g-dev libfreetype6-dev \
liblcms2-dev libwebp-dev libharfbuzz-dev libfribidi-dev libxcb1-dev libpq-dev
Odoo dependencies are listed in the `requirements.txt` file located at the root of the Odoo
community directory.
.. tip:: It can be preferable to not mix python modules packages between different instances of Odoo
or with your system. You can use virtualenv_ to create isolated Python environments.
Navigate to the path of your Odoo Community installation (`CommunityPath`) and run **pip**
on the requirements file:
.. code-block:: console
$ cd /CommunityPath
$ pip3 install setuptools wheel
$ pip3 install -r requirements.txt
.. warning:: `wkhtmltopdf` is not installed through **pip** and must be installed manually in
version `0.12.5 <the wkhtmltopdf download page_>`_ for it to support headers and
footers. See our `wiki <https://github.com/odoo/odoo/wiki/Wkhtmltopdf>`_ for more
details on the various versions.
For languages with right-to-left interface (such as Arabic or Hebrew), the package `rtlcss` is
needed:
#. Download and install **nodejs** and **npm** with your package manager.
#. Install `rtlcss`:
.. code-block:: console
$ sudo npm install -g rtlcss
Running Odoo
''''''''''''
Once all dependencies are set up, Odoo can be launched by running `odoo-bin`, the
command-line interface of the server. It is located at the root of the Odoo Community directory.
To configure the server, you can either specify :ref:`command-line arguments <reference/cmdline/server>` or a
:ref:`configuration file <reference/cmdline/config>`.
.. tip:: For the Enterprise edition, you must add the path to the `enterprise` addons to the
`addons-path` argument. Note that it must come before the other paths in `addons-path` for
addons to be loaded correctly.
Common necessary configurations are:
* PostgreSQL user and password. Odoo has no defaults beyond
`psycopg2's defaults <http://initd.org/psycopg/docs/module.html>`_: connects over a UNIX socket on
port `5432` with the current user and no password.
* Custom addon paths beyond the defaults, to load your own modules.
A typical way to run the server would be:
.. code-block:: console
$ cd /CommunityPath
$ python3 odoo-bin --addons-path=addons -d mydb
Where `CommunityPath` is the path of the Odoo Community installation
and `mydb` is the default database to serve on `localhost:8069`. You can add other
directory paths separated by a comma to ``addons`` at the end of the addons-path option.
Mac OS
------
Fetch the sources
'''''''''''''''''
There are two ways to obtain the source code of Odoo: as a zip **archive** or through **git**.
Archive
^^^^^^^
Community Edition:
* `Official download page <download_>`_
* `GitHub repository <community-repository_>`_
* `Nightly server <nightly_>`_
Enterprise Edition:
* `Official download page <download_>`_
* `GitHub repository <enterprise-repository_>`_
Git
^^^
The following requires git_ to be installed on your machine and that you have basic knowledge of
git commands.
Community Edition:
.. code-block:: console
$ git clone https://github.com/odoo/odoo.git
Enterprise Edition: (see :ref:`setup/install/editions` to get access)
.. code-block:: console
$ git clone https://github.com/odoo/enterprise.git
.. note:: **The Enterprise git repository does not contain the full Odoo source code**. It is only
a collection of extra add-ons. The main server code is in the Community version. Running
the Enterprise version actually means running the server from the Community version with
the addons-path option set to the folder with the Enterprise version. You need to clone
both the Community and Enterprise repository to have a working Odoo Enterprise
installation.
Prepare
'''''''
Python
^^^^^^
Odoo requires Python 3.6 or later to run. Use your preferred package manager (homebrew_, macports_)
to download and install Python 3 on your machine if it is not already done.
.. note:: If Python 3 is already installed, make sure that the version is 3.6 or above, as previous
versions are not compatible with Odoo.
.. code-block:: console
$ python3 --version
Verify also that pip_ is installed for this version.
.. code-block:: console
$ pip3 --version
PostgreSQL
^^^^^^^^^^
Odoo uses PostgreSQL as database management system. Use `postgres.app <https://postgresapp.com>`_
to download and install PostgreSQL (supported version: 10.0 and later).
By default, the only user is `postgres` but Odoo forbids connecting as `postgres`, so you need to
create a new PostgreSQL user:
.. code-block:: console
$ sudo -u postgres createuser -s $USER
$ createdb $USER
.. note:: Because your PostgreSQL user has the same name as your Unix login, you will be able to
connect to the database without password.
Dependencies
^^^^^^^^^^^^
Odoo dependencies are listed in the `requirements.txt` file located at the root of the Odoo
community directory.
.. tip:: It can be preferable to not mix python modules packages between different instances of Odoo
or with your system. You can use virtualenv_ to create isolated Python environments.
Navigate to the path of your Odoo Community installation (`CommunityPath`) and run **pip**
on the requirements file:
.. code-block:: console
$ cd /CommunityPath
$ pip3 install setuptools wheel
$ pip3 install -r requirements.txt
.. warning:: Non-Python dependencies need to be installed with a package manager:
#. Download and install the **Command Line Tools**:
.. code-block:: console
$ xcode-select --install
#. Download and install the package manager of your choice (homebrew_, macports_).
#. Install non-python dependencies.
.. warning:: `wkhtmltopdf` is not installed through **pip** and must be installed manually in
version `0.12.5 <the wkhtmltopdf download page_>`_ for it to support headers and
footers. See our `wiki <https://github.com/odoo/odoo/wiki/Wkhtmltopdf>`_ for more
details on the various versions.
For languages with right-to-left interface (such as Arabic or Hebrew), the package `rtlcss` is
needed:
#. Download and install **nodejs** with your preferred package manager (homebrew_, macports_).
#. Install `rtlcss`:
.. code-block:: console
$ sudo npm install -g rtlcss
Running Odoo
''''''''''''
Once all dependencies are set up, Odoo can be launched by running `odoo-bin`, the
command-line interface of the server. It is located at the root of the Odoo Community directory.
To configure the server, you can either specify :ref:`command-line arguments <reference/cmdline/server>` or a
:ref:`configuration file <reference/cmdline/config>`.
.. tip:: For the Enterprise edition, you must add the path to the `enterprise` addons to the
`addons-path` argument. Note that it must come before the other paths in `addons-path` for
addons to be loaded correctly.
Common necessary configurations are:
* PostgreSQL user and password. Odoo has no defaults beyond
`psycopg2's defaults <http://initd.org/psycopg/docs/module.html>`_: connects over a UNIX socket on
port `5432` with the current user and no password.
* Custom addon paths beyond the defaults, to load your own modules.
A typical way to run the server would be:
.. code-block:: console
$ cd /CommunityPath
$ python3 odoo-bin --addons-path=addons -d mydb
Where `CommunityPath` is the path of the Odoo Community installation
and `mydb` is the default database to serve on `localhost:8069`. You can add other
directory paths separated by a comma to ``addons`` at the end of the addons-path option.
.. _setup/install/docker:
Docker
======
The full documentation on how to use Odoo with Docker can be found on the
official Odoo `docker image <https://registry.hub.docker.com/_/odoo/>`_ page.
.. _Debian Buster: https://www.debian.org/releases/buster/
.. _demo: https://demo.odoo.com
.. _docker: https://www.docker.com
.. _download: https://www.odoo.com/page/download
.. _Ubuntu 18.04: http://releases.ubuntu.com/18.04/
.. _EPEL: https://fedoraproject.org/wiki/EPEL
.. _PostgreSQL: http://www.postgresql.org
.. _the official installer:
.. _install pip:
https://pip.pypa.io/en/latest/installing.html#install-pip
.. _Quilt: http://en.wikipedia.org/wiki/Quilt_(software)
.. _saas: https://www.odoo.com/page/start
.. _the wkhtmltopdf download page: https://github.com/wkhtmltopdf/wkhtmltopdf/releases/tag/0.12.5
.. _UAC: http://en.wikipedia.org/wiki/User_Account_Control
.. _wkhtmltopdf: http://wkhtmltopdf.org
.. _pip: https://pip.pypa.io
.. _macports: https://www.macports.org
.. _homebrew: http://brew.sh
.. _wheels: https://wheel.readthedocs.org/en/latest/
.. _virtualenv: https://pypi.python.org/pypi/virtualenv
.. _virtualenvwrapper: https://virtualenvwrapper.readthedocs.io/en/latest/
.. _pywin32: http://sourceforge.net/projects/pywin32/files/pywin32/
.. _community-repository: https://github.com/odoo/odoo
.. _enterprise-repository: https://github.com/odoo/enterprise
.. _git: https://git-scm.com/
.. _Editions: https://www.odoo.com/pricing#pricing_table_features
.. _nightly: https://nightly.odoo.com/
.. _extra: https://nightly.odoo.com/extra/
+14
View File
@@ -0,0 +1,14 @@
:nosearch:
========
Maintain
========
.. toctree::
maintain/update
maintain/db_upgrade
maintain/enterprise
maintain/hosting_changes
maintain/db_premise
maintain/supported_versions
@@ -0,0 +1,179 @@
.. _db_premise:
===============================
On-premises Database management
===============================
Register a database
===================
To register your database, you just need to enter your Subscription Code in the
banner in the App Switcher. Make sure you do not add extra spaces before or after
your subscription code. If the registration is successful, it will turn green and
will provide you with the Expiration Date of your freshly-registered database. You
can check this Epiration Date in the About menu (Odoo 9) or in the Settings Dashboard
(Odoo 10).
Registration Error Message
--------------------------
If you are unable to register your database, you will likely encounter this
message:
.. image:: media/error_message_sub_code.png
:align: center
:alt: Something went wrong while registering your database,
you can try again or contact Odoo Help
Solutions
'''''''''
* Do you have a valid Enterprise subscription?
* Check if your subscription details get the tag "In Progress" on
your `Odoo Account
<https://accounts.odoo.com/my/subscription>`__ or with your Account Manager
* Have you already linked a database with your subscription reference?
* You can link only one database per subscription.
(Need a test or a development database? `Find a partner
<https://www.odoo.com/partners>`__)
* You can unlink the old database yourself on your `Odoo Contract
<https://accounts.odoo.com/my/subscription>`__ with the button "Unlink database"
.. image:: media/unlink_single_db.png
:align: center
A confirmation message will appear; make sure this is the correct database as
it will be deactivated shortly:
.. image:: media/unlink_confirm_enterprise_edition.png
:align: center
* Do you have the updated version of Odoo 9?
* From July 2016 onward, Odoo 9 now automatically change the uuid of a
duplicated database; a manual operation is no longer required.
* If it's not the case, you may have multiple databases sharing the same
UUID. Please check on your `Odoo Contract
<https://accounts.odoo.com/my/subscription>`__, a short message will appear
specifying which database is problematic:
.. image:: media/unlink_db_name_collision.png
:align: center
In this case, you need to change the UUID on your test databases to solve this
issue. You will find more information about this in :ref:`this section <duplicate_premise>`.
For your information, we identify database with UUID. Therefore, each database
should have a distinct UUID to ensure that registration and invoicing proceed
effortlessly for your and for us.
* Check your network and firewall settings
* The Update notification must be able to reach Odoo's subscription
validation servers. In other words, make sure that the Odoo server is able
to open outgoing connections towards:
* services.odoo.com on port 443 (or 80)
* services.openerp.com on port 443 (or 80) for older deployments
* Once you activated your database, you must keep these ports open, as the
Update notification runs once a week.
Error message due to too many users
-----------------------------------
If you have more users in your local database than provisionned in your
Odoo Enterprise subscription, you may encounter this message:
.. image:: media/add_more_users.png
:align: center
:alt: This database will expire in X days, you
have more users than your subscription allows
When the message appears you have 30 days before the expiration.
The countdown is updated everyday.
Solutions
'''''''''
- **Add more users** on your subscription: follow the link and Validate
the upsell quotation and pay for the extra users.
- **Deactivate users** as explained in this `documentation <documentation.html#deactivating-users>`_
and **Reject** the upsell quotation.
Once your database has the correct number of users, the expiration message
will disappear automatically after a few days, when the next verification occurs.
We understand that it can be a bit frightening to see the countdown,
so you can :ref:`force an Update Notification <force_ping>` to make the message disappear
right away.
Database expired error message
------------------------------
If your database reaches its expiration date before your renew your subscription,
you will encounter this message:
.. image:: media/database_expired.png
:align: center
:alt: This database has expired.
This **blocking** message appears after a non-blocking message that lasts 30 days.
If you fail to take action before the end of the countdown, the database is expired.
Solutions
'''''''''
* Renew your subscription: follow the link and renew your subscription - note that
if you wish to pay by Wire Transfer, your subscription will effectively be renewed
only when the payment arrives, which can take a few days. Credit card payments are
processed immediately.
* Contact our `Support <https://www.odoo.com/help>`__
None of those solutions worked for you? Please contact our
`Support <https://www.odoo.com/help>`__
.. _force_ping:
.. _duplicate_premise:
Duplicate a database
====================
You can duplicate your database by accessing the database manager on your
server (<odoo-server>/web/database/manager). In this page, you can easily
duplicate your database (among other things).
.. image:: media/db_manager.gif
:align: center
When you duplicate a local database, it is **strongly** advised to change
the duplicated database's uuid (Unniversally Unique Identifier), since this
uuid is how your database identifies itself with our servers. Having two
databases with the same uuid could result in invoicing problems or registration
problems down the line.
.. note:: From July 2016 onward, Odoo 9 now automatically change the uuid of a
duplicated database; a manual operation is no longer required.
The database uuid is currently accessible from the menu :menuselection:`Settings --> Technical -->
System Parameters`, we advise you to use a `uuid generator <https://www.uuidtools.com>`_ or to
use the unix command ``uuidgen`` to generate a new uuid. You can then simply replace it like any
other record by clicking on it and using the edit button.
.. image:: media/db_uuid.png
:align: center
@@ -0,0 +1,413 @@
.. |assistance-contact| replace::
If you need Odoo assistance on this matter, please contact your Odoo Account Manager or contact
our `Sales department`_.
.. _Sales department: mailto:sales@odoo.com
.. _db-upgrade:
================
Versions upgrade
================
.. _db-upgrade/overview:
Overview
========
.. _db-upgrade/process:
The upgrade process
-------------------
This documentation is for our *On-Premise* (self-hosted) and *Odoo.sh* customers.
.. _db-upgrade/definition:
Definition
~~~~~~~~~~
An upgrade is switching to a newer version of Odoo (e.g., Odoo 13.0 to Odoo 14.0)
An upgrade does not cover:
* changing :ref:`Editions <db-upgrade/faq/editions-change>` (i.e., Community to Enterprise edition)
* switching :ref:`hosting type <db-upgrade/faq/hosting-types-switch>` (i.e., On-Premise to Online or
Odoo.sh)
* migration from another ERP to Odoo
.. note:: |assistance-contact|
.. _db-upgrade/process-workflow:
Process workflow
~~~~~~~~~~~~~~~~
The upgrade process in a nutshell:
#. You create a test upgrade request.
#. | The request is processed by Odoo:
| This happens via an automated process that runs the database through an upgrade script and
takes between 20 and 120 minutes. Only if an issue(s) arises will we have to intervene
manually and adjust the script specifically to your database until the upgrade succeeds.
#. Odoo delivers a test database.
#. You test your database for possible discrepancies (see :ref:`db-upgrade/test-guidance`)
#. If there are any discrepancies, you report them to the Upgrade support team via the
:ref:`Help portal <db-upgrade/test-assistance>`.
#. We will fix the issues and send you a new test database.
#. Once you completed the testing and are happy with the result, you decide on a date and time when
you stop users from accessing Odoo, freeze all data entries and create an upgrade request for the
production upgrade.
#. Odoo delivers the production database through the automated process.
#. You restore it in your Production environment a few short hours later and continue working on the
newly upgraded database.
.. _db-upgrade/service-level:
Service Level Agreement
-----------------------
What is covered by the Enterprise Licence?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Databases hosted on Odoos Cloud platforms (Saas and Odoo.sh) or On-Premise (Self-Hosting) enjoy the
following service at all times.
The upgrade of:
* standard applications
* Studio customization (as long as the Studio app is still active)
* customizations done by our consulting and developer services *if* they are covered by a
Maintenance of Customisations subscription
The Upgrade Service is limited to the technical conversion and adaptation of your database (standard
modules and data) to make it compatible with the targeted version.
What upgrading does NOT cover
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* The cleaning of pre-existing data & configuration while upgrading
* Any new developments and/or upgrade of your own :ref:`custom modules
<db-upgrade/faq/custom-modules>`
* `Training <https://www.odoo.com/learn>`_ on the new version
You can get more information about your Enterprise Licence on our :ref:`Odoo Enterprise Subscription
Agreement <upgrade>` page.
.. note:: |assistance-contact|
.. _db-upgrade/get-started:
Get started
===========
The upgrade process varies depending on where your database is hosted.
.. _db-upgrade/online:
Online (SaaS)
-------------
If you are hosted Online, please check your `database manager <https://www.odoo.com/my/databases>`_.
.. _db-upgrade/odoo-sh:
Odoo.sh
-------
If you are Odoo.sh hosted, check our :doc:`specific instructions to be able to upgrade
<../odoo_sh/advanced/upgrade_your_database>`.
.. _db-upgrade/on-premise:
On-Premise
----------
There are two possibilities:
#. Via the interface of our `website form <https://upgrade.odoo.com>`_
#. | For technically-advanced users and partners, via the following command line (to be used on the
machine where your database is hosted):
| ``python <(curl -s beta.upgrade.odoo.com/upgrade) test -d <your db name> -t 14.0``
What does it do?
~~~~~~~~~~~~~~~~
The above command will dump your database to a file, then send it to the upgrade platform for
upgrade, displaying you the live logs, then restore the upgraded database back on your server as a
duplicate test database.
.. _db-upgrade/steps:
Steps
=====
.. _db-upgrade/steps-test:
The testing phase
-----------------
.. _db-upgrade/test-process:
Test process
~~~~~~~~~~~~
Also referred to as the pre-production phase, the test phase allows you to review an upgraded
version of your database without affecting your production database in any way.
We suggest that you run the test upgrade process at least once, but you can do it as often as you
want (one at a time).
Once you receive your upgraded test database, you should check that all data, processes and
functionality are still correct and working as expected.
If you do find discrepancies, you'll be able to:
* | :ref:`Report your issues <db-upgrade/test-assistance>`
| and/or
* Ask for a new :ref:`test request <db-upgrade/test-db-request>` after the reported issues have
been fixed in the upgrade script.
When you do not find any discrepancies, you'll be able to:
* Move on to the upgrade of your :ref:`production database <db-upgrade/production-live>`.
.. _db-upgrade/test-db-request:
Request a test database
~~~~~~~~~~~~~~~~~~~~~~~
When filling the `website form <https://upgrade.odoo.com>`_, select *Testing* purpose.
.. image:: media/db-upgrade-test-purpose.png
:align: center
:alt: Selection of the "Testing" purpose in the upgrade form on Odoo
.. _db-upgrade/test-guidance:
Test guidance
~~~~~~~~~~~~~
Every business and organization has its own operational needs and will have to test its specific
Odoo instance respectively. However, we recommend you look at `the test scenario
<https://drive.google.com/open?id=1Lm4JqbsHBirB1wMi14UChoz_YHLjx5ec>`_ we created, a high-level idea
of what you should test and look out for.
.. todo:: change link "test scenario" once the related doc is published
.. _db-upgrade/test-assistance:
Assistance
~~~~~~~~~~
If you encounter issues or problems in the **test database**, please contact the Odoo Upgrade
Support:
#. Connect to our `Odoo Support page <https://www.odoo.com/help>`_.
#. Under the *Ticket Description* section, select *An issue related to my upgrade* ticket type.
.. image:: media/db-upgrade-test-assistance.png
:align: center
:alt: Selection of "An issue related to my upgrade" as Ticket Type in the support form on Odoo
.. warning::
If you choose another *Ticket Description* type, the request will be redirected to another
team than the upgrade one and will slow down the processing and response time.
#. Please provide as much detail as you can. Where applicable, illustrate the current and previous
flows with videos and/or screenshots. This will avoid clarifying questions and speed up the
resolution process significantly.
.. image:: media/db-upgrade-test-assistance-details.png
:align: center
:alt: "Detailed Description" field in the support form on Odoo
.. note::
* The purpose of the test phase is not to correct existing data or configurations in your
database.
* |assistance-contact|
.. _db-upgrade/steps-production:
The production launch
---------------------
.. _db-upgrade/production-live:
Production goes live
~~~~~~~~~~~~~~~~~~~~
The production upgrade request is when you decide to upgrade your current database with all your
production data (invoices, VAT returns, inventories, current orders) to a new version of your choice.
After your :ref:`tests <db-upgrade/steps-test>` are completed to your satisfaction, submit the
request to upgrade your production database via our `website form <https://upgrade.odoo.com>`_.
Select *Production* purpose.
.. image:: media/db-upgrade-production-purpose.png
:align: center
:alt: Selection of the "Production" purpose in the upgrade form on Odoo
.. danger::
Going into production without first testing may lead to:
- business interruptions (e.g. no longer having the possibility to validate an action)
- poor customer experiences (e.g. an eCommerce website that does not work correctly)
.. _db-upgrade/production-assistance:
Assistance
~~~~~~~~~~
If you encounter issues or problems in the **production database**, please contact the **Odoo
Support**:
#. Connect to our `Odoo Support page <https://www.odoo.com/help>`_.
#. Under the *Ticket Description* section, select the appropriate type related to your issue but
**do not select** the option *An issue related to my upgrade*.
.. note::
After upgrading to production, the support will be provided by the Support team instead of the
Upgrade team.
#. Please provide as much detail as you can. Where applicable, illustrate the current and previous
flows with videos and/or screenshots. This will avoid clarifying questions and speed up the
resolution process significantly.
.. image:: media/db-upgrade-production-assistance-details.png
:align: center
:alt: "Detailed Description" field in the support form on Odoo
.. warning::
If you choose *An issue related to my upgrade* as ticket type, the request will be redirected
to another team than the support one and will slow down the processing and response time.
.. _db-upgrade/faq:
FAQ
===
.. _db-upgrade/faq/why:
Why upgrade?
------------
* You benefit from the latest features of the :ref:`new major version
<db-upgrade/faq/release-notes>` released by Odoo.
* If you are in an :ref:`unsupported version <db-upgrade/supported-versions>`, you get a new version
with support.
.. _db-upgrade/faq/when:
When to upgrade?
----------------
Whenever you want. You can make your upgrade request as soon as a new version is released on our
`website form <https://upgrade.odoo.com>`_.
.. _db-upgrade/faq/availability:
Availability of the new version
-------------------------------
Please kindly note that as soon as we announce the release of a new major version (usually at the
end of year), the Upgrade Service team needs to adapt the upgrade scripts to it, which is why the
new version is not immediately available for existing databases.
.. _db-upgrade/faq/finalization:
Finalization of the upgrade (:abbr:`ETA (Estimated Time of Arrival)`)
---------------------------------------------------------------------
Unfortunately, it is impossible to give time estimates for every upgrade request. Odoo offers so
many possibilities (e.g. branding, workflows, customization, etc) that it can get tricky to upgrade,
and translate to the new structure. If you use multiple apps managing sensitive data (e.g.,
Accounting, Inventory, etc.), some cases may still require a human intervention, making the process
slower.
This is especially true during the first months following the release of a new major version, which
can significantly lengthen the upgrade delay.
In general, the smaller the database, the quickest the upgrade. A single-user database that uses
only CRM will be processed faster than a multi-company, multi-user database that uses Accounting,
Sales, Purchase, and Manufacturing.
So, in a nutshell, what can impact your upgrade lead time?
* Source & targeted versions
* Installed apps
* Volume of data
* Amount of customization (models, fields, methods, workflows, reports, website, etc.)
* Installation of new apps or configuration changes after the start of the test phase
Usually, the delays experienced during the first request (waiting time between the time you
submitted your first request for a test upgrade) can generally give you an idea of the time to wait
for the production request.
.. _db-upgrade/faq/custom-modules:
Upgrade of the custom modules
-----------------------------
As stated in our :doc:`/legal/terms/enterprise`, section :ref:`charges_standard`, this optional
service is subject to additional fees.
If you have a custom code, you can choose to have it upgraded by our services, by one of our
`partners <https://www.odoo.com/partners>`_ or you can do it yourself.
.. note:: |assistance-contact|
.. _db-upgrade/faq/editions-change:
Editions change (from Community to Enterprise)
----------------------------------------------
An upgrade does not cover a change of `Editions <https://www.odoo.com/page/editions>`_
.. note:: |assistance-contact|
.. _db-upgrade/faq/hosting-types-switch:
Switching the hosting types (Self-hosted vs Online vs Odoo.sh)
--------------------------------------------------------------
An upgrade does not cover a change of `Hosting types <https://www.odoo.com/page/hosting-types>`_.
Open the following link to get :doc:`more information about how to change your hosting type
<hosting_changes>`.
.. note:: |assistance-contact|
.. _db-upgrade/faq/release-notes:
Release Notes by version
------------------------
Open our `Release Note <https://www.odoo.com/page/release-notes>`_ page to get a summary of the new
features and improvements made in each version.
.. _db-upgrade/assistance:
Assistance
==========
.. _db-upgrade/contact:
Contact our Upgrade service support
-----------------------------------
Should you have any more questions about the upgrade, do not hesitate to send a message to `Odoo
Upgrade Team <mailto:upgrade@odoo.com>`_. We will be very pleased to answer it as soon as possible.
.. _db-upgrade/supported-versions:
Supported versions
------------------
Please note that Odoo provides support and bug fixing only for the three last major versions of Odoo.
This is a factor to take into consideration before upgrading. If you are on an older version, we
suggest you to prefer the most recent version to benefit from a longer support (before having to
upgrade again).
You can get more information about our :doc:`supported versions <supported_versions>`.
@@ -0,0 +1,106 @@
.. _setup/enterprise:
===============================
Upgrade Community to Enterprise
===============================
Depending on your current installation, there are multiple ways to upgrade
your community version.
In any case the basic guidelines are:
* Backup your community database
.. image:: enterprise/db_manager.png
:class: img-fluid
* Shutdown your server
* Install the web_enterprise module
* Restart your server
* Enter your Odoo Enterprise Subscription code
.. image:: enterprise/enterprise_code.png
:class: img-fluid
On Linux, using an installer
============================
* Backup your community database
* Stop the odoo service
.. code-block:: console
$ sudo service odoo stop
* Install the enterprise .deb (it should install over the community package)
.. code-block:: console
$ sudo dpkg -i <path_to_enterprise_deb>
* Update your database to the enterprise packages using
.. code-block:: console
$ python3 /usr/bin/odoo-bin -d <database_name> -i web_enterprise --stop-after-init
* You should be able to connect to your Odoo Enterprise instance using your usual mean of identification.
You can then link your database with your Odoo Enterprise Subscription by entering the code you received
by e-mail in the form input
On Linux, using the source code
===============================
There are many ways to launch your server when using sources, and you probably
have your own favourite. You may need to adapt sections to your usual workflow.
* Shutdown your server
* Backup your community database
* Update the ``--addons-path`` parameter of your launch command (see :ref:`setup/install/source`)
* Install the web_enterprise module by using
.. code-block:: console
$ -d <database_name> -i web_enterprise --stop-after-init
Depending on the size of your database, this may take some time.
* Restart your server with the updated addons path of point 3.
You should be able to connect to your instance. You can then link your database with your
Odoo Enterprise Subscription by entering the code you received by e-mail in the form input
On Windows
==========
* Backup your community database
* Uninstall Odoo Community (using the Uninstall executable in the installation folder) -
PostgreSQL will remain installed
.. image:: enterprise/windows_uninstall.png
:class: img-fluid
* Launch the Odoo Enterprise Installer and follow the steps normally. When choosing
the installation path, you can set the folder of the Community installation
(this folder still contains the PostgreSQL installation).
Uncheck ``Start Odoo`` at the end of the installation
.. image:: enterprise/windows_setup.png
:class: img-fluid
* Using a command window, update your Odoo Database using this command (from the Odoo
installation path, in the server subfolder)
.. code-block:: console
$ odoo.exe -d <database_name> -i web_enterprise --stop-after-init
* No need to manually launch the server, the service is running.
You should be able to connect to your Odoo Enterprise instance using your usual
mean of identification. You can then link your database with your Odoo Enterprise
Subscription by entering the code you received by e-mail in the form input

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

@@ -0,0 +1,61 @@
.. _db_management/hosting_changes:
=======================
Change hosting solution
=======================
You may want to move your Odoo database from one hosting solution to another.
Depending on the platforms, you have to do it by yourself or contact our support team first.
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.**
4. `Create a support ticket <https://www.odoo.com/help>`_ and attach the dump (if the file is too large, use any file transfer service and attach the link to your ticket). Also include your subscription number and the URL you want to use for your database (e.g.: my-company.odoo.com).
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!
From on-premises to Odoo.sh
===========================
1. Follow the :ref:`Import your database section of the Odoo.sh documentation <odoo_sh_import_your_database>`.
2. ...and voilà!
From Odoo Online to on-premises
===============================
1. Log into `your Odoo Online user portal <https://accounts.odoo.com/my/databases/manage>`_ and look for the version number of your database.
2. If your database does not run a :ref:`major version <supported_versions>` of Odoo, you cannot host it on-premises yet, you have to upgrade it first to a new major version. (*e.g.: If your database runs Odoo 12.3 which is not a major version, you have to upgrade it first to Odoo 13.0 or 14.0.*)
3. Download a backup of your database by clicking on the "Gear" icon next to your database name then :menuselection:`Download` (if the download fails due to your backup file being too large, contact `our support <https://www.odoo.com/help>`_)
4. Restore it from the database manager on your local server.
From Odoo Online to Odoo.sh
===========================
1. Log into `your Odoo Online user portal <https://accounts.odoo.com/my/databases/manage>`_ and look for the version number of your database.
2. If your database does not run a :ref:`major version <supported_versions>` of Odoo, you cannot host it on Odoo.sh yet, you have to upgrade it first to a new major version. (*e.g.: If your database runs Odoo 12.3 which is not a major version, you have to upgrade it first to Odoo 13.0 or 14.0.*)
3. Download a backup of your database by clicking on the "Gear" icon next to your database name then :menuselection:`Download` (if the download fails due to your backup file being too large, contact `our support <https://www.odoo.com/help>`_)
4. Follow the :ref:`Import your database section of the Odoo.sh documentation <odoo_sh_import_your_database>`.
From Odoo.sh to Odoo Online
===========================
.. warning:: Odoo Online is not compatible with **non-standard apps**.
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 attach the dump (if the file is too large, use any file transfer service and attach the link to your ticket). Also 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
===========================
1. Grab a :ref:`backup of your Odoo.sh production database <odoo_sh_branches_backups>`.
2. Restore it from the database manager on your local server.
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

@@ -0,0 +1,85 @@
.. _supported_versions:
==================
Supported versions
==================
Odoo provides support and bug fixing **for the 3 last major versions** of Odoo.
Users hosted on **Odoo Online** may use intermediary versions (sometimes called *SaaS versions*) that are
supported as well. These versions are not published for Odoo.sh or On-Premise
installations.
What's the support status of my Odoo?
=====================================
This matrix shows the support status of every version.
**Major releases are in bold type.**
+--------------------+-------------+----------+--------------+----------------+----------------------------------------------+
| | Odoo Online | Odoo.sh | On-Premise | Release date | |
+====================+=============+==========+==============+================+==============================================+
| **Odoo 14.0** | |green| | |green| | |green| | October 2020 | |
+--------------------+-------------+----------+--------------+----------------+----------------------------------------------+
| Odoo 13.saas~4 | |green| | N/A | N/A | August 2019 | |
+--------------------+-------------+----------+--------------+----------------+----------------------------------------------+
| **Odoo 13.0** | |green| | |green| | |green| | October 2019 | |
+--------------------+-------------+----------+--------------+----------------+----------------------------------------------+
| Odoo 12.saas~3 | |green| | N/A | N/A | August 2019 | |
+--------------------+-------------+----------+--------------+----------------+----------------------------------------------+
| **Odoo 12.0** | |green| | |green| | |green| | October 2018 | *End-of-support is planned for October 2021* |
+--------------------+-------------+----------+--------------+----------------+----------------------------------------------+
| Odoo 11.saas~3 | |orange| | N/A | N/A | April 2018 | |
+--------------------+-------------+----------+--------------+----------------+----------------------------------------------+
| **Odoo 11.0** | |orange| | |orange| | |red| | October 2017 | |
+--------------------+-------------+----------+--------------+----------------+----------------------------------------------+
| Odoo 10.saas~15 | |orange| | N/A | N/A | March 2017 | |
+--------------------+-------------+----------+--------------+----------------+----------------------------------------------+
| Odoo 10.saas~14 | |orange| | N/A | N/A | January 2017 | |
+--------------------+-------------+----------+--------------+----------------+----------------------------------------------+
| **Odoo 10.0** | |orange| | |orange| | |red| | October 2016 | |
+--------------------+-------------+----------+--------------+----------------+----------------------------------------------+
| Odoo 9.saas~11 | |orange| | N/A | N/A | May 2016 | |
+--------------------+-------------+----------+--------------+----------------+----------------------------------------------+
| **Odoo 9.0** | |orange| | N/A | |red| | October 2015 | |
+--------------------+-------------+----------+--------------+----------------+----------------------------------------------+
| Odoo 8.saas~6 | |orange| | N/A | N/A | February 2015 | |
+--------------------+-------------+----------+--------------+----------------+----------------------------------------------+
| **Odoo 8.0** | |orange| | N/A | |red| | September 2014 | |
+--------------------+-------------+----------+--------------+----------------+----------------------------------------------+
.. note::
|green| Supported version
|red| End-of-support
N/A Never released for this platform
|orange| Some of our older customers may still run this version on our Odoo Online servers, we provide help only on blocking issues and advise you to upgrade.
🏁 Future version, not released yet
.. |green| image:: data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMzIuMTkgMjMyLjE5Ij48Y2lyY2xlIGN4PSIxMTYuMDkiIGN5PSIxMTYuMDkiIHI9IjExNi4wOSIgc3R5bGU9ImZpbGw6IzAwYTcwMCIvPjwvc3ZnPg==
:width: 15
.. |red| image:: data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMzIuMTkgMjMyLjE5Ij48Y2lyY2xlIGN4PSIxMTYuMDkiIGN5PSIxMTYuMDkiIHI9IjExNi4wOSIgc3R5bGU9ImZpbGw6I2QwMDAwMCIvPjwvc3ZnPg==
:width: 15
.. |orange| image:: data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMzIuMTkgMjMyLjE5Ij48Y2lyY2xlIGN4PSIxMTYuMDkiIGN5PSIxMTYuMDkiIHI9IjExNi4wOSIgc3R5bGU9ImZpbGw6I2ZmYTcwMCIvPjwvc3ZnPg==
:width: 15
I run an older version of Odoo/OpenERP/TinyERP
==============================================
OpenERP 7.0, 6.1, 6.0 and 5.0 is not supported anymore, on any platform.
TinyERP 4.0, 3.0, 2.0 and 1.0 is not supported anymore, on any platform.
Even though we don't support older versions, you can always `upgrade from any version <https://upgrade.odoo.com/>`_.
@@ -46,7 +46,7 @@ Updating Odoo is accomplished by simply reinstalling the latest version of your
Edition on top of your current installation. This will preserve your data without any alteration,
as long as you do not uninstall PostgreSQL (the database engine that comes with Odoo).
The main reference for updating is logically our :doc:`installation guide <../on_premise>`,
The main reference for updating is logically our :ref:`installation guide <setup/install>`,
which explains the common installation methods.
Updating is also most appropriately accomplished by the person who deployed Odoo initially,
@@ -104,13 +104,12 @@ and you're all set.
Source Install (Tarball)
------------------------
If you have originally installed Odoo with the "tarball" version (source code archive), you have
to replace the installation directory with a newer version. First download the latest tarball
from Odoo.com. They are updated daily and include the latest security fixes (see step #1)
After downloading the package, extract it to a temporary location on your server.
You will get a folder labeled with the version of the source code, for example "odoo-13.0+e.20190719",
You will get a folder labelled with the version of the source code, for example "odoo-13.0+e.20190719",
that contains a folder "odoo.egg-info" and the actual source code folder named "odoo" (for Odoo 10
and later) or "openerp" for older versions.
You can ignore the odoo.egg-info folder. Locate the folder where your current installation is deployed,
@@ -124,7 +123,6 @@ Finally, restart the Odoo service or reboot the machine, and you are all set.
Source Install (Github)
-----------------------
If you have originally installed Odoo with a full Github clone of the official repositories, the
update procedure requires you to pull the latest source code via git.
Change into the directory for each repository (the main Odoo repository, and the Enterprise
-67
View File
@@ -1,67 +0,0 @@
================
Odoo mobile apps
================
Two kind of Odoo mobile app exist: the progressive web app (PWA) and store apps. Using the PWA is
recommended.
Progressive web app (PWA)
=========================
PWAs are web-based applications designed to function across different devices and platforms,
leveraging web browsers to deliver user experiences similar to native apps.
The Odoo PWA features include:
- Quick access by adding the PWA to a device's home screen
- Seamless and borderless navigation experience
- Push notifications
- SSO authentication
To install the Odoo PWA, launch a browser supporting PWAs, and sign in to an Odoo database. The
instructions to install a PWA depend on the platform and browser used.
.. tabs::
.. tab:: Android
**Chrome**: open Chrome's menu (:guilabel:`⋮`), select :guilabel:`Install app`, and tap
:guilabel:`Install`.
**Firefox**: open Firefox's menu (:guilabel:`⋮`), select :guilabel:`Install`, and either touch
and hold the Odoo icon or tap :guilabel:`Add automatically`.
The PWA can also be installed with **Samsung Internet**, **Edge**, and **Opera**.
.. tab:: iOS
**Safari**: open the **Share** menu by tapping the square with an arrow pointing upwards icon,
select :guilabel:`Add to Home Screen`, edit the PWA details if desired, and tap
:guilabel:`Add`.
On iOS 16.4 and above, the PWA can also be installed with **Chrome**, **Firefox**, and
**Edge**.
.. tab:: Desktop
**Chrome** and **Edge**: click the installation icon at the right of the address bar and click
:guilabel:`Install`.
.. seealso::
- `Google Chrome Help: Use progressive web apps
<https://support.google.com/chrome/answer/9658361>`_
- `MDN Web Docs: Installing and uninstalling web apps
<https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Guides/Installing>`_
- `Microsoft Support: Install, manage, or uninstall apps in Microsoft Edge <https://support.microsoft.com/en-us/topic/install-manage-or-uninstall-apps-in-microsoft-edge-0c156575-a94a-45e4-a54f-3a84846f6113>`_
Store apps
==========
The Odoo mobile apps are available for download on the `Google Play Store
<https://play.google.com/store/apps/details?id=com.odoo.mobile>`_ and `Apple App Store
<https://apps.apple.com/app/odoo/id1272543640>`_.
.. important::
The iOS app cannot be updated and will be deprecated at some point in the future.
While the store apps support multi-accounts, they are not compatible with SS0 authentication.
@@ -1,36 +0,0 @@
====================
Neutralized database
====================
A neutralized database is a non-production database on which several parameters are deactivated.
This enables one to carry out tests without the risk of launching specific automated processes that
could impact production data (e.g., sending emails to customers). Live access is removed and
turned into a testing environment.
.. note::
**Any testing database created is a neutralized database:**
- testing backup databases
- duplicate databases
- for Odoo.sh: staging and development databases
.. important::
A database can also be neutralized when upgrading, as it is vital to do some tests before
switching to a new version.
Deactivated features
====================
Here is a non-exhaustive list of the deactivated features:
- all planned actions (e.g., automatic invoicing of subscriptions, mass mailing, etc.)
- outgoing emails
- bank synchronization
- payment providers
- delivery methods
- :abbr:`IAP (In-App Purchase)` tokens
- website visibility (prevent search engines from indexing your site)
.. note::
**A red banner at the top of the screen is displayed on the neutralized database so that it can
be seen immediately.**
Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

-80
View File
@@ -1,80 +0,0 @@
=================
Odoo.com accounts
=================
This documentation is dedicated to edits made to an Odoo.com account. The following processes
describe how to delete an Odoo.com account, and how to change the password on an Odoo.com account.
Delete Odoo.com account
=======================
To delete an Odoo.com account, start by clicking the profile icon in the upper-right corner
(represented by the username and icon) to reveal a drop-down menu. From the drop-down menu, select
:guilabel:`My Odoo.com account`, which reveals the user portal.
From the user portal, the delete option can be accessed by going to :menuselection:`My Account -->
Edit Security Settings --> Delete Account`. It can also be accessed by going to
`https://www.odoo.com/my/home <https://www.odoo.com/my/home>`_.
.. danger::
Deleting an Odoo account is irreversible. Be careful performing this action, as the Odoo.com
account is **not** retrievable once deleted.
Upon clicking the :guilabel:`Delete Account` button, a pop-up window appears, requesting
confirmation for the account deletion.
.. image:: odoo_account/delete-account.png
:align: center
:alt: Clicking on the Delete Account button will populate a window verifying the change.
To confirm the deletion, enter the :guilabel:`Password` and the :guilabel:`Login` for the account
being deleted. Then, click the :guilabel:`Delete Account` button to confirm the deletion.
.. _odoocom/change_password:
Odoo.com account password change
================================
To change an Odoo.com account password, first login into the Odoo.com user account from the Odoo.com
login page. After logging-in, go to the upper-right corner of the screen, and click the :guilabel:`▼
(down arrow)` icon next to the profile icon. Then, select :guilabel:`My Account`, and a portal
dashboard appears.
To change the Odoo.com password, click on the :guilabel:`Edit Security Settings` link, below the
:menuselection:`Account Security` section. Next, make the necessary changes by typing in the current
:guilabel:`Password`, :guilabel:`New Password`, and verify the new password. Lastly, click on
:guilabel:`Change Password` to complete the password change.
.. note::
If a customer would like to change the login, contact Odoo support `here
<https://www.odoo.com/help>`_.
.. note::
Passwords for Odoo.com users and portal users remain separate, even if the same email address is
used.
Add two-factor authentication
=============================
To add two-factor authentication, login into the Odoo.com user account from the Odoo.com login page.
After logging-in, go to the upper-right corner of the screen, and click the :guilabel:`▼ (down
arrow)` icon next to the :guilabel:`profile icon`. Then, select :guilabel:`My Account`, and a portal
dashboard appears.
If the user would like to turn on two-factor authentication (2FA) for Odoo.com access, click on the
:guilabel:`Edit Security Settings` link below the :menuselection:`Account Security` section.
Click on :guilabel:`Enable two-factor authentication` to turn on :abbr:`2FA (two-factor
authentication)`. Then, confirm the current password in the :guilabel:`Password` field. Next, click
on :guilabel:`Confirm Password`. Following that, activate :abbr:`2FA (two-factor authentication)` in
a :abbr:`2FA (two-factor authentication)` app (Google Authenticator, Authy, etc.), by scanning the
:guilabel:`QR code` or entering a :guilabel:`Verification Code`.
Finally, click on :guilabel:`Enable two-factor authentication` to complete the setup.
.. note::
Under :guilabel:`My Account` Odoo.com users can also access the following:
- :guilabel:`My Partner dashboard`
- :guilabel:`My In-App Services`
- :guilabel:`My Apps Dashboard`
-151
View File
@@ -1,151 +0,0 @@
===========
Odoo Online
===========
`Odoo Online <https://www.odoo.com/trial>`_ provides private databases which are fully managed and
hosted by Odoo. It can be used for long-term production or to test Odoo thoroughly, including
customizations that don't require code.
.. note::
Odoo Online is incompatible with custom modules or the Odoo App Store.
Odoo Online databases are accessed using any web browser and do not require a local installation.
To quickly try out Odoo, shared `demo <https://demo.odoo.com>`_ instances are available. No
registration is required, but each instance only lives for a few hours.
Database management
===================
To manage a database, go to the `database manager <https://www.odoo.com/my/databases>`_ and sign in
as the database administrator.
All the main database management options are available by clicking the database name, except the
upgrade option, which can be accessed by clicking the **arrow in a circle** icon next to the
database name. It is only displayed if an upgrade is available.
.. image:: odoo_online/database-manager.png
:alt: Accessing the database management options
- :ref:`odoo_online/upgrade`
- :ref:`odoo_online/duplicate`
- :ref:`odoo_online/rename`
- :ref:`odoo_online/download`
- :ref:`odoo_online/domains`
- :ref:`odoo_online/tags`
- :ref:`odoo_online/delete`
- :ref:`odoo_online/contact-support`
- :ref:`odoo_online/users`
.. _odoo_online/upgrade:
Upgrade
=======
Trigger a database upgrade.
.. seealso::
For more information about the upgrade process, check out the :ref:`Odoo Online upgrade
documentation <upgrade-request-test>`.
.. _odoo_online/duplicate:
Duplicate
=========
Create an exact copy of the database, which can be used to perform testing without compromising
daily operations.
.. important::
- By checking :guilabel:`For testing purposes`, all external actions (emails, payments, delivery
orders, etc.) are disabled by default on the duplicated database.
- Duplicated databases expire automatically after 15 days.
- A maximum of five duplicates can be made per database. Under extraordinary circumstances,
contact `support <https://www.odoo.com/help>`_ to raise the limit.
.. _odoo_online/rename:
Rename
======
Rename the database and its URL.
.. _odoo_online/download:
Download
========
Download a ZIP file containing a backup of the database.
.. note::
Databases are backed up daily as per the `Odoo Cloud Hosting SLA
<https://www.odoo.com/cloud-sla>`_.
.. _odoo_online/domains:
Domain names
============
Use a custom :doc:`domain name </applications/websites/website/configuration/domain_names>` to
access the database via another URL.
.. tip::
You can :ref:`register a domain name for free <domain-name/register>`.
.. _odoo_online/tags:
Tags
====
Add tags to easily identify and sort your databases.
.. tip::
You can search for tags in the search bar.
.. _odoo_online/delete:
Delete
======
Delete a database instantly.
.. danger::
Deleting a database means that all data is permanently lost. The deletion is instant and applies
to all users. It is recommended to create a backup of the database before deleting it.
Carefully read the warning message and only proceed if the implications of deleting a database are
fully understood.
.. image:: odoo_online/delete.png
:alt: The warning message displayed before deleting a database
.. note::
- Only an administrator can delete a database.
- The database name is immediately made available to anyone.
- Deleting a database if it has expired or is linked to a subscription is impossible. In that
case, contact `Odoo Support <https://www.odoo.com/help>`_.
.. _odoo_online/contact-support:
Contact us
==========
Access the `Odoo.com support page <https://www.odoo.com/help>`_ with the database's details already
pre-filled.
.. _odoo_online/users:
Invite / remove users
=====================
To invite users, fill out the new user's email address and click :guilabel:`Invite`. To add multiple
users, click :guilabel:`Add more users`.
.. image:: odoo_online/invite-users.png
:alt: Inviting a user on a database
To remove users, select them and click :guilabel:`Remove`.
.. seealso::
- :doc:`/applications/general/users`
- :doc:`odoo_accounts`
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

+3 -2
View File
@@ -1,12 +1,13 @@
:nosearch:
========
=================
Advanced
========
=================
.. toctree::
:titlesonly:
advanced/containers
advanced/submodules
advanced/upgrade_your_database
advanced/frequent_technical_questions
@@ -1,7 +1,7 @@
==========
==================================
Containers
==========
==================================
Overview
========
@@ -17,7 +17,7 @@ The platform will take care to install these dependencies in your containers.
`The pip requirements specifiers <https://pip.pypa.io/en/stable/reference/pip_install/#requirement-specifiers>`_
documentation can help you write a :file:`requirements.txt` file.
To have a concrete example,
check out the `requirements.txt file of Odoo <{GITHUB_PATH}/requirements.txt>`_.
check out the `requirements.txt file of Odoo <https://github.com/odoo/odoo/blob/14.0/requirements.txt>`_.
The :file:`requirements.txt` files of submodules are taken into account as well. The platform
looks for :file:`requirements.txt` files in each folder containing Odoo modules: Not in the module folder itself,
@@ -167,16 +167,16 @@ 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/reference/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*":
::
2018-02-19 10:51:39,267 4 INFO ? odoo: Odoo version {BRANCH}
2018-02-19 10:51:39,267 4 INFO ? odoo: Odoo version 13.0
2018-02-19 10:51:39,268 4 INFO ? odoo: Using configuration file at /home/odoo/.config/odoo/odoo.conf
2018-02-19 10:51:39,268 4 INFO ? odoo: addons paths: ['/home/odoo/data/addons/{BRANCH}', '/home/odoo/src/user', '/home/odoo/src/enterprise', '/home/odoo/src/themes', '/home/odoo/src/odoo/addons', '/home/odoo/src/odoo/odoo/addons']
2018-02-19 10:51:39,268 4 INFO ? odoo: addons paths: ['/home/odoo/data/addons/13.0', '/home/odoo/src/user', '/home/odoo/src/enterprise', '/home/odoo/src/themes', '/home/odoo/src/odoo/addons', '/home/odoo/src/odoo/odoo/addons']
**Be careful**, especially with your production database.
Operations that you perform running this Odoo server instance are not isolated:
@@ -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.
@@ -1,9 +1,9 @@
.. _odoosh-advanced-frequent_technical_questions:
============================
==================================
Frequent Technical Questions
============================
==================================
"Scheduled actions do not run at the exact time they were expected"
-------------------------------------------------------------------
@@ -30,31 +30,3 @@ We advise that:
`idempotent <https://stackoverflow.com/a/1077421/3332416>`_: they must not
cause side-effects if they are started more often than expected.
.. _ip-address-change:
How can I automate tasks when an IP address change occurs?
----------------------------------------------------------
**Odoo.sh notifies project administrators of IP address changes.**
Additionally, when the IP address of a production instance changes, an HTTP `GET` request is made
to the path `/_odoo.sh/ip-change` with the new IP address included as a query string parameter
(`new`), along with the previous IP address as an additional parameter (`old`).
This mechanism allows custom actions to be applied in response to the IP address change
(e.g., sending an email, contacting a firewall API, configuring database objects, etc.)
For security reasons, the `/_odoo.sh/ip-change` route is accessible only internally by the platform
itself and returns a `403` response if accessed through any other means.
Here is a pseudo-implementation example:
.. code-block:: python
class IPChangeController(http.Controller):
@http.route('/_odoo.sh/ip-change', auth='public')
def ip_change(self, old=None, new=None):
_logger.info("IP address changed from %s to %s", old, new)
# Then perform whatever action required for your use case, e.g., update an
# ir.config_parameter, send an email, contact an external firewall service's API, ...
return 'ok'

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

@@ -1,9 +1,9 @@
.. _odoosh-advanced-submodules:
==========
==================================
Submodules
==========
==================================
Overview
========
@@ -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,18 +53,18 @@ 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:
With Git (advanced)
-------------------
---------------------
In a terminal, in the folder where your Git repository is cloned,
checkout the branch in which you want to add a submodule:
@@ -0,0 +1,48 @@
=====================
Upgrade your database
=====================
.. _odoosh-advanced-upgrade_your_database:
Download and Upload your database
=================================
Download a dump of your database (from the :ref:`Builds view <odoosh-gettingstarted-builds-download-dump>`), choose the
exact copy and without filestore options. Upload the .sql.gz dump on https://upgrade.odoo.com/upload and
select the Testing Purpose. If you have custom code, you can choose to have it upgraded by us, or do it yourself. Once
it's processed, you'll get a dump of the database in return.
.. warning::
Do *not* upload *backups* of your production database (found in the Backups tab of the production branch) as these
are incompatible with the Upgrade platform - they contain your complete sources, etc. that are not needed for the
upgrade. Make sure to download a **Dump** instead - either through the Backups tab using the *Download Dump* button
or through the Builds page by using the *Download Dump* entry of the contextual menu of your latest production build.
Test your upgraded database
===========================
Create a staging branch that will run the upgraded database. Either make sure your production branch's code is
compatible between the two Odoo versions and fork your production branch, or make a new staging branch containing
the upgraded code.
Once the staging build is done (it doesn't matter if it failed due to the version incompatibility), import your
upgraded dump in the backups tab of the branch. The platform will automatically detect the version of the dump and
change the version of Odoo's source code to the corresponding version for the build.
Test the upgraded database and make sure everything runs as it's supposed to.
Replace your existing production database
=========================================
Once you've tested everything and you're satisfied, start the process over to get an up-to-date upgraded dump:
* Make a new dump of your production database (as described in step 1)
* Upload it on upgrade.odoo.com and select the Production purpose
* Receive the newly upgraded dump and import it in your production branch. The build might get marked as failed because
the platform will run it with the upgraded databases' Odoo version together with the old custom code.
* Merge or commit the upgraded custom code in the production branch
If anything goes wrong, remember you can restore a backup. The platform will always make one before you make any
Odoo.sh operation on the production database. If the restored backup comes from a previous version, the platform will
detect it and change the project's Odoo version back if it needs to.
@@ -1,8 +1,8 @@
:nosearch:
===========
=================
Get started
===========
=================
.. toctree::
:titlesonly:
@@ -1,32 +1,32 @@
========
==================================
Branches
========
==================================
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:
Stages
======
===============
Odoo.sh offers three different stages for your branches: production, staging and development.
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:
Production
----------
This is the branch holding the code on which your production database runs.
There can be only one production branch.
@@ -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/reference/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,
@@ -59,7 +59,6 @@ will automatically be set back to the development stage after 30 days.
Staging
-------
Staging branches are meant to test your new features using the production data without compromising
the actual production database with test records. They will create databases that are neutralized
duplicates of the production database.
@@ -72,7 +71,7 @@ The neutralization includes:
* Disabling outgoing emails by intercepting them with a mailcatcher. An
:ref:`interface to view <odoosh-gettingstarted-branches-tabs-mails>` the emails sent by your
database is provided. That way, you do not have to worry about sending test emails to your contacts.
* Setting payment providers and shipping providers in test mode.
* Setting payment acquirers and shipping providers in test mode.
* Disabling IAP services
The latest database will be kept alive indefinitely, older ones from the same branch may get garbage collected
@@ -84,9 +83,9 @@ The unit tests are not performed as, in Odoo, they currently rely on the demo da
production database. In the future, if Odoo supports to run the unit tests without the demo data,
Odoo.sh will then consider running the tests on staging databases.
Development
-----------
Development branches create new databases using the demo data to run the unit tests.
The installed modules are the ones included in your branches. You can change this list of modules
to install in your :ref:`project Settings <odoosh-gettingstarted-settings-modules-installation>`.
@@ -99,7 +98,7 @@ disable the tests or allow specific tests to be run with custom tags in the :ref
<odoosh-gettingstarted-branches-tabs-settings>`.
Similar to staging branches, the emails are not sent but are intercepted by a mailcatcher and
scheduled actions are not triggered as long as the database is not in use.
scheduled actions are not triggered as often is the database is not in use.
The databases created for development branches are meant to live around three days.
After that, they can be automatically garbage collected to make room for new databases without prior notice.
@@ -108,10 +107,9 @@ After that, they can be automatically garbage collected to make room for new dat
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,
@@ -149,17 +147,16 @@ If you test configuration changes in staging branches, and want them to be appli
.. _odoosh-gettingstarted-branches-tabs:
Tabs
====
=============
History
-------
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.
@@ -171,38 +168,36 @@ When an operation is successful, you can access the database thanks to the *conn
Mails
-----
This tab contains the mail catcher. It displays an overview of the emails sent by your database.
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%
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,
for instance side by side.
.. Note::
Long running shell instances are not guaranteed. Idle shells can be
disconnected at anytime in order to free up resources.
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,
@@ -210,23 +205,19 @@ for instance side by side.
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.
On the graphs, annotations help you relate to changes on the build (database import, git push, etc...).
.. _odoosh/logs:
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:
@@ -247,11 +238,10 @@ The fetching is automatically stopped after 5 minutes. You can restart it using
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.
@@ -267,16 +257,16 @@ This server only keeps one month of backups: 7 daily and 4 weekly backups.
Dedicated backup servers keep the same backups, as well as 3 additional monthly backups.
To restore or download one of these monthly backups, please `contact us <https://www.odoo.com/help>`_.
If you merge a commit updating the version of one or several modules (in :file:`__manifest__.py`), or their linked python
dependencies (in :file:`requirements.txt`), then Odoo.sh performs a backup automatically (flagged with type Update in the list),
as either the container will be changed by the installation of new pip packages, either the database itself will be
changed with the module update triggered afterwards. In these two cases, we are doing a backup as it may potentially
If you merge a commit updating the version of one or several modules (in :file:`__manifest__.py`), or their linked python
dependencies (in :file:`requirements.txt`), then Odoo.sh performs a backup automatically (flagged with type Update in the list),
as either the container will be changed by the installation of new pip packages, either the database itself will be
changed with the module update triggered afterwards. In these two cases, we are doing a backup as it may potentially
break things.
If you merge a commit that only changes some code without the above-mentioned modifications, then no backup is done
by Odoo.sh, as neither the container nor the database is modified so the platform considers this safe enough. Of course,
as an extra precaution, you can make a backup manually before making big changes in your production sources in case
something goes wrong (those manual backups are available for about one week). To avoid abuse, we limit manual backups
If you merge a commit that only changes some code without the above-mentioned modifications, then no backup is done
by Odoo.sh, as neither the container nor the database is modified so the platform considers this safe enough. Of course,
as an extra precaution, you can make a backup manually before making big changes in your production sources in case
something goes wrong (those manual backups are available for about one week). To avoid abuse, we limit manual backups
to 5 per day.
The *import database* feature accepts database archives in the format provided by:
@@ -287,24 +277,13 @@ The *import database* feature accepts database archives in the format provided b
* the Odoo.sh backup download button of this *Backups* tab,
* the Odoo.sh dump download button in the :ref:`Builds view <odoosh-gettingstarted-builds>`.
.. _odoo_sh/upgrade:
Upgrade
-------
Available for production and staging branches for valid projects.
.. seealso::
:doc:`Upgrade documentation <../../upgrade>`
.. _odoosh-gettingstarted-branches-tabs-settings:
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**
@@ -321,7 +300,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.
@@ -402,20 +381,19 @@ we are considering the feature if there is enough demand.
In case the domain of your users email addresses use SPF (Sender Policy Framework) or DKIM
(DomainKeys Identified Mail), don't forget to authorize Odoo as a sending host in your domain name
settings to increase the deliverability of your outgoing emails. The configuration steps are
explained in the documentation about :ref:`SPF <email-domain-spf>` and :ref:`DKIM
<email-domain-dkim>`.
settings to increase the deliverability of your outgoing emails.
The configuration steps are explained in the :ref:`Discuss app documentation <discuss-email_servers-spf-compliant>`.
.. Warning::
Forgetting to configure your SPF or DKIM to authorize Odoo as a sending host can lead to the
delivery of your emails as spam in your contacts inbox.
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,
@@ -425,7 +403,6 @@ such as ``<URL>``, ``<PATH>``, ...
Clone
-----
Download the Git repository.
.. code-block:: bash
@@ -441,7 +418,6 @@ The *run* button is not available for this command, as it is meant to be used on
Fork
----
Create a new branch based on the current branch.
.. code-block:: bash
@@ -458,7 +434,6 @@ Uploads the new branch *feature-1* on your remote repository.
Merge
-----
Merge the current branch in another branch.
.. code-block:: bash
@@ -475,10 +450,8 @@ Uploads the changes you just added in the *master* branch on your remote reposit
SSH
---
Setup
~~~~~
In order to use SSH, you have to set up your profile SSH public key (if it is not already done).
To do so, follow these steps:
@@ -489,12 +462,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
@@ -508,7 +481,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,
@@ -518,6 +491,7 @@ you'll be granted ssh access to the build.
Long running ssh connections are not guaranteed. Idle connections will be
disconnected in order to free up resources.
Submodule
---------
@@ -1,20 +1,19 @@
.. _odoosh-gettingstarted-builds:
======
==================================
Builds
======
==================================
Overview
========
In Odoo.sh, a build is considered as a database loaded by an Odoo server
(`odoo/odoo <https://github.com/odoo/odoo>`_ & `odoo/enterprise
<https://github.com/odoo/enterprise>`_) 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.
(`odoo/odoo <https://github.com/odoo/odoo>`_ & `odoo/enterprise <https://github.com/odoo/enterprise>`_)
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.
@@ -29,13 +28,13 @@ A successful build is highlighted in green.
A build is considered failed if errors come up during its creation.
A failed build is highlighted in red.
If warnings come up during the creation, but there are no errors, the build is considered almost
successful. It is highlighted in yellow to notify the developer warnings were raised.
If warnings come up during the creation, but there are no errors, the build is considered almost successful.
It is highlighted in yellow to notify the developer warnings were raised.
Builds do not always create a database from scratch. For instance, when pushing a change on the
production branch, the build created just starts the server with your new revision and tries to load
the current production database on it. If no errors come up, the build is considered successful, and
otherwise failed.
Builds do not always create a database from scratch.
For instance, when pushing a change on the production branch, the build created just starts the server
with your new revision and tries to load the current production database on it.
If no errors come up, the build is considered successful, and otherwise failed.
Stages
======
@@ -49,15 +48,14 @@ If this build is successful, this database is considered as the production datab
From then, pushes on the production branch will create new builds that attempt to load the database
using a server running with the new revision.
If the build is successful, or has warnings but no errors, the production database will now run with
this build, along with the revision associated to this build.
If the build is successful, or has warnings but no errors, the production database will now run with this build, along
with the revision associated to this build.
If the build fails to load or update the database, then the previous successful build is re-used to
load the database, and therefore the database will run using a server running with the previous
successful revision.
If the build fails to load or update the database, then the previous successful build is re-used to load the database,
and therefore the database will run using a server running with the previous successful revision.
The build used to run the production database is always the first of the builds list. If a build
fails, it is put after the build currently running the production database.
The build used to run the production database is always the first of the builds list. If a build fails, it is
put after the build currently running the production database.
Staging
-------
@@ -65,17 +63,18 @@ Staging
Staging builds duplicate the production database,
and try to load this duplicate with the revisions of the staging branches.
Each time you push a new revision on a staging branch, the build created uses a new copy of the
production database. The databases are not re-used between builds of the same branch. This ensures:
Each time you push a new revision on a staging branch, the build created uses a new copy of the production database.
The databases are not re-used between builds of the same branch. This ensures:
* staging builds use databases that are close to what the production looks like, so you do not make
your tests with outdated data,
* staging builds use databases that are close to what the production looks like,
so you do not make your tests with outdated data,
* you can play around as much as you want in the same staging database, and you can then ask for a
rebuild when you want to restart with a new copy of the production.
* you can play around as much as you want in the same staging database,
and you can then ask for a rebuild when you want to restart with a new copy of the production.
Nevertheless, this means that if you make configuration changes in staging databases and do not
apply them in the production, they will not be passed on the next build of the same staging branch.
Nevertheless, this means that if you make configuration changes in staging databases
and do not apply them in the production,
they will not be passed on the next build of the same staging branch.
Development
-----------
@@ -87,38 +86,38 @@ as they are meant to raise errors if something wrong occurs.
If all tests pass, and there is no error, the build will be considered successful.
According to the list of modules to install and test, a development build can take up to 1 hour to
be ready. This is due to the large number of tests set in the default Odoo modules suite.
According to the list of modules to install and test, a development build can take up to 1 hour to be ready.
This is due to the large number of tests set in the default Odoo modules suite.
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.
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 the *Github* link. For other branches than the production, you can create a new
build which will use the latest revision of the branch using the link *rebuild*. This last link is
not available when there is already a build in progress for the branch.
For each branch, you can access the last build's database using the *Connect* link and jump to the branch code using
the *Github* link. For other branches than the production, you can create a new build which will use the latest revision
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. You can
access the build's database as the administrator using the *Connect* button. Also, you can access
the database with another user using the *Connect as* button, in the dropdown menu of the *Connect*
button.
For each build, you can access the revision changes using the button with the Github icon.
You can access the build's database as the administrator using the *Connect* button.
Also, you can access the database with another user using the *Connect as* button,
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:
In the dropdown menu of the build, you can access the same features than in :ref:`the branches view
<odoosh-gettingstarted-branches-tabs>`: *Logs*, *Web Shell*, *Editor*, *Outgoing e-mails*. You also
have the possibility to *Download a dump* of the build's database.
In the dropdown menu of the build, you can access the same features than in :ref:`the branches view <odoosh-gettingstarted-branches-tabs>`:
*Logs*, *Web Shell*, *Editor*, *Outgoing e-mails*.
You also have the possibility to *Download a dump* of the build's database.
@@ -1,25 +1,24 @@
.. _odoosh-gettingstarted-create:
===================
==================================
Create your project
===================
==================================
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
===================
Sign in with your Github account. If you do not have an account yet, hit the *Create an account*
link.
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
@@ -27,62 +26,51 @@ 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:
* to know your Github login and email,
* to create a new repository in case you decide to start from scratch,
* to read your existing repositories, including the ones of your organizations, in case you want to
start from an existing repository,
* to read your existing repositories, including the ones of your organizations, in case you want to start from an existing repository,
* to create a webhook to be notified each time you push changes,
* to commit changes to make your deployment easier, merging branches or adding new `submodules
<https://git-scm.com/book/en/v2/Git-Tools-Submodules>`_ for example.
* to commit changes to make your deployment easier, merging branches or adding new `submodules <https://git-scm.com/book/en/v2/Git-Tools-Submodules>`_ for example.
Submit your project
===================
Choose if you want to start from scratch by creating a new repository, or if you want to use an
existing repository.
Choose if you want to start from scratch by creating a new repository, or if you want to use an existing repository.
Then, choose a name or select the repository you want to use.
Choose the Odoo version you want to use. If you plan to import an existing database or an existing
set of applications, you might need to choose the according version. If you start from scratch, use
the latest version.
Choose the Odoo version you want to use. If you plan to import an existing database or an existing set of applications, you might need to choose the according version. If you start from scratch, use the latest version.
Enter your *subscription code*. This is also called *subscription referral*, *contract number* or
*activation code*.
Enter your *subscription code*. This is also called *subscription referral*, *contract number* or *activation code*.
It should be the code of your Enterprise subscription that includes Odoo.sh.
Partners can use their partnership codes to start a trial. Should their clients start a project,
they ought to get an Enterprise subscription including Odoo.sh and use its subscription code. The
partner will get 50% of the amount back as commission. Contact your sales representative or account
manager in order to get it.
Partners can use their partnership codes to start a trial. Should their clients start a project, they ought to get an Enterprise subscription including Odoo.sh and use its subscription code. The partner will get the full amount as back commission.
Contact your sales representative or account manager in order to get it.
When submitting the form, if you are notified your subscription is not valid, it either means:
* it is not an existing subscription,
* it is not a partnership subscription,
* it is an enterprise subscription, but which does not include Odoo.sh,
* it is neither a partnership subscription or an enterprise subscription (e.g. an online
subscription).
* it is neither a partnership subscription or an enterprise subscription (e.g. an online subscription).
In case of doubt with your subscription, please contact the `Odoo support
<https://www.odoo.com/help>`_.
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 !
=============
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.
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:
@@ -91,7 +79,7 @@ Import your database
====================
You can import your database in your Odoo.sh project as long as it is in a :doc:`supported version
</administration/supported_versions>` of Odoo.
</administration/maintain/supported_versions>` of Odoo.
Push your modules in production
-------------------------------
@@ -100,10 +88,9 @@ If you use community or custom modules, add them in a branch in your Github repo
Databases hosted on the Odoo.com online platform do not have any custom modules.
Users of these databases can therefore skip this step.
You can structure your modules as you wish, Odoo.sh will automatically detect the folders containing
Odoo addons. For instance, you can put all your modules folder in the root directory of your
repository, or group the modules in folders by categories that you define (accounting, project,
...).
You can structure your modules as you wish, Odoo.sh will automatically detect the folders containing Odoo addons.
For instance, you can put all your modules folder in the root directory of your repository,
or group the modules in folders by categories that you define (accounting, project, ...).
For community modules available in public Git repositories,
you can also consider to add them using :ref:`Submodules <odoosh-advanced-submodules>`.
@@ -124,82 +111,77 @@ Access the URL :file:`/web/database/manager` of your on-premise database and dow
If you cannot access the database manager, it may have been disabled by your system administrator.
See the :ref:`database manager security documentation <db_manager_security>`.
You will need the master password of your database server. If you do not have it, contact your
system administrator.
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
~~~~~~~~~~~~~~~~~~~~~
`Access your databases manager <https://accounts.odoo.com/my/databases/manage>`_ and download a
backup of your database.
`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
:align: center
.. image:: ./media/create-import-online-backup.png
:align: center
.. Warning::
Online versions (e.g. *saas-**) are not supported on Odoo.sh.
Saas releases (e.g. *saas-**) are not supported on Odoo.sh.
Upload the backup
-----------------
Then, in your Odoo.sh project, in the backups tab of your production branch, import the backup you
just downloaded.
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.
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
:align: center
.. image:: ./media/create-import-production-done.png
:align: center
Check your outgoing email servers
---------------------------------
There is a default mail server provided with Odoo.sh.
To use it, there must be no enabled outgoing mail server configured in your database in
:menuselection:`Settings --> Technical --> Outgoing Mail Servers` (:ref:`Developer mode
<developer-mode>` must be activated).
:menuselection:`Settings --> Technical --> Outgoing Mail Servers`
(:ref:`Developer mode <developer-mode>` must be activated).
After the import of your database, all outgoing email servers are disabled so you use the Odoo.sh
email server provided by default.
After the import of your database,
all outgoing email servers are disabled so you use the Odoo.sh email server provided by default.
.. warning::
Port 25 is (and will stay) closed. If you want to connect to an external SMTP server, you should
use ports 465 and 587.
.. Warning::
Port 25 is (and will stay) closed. If you want to connect to an external SMTP server, you should use ports 465 and 587.
Check your scheduled actions
----------------------------
All scheduled actions are disabled after the import.
This is to prevent your newly imported database to perform actions that could impact your running
production, such as sending the mails remaining in the queue, processing mass mailings, or
third-party services synchronization (Calendars, files hosting, ...).
This is to prevent your newly imported database to perform actions that could impact your running production,
such as sending the mails remaining in the queue, processing mass mailings, or third-party services synchronization
(Calendars, files hosting, ...).
If you plan to make the imported database your production, enable the scheduled actions you need.
You can check what is enabled in the database of origin and enable the same actions in the imported
database. Scheduled actions are located under :menuselection:`Settings --> Technical --> Automation
--> Scheduled Actions`.
You can check what is enabled in the database of origin and enable the same actions in the imported database.
Scheduled actions are located under :menuselection:`Settings --> Technical --> Automation --> Scheduled Actions`.
Register your subscription
--------------------------
Your subscription is unlinked after the import.
The imported database is considered a duplicate by default and the enterprise subscription is
therefore removed, as you can only have one database linked per subscription.
The imported database is considered a duplicate by default and the enterprise subscription is therefore removed,
as you can only have one database linked per subscription.
If you plan to make it your production, unlink your former database from the subscription, and
register the newly imported database. Read the :doc:`database registration documentation
<../../on_premise>` for instructions.
If you plan to make it your production,
unlink your former database from the subscription, and register the newly imported database.
Read the :ref:`database registration documentation <db_premise>` for instructions.
@@ -1,14 +1,14 @@
=================
==================================
Your first module
=================
==================================
Overview
========
This chapter helps you to create your first Odoo module and deploy it in your Odoo.sh project.
This tutorial requires :ref:`you created a project on Odoo.sh <odoosh-gettingstarted-create>`, and
you know your Github repository's URL.
This tutorial requires :ref:`you created a project on Odoo.sh <odoosh-gettingstarted-create>`, and you know your Github repository's URL.
Basic use of Git and Github is explained.
@@ -27,7 +27,7 @@ Create the development branch
=============================
From Odoo.sh
------------
-------------
In the branches view:
@@ -37,24 +37,26 @@ 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
:align: center
.. image:: ./media/firstmodule-development-editor.png
:align: center
.. image:: first_module/firstmodule-development-editor-interface.png
:align: center
.. image:: ./media/firstmodule-development-editor-interface.png
:align: center
From your computer
------------------
Clone your Github repository on your computer:
.. code-block:: bash
@@ -70,6 +72,7 @@ Create a new branch:
$ git checkout -b feature-1 master
Create the module structure
===========================
@@ -85,15 +88,15 @@ From the Odoo.sh editor, in a terminal:
$ odoo-bin scaffold my_module ~/src/user/
Or, from your computer, if you have an :doc:`installation of Odoo <../../on_premise/source>`:
Or, from your computer, if you have an :ref:`installation of Odoo <setup/install/source>`:
.. code-block:: bash
$ ./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 *my_module* to the name of your choice.
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:
@@ -116,11 +119,11 @@ The below structure will be generated:
├── templates.xml
└── views.xml
.. warning::
.. Warning::
Do not use special characters other than the underscore ( _ ) for your module name, not even an
hyphen ( - ). This name is used for the Python classes of your module, and having classes name
with special characters other than the underscore is not valid in Python.
Do not use special characters other than the underscore ( _ ) for your module name, not even an hyphen ( - ).
This name is used for the Python classes of your module,
and having classes name with special characters other than the underscore is not valid in Python.
Uncomment the content of the files:
@@ -138,7 +141,7 @@ Uncomment the content of the files:
the manifest of your module, including for instance its title, description and data files to load.
You just need to uncomment the access control list data file:
.. code-block:: python
.. code-block:: xml
# 'security/ir.model.access.csv',
@@ -146,7 +149,7 @@ Manually
--------
If you want to create your module structure manually,
you can follow the :doc:`/developer/tutorials/server_framework_101` tutorial to understand
you can follow :doc:`Build an Odoo module </developer/howtos/backend>` to understand
the structure of a module and the content of each file.
Push the development branch
@@ -177,8 +180,8 @@ The above command is explained in the section
<odoosh-gettingstarted-online-editor-push>` of the
:ref:`Online Editor <odoosh-gettingstarted-online-editor>`
chapter.
It includes the explanation regarding the fact you will be prompted to type your username and
password, and what to do if you use the two-factor authentication.
It includes the explanation regarding the fact you will be prompted to type your username and password,
and what to do if you use the two-factor authentication.
Or, from your computer terminal:
@@ -198,27 +201,27 @@ 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,
you will directly see it amongst the database apps. Otherwise, it will be available in the apps to
install.
you will directly see it amongst the database apps. Otherwise, it will be available in the apps to install.
You can then play around with your module, create new records and test your features and buttons.
Test with the production data
=============================
@@ -229,24 +232,23 @@ you can test it with the production data using a staging branch.
You can either:
* Make your development branch a staging branch, by drag and dropping it onto the *staging* section
title.
* Make your development branch a staging branch, by drag and dropping it onto the *staging* section title.
.. image:: first_module/firstmodule-test-devtostaging.png
:align: center
.. 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
:align: center
.. image:: ./media/firstmodule-test-devinstaging.png
:align: center
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.
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
:align: center
.. image:: ./media/firstmodule-test-mergedinstaging.png
:align: center
Once the database ready, you can access it using the *Connect* button.
@@ -255,24 +257,22 @@ Once the database ready, you can access it using the *Connect* button.
Install your module
-------------------
Your module will not be installed automatically, you have to install it from the apps menu. Indeed,
the purpose of the staging build is to test the behavior of your changes as it would be on your
production, and on your production you would not like your module to be installed automatically, but
on demand.
Your module will not be installed automatically, you have to install it from the apps menu.
Indeed, the purpose of the staging build is to test the behavior of your changes as it would be on your production,
and on your production you would not like your module to be installed automatically, but on demand.
Your module may not appear directly in your apps to install either, you need to update your apps
list first:
Your module may not appear directly in your apps to install either, you need to update your apps list first:
* Activate the :ref:`developer mode <developer-mode>`
* 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.
@@ -307,16 +307,14 @@ you have to install it manually as explained in the
Add a change
============
This section explains how to add a change in your module by adding a new field in a model and deploy
it.
This section explains how to add a change in your module by adding a new field in a model and deploy it.
From the Odoo.sh editor,
* browse to your module folder *~/src/user/my_module*,
* then, open the file *models/models.py*.
Or, from your computer,
* use the file browser of your choice to browse to your module folder
*~/src/odoo-addons/my_module*,
* use the file browser of your choice to browse to your module folder *~/src/odoo-addons/my_module*,
* then, open the file *models/models.py* using the editor of your choice,
such as *Atom*, *Sublime Text*, *PyCharm*, *vim*, ...
@@ -352,8 +350,8 @@ and modify a view stored in database.
In order to be applied in existing databases, such as your production database,
these changes requires the module to be updated.
If you would like the update to be performed automatically by the Odoo.sh platform when you push
your changes, increase your module version in its manifest.
If you would like the update to be performed automatically by the Odoo.sh platform when you push your changes,
increase your module version in its manifest.
Open the module manifest *__manifest__.py*.
@@ -369,8 +367,7 @@ with
'version': '0.2',
The platform will detect the change of version and trigger the update of the module upon the new
revision deployment.
The platform will detect the change of version and trigger the update of the module upon the new revision deployment.
Browse to your Git folder.
@@ -414,13 +411,13 @@ 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
:align: center
.. 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 branch on the production branch in the Odoo.sh interface. As you increased the
module version in the manifest, the platform will update the module automatically and your new field
will be directly available. Otherwise you can manually update the module within the apps list.
Once you tested your changes, you can merge your changes in the production branch, for instance by drag-and-dropping the
branch on the production branch in the Odoo.sh interface. As you increased the module version in the manifest,
the platform will update the module automatically and your new field will be directly available.
Otherwise you can manually update the module within the apps list.
Use an external Python library
==============================
@@ -428,18 +425,10 @@ Use an external Python library
If you would like to use an external Python library which is not installed by default,
you can define a *requirements.txt* file listing the external libraries your modules depends on.
.. note::
- It is not possible to install or upgrade system packages on an Odoo.sh database (e.g., apt
packages). However, under specific conditions, packages can be considered for installation.
This also applies to **Python modules** requiring system packages for their compilation, and
**third-party Odoo modules**.
- **PostgreSQL extensions** are not supported on Odoo.sh.
- For more information, consult our `FAQ <https://www.odoo.sh/faq#install_dependencies>`_.
The platform will use this file to automatically install the Python libraries your project needs.
The feature is explained in this section by using the `Unidecode library
<https://pypi.python.org/pypi/Unidecode>`_ in your module.
The feature is explained in this section by using the `Unidecode library <https://pypi.python.org/pypi/Unidecode>`_ in
your module.
Create a file *requirements.txt* in the root folder of your repository
@@ -453,8 +442,8 @@ Add
unidecode
Then use the library in your module, for instance to remove accents from characters in the name
field of your model.
Then use the library in your module, for instance to remove accents from characters in the name field of your
model.
Open the file *models/models.py*.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

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