Compare commits
No commits in common. "17.0" and "16.0" have entirely different histories.
|
|
@ -1,9 +1,7 @@
|
||||||
# Do NOT update manually; changes here will be overwritten by Copier
|
# Do NOT update manually; changes here will be overwritten by Copier
|
||||||
_commit: v1.19
|
_commit: v1.17.2
|
||||||
_src_path: gh:oca/oca-addons-repo-template
|
_src_path: gh:oca/oca-addons-repo-template
|
||||||
additional_ruff_rules: []
|
|
||||||
ci: GitHub
|
ci: GitHub
|
||||||
convert_readme_fragments_to_markdown: true
|
|
||||||
generate_requirements_txt: true
|
generate_requirements_txt: true
|
||||||
github_check_license: true
|
github_check_license: true
|
||||||
github_ci_extra_env: {}
|
github_ci_extra_env: {}
|
||||||
|
|
@ -13,7 +11,7 @@ github_enable_stale_action: true
|
||||||
github_enforce_dev_status_compatibility: true
|
github_enforce_dev_status_compatibility: true
|
||||||
include_wkhtmltopdf: false
|
include_wkhtmltopdf: false
|
||||||
odoo_test_flavor: Both
|
odoo_test_flavor: Both
|
||||||
odoo_version: 17.0
|
odoo_version: 16.0
|
||||||
org_name: Odoo Community Association (OCA)
|
org_name: Odoo Community Association (OCA)
|
||||||
org_slug: OCA
|
org_slug: OCA
|
||||||
rebel_module_groups: []
|
rebel_module_groups: []
|
||||||
|
|
@ -21,6 +19,4 @@ repo_description: 'TODO: add repo description.'
|
||||||
repo_name: server-env
|
repo_name: server-env
|
||||||
repo_slug: server-env
|
repo_slug: server-env
|
||||||
repo_website: https://github.com/OCA/server-env
|
repo_website: https://github.com/OCA/server-env
|
||||||
use_pyproject_toml: true
|
|
||||||
use_ruff: true
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
[flake8]
|
||||||
|
max-line-length = 88
|
||||||
|
max-complexity = 16
|
||||||
|
# B = bugbear
|
||||||
|
# B9 = bugbear opinionated (incl line length)
|
||||||
|
select = C,E,F,W,B,B9
|
||||||
|
# E203: whitespace before ':' (black behaviour)
|
||||||
|
# E501: flake8 line length (covered by bugbear B950)
|
||||||
|
# W503: line break before binary operator (black behaviour)
|
||||||
|
ignore = E203,E501,W503
|
||||||
|
per-file-ignores=
|
||||||
|
__init__.py:F401
|
||||||
|
|
@ -3,11 +3,11 @@ name: pre-commit
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- "17.0*"
|
- "16.0*"
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- "17.0"
|
- "16.0"
|
||||||
- "17.0-ocabot-*"
|
- "16.0-ocabot-*"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pre-commit:
|
pre-commit:
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,11 @@ name: tests
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- "17.0*"
|
- "16.0*"
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- "17.0"
|
- "16.0"
|
||||||
- "17.0-ocabot-*"
|
- "16.0-ocabot-*"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
unreleased-deps:
|
unreleased-deps:
|
||||||
|
|
@ -35,9 +35,9 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- container: ghcr.io/oca/oca-ci/py3.10-odoo17.0:latest
|
- container: ghcr.io/oca/oca-ci/py3.10-odoo16.0:latest
|
||||||
name: test with Odoo
|
name: test with Odoo
|
||||||
- container: ghcr.io/oca/oca-ci/py3.10-ocb17.0:latest
|
- container: ghcr.io/oca/oca-ci/py3.10-ocb16.0:latest
|
||||||
name: test with OCB
|
name: test with OCB
|
||||||
makepot: "true"
|
makepot: "true"
|
||||||
services:
|
services:
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ __pycache__/
|
||||||
*.py[cod]
|
*.py[cod]
|
||||||
/.venv
|
/.venv
|
||||||
/.pytest_cache
|
/.pytest_cache
|
||||||
/.ruff_cache
|
|
||||||
|
|
||||||
# C extensions
|
# C extensions
|
||||||
*.so
|
*.so
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
[settings]
|
||||||
|
; see https://github.com/psf/black
|
||||||
|
multi_line_output=3
|
||||||
|
include_trailing_comma=True
|
||||||
|
force_grid_wrap=0
|
||||||
|
combine_as_imports=True
|
||||||
|
use_parentheses=True
|
||||||
|
line_length=88
|
||||||
|
known_odoo=odoo
|
||||||
|
known_odoo_addons=odoo.addons
|
||||||
|
sections=FUTURE,STDLIB,THIRDPARTY,ODOO,ODOO_ADDONS,FIRSTPARTY,LOCALFOLDER
|
||||||
|
default_section=THIRDPARTY
|
||||||
|
ensure_newline_before_comments = True
|
||||||
|
|
@ -14,8 +14,6 @@ exclude: |
|
||||||
^docs/_templates/.*\.html$|
|
^docs/_templates/.*\.html$|
|
||||||
# Don't bother non-technical authors with formatting issues in docs
|
# Don't bother non-technical authors with formatting issues in docs
|
||||||
readme/.*\.(rst|md)$|
|
readme/.*\.(rst|md)$|
|
||||||
# Ignore build and dist directories in addons
|
|
||||||
/build/|/dist/|
|
|
||||||
# You don't usually want a bot to modify your legal texts
|
# You don't usually want a bot to modify your legal texts
|
||||||
(LICENSE.*|COPYING.*)
|
(LICENSE.*|COPYING.*)
|
||||||
default_language_version:
|
default_language_version:
|
||||||
|
|
@ -36,12 +34,8 @@ repos:
|
||||||
entry: found a en.po file
|
entry: found a en.po file
|
||||||
language: fail
|
language: fail
|
||||||
files: '[a-zA-Z0-9_]*/i18n/en\.po$'
|
files: '[a-zA-Z0-9_]*/i18n/en\.po$'
|
||||||
- repo: https://github.com/sbidoul/whool
|
|
||||||
rev: v0.5
|
|
||||||
hooks:
|
|
||||||
- id: whool-init
|
|
||||||
- repo: https://github.com/oca/maintainer-tools
|
- repo: https://github.com/oca/maintainer-tools
|
||||||
rev: f71041f22b8cd68cf7c77b73a14ca8d8cd190a60
|
rev: 969238e47c07d0c40573acff81d170f63245d738
|
||||||
hooks:
|
hooks:
|
||||||
# update the NOT INSTALLABLE ADDONS section above
|
# update the NOT INSTALLABLE ADDONS section above
|
||||||
- id: oca-update-pre-commit-excluded-addons
|
- id: oca-update-pre-commit-excluded-addons
|
||||||
|
|
@ -50,18 +44,30 @@ repos:
|
||||||
- id: oca-gen-addon-readme
|
- id: oca-gen-addon-readme
|
||||||
args:
|
args:
|
||||||
- --addons-dir=.
|
- --addons-dir=.
|
||||||
- --branch=17.0
|
- --branch=16.0
|
||||||
- --org-name=OCA
|
- --org-name=OCA
|
||||||
- --repo-name=server-env
|
- --repo-name=server-env
|
||||||
- --if-source-changed
|
- --if-source-changed
|
||||||
- --keep-source-digest
|
|
||||||
- --convert-fragments-to-markdown
|
|
||||||
- id: oca-gen-external-dependencies
|
|
||||||
- repo: https://github.com/OCA/odoo-pre-commit-hooks
|
- repo: https://github.com/OCA/odoo-pre-commit-hooks
|
||||||
rev: v0.0.25
|
rev: v0.0.25
|
||||||
hooks:
|
hooks:
|
||||||
- id: oca-checks-odoo-module
|
- id: oca-checks-odoo-module
|
||||||
- id: oca-checks-po
|
- id: oca-checks-po
|
||||||
|
- repo: https://github.com/myint/autoflake
|
||||||
|
rev: v1.6.1
|
||||||
|
hooks:
|
||||||
|
- id: autoflake
|
||||||
|
args:
|
||||||
|
- --expand-star-imports
|
||||||
|
- --ignore-init-module-imports
|
||||||
|
- --in-place
|
||||||
|
- --remove-all-unused-imports
|
||||||
|
- --remove-duplicate-keys
|
||||||
|
- --remove-unused-variables
|
||||||
|
- repo: https://github.com/psf/black
|
||||||
|
rev: 22.8.0
|
||||||
|
hooks:
|
||||||
|
- id: black
|
||||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
||||||
rev: v2.7.1
|
rev: v2.7.1
|
||||||
hooks:
|
hooks:
|
||||||
|
|
@ -103,12 +109,35 @@ repos:
|
||||||
- id: check-xml
|
- id: check-xml
|
||||||
- id: mixed-line-ending
|
- id: mixed-line-ending
|
||||||
args: ["--fix=lf"]
|
args: ["--fix=lf"]
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
- repo: https://github.com/asottile/pyupgrade
|
||||||
rev: v0.1.3
|
rev: v2.38.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: ruff
|
- id: pyupgrade
|
||||||
args: [--fix, --exit-non-zero-on-fix]
|
args: ["--keep-percent-format"]
|
||||||
- id: ruff-format
|
- repo: https://github.com/PyCQA/isort
|
||||||
|
rev: 5.12.0
|
||||||
|
hooks:
|
||||||
|
- id: isort
|
||||||
|
name: isort except __init__.py
|
||||||
|
args:
|
||||||
|
- --settings=.
|
||||||
|
exclude: /__init__\.py$
|
||||||
|
- repo: https://github.com/acsone/setuptools-odoo
|
||||||
|
rev: 3.1.8
|
||||||
|
hooks:
|
||||||
|
- id: setuptools-odoo-make-default
|
||||||
|
- id: setuptools-odoo-get-requirements
|
||||||
|
args:
|
||||||
|
- --output
|
||||||
|
- requirements.txt
|
||||||
|
- --header
|
||||||
|
- "# generated from manifests external_dependencies"
|
||||||
|
- repo: https://github.com/PyCQA/flake8
|
||||||
|
rev: 3.9.2
|
||||||
|
hooks:
|
||||||
|
- id: flake8
|
||||||
|
name: flake8
|
||||||
|
additional_dependencies: ["flake8-bugbear==21.9.2"]
|
||||||
- repo: https://github.com/OCA/pylint-odoo
|
- repo: https://github.com/OCA/pylint-odoo
|
||||||
rev: v8.0.19
|
rev: v8.0.19
|
||||||
hooks:
|
hooks:
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ manifest-required-authors=Odoo Community Association (OCA)
|
||||||
manifest-required-keys=license
|
manifest-required-keys=license
|
||||||
manifest-deprecated-keys=description,active
|
manifest-deprecated-keys=description,active
|
||||||
license-allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3
|
license-allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3
|
||||||
valid-odoo-versions=17.0
|
valid-odoo-versions=16.0
|
||||||
|
|
||||||
[MESSAGES CONTROL]
|
[MESSAGES CONTROL]
|
||||||
disable=all
|
disable=all
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ manifest-required-authors=Odoo Community Association (OCA)
|
||||||
manifest-required-keys=license
|
manifest-required-keys=license
|
||||||
manifest-deprecated-keys=description,active
|
manifest-deprecated-keys=description,active
|
||||||
license-allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3
|
license-allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3
|
||||||
valid-odoo-versions=17.0
|
valid-odoo-versions=16.0
|
||||||
|
|
||||||
[MESSAGES CONTROL]
|
[MESSAGES CONTROL]
|
||||||
disable=all
|
disable=all
|
||||||
|
|
|
||||||
29
.ruff.toml
29
.ruff.toml
|
|
@ -1,29 +0,0 @@
|
||||||
|
|
||||||
target-version = "py310"
|
|
||||||
fix = true
|
|
||||||
|
|
||||||
[lint]
|
|
||||||
extend-select = [
|
|
||||||
"B",
|
|
||||||
"C90",
|
|
||||||
"I", # isort
|
|
||||||
"UP", # pyupgrade
|
|
||||||
]
|
|
||||||
exclude = ["setup/*"]
|
|
||||||
|
|
||||||
[format]
|
|
||||||
exclude = ["setup/*"]
|
|
||||||
|
|
||||||
[per-file-ignores]
|
|
||||||
"__init__.py" = ["F401", "I001"] # ignore unused and unsorted imports in __init__.py
|
|
||||||
"__manifest__.py" = ["B018"] # useless expression
|
|
||||||
|
|
||||||
[isort]
|
|
||||||
section-order = ["future", "standard-library", "third-party", "odoo", "odoo-addons", "first-party", "local-folder"]
|
|
||||||
|
|
||||||
[isort.sections]
|
|
||||||
"odoo" = ["odoo"]
|
|
||||||
"odoo-addons" = ["odoo.addons"]
|
|
||||||
|
|
||||||
[mccabe]
|
|
||||||
max-complexity = 16
|
|
||||||
16
README.md
16
README.md
|
|
@ -1,9 +1,9 @@
|
||||||
|
|
||||||
[](https://runboat.odoo-community.org/builds?repo=OCA/server-env&target_branch=17.0)
|
[](https://runboat.odoo-community.org/builds?repo=OCA/server-env&target_branch=16.0)
|
||||||
[](https://github.com/OCA/server-env/actions/workflows/pre-commit.yml?query=branch%3A17.0)
|
[](https://github.com/OCA/server-env/actions/workflows/pre-commit.yml?query=branch%3A16.0)
|
||||||
[](https://github.com/OCA/server-env/actions/workflows/test.yml?query=branch%3A17.0)
|
[](https://github.com/OCA/server-env/actions/workflows/test.yml?query=branch%3A16.0)
|
||||||
[](https://codecov.io/gh/OCA/server-env)
|
[](https://codecov.io/gh/OCA/server-env)
|
||||||
[](https://translation.odoo-community.org/engage/server-env-17-0/?utm_source=widget)
|
[](https://translation.odoo-community.org/engage/server-env-16-0/?utm_source=widget)
|
||||||
|
|
||||||
<!-- /!\ do not modify above this line -->
|
<!-- /!\ do not modify above this line -->
|
||||||
|
|
||||||
|
|
@ -21,7 +21,11 @@ Available addons
|
||||||
----------------
|
----------------
|
||||||
addon | version | maintainers | summary
|
addon | version | maintainers | summary
|
||||||
--- | --- | --- | ---
|
--- | --- | --- | ---
|
||||||
[server_environment](server_environment/) | 17.0.1.0.0 | | move some configurations out of the database
|
[data_encryption](data_encryption/) | 16.0.1.0.1 | | Store accounts and credentials encrypted by environment
|
||||||
|
[mail_environment](mail_environment/) | 16.0.1.0.1 | | Configure mail servers with server_environment_files
|
||||||
|
[server_environment](server_environment/) | 16.0.1.0.3 | | move some configurations out of the database
|
||||||
|
[server_environment_data_encryption](server_environment_data_encryption/) | 16.0.1.0.0 | | Server Environment Data Encryption
|
||||||
|
[server_environment_ir_config_parameter](server_environment_ir_config_parameter/) | 16.0.1.1.0 | | Override System Parameters from server environment file
|
||||||
|
|
||||||
[//]: # (end addons)
|
[//]: # (end addons)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,118 @@
|
||||||
|
===============
|
||||||
|
Encryption data
|
||||||
|
===============
|
||||||
|
|
||||||
|
..
|
||||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
!! This file is generated by oca-gen-addon-readme !!
|
||||||
|
!! changes will be overwritten. !!
|
||||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
!! source digest: sha256:2d4447d50c16329e068a3699d69972506a62f5d3235b59046149e6aa76151e0e
|
||||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
|
||||||
|
:target: https://odoo-community.org/page/development-status
|
||||||
|
:alt: Alpha
|
||||||
|
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
|
||||||
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
:alt: License: AGPL-3
|
||||||
|
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--env-lightgray.png?logo=github
|
||||||
|
:target: https://github.com/OCA/server-env/tree/16.0/data_encryption
|
||||||
|
:alt: OCA/server-env
|
||||||
|
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||||
|
:target: https://translation.odoo-community.org/projects/server-env-16-0/server-env-16-0-data_encryption
|
||||||
|
:alt: Translate me on Weblate
|
||||||
|
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
||||||
|
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-env&target_branch=16.0
|
||||||
|
:alt: Try me on Runboat
|
||||||
|
|
||||||
|
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||||
|
|
||||||
|
This module allows to encrypt and decrypt data. This module is not usable
|
||||||
|
by itself, it is a low level module which should work as a base for others.
|
||||||
|
An example is the module server_environment_data_encryption
|
||||||
|
|
||||||
|
.. IMPORTANT::
|
||||||
|
This is an alpha version, the data model and design can change at any time without warning.
|
||||||
|
Only for development or testing purpose, do not use in production.
|
||||||
|
`More details on development status <https://odoo-community.org/page/development-status>`_
|
||||||
|
|
||||||
|
**Table of contents**
|
||||||
|
|
||||||
|
.. contents::
|
||||||
|
:local:
|
||||||
|
|
||||||
|
Configuration
|
||||||
|
=============
|
||||||
|
|
||||||
|
To configure this module, you need to edit the main configuration file
|
||||||
|
of your instance, and add a directive called ``running_env``. Commonly
|
||||||
|
used values are 'dev', 'test', 'production'::
|
||||||
|
|
||||||
|
[options]
|
||||||
|
running_env=dev
|
||||||
|
|
||||||
|
|
||||||
|
You also need to set the encryption key(s). The main idea is to have different
|
||||||
|
encryption keys for your different environment, to avoid the possibility to retrieve
|
||||||
|
crucial information from the production environment in a developement environment, for instance.
|
||||||
|
So, if your running environment is 'dev'::
|
||||||
|
|
||||||
|
[options]
|
||||||
|
encryption_key_dev=fyeMIx9XVPBBky5XZeLDxVc9dFKy7Uzas3AoyMarHPA=
|
||||||
|
|
||||||
|
In the configuration file of your production environment, you may want to configure
|
||||||
|
all your other environments encryption key. This way, from production you can encrypt and decrypt
|
||||||
|
data for all environments.
|
||||||
|
|
||||||
|
You can generate keys with python -c 'from cryptography.fernet import Fernet; print(Fernet.generate_key())'.
|
||||||
|
|
||||||
|
Known issues / Roadmap
|
||||||
|
======================
|
||||||
|
|
||||||
|
For now the encryption is dependent on the environment. It has been designed
|
||||||
|
to store the same kind of data with different values depending on the environement
|
||||||
|
(dev, preprod, prod...).
|
||||||
|
An improvement could be to split this in 2 modules. But the environment stuff
|
||||||
|
is not a big constraint.
|
||||||
|
|
||||||
|
Bug Tracker
|
||||||
|
===========
|
||||||
|
|
||||||
|
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-env/issues>`_.
|
||||||
|
In case of trouble, please check there if your issue has already been reported.
|
||||||
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
||||||
|
`feedback <https://github.com/OCA/server-env/issues/new?body=module:%20data_encryption%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||||
|
|
||||||
|
Do not contact contributors directly about support or help with technical issues.
|
||||||
|
|
||||||
|
Credits
|
||||||
|
=======
|
||||||
|
|
||||||
|
Authors
|
||||||
|
~~~~~~~
|
||||||
|
|
||||||
|
* Akretion
|
||||||
|
|
||||||
|
Contributors
|
||||||
|
~~~~~~~~~~~~
|
||||||
|
|
||||||
|
* Raphaël Reverdy <raphael.reverdy@akretion.com>
|
||||||
|
* Florian da Costa <florian.dacosta@akretion.com>
|
||||||
|
|
||||||
|
Maintainers
|
||||||
|
~~~~~~~~~~~
|
||||||
|
|
||||||
|
This module is maintained by the OCA.
|
||||||
|
|
||||||
|
.. image:: https://odoo-community.org/logo.png
|
||||||
|
:alt: Odoo Community Association
|
||||||
|
:target: https://odoo-community.org
|
||||||
|
|
||||||
|
OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||||
|
mission is to support the collaborative development of Odoo features and
|
||||||
|
promote its widespread use.
|
||||||
|
|
||||||
|
This module is part of the `OCA/server-env <https://github.com/OCA/server-env/tree/16.0/data_encryption>`_ project on GitHub.
|
||||||
|
|
||||||
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
from . import models
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
# Copyright <2019> Akretion
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
{
|
||||||
|
"name": "Encryption data",
|
||||||
|
"summary": "Store accounts and credentials encrypted by environment",
|
||||||
|
"version": "16.0.1.0.1",
|
||||||
|
"development_status": "Alpha",
|
||||||
|
"category": "Tools",
|
||||||
|
"website": "https://github.com/OCA/server-env",
|
||||||
|
"author": "Akretion, Odoo Community Association (OCA)",
|
||||||
|
"license": "AGPL-3",
|
||||||
|
"application": False,
|
||||||
|
"installable": True,
|
||||||
|
"external_dependencies": {"python": ["cryptography"]},
|
||||||
|
"depends": ["base"],
|
||||||
|
"data": ["security/ir.model.access.csv"],
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,134 @@
|
||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * data_encryption
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 14.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"Last-Translator: Automatically generated\n"
|
||||||
|
"Language-Team: none\n"
|
||||||
|
"Language: ca\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,help:data_encryption.field_encrypted_data__environment
|
||||||
|
msgid "Concerned Odoo environment (prod, preprod...)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__create_uid
|
||||||
|
msgid "Created by"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__create_date
|
||||||
|
msgid "Created on"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__display_name
|
||||||
|
msgid "Display Name"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__encrypted_data
|
||||||
|
msgid "Encrypted Data"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/data_encryption/models/encrypted_data.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Encrypted data can only be read with suspended security (sudo)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__environment
|
||||||
|
msgid "Environment"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__id
|
||||||
|
msgid "ID"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data____last_update
|
||||||
|
msgid "Last Modified on"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__write_uid
|
||||||
|
msgid "Last Updated by"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__write_date
|
||||||
|
msgid "Last Updated on"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__name
|
||||||
|
msgid "Name"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/data_encryption/models/encrypted_data.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"No '%(key_name)s' entry found in config file. Use a key similar to: %(key)s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/data_encryption/models/encrypted_data.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"No environment found, please check your running_env entry in your config "
|
||||||
|
"file."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/data_encryption/models/encrypted_data.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"Password has been encrypted with a different key. Unless you can recover the "
|
||||||
|
"previous key, this password is unreadable."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model,name:data_encryption.model_encrypted_data
|
||||||
|
msgid "Store any encrypted data by environment"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,help:data_encryption.field_encrypted_data__name
|
||||||
|
msgid "Technical name"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/data_encryption/models/encrypted_data.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "The data you are trying to read are not in a json format"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.constraint,message:data_encryption.constraint_encrypted_data_name_environment_uniq
|
||||||
|
msgid ""
|
||||||
|
"You can not store multiple encrypted data for the same record and "
|
||||||
|
"environment"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/data_encryption/models/encrypted_data.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "You can only encrypt data with suspended security (sudo)"
|
||||||
|
msgstr ""
|
||||||
|
|
@ -0,0 +1,133 @@
|
||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * data_encryption
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 16.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"Last-Translator: \n"
|
||||||
|
"Language-Team: \n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: \n"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,help:data_encryption.field_encrypted_data__environment
|
||||||
|
msgid "Concerned Odoo environment (prod, preprod...)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__create_uid
|
||||||
|
msgid "Created by"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__create_date
|
||||||
|
msgid "Created on"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__display_name
|
||||||
|
msgid "Display Name"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__encrypted_data
|
||||||
|
msgid "Encrypted Data"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/data_encryption/models/encrypted_data.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Encrypted data can only be read with suspended security (sudo)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__environment
|
||||||
|
msgid "Environment"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__id
|
||||||
|
msgid "ID"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data____last_update
|
||||||
|
msgid "Last Modified on"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__write_uid
|
||||||
|
msgid "Last Updated by"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__write_date
|
||||||
|
msgid "Last Updated on"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__name
|
||||||
|
msgid "Name"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/data_encryption/models/encrypted_data.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"No '%(key_name)s' entry found in config file. Use a key similar to: %(key)s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/data_encryption/models/encrypted_data.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"No environment found, please check your running_env entry in your config "
|
||||||
|
"file."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/data_encryption/models/encrypted_data.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"Password has been encrypted with a different key. Unless you can recover the"
|
||||||
|
" previous key, this password is unreadable."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model,name:data_encryption.model_encrypted_data
|
||||||
|
msgid "Store any encrypted data by environment"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,help:data_encryption.field_encrypted_data__name
|
||||||
|
msgid "Technical name"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/data_encryption/models/encrypted_data.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "The data you are trying to read are not in a json format"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.constraint,message:data_encryption.constraint_encrypted_data_name_environment_uniq
|
||||||
|
msgid ""
|
||||||
|
"You can not store multiple encrypted data for the same record and "
|
||||||
|
"environment"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/data_encryption/models/encrypted_data.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "You can only encrypt data with suspended security (sudo)"
|
||||||
|
msgstr ""
|
||||||
|
|
@ -0,0 +1,136 @@
|
||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * data_encryption
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 16.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"PO-Revision-Date: 2022-11-04 14:45+0000\n"
|
||||||
|
"Last-Translator: Maria Sparenberg <maria.sparenberg@gmx.net>\n"
|
||||||
|
"Language-Team: none\n"
|
||||||
|
"Language: de\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||||
|
"X-Generator: Weblate 4.14.1\n"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,help:data_encryption.field_encrypted_data__environment
|
||||||
|
msgid "Concerned Odoo environment (prod, preprod...)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__create_uid
|
||||||
|
msgid "Created by"
|
||||||
|
msgstr "Erstellt von"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__create_date
|
||||||
|
msgid "Created on"
|
||||||
|
msgstr "Erstellt am"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__display_name
|
||||||
|
msgid "Display Name"
|
||||||
|
msgstr "Anzeigename"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__encrypted_data
|
||||||
|
msgid "Encrypted Data"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/data_encryption/models/encrypted_data.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Encrypted data can only be read with suspended security (sudo)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__environment
|
||||||
|
msgid "Environment"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__id
|
||||||
|
msgid "ID"
|
||||||
|
msgstr "ID"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data____last_update
|
||||||
|
msgid "Last Modified on"
|
||||||
|
msgstr "Zuletzt geändert am"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__write_uid
|
||||||
|
msgid "Last Updated by"
|
||||||
|
msgstr "Zuletzt aktualisiert von"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__write_date
|
||||||
|
msgid "Last Updated on"
|
||||||
|
msgstr "Zuletzt aktualisiert am"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__name
|
||||||
|
msgid "Name"
|
||||||
|
msgstr "Bezeichnung"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/data_encryption/models/encrypted_data.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"No '%(key_name)s' entry found in config file. Use a key similar to: %(key)s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/data_encryption/models/encrypted_data.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"No environment found, please check your running_env entry in your config "
|
||||||
|
"file."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/data_encryption/models/encrypted_data.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"Password has been encrypted with a different key. Unless you can recover the "
|
||||||
|
"previous key, this password is unreadable."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model,name:data_encryption.model_encrypted_data
|
||||||
|
msgid "Store any encrypted data by environment"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,help:data_encryption.field_encrypted_data__name
|
||||||
|
msgid "Technical name"
|
||||||
|
msgstr "Technischer Name"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/data_encryption/models/encrypted_data.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "The data you are trying to read are not in a json format"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.constraint,message:data_encryption.constraint_encrypted_data_name_environment_uniq
|
||||||
|
msgid ""
|
||||||
|
"You can not store multiple encrypted data for the same record and "
|
||||||
|
"environment"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/data_encryption/models/encrypted_data.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "You can only encrypt data with suspended security (sudo)"
|
||||||
|
msgstr ""
|
||||||
|
|
@ -0,0 +1,145 @@
|
||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * data_encryption
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 16.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"PO-Revision-Date: 2023-07-25 13:10+0000\n"
|
||||||
|
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
|
||||||
|
"Language-Team: none\n"
|
||||||
|
"Language: es\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||||
|
"X-Generator: Weblate 4.17\n"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,help:data_encryption.field_encrypted_data__environment
|
||||||
|
msgid "Concerned Odoo environment (prod, preprod...)"
|
||||||
|
msgstr "Entorno Odoo concernido (prod, preprod...)"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__create_uid
|
||||||
|
msgid "Created by"
|
||||||
|
msgstr "Creado por"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__create_date
|
||||||
|
msgid "Created on"
|
||||||
|
msgstr "creado el"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__display_name
|
||||||
|
msgid "Display Name"
|
||||||
|
msgstr "nombre a mostrar"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__encrypted_data
|
||||||
|
msgid "Encrypted Data"
|
||||||
|
msgstr "Datos encriptados"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/data_encryption/models/encrypted_data.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Encrypted data can only be read with suspended security (sudo)"
|
||||||
|
msgstr ""
|
||||||
|
"Los datos encriptados sólo pueden leerse con seguridad suspendida (sudo)"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__environment
|
||||||
|
msgid "Environment"
|
||||||
|
msgstr "Ambiente"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__id
|
||||||
|
msgid "ID"
|
||||||
|
msgstr "ID (identificación)"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data____last_update
|
||||||
|
msgid "Last Modified on"
|
||||||
|
msgstr "Última Modificación el"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__write_uid
|
||||||
|
msgid "Last Updated by"
|
||||||
|
msgstr "Última actualización por"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__write_date
|
||||||
|
msgid "Last Updated on"
|
||||||
|
msgstr "Última Actualización el"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__name
|
||||||
|
msgid "Name"
|
||||||
|
msgstr "Nombre"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/data_encryption/models/encrypted_data.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"No '%(key_name)s' entry found in config file. Use a key similar to: %(key)s"
|
||||||
|
msgstr ""
|
||||||
|
"No se ha encontrado ninguna entrada '%(key_name)s' en el archivo de "
|
||||||
|
"configuración. Utilice una clave similar a: %(key)s"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/data_encryption/models/encrypted_data.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"No environment found, please check your running_env entry in your config "
|
||||||
|
"file."
|
||||||
|
msgstr ""
|
||||||
|
"No se ha encontrado ningún entorno, compruebe la entrada running_env de su "
|
||||||
|
"archivo de configuración."
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/data_encryption/models/encrypted_data.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"Password has been encrypted with a different key. Unless you can recover the "
|
||||||
|
"previous key, this password is unreadable."
|
||||||
|
msgstr ""
|
||||||
|
"La contraseña ha sido encriptada con una clave diferente. A menos que puedas "
|
||||||
|
"recuperar la clave anterior, esta contraseña es ilegible."
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model,name:data_encryption.model_encrypted_data
|
||||||
|
msgid "Store any encrypted data by environment"
|
||||||
|
msgstr "Almacenar cualquier dato encriptado por entorno"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,help:data_encryption.field_encrypted_data__name
|
||||||
|
msgid "Technical name"
|
||||||
|
msgstr "Nombre técnico"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/data_encryption/models/encrypted_data.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "The data you are trying to read are not in a json format"
|
||||||
|
msgstr "Los datos que intentas leer no están en formato json"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.constraint,message:data_encryption.constraint_encrypted_data_name_environment_uniq
|
||||||
|
msgid ""
|
||||||
|
"You can not store multiple encrypted data for the same record and "
|
||||||
|
"environment"
|
||||||
|
msgstr ""
|
||||||
|
"No se pueden almacenar varios datos encriptados para el mismo registro y "
|
||||||
|
"entorno"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/data_encryption/models/encrypted_data.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "You can only encrypt data with suspended security (sudo)"
|
||||||
|
msgstr "Sólo puede cifrar datos con seguridad suspendida (sudo)"
|
||||||
|
|
@ -0,0 +1,144 @@
|
||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * data_encryption
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 16.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"PO-Revision-Date: 2024-01-03 17:35+0000\n"
|
||||||
|
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
|
||||||
|
"Language-Team: none\n"
|
||||||
|
"Language: it\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||||
|
"X-Generator: Weblate 4.17\n"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,help:data_encryption.field_encrypted_data__environment
|
||||||
|
msgid "Concerned Odoo environment (prod, preprod...)"
|
||||||
|
msgstr "Riguardo all'ambinte Odoo (produzione, preproduzione...)"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__create_uid
|
||||||
|
msgid "Created by"
|
||||||
|
msgstr "Creato da"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__create_date
|
||||||
|
msgid "Created on"
|
||||||
|
msgstr "Creato il"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__display_name
|
||||||
|
msgid "Display Name"
|
||||||
|
msgstr "Nome visualizzato"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__encrypted_data
|
||||||
|
msgid "Encrypted Data"
|
||||||
|
msgstr "Dati criptati"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/data_encryption/models/encrypted_data.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Encrypted data can only be read with suspended security (sudo)"
|
||||||
|
msgstr "I dati criptati possono essere letti slo con la sicrezza sospesa (sudo)"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__environment
|
||||||
|
msgid "Environment"
|
||||||
|
msgstr "Ambiente"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__id
|
||||||
|
msgid "ID"
|
||||||
|
msgstr "ID"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data____last_update
|
||||||
|
msgid "Last Modified on"
|
||||||
|
msgstr "Ultima modifica il"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__write_uid
|
||||||
|
msgid "Last Updated by"
|
||||||
|
msgstr "Ultimo aggiornamento di"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__write_date
|
||||||
|
msgid "Last Updated on"
|
||||||
|
msgstr "Ultimo aggiornamento il"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__name
|
||||||
|
msgid "Name"
|
||||||
|
msgstr "Nome"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/data_encryption/models/encrypted_data.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"No '%(key_name)s' entry found in config file. Use a key similar to: %(key)s"
|
||||||
|
msgstr ""
|
||||||
|
"Nessun valore trovato per '%(key_name)s' nel file configrazione. Usare una "
|
||||||
|
"chiave simile a: %(key)s"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/data_encryption/models/encrypted_data.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"No environment found, please check your running_env entry in your config "
|
||||||
|
"file."
|
||||||
|
msgstr ""
|
||||||
|
"Nessun ambiente trovato, verificare il valore running_env nel file di "
|
||||||
|
"configurazione."
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/data_encryption/models/encrypted_data.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"Password has been encrypted with a different key. Unless you can recover the"
|
||||||
|
" previous key, this password is unreadable."
|
||||||
|
msgstr ""
|
||||||
|
"La password è stata criptata con un'altra chiave. Finché non si recupera la "
|
||||||
|
"chiave precedente, la password non è leggibile."
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model,name:data_encryption.model_encrypted_data
|
||||||
|
msgid "Store any encrypted data by environment"
|
||||||
|
msgstr "Deposita ogni dato criptato per ambiente"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.fields,help:data_encryption.field_encrypted_data__name
|
||||||
|
msgid "Technical name"
|
||||||
|
msgstr "Nome tecnico"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/data_encryption/models/encrypted_data.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "The data you are trying to read are not in a json format"
|
||||||
|
msgstr "I dati che si sta cercando di leggere non sono in formato JSON"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#: model:ir.model.constraint,message:data_encryption.constraint_encrypted_data_name_environment_uniq
|
||||||
|
msgid ""
|
||||||
|
"You can not store multiple encrypted data for the same record and "
|
||||||
|
"environment"
|
||||||
|
msgstr ""
|
||||||
|
"Non si possono depositare dati criptati multipli per lo stesso record "
|
||||||
|
"e ambiente"
|
||||||
|
|
||||||
|
#. module: data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/data_encryption/models/encrypted_data.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "You can only encrypt data with suspended security (sudo)"
|
||||||
|
msgstr "Si possono criptare i dati solo con la sicurezza sospesa (sudo)"
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
from . import encrypted_data
|
||||||
|
|
@ -0,0 +1,148 @@
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||||
|
import json
|
||||||
|
import logging
|
||||||
|
|
||||||
|
from odoo import api, fields, models
|
||||||
|
from odoo.exceptions import AccessError, ValidationError
|
||||||
|
from odoo.tools import ormcache
|
||||||
|
from odoo.tools.config import config
|
||||||
|
from odoo.tools.translate import _
|
||||||
|
|
||||||
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
try:
|
||||||
|
from cryptography.fernet import Fernet, InvalidToken
|
||||||
|
except ImportError as err: # pragma: no cover
|
||||||
|
_logger.debug(err)
|
||||||
|
|
||||||
|
|
||||||
|
class EncryptedData(models.Model):
|
||||||
|
"""Model to store encrypted data by environment (prod, preprod...)"""
|
||||||
|
|
||||||
|
_name = "encrypted.data"
|
||||||
|
_description = "Store any encrypted data by environment"
|
||||||
|
|
||||||
|
name = fields.Char(required=True, readonly=True, index=True, help="Technical name")
|
||||||
|
environment = fields.Char(
|
||||||
|
required=True,
|
||||||
|
index=True,
|
||||||
|
help="Concerned Odoo environment (prod, preprod...)",
|
||||||
|
)
|
||||||
|
encrypted_data = fields.Binary(attachment=False)
|
||||||
|
|
||||||
|
_sql_constraints = [
|
||||||
|
(
|
||||||
|
"name_environment_uniq",
|
||||||
|
"unique (name, environment)",
|
||||||
|
"You can not store multiple encrypted data for the same record and \
|
||||||
|
environment",
|
||||||
|
)
|
||||||
|
]
|
||||||
|
|
||||||
|
def _decrypt_data(self, env):
|
||||||
|
self.ensure_one()
|
||||||
|
cipher = self._get_cipher(env)
|
||||||
|
try:
|
||||||
|
return cipher.decrypt(self.encrypted_data).decode()
|
||||||
|
except InvalidToken as exc:
|
||||||
|
raise ValidationError(
|
||||||
|
_(
|
||||||
|
"Password has been encrypted with a different "
|
||||||
|
"key. Unless you can recover the previous key, "
|
||||||
|
"this password is unreadable."
|
||||||
|
)
|
||||||
|
) from exc
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
@ormcache("self._uid", "name", "env")
|
||||||
|
def _encrypted_get(self, name, env=None):
|
||||||
|
if self.env.context.get("bin_size"):
|
||||||
|
self = self.with_context(bin_size=False)
|
||||||
|
if not self.env.su:
|
||||||
|
raise AccessError(
|
||||||
|
_("Encrypted data can only be read with suspended security (sudo)")
|
||||||
|
)
|
||||||
|
if not env:
|
||||||
|
env = self._retrieve_env()
|
||||||
|
encrypted_rec = self.search([("name", "=", name), ("environment", "=", env)])
|
||||||
|
if not encrypted_rec:
|
||||||
|
return None
|
||||||
|
return encrypted_rec._decrypt_data(env)
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
@ormcache("self._uid", "name", "env")
|
||||||
|
def _encrypted_read_json(self, name, env=None):
|
||||||
|
data = self._encrypted_get(name, env=env)
|
||||||
|
if not data:
|
||||||
|
return {}
|
||||||
|
try:
|
||||||
|
return json.loads(data)
|
||||||
|
except (ValueError, TypeError) as exc:
|
||||||
|
raise ValidationError(
|
||||||
|
_("The data you are trying to read are not in a json format")
|
||||||
|
) from exc
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def _retrieve_env():
|
||||||
|
"""Return the current environment
|
||||||
|
Raise if none is found
|
||||||
|
"""
|
||||||
|
current = config.get("running_env", False)
|
||||||
|
if not current:
|
||||||
|
raise ValidationError(
|
||||||
|
_(
|
||||||
|
"No environment found, please check your running_env "
|
||||||
|
"entry in your config file."
|
||||||
|
)
|
||||||
|
)
|
||||||
|
return current
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def _get_cipher(cls, env):
|
||||||
|
"""Return a cipher using the key of environment.
|
||||||
|
force_env = name of the env key.
|
||||||
|
Useful for encoding against one precise env
|
||||||
|
"""
|
||||||
|
key_name = "encryption_key_%s" % env
|
||||||
|
key_str = config.get(key_name)
|
||||||
|
if not key_str:
|
||||||
|
raise ValidationError(
|
||||||
|
_(
|
||||||
|
"No '%(key_name)s' entry found in config file. "
|
||||||
|
"Use a key similar to: %(key)s"
|
||||||
|
)
|
||||||
|
% {"key_name": key_name, "key": Fernet.generate_key()}
|
||||||
|
)
|
||||||
|
# key should be in bytes format
|
||||||
|
key = key_str.encode()
|
||||||
|
return Fernet(key)
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _encrypt_data(self, data, env):
|
||||||
|
cipher = self._get_cipher(env)
|
||||||
|
if not isinstance(data, bytes):
|
||||||
|
data = data.encode()
|
||||||
|
return cipher.encrypt(data or "")
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _encrypted_store(self, name, data, env=None):
|
||||||
|
if not self.env.su:
|
||||||
|
raise AccessError(
|
||||||
|
_("You can only encrypt data with suspended security (sudo)")
|
||||||
|
)
|
||||||
|
if not env:
|
||||||
|
env = self._retrieve_env()
|
||||||
|
encrypted_data = self._encrypt_data(data, env)
|
||||||
|
existing_data = self.search([("name", "=", name), ("environment", "=", env)])
|
||||||
|
if existing_data:
|
||||||
|
existing_data.write({"encrypted_data": encrypted_data})
|
||||||
|
else:
|
||||||
|
self.create(
|
||||||
|
{"name": name, "environment": env, "encrypted_data": encrypted_data}
|
||||||
|
)
|
||||||
|
self._encrypted_get.clear_cache(self)
|
||||||
|
self._encrypted_read_json.clear_cache(self)
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _encrypted_store_json(self, name, json_data, env=None):
|
||||||
|
return self._encrypted_store(name, json.dumps(json_data), env=env)
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
To configure this module, you need to edit the main configuration file
|
||||||
|
of your instance, and add a directive called ``running_env``. Commonly
|
||||||
|
used values are 'dev', 'test', 'production'::
|
||||||
|
|
||||||
|
[options]
|
||||||
|
running_env=dev
|
||||||
|
|
||||||
|
|
||||||
|
You also need to set the encryption key(s). The main idea is to have different
|
||||||
|
encryption keys for your different environment, to avoid the possibility to retrieve
|
||||||
|
crucial information from the production environment in a developement environment, for instance.
|
||||||
|
So, if your running environment is 'dev'::
|
||||||
|
|
||||||
|
[options]
|
||||||
|
encryption_key_dev=fyeMIx9XVPBBky5XZeLDxVc9dFKy7Uzas3AoyMarHPA=
|
||||||
|
|
||||||
|
In the configuration file of your production environment, you may want to configure
|
||||||
|
all your other environments encryption key. This way, from production you can encrypt and decrypt
|
||||||
|
data for all environments.
|
||||||
|
|
||||||
|
You can generate keys with python -c 'from cryptography.fernet import Fernet; print(Fernet.generate_key())'.
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
* Raphaël Reverdy <raphael.reverdy@akretion.com>
|
||||||
|
* Florian da Costa <florian.dacosta@akretion.com>
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
This module allows to encrypt and decrypt data. This module is not usable
|
||||||
|
by itself, it is a low level module which should work as a base for others.
|
||||||
|
An example is the module server_environment_data_encryption
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
For now the encryption is dependent on the environment. It has been designed
|
||||||
|
to store the same kind of data with different values depending on the environement
|
||||||
|
(dev, preprod, prod...).
|
||||||
|
An improvement could be to split this in 2 modules. But the environment stuff
|
||||||
|
is not a big constraint.
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||||
|
access_encrypted_data,access_encrypted_data,model_encrypted_data,base.group_system,0,0,0,0
|
||||||
|
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
|
|
@ -0,0 +1,462 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
|
||||||
|
<title>Encryption data</title>
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
/*
|
||||||
|
:Author: David Goodger (goodger@python.org)
|
||||||
|
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
|
||||||
|
:Copyright: This stylesheet has been placed in the public domain.
|
||||||
|
|
||||||
|
Default cascading style sheet for the HTML output of Docutils.
|
||||||
|
|
||||||
|
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
||||||
|
customize this style sheet.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* used to remove borders from tables and images */
|
||||||
|
.borderless, table.borderless td, table.borderless th {
|
||||||
|
border: 0 }
|
||||||
|
|
||||||
|
table.borderless td, table.borderless th {
|
||||||
|
/* Override padding for "table.docutils td" with "! important".
|
||||||
|
The right padding separates the table cells. */
|
||||||
|
padding: 0 0.5em 0 0 ! important }
|
||||||
|
|
||||||
|
.first {
|
||||||
|
/* Override more specific margin styles with "! important". */
|
||||||
|
margin-top: 0 ! important }
|
||||||
|
|
||||||
|
.last, .with-subtitle {
|
||||||
|
margin-bottom: 0 ! important }
|
||||||
|
|
||||||
|
.hidden {
|
||||||
|
display: none }
|
||||||
|
|
||||||
|
.subscript {
|
||||||
|
vertical-align: sub;
|
||||||
|
font-size: smaller }
|
||||||
|
|
||||||
|
.superscript {
|
||||||
|
vertical-align: super;
|
||||||
|
font-size: smaller }
|
||||||
|
|
||||||
|
a.toc-backref {
|
||||||
|
text-decoration: none ;
|
||||||
|
color: black }
|
||||||
|
|
||||||
|
blockquote.epigraph {
|
||||||
|
margin: 2em 5em ; }
|
||||||
|
|
||||||
|
dl.docutils dd {
|
||||||
|
margin-bottom: 0.5em }
|
||||||
|
|
||||||
|
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||||
|
dl.docutils dt {
|
||||||
|
font-weight: bold }
|
||||||
|
*/
|
||||||
|
|
||||||
|
div.abstract {
|
||||||
|
margin: 2em 5em }
|
||||||
|
|
||||||
|
div.abstract p.topic-title {
|
||||||
|
font-weight: bold ;
|
||||||
|
text-align: center }
|
||||||
|
|
||||||
|
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||||
|
div.hint, div.important, div.note, div.tip, div.warning {
|
||||||
|
margin: 2em ;
|
||||||
|
border: medium outset ;
|
||||||
|
padding: 1em }
|
||||||
|
|
||||||
|
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||||
|
div.important p.admonition-title, div.note p.admonition-title,
|
||||||
|
div.tip p.admonition-title {
|
||||||
|
font-weight: bold ;
|
||||||
|
font-family: sans-serif }
|
||||||
|
|
||||||
|
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||||
|
div.danger p.admonition-title, div.error p.admonition-title,
|
||||||
|
div.warning p.admonition-title, .code .error {
|
||||||
|
color: red ;
|
||||||
|
font-weight: bold ;
|
||||||
|
font-family: sans-serif }
|
||||||
|
|
||||||
|
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||||
|
compound paragraphs.
|
||||||
|
div.compound .compound-first, div.compound .compound-middle {
|
||||||
|
margin-bottom: 0.5em }
|
||||||
|
|
||||||
|
div.compound .compound-last, div.compound .compound-middle {
|
||||||
|
margin-top: 0.5em }
|
||||||
|
*/
|
||||||
|
|
||||||
|
div.dedication {
|
||||||
|
margin: 2em 5em ;
|
||||||
|
text-align: center ;
|
||||||
|
font-style: italic }
|
||||||
|
|
||||||
|
div.dedication p.topic-title {
|
||||||
|
font-weight: bold ;
|
||||||
|
font-style: normal }
|
||||||
|
|
||||||
|
div.figure {
|
||||||
|
margin-left: 2em ;
|
||||||
|
margin-right: 2em }
|
||||||
|
|
||||||
|
div.footer, div.header {
|
||||||
|
clear: both;
|
||||||
|
font-size: smaller }
|
||||||
|
|
||||||
|
div.line-block {
|
||||||
|
display: block ;
|
||||||
|
margin-top: 1em ;
|
||||||
|
margin-bottom: 1em }
|
||||||
|
|
||||||
|
div.line-block div.line-block {
|
||||||
|
margin-top: 0 ;
|
||||||
|
margin-bottom: 0 ;
|
||||||
|
margin-left: 1.5em }
|
||||||
|
|
||||||
|
div.sidebar {
|
||||||
|
margin: 0 0 0.5em 1em ;
|
||||||
|
border: medium outset ;
|
||||||
|
padding: 1em ;
|
||||||
|
background-color: #ffffee ;
|
||||||
|
width: 40% ;
|
||||||
|
float: right ;
|
||||||
|
clear: right }
|
||||||
|
|
||||||
|
div.sidebar p.rubric {
|
||||||
|
font-family: sans-serif ;
|
||||||
|
font-size: medium }
|
||||||
|
|
||||||
|
div.system-messages {
|
||||||
|
margin: 5em }
|
||||||
|
|
||||||
|
div.system-messages h1 {
|
||||||
|
color: red }
|
||||||
|
|
||||||
|
div.system-message {
|
||||||
|
border: medium outset ;
|
||||||
|
padding: 1em }
|
||||||
|
|
||||||
|
div.system-message p.system-message-title {
|
||||||
|
color: red ;
|
||||||
|
font-weight: bold }
|
||||||
|
|
||||||
|
div.topic {
|
||||||
|
margin: 2em }
|
||||||
|
|
||||||
|
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||||
|
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||||
|
margin-top: 0.4em }
|
||||||
|
|
||||||
|
h1.title {
|
||||||
|
text-align: center }
|
||||||
|
|
||||||
|
h2.subtitle {
|
||||||
|
text-align: center }
|
||||||
|
|
||||||
|
hr.docutils {
|
||||||
|
width: 75% }
|
||||||
|
|
||||||
|
img.align-left, .figure.align-left, object.align-left, table.align-left {
|
||||||
|
clear: left ;
|
||||||
|
float: left ;
|
||||||
|
margin-right: 1em }
|
||||||
|
|
||||||
|
img.align-right, .figure.align-right, object.align-right, table.align-right {
|
||||||
|
clear: right ;
|
||||||
|
float: right ;
|
||||||
|
margin-left: 1em }
|
||||||
|
|
||||||
|
img.align-center, .figure.align-center, object.align-center {
|
||||||
|
display: block;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.align-center {
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.align-left {
|
||||||
|
text-align: left }
|
||||||
|
|
||||||
|
.align-center {
|
||||||
|
clear: both ;
|
||||||
|
text-align: center }
|
||||||
|
|
||||||
|
.align-right {
|
||||||
|
text-align: right }
|
||||||
|
|
||||||
|
/* reset inner alignment in figures */
|
||||||
|
div.align-right {
|
||||||
|
text-align: inherit }
|
||||||
|
|
||||||
|
/* div.align-center * { */
|
||||||
|
/* text-align: left } */
|
||||||
|
|
||||||
|
.align-top {
|
||||||
|
vertical-align: top }
|
||||||
|
|
||||||
|
.align-middle {
|
||||||
|
vertical-align: middle }
|
||||||
|
|
||||||
|
.align-bottom {
|
||||||
|
vertical-align: bottom }
|
||||||
|
|
||||||
|
ol.simple, ul.simple {
|
||||||
|
margin-bottom: 1em }
|
||||||
|
|
||||||
|
ol.arabic {
|
||||||
|
list-style: decimal }
|
||||||
|
|
||||||
|
ol.loweralpha {
|
||||||
|
list-style: lower-alpha }
|
||||||
|
|
||||||
|
ol.upperalpha {
|
||||||
|
list-style: upper-alpha }
|
||||||
|
|
||||||
|
ol.lowerroman {
|
||||||
|
list-style: lower-roman }
|
||||||
|
|
||||||
|
ol.upperroman {
|
||||||
|
list-style: upper-roman }
|
||||||
|
|
||||||
|
p.attribution {
|
||||||
|
text-align: right ;
|
||||||
|
margin-left: 50% }
|
||||||
|
|
||||||
|
p.caption {
|
||||||
|
font-style: italic }
|
||||||
|
|
||||||
|
p.credits {
|
||||||
|
font-style: italic ;
|
||||||
|
font-size: smaller }
|
||||||
|
|
||||||
|
p.label {
|
||||||
|
white-space: nowrap }
|
||||||
|
|
||||||
|
p.rubric {
|
||||||
|
font-weight: bold ;
|
||||||
|
font-size: larger ;
|
||||||
|
color: maroon ;
|
||||||
|
text-align: center }
|
||||||
|
|
||||||
|
p.sidebar-title {
|
||||||
|
font-family: sans-serif ;
|
||||||
|
font-weight: bold ;
|
||||||
|
font-size: larger }
|
||||||
|
|
||||||
|
p.sidebar-subtitle {
|
||||||
|
font-family: sans-serif ;
|
||||||
|
font-weight: bold }
|
||||||
|
|
||||||
|
p.topic-title {
|
||||||
|
font-weight: bold }
|
||||||
|
|
||||||
|
pre.address {
|
||||||
|
margin-bottom: 0 ;
|
||||||
|
margin-top: 0 ;
|
||||||
|
font: inherit }
|
||||||
|
|
||||||
|
pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
||||||
|
margin-left: 2em ;
|
||||||
|
margin-right: 2em }
|
||||||
|
|
||||||
|
pre.code .ln { color: grey; } /* line numbers */
|
||||||
|
pre.code, code { background-color: #eeeeee }
|
||||||
|
pre.code .comment, code .comment { color: #5C6576 }
|
||||||
|
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
||||||
|
pre.code .literal.string, code .literal.string { color: #0C5404 }
|
||||||
|
pre.code .name.builtin, code .name.builtin { color: #352B84 }
|
||||||
|
pre.code .deleted, code .deleted { background-color: #DEB0A1}
|
||||||
|
pre.code .inserted, code .inserted { background-color: #A3D289}
|
||||||
|
|
||||||
|
span.classifier {
|
||||||
|
font-family: sans-serif ;
|
||||||
|
font-style: oblique }
|
||||||
|
|
||||||
|
span.classifier-delimiter {
|
||||||
|
font-family: sans-serif ;
|
||||||
|
font-weight: bold }
|
||||||
|
|
||||||
|
span.interpreted {
|
||||||
|
font-family: sans-serif }
|
||||||
|
|
||||||
|
span.option {
|
||||||
|
white-space: nowrap }
|
||||||
|
|
||||||
|
span.pre {
|
||||||
|
white-space: pre }
|
||||||
|
|
||||||
|
span.problematic {
|
||||||
|
color: red }
|
||||||
|
|
||||||
|
span.section-subtitle {
|
||||||
|
/* font-size relative to parent (h1..h6 element) */
|
||||||
|
font-size: 80% }
|
||||||
|
|
||||||
|
table.citation {
|
||||||
|
border-left: solid 1px gray;
|
||||||
|
margin-left: 1px }
|
||||||
|
|
||||||
|
table.docinfo {
|
||||||
|
margin: 2em 4em }
|
||||||
|
|
||||||
|
table.docutils {
|
||||||
|
margin-top: 0.5em ;
|
||||||
|
margin-bottom: 0.5em }
|
||||||
|
|
||||||
|
table.footnote {
|
||||||
|
border-left: solid 1px black;
|
||||||
|
margin-left: 1px }
|
||||||
|
|
||||||
|
table.docutils td, table.docutils th,
|
||||||
|
table.docinfo td, table.docinfo th {
|
||||||
|
padding-left: 0.5em ;
|
||||||
|
padding-right: 0.5em ;
|
||||||
|
vertical-align: top }
|
||||||
|
|
||||||
|
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||||
|
font-weight: bold ;
|
||||||
|
text-align: left ;
|
||||||
|
white-space: nowrap ;
|
||||||
|
padding-left: 0 }
|
||||||
|
|
||||||
|
/* "booktabs" style (no vertical lines) */
|
||||||
|
table.docutils.booktabs {
|
||||||
|
border: 0px;
|
||||||
|
border-top: 2px solid;
|
||||||
|
border-bottom: 2px solid;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
table.docutils.booktabs * {
|
||||||
|
border: 0px;
|
||||||
|
}
|
||||||
|
table.docutils.booktabs th {
|
||||||
|
border-bottom: thin solid;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||||
|
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||||
|
font-size: 100% }
|
||||||
|
|
||||||
|
ul.auto-toc {
|
||||||
|
list-style-type: none }
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="document" id="encryption-data">
|
||||||
|
<h1 class="title">Encryption data</h1>
|
||||||
|
|
||||||
|
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
!! This file is generated by oca-gen-addon-readme !!
|
||||||
|
!! changes will be overwritten. !!
|
||||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
!! source digest: sha256:2d4447d50c16329e068a3699d69972506a62f5d3235b59046149e6aa76151e0e
|
||||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||||
|
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Alpha" src="https://img.shields.io/badge/maturity-Alpha-red.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-env/tree/16.0/data_encryption"><img alt="OCA/server-env" src="https://img.shields.io/badge/github-OCA%2Fserver--env-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-env-16-0/server-env-16-0-data_encryption"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/server-env&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||||
|
<p>This module allows to encrypt and decrypt data. This module is not usable
|
||||||
|
by itself, it is a low level module which should work as a base for others.
|
||||||
|
An example is the module server_environment_data_encryption</p>
|
||||||
|
<div class="admonition important">
|
||||||
|
<p class="first admonition-title">Important</p>
|
||||||
|
<p class="last">This is an alpha version, the data model and design can change at any time without warning.
|
||||||
|
Only for development or testing purpose, do not use in production.
|
||||||
|
<a class="reference external" href="https://odoo-community.org/page/development-status">More details on development status</a></p>
|
||||||
|
</div>
|
||||||
|
<p><strong>Table of contents</strong></p>
|
||||||
|
<div class="contents local topic" id="contents">
|
||||||
|
<ul class="simple">
|
||||||
|
<li><a class="reference internal" href="#configuration" id="toc-entry-1">Configuration</a></li>
|
||||||
|
<li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-2">Known issues / Roadmap</a></li>
|
||||||
|
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-3">Bug Tracker</a></li>
|
||||||
|
<li><a class="reference internal" href="#credits" id="toc-entry-4">Credits</a><ul>
|
||||||
|
<li><a class="reference internal" href="#authors" id="toc-entry-5">Authors</a></li>
|
||||||
|
<li><a class="reference internal" href="#contributors" id="toc-entry-6">Contributors</a></li>
|
||||||
|
<li><a class="reference internal" href="#maintainers" id="toc-entry-7">Maintainers</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="configuration">
|
||||||
|
<h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
|
||||||
|
<p>To configure this module, you need to edit the main configuration file
|
||||||
|
of your instance, and add a directive called <tt class="docutils literal">running_env</tt>. Commonly
|
||||||
|
used values are ‘dev’, ‘test’, ‘production’:</p>
|
||||||
|
<pre class="literal-block">
|
||||||
|
[options]
|
||||||
|
running_env=dev
|
||||||
|
</pre>
|
||||||
|
<p>You also need to set the encryption key(s). The main idea is to have different
|
||||||
|
encryption keys for your different environment, to avoid the possibility to retrieve
|
||||||
|
crucial information from the production environment in a developement environment, for instance.
|
||||||
|
So, if your running environment is ‘dev’:</p>
|
||||||
|
<pre class="literal-block">
|
||||||
|
[options]
|
||||||
|
encryption_key_dev=fyeMIx9XVPBBky5XZeLDxVc9dFKy7Uzas3AoyMarHPA=
|
||||||
|
</pre>
|
||||||
|
<p>In the configuration file of your production environment, you may want to configure
|
||||||
|
all your other environments encryption key. This way, from production you can encrypt and decrypt
|
||||||
|
data for all environments.</p>
|
||||||
|
<p>You can generate keys with python -c ‘from cryptography.fernet import Fernet; print(Fernet.generate_key())’.</p>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="known-issues-roadmap">
|
||||||
|
<h1><a class="toc-backref" href="#toc-entry-2">Known issues / Roadmap</a></h1>
|
||||||
|
<p>For now the encryption is dependent on the environment. It has been designed
|
||||||
|
to store the same kind of data with different values depending on the environement
|
||||||
|
(dev, preprod, prod…).
|
||||||
|
An improvement could be to split this in 2 modules. But the environment stuff
|
||||||
|
is not a big constraint.</p>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="bug-tracker">
|
||||||
|
<h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
|
||||||
|
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-env/issues">GitHub Issues</a>.
|
||||||
|
In case of trouble, please check there if your issue has already been reported.
|
||||||
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
||||||
|
<a class="reference external" href="https://github.com/OCA/server-env/issues/new?body=module:%20data_encryption%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||||
|
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="credits">
|
||||||
|
<h1><a class="toc-backref" href="#toc-entry-4">Credits</a></h1>
|
||||||
|
<div class="section" id="authors">
|
||||||
|
<h2><a class="toc-backref" href="#toc-entry-5">Authors</a></h2>
|
||||||
|
<ul class="simple">
|
||||||
|
<li>Akretion</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="contributors">
|
||||||
|
<h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
|
||||||
|
<ul class="simple">
|
||||||
|
<li>Raphaël Reverdy <<a class="reference external" href="mailto:raphael.reverdy@akretion.com">raphael.reverdy@akretion.com</a>></li>
|
||||||
|
<li>Florian da Costa <<a class="reference external" href="mailto:florian.dacosta@akretion.com">florian.dacosta@akretion.com</a>></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="maintainers">
|
||||||
|
<h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
|
||||||
|
<p>This module is maintained by the OCA.</p>
|
||||||
|
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
||||||
|
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||||
|
mission is to support the collaborative development of Odoo features and
|
||||||
|
promote its widespread use.</p>
|
||||||
|
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-env/tree/16.0/data_encryption">OCA/server-env</a> project on GitHub.</p>
|
||||||
|
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
from . import test_data_encrypt
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||||
|
|
||||||
|
import logging
|
||||||
|
|
||||||
|
from odoo.tests.common import TransactionCase
|
||||||
|
from odoo.tools.config import config
|
||||||
|
|
||||||
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
try:
|
||||||
|
from cryptography.fernet import Fernet
|
||||||
|
except ImportError as err: # pragma: no cover
|
||||||
|
_logger.debug(err)
|
||||||
|
|
||||||
|
|
||||||
|
class CommonDataEncrypted(TransactionCase):
|
||||||
|
def setUp(self):
|
||||||
|
super().setUp()
|
||||||
|
|
||||||
|
self.encrypted_data = self.env["encrypted.data"]
|
||||||
|
self.set_new_key_env("test")
|
||||||
|
self.old_running_env = config.get("running_env", "")
|
||||||
|
config["running_env"] = "test"
|
||||||
|
self.crypted_data_name = "test_model,1"
|
||||||
|
|
||||||
|
def set_new_key_env(self, environment):
|
||||||
|
crypting_key = Fernet.generate_key()
|
||||||
|
# The key is encoded to bytes in the module, because in real life
|
||||||
|
# the key com from the config file and is not in a binary format.
|
||||||
|
# So we decode here to avoid having a special behavior because of
|
||||||
|
# the tests.
|
||||||
|
config["encryption_key_{}".format(environment)] = crypting_key.decode()
|
||||||
|
|
||||||
|
def tearDown(self):
|
||||||
|
config["running_env"] = self.old_running_env
|
||||||
|
return super().tearDown()
|
||||||
|
|
@ -0,0 +1,92 @@
|
||||||
|
# © 2016 Akretion Raphaël REVERDY
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||||
|
|
||||||
|
import logging
|
||||||
|
|
||||||
|
from odoo.exceptions import AccessError, ValidationError
|
||||||
|
from odoo.tools.config import config
|
||||||
|
|
||||||
|
from .common import CommonDataEncrypted
|
||||||
|
|
||||||
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
try:
|
||||||
|
from cryptography.fernet import Fernet
|
||||||
|
except ImportError as err: # pragma: no cover
|
||||||
|
_logger.debug(err)
|
||||||
|
|
||||||
|
|
||||||
|
class TestDataEncrypted(CommonDataEncrypted):
|
||||||
|
def test_store_data_no_superuser(self):
|
||||||
|
# only superuser can use this model
|
||||||
|
admin = self.env.ref("base.user_admin")
|
||||||
|
with self.assertRaises(AccessError):
|
||||||
|
self.encrypted_data.with_user(admin.id)._encrypted_store(
|
||||||
|
self.crypted_data_name, "My config"
|
||||||
|
)
|
||||||
|
|
||||||
|
def test_store_data_noenv_set(self):
|
||||||
|
config.pop("running_env", None)
|
||||||
|
with self.assertRaises(ValidationError):
|
||||||
|
self.encrypted_data.sudo()._encrypted_store(
|
||||||
|
self.crypted_data_name, "My config"
|
||||||
|
)
|
||||||
|
|
||||||
|
def test_store_data_nokey_set(self):
|
||||||
|
config.pop("encryption_key_test", None)
|
||||||
|
with self.assertRaises(ValidationError):
|
||||||
|
self.encrypted_data.sudo()._encrypted_store(
|
||||||
|
self.crypted_data_name, "My config"
|
||||||
|
)
|
||||||
|
|
||||||
|
def test_get_data_decrypted_and_cache(self):
|
||||||
|
self.encrypted_data.sudo()._encrypted_store("test_model,1", "My config")
|
||||||
|
data = self.encrypted_data.sudo()._encrypted_get(self.crypted_data_name)
|
||||||
|
self.assertEqual(data, "My config")
|
||||||
|
|
||||||
|
# Test cache really depends on user (super user) else any user could
|
||||||
|
# access the data
|
||||||
|
admin = self.env.ref("base.user_admin")
|
||||||
|
with self.assertRaises(AccessError):
|
||||||
|
self.encrypted_data.with_user(admin)._encrypted_get(self.crypted_data_name)
|
||||||
|
|
||||||
|
# Change value should invalidate cache
|
||||||
|
self.encrypted_data.sudo()._encrypted_store("test_model,1", "Other Config")
|
||||||
|
new_data = self.encrypted_data.sudo()._encrypted_get(self.crypted_data_name)
|
||||||
|
self.assertEqual(new_data, "Other Config")
|
||||||
|
|
||||||
|
def test_get_data_wrong_key(self):
|
||||||
|
self.encrypted_data.sudo()._encrypted_store("test_model,1", "My config")
|
||||||
|
new_key = Fernet.generate_key()
|
||||||
|
config["encryption_key_test"] = new_key.decode()
|
||||||
|
with self.assertRaises(ValidationError):
|
||||||
|
self.encrypted_data.sudo()._encrypted_get(self.crypted_data_name)
|
||||||
|
|
||||||
|
def test_get_empty_data(self):
|
||||||
|
empty_data = self.encrypted_data.sudo()._encrypted_get(self.crypted_data_name)
|
||||||
|
self.assertEqual(empty_data, None)
|
||||||
|
|
||||||
|
def test_get_wrong_json(self):
|
||||||
|
self.encrypted_data.sudo()._encrypted_store(self.crypted_data_name, "config")
|
||||||
|
with self.assertRaises(ValidationError):
|
||||||
|
self.encrypted_data.sudo()._encrypted_read_json(self.crypted_data_name)
|
||||||
|
|
||||||
|
def test_get_good_json(self):
|
||||||
|
self.encrypted_data.sudo()._encrypted_store_json(
|
||||||
|
self.crypted_data_name, {"key": "value"}
|
||||||
|
)
|
||||||
|
data = self.encrypted_data.sudo()._encrypted_read_json(self.crypted_data_name)
|
||||||
|
self.assertEqual(data, {"key": "value"})
|
||||||
|
|
||||||
|
def test_get_empty_json(self):
|
||||||
|
data = self.encrypted_data.sudo()._encrypted_read_json(self.crypted_data_name)
|
||||||
|
self.assertEqual(data, {})
|
||||||
|
|
||||||
|
def test_get_data_with_bin_size_context(self):
|
||||||
|
self.encrypted_data.sudo()._encrypted_store(self.crypted_data_name, "test")
|
||||||
|
data = (
|
||||||
|
self.encrypted_data.sudo()
|
||||||
|
.with_context(bin_size=True)
|
||||||
|
._encrypted_get(self.crypted_data_name)
|
||||||
|
)
|
||||||
|
self.assertEqual(data, "test")
|
||||||
|
|
@ -0,0 +1,146 @@
|
||||||
|
==========================================
|
||||||
|
Mail configuration with server_environment
|
||||||
|
==========================================
|
||||||
|
|
||||||
|
..
|
||||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
!! This file is generated by oca-gen-addon-readme !!
|
||||||
|
!! changes will be overwritten. !!
|
||||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
!! source digest: sha256:98c12a3139202085663c933e6fb71273de1950ab8c96e24c2f0ba966a8860bea
|
||||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
||||||
|
:target: https://odoo-community.org/page/development-status
|
||||||
|
:alt: Beta
|
||||||
|
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
|
||||||
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
:alt: License: AGPL-3
|
||||||
|
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--env-lightgray.png?logo=github
|
||||||
|
:target: https://github.com/OCA/server-env/tree/16.0/mail_environment
|
||||||
|
:alt: OCA/server-env
|
||||||
|
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||||
|
:target: https://translation.odoo-community.org/projects/server-env-16-0/server-env-16-0-mail_environment
|
||||||
|
:alt: Translate me on Weblate
|
||||||
|
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
||||||
|
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-env&target_branch=16.0
|
||||||
|
:alt: Try me on Runboat
|
||||||
|
|
||||||
|
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||||
|
|
||||||
|
This module allows to configure the incoming and outgoing mail servers
|
||||||
|
using the `server_environment` mechanism: you can then have different
|
||||||
|
mail servers for the production and the test environment.
|
||||||
|
|
||||||
|
**Table of contents**
|
||||||
|
|
||||||
|
.. contents::
|
||||||
|
:local:
|
||||||
|
|
||||||
|
Installation
|
||||||
|
============
|
||||||
|
|
||||||
|
To install this module, you need to have the server_environment module
|
||||||
|
installed and properly configured.
|
||||||
|
|
||||||
|
Configuration
|
||||||
|
=============
|
||||||
|
|
||||||
|
With this module installed, the incoming and outgoing mail servers are
|
||||||
|
configured in the `server_environment_files` module (which is a module
|
||||||
|
you should provide, see the documentation of `server_environment` for
|
||||||
|
more information).
|
||||||
|
|
||||||
|
In the configuration file of each environment, you may first use the
|
||||||
|
sections `[outgoing_mail]` and `[incoming_mail]` to configure the
|
||||||
|
default values respectively for SMTP servers and the IMAP/POP servers.
|
||||||
|
|
||||||
|
Then for each server, you can define additional values or override the
|
||||||
|
default values with a section named `[outgoing_mail.resource_name]` or
|
||||||
|
`[incoming_mail.resource_name]` where "resource_name" is the name of
|
||||||
|
the server.
|
||||||
|
|
||||||
|
Example of config file ::
|
||||||
|
|
||||||
|
[outgoing_mail]
|
||||||
|
smtp_host = smtp.myserver.com
|
||||||
|
smtp_port = 587
|
||||||
|
smtp_user =
|
||||||
|
smtp_pass =
|
||||||
|
smtp_encryption = ssl
|
||||||
|
|
||||||
|
[outgoing_mail.odoo_smtp_server1]
|
||||||
|
smtp_user = odoo
|
||||||
|
smtp_pass = odoo
|
||||||
|
|
||||||
|
[incoming_mail.odoo_pop_mail1]
|
||||||
|
server = mail.myserver.com
|
||||||
|
port = 110
|
||||||
|
server_type = pop
|
||||||
|
is_ssl = 0
|
||||||
|
attach = 0
|
||||||
|
original = 0
|
||||||
|
user = odoo@myserver.com
|
||||||
|
password = uas1ohV0
|
||||||
|
|
||||||
|
You will need to create 2 records in the database, one outgoing mail
|
||||||
|
server with the field `name` set to "odoo_smtp_server1" and one
|
||||||
|
incoming mail server with the field `name` set to "odoo_pop_mail1".
|
||||||
|
|
||||||
|
Usage
|
||||||
|
=====
|
||||||
|
|
||||||
|
Once configured, Odoo will read the mail servers values from the
|
||||||
|
configuration file related to each environment defined in the main
|
||||||
|
Odoo file.
|
||||||
|
|
||||||
|
Known issues / Roadmap
|
||||||
|
======================
|
||||||
|
|
||||||
|
* Due to the special nature of this addon, you cannot test it on the OCA
|
||||||
|
runbot.
|
||||||
|
|
||||||
|
Bug Tracker
|
||||||
|
===========
|
||||||
|
|
||||||
|
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-env/issues>`_.
|
||||||
|
In case of trouble, please check there if your issue has already been reported.
|
||||||
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
||||||
|
`feedback <https://github.com/OCA/server-env/issues/new?body=module:%20mail_environment%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||||
|
|
||||||
|
Do not contact contributors directly about support or help with technical issues.
|
||||||
|
|
||||||
|
Credits
|
||||||
|
=======
|
||||||
|
|
||||||
|
Authors
|
||||||
|
~~~~~~~
|
||||||
|
|
||||||
|
* Camptocamp
|
||||||
|
|
||||||
|
Contributors
|
||||||
|
~~~~~~~~~~~~
|
||||||
|
|
||||||
|
* Nicolas Bessi <nicolas.bessi@camptocamp.com>
|
||||||
|
* Yannick Vaucher <yannick.vaucher@camptocamp.com>
|
||||||
|
* Guewen Baconnier <guewen.baconnier@camptocamp.com>
|
||||||
|
* Joël Grand-Guillaume <joel.grandguillaume@camptocamp.com>
|
||||||
|
* Holger Brunn <hbrunn@therp.nl>
|
||||||
|
* Alexandre Fayolle <alexandre.fayolle@camptocamp.com>
|
||||||
|
|
||||||
|
Maintainers
|
||||||
|
~~~~~~~~~~~
|
||||||
|
|
||||||
|
This module is maintained by the OCA.
|
||||||
|
|
||||||
|
.. image:: https://odoo-community.org/logo.png
|
||||||
|
:alt: Odoo Community Association
|
||||||
|
:target: https://odoo-community.org
|
||||||
|
|
||||||
|
OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||||
|
mission is to support the collaborative development of Odoo features and
|
||||||
|
promote its widespread use.
|
||||||
|
|
||||||
|
This module is part of the `OCA/server-env <https://github.com/OCA/server-env/tree/16.0/mail_environment>`_ project on GitHub.
|
||||||
|
|
||||||
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
from . import models
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
# Copyright 2012-2018 Camptocamp SA
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
|
{
|
||||||
|
"name": "Mail configuration with server_environment",
|
||||||
|
"version": "16.0.1.0.1",
|
||||||
|
"category": "Tools",
|
||||||
|
"summary": "Configure mail servers with server_environment_files",
|
||||||
|
"author": "Camptocamp, Odoo Community Association (OCA)",
|
||||||
|
"license": "AGPL-3",
|
||||||
|
"website": "https://github.com/OCA/server-env",
|
||||||
|
"depends": ["mail", "server_environment"],
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * mail_environment
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# Rudolf Schnapka <rs@techno-flex.de>, 2016
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: server-tools (9.0)\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2016-04-17 12:15+0000\n"
|
||||||
|
"PO-Revision-Date: 2016-04-21 09:16+0000\n"
|
||||||
|
"Last-Translator: Rudolf Schnapka <rs@techno-flex.de>\n"
|
||||||
|
"Language-Team: German (http://www.transifex.com/oca/OCA-server-tools-9-0/"
|
||||||
|
"language/de/)\n"
|
||||||
|
"Language: de\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model.fields,help:mail_environment.field_fetchmail_server__is_ssl
|
||||||
|
msgid ""
|
||||||
|
"Connections are encrypted with SSL/TLS through a dedicated port (default: "
|
||||||
|
"IMAPS=993, POP3S=995)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model,name:mail_environment.model_fetchmail_server
|
||||||
|
msgid "Incoming Mail Server"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model,name:mail_environment.model_ir_mail_server
|
||||||
|
#, fuzzy
|
||||||
|
msgid "Mail Server"
|
||||||
|
msgstr "ir.mail_server"
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__is_ssl
|
||||||
|
msgid "SSL/TLS"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__server_env_defaults
|
||||||
|
#: model:ir.model.fields,field_description:mail_environment.field_ir_mail_server__server_env_defaults
|
||||||
|
msgid "Server Env Defaults"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__server_type
|
||||||
|
msgid "Server Type"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "IMAP Server"
|
||||||
|
#~ msgstr "POP/IMAP-Server"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "POP Server"
|
||||||
|
#~ msgstr "POP/IMAP-Server"
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * mail_environment
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# Pedro M. Baeza <pedro.baeza@gmail.com>, 2017
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2017-05-01 10:38+0000\n"
|
||||||
|
"PO-Revision-Date: 2023-07-25 13:10+0000\n"
|
||||||
|
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
|
||||||
|
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
|
||||||
|
"Language: es\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||||
|
"X-Generator: Weblate 4.17\n"
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model.fields,help:mail_environment.field_fetchmail_server__is_ssl
|
||||||
|
msgid ""
|
||||||
|
"Connections are encrypted with SSL/TLS through a dedicated port (default: "
|
||||||
|
"IMAPS=993, POP3S=995)"
|
||||||
|
msgstr ""
|
||||||
|
"Las conexiones se cifran con SSL/TLS a través de un puerto dedicado (por "
|
||||||
|
"defecto: IMAPS=993, POP3S=995)"
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model,name:mail_environment.model_fetchmail_server
|
||||||
|
msgid "Incoming Mail Server"
|
||||||
|
msgstr "Servidor de correo entrante"
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model,name:mail_environment.model_ir_mail_server
|
||||||
|
msgid "Mail Server"
|
||||||
|
msgstr "Servidor de correo"
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__is_ssl
|
||||||
|
msgid "SSL/TLS"
|
||||||
|
msgstr "SSL/TLS"
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__server_env_defaults
|
||||||
|
#: model:ir.model.fields,field_description:mail_environment.field_ir_mail_server__server_env_defaults
|
||||||
|
msgid "Server Env Defaults"
|
||||||
|
msgstr "Valores por defecto del entorno de servidor"
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__server_type
|
||||||
|
msgid "Server Type"
|
||||||
|
msgstr "Tipo de servidor"
|
||||||
|
|
@ -0,0 +1,63 @@
|
||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * mail_environment
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# Bole <bole@dajmi5.com>, 2016
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: server-tools (9.0)\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2016-06-29 00:48+0000\n"
|
||||||
|
"PO-Revision-Date: 2016-06-14 10:58+0000\n"
|
||||||
|
"Last-Translator: Bole <bole@dajmi5.com>\n"
|
||||||
|
"Language-Team: Croatian (http://www.transifex.com/oca/OCA-server-tools-9-0/"
|
||||||
|
"language/hr/)\n"
|
||||||
|
"Language: hr\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
|
||||||
|
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model.fields,help:mail_environment.field_fetchmail_server__is_ssl
|
||||||
|
msgid ""
|
||||||
|
"Connections are encrypted with SSL/TLS through a dedicated port (default: "
|
||||||
|
"IMAPS=993, POP3S=995)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model,name:mail_environment.model_fetchmail_server
|
||||||
|
msgid "Incoming Mail Server"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model,name:mail_environment.model_ir_mail_server
|
||||||
|
#, fuzzy
|
||||||
|
msgid "Mail Server"
|
||||||
|
msgstr "ir.mail_server"
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__is_ssl
|
||||||
|
msgid "SSL/TLS"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__server_env_defaults
|
||||||
|
#: model:ir.model.fields,field_description:mail_environment.field_ir_mail_server__server_env_defaults
|
||||||
|
msgid "Server Env Defaults"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__server_type
|
||||||
|
msgid "Server Type"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "IMAP Server"
|
||||||
|
#~ msgstr "POP/IMAP Server"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "POP Server"
|
||||||
|
#~ msgstr "POP/IMAP Server"
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * mail_environment
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 16.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"PO-Revision-Date: 2024-01-03 14:36+0000\n"
|
||||||
|
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
|
||||||
|
"Language-Team: none\n"
|
||||||
|
"Language: it\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||||
|
"X-Generator: Weblate 4.17\n"
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model.fields,help:mail_environment.field_fetchmail_server__is_ssl
|
||||||
|
msgid ""
|
||||||
|
"Connections are encrypted with SSL/TLS through a dedicated port (default: "
|
||||||
|
"IMAPS=993, POP3S=995)"
|
||||||
|
msgstr ""
|
||||||
|
"Le connessioni sono criptate con SSL/TLS attraverso una porta dedicata "
|
||||||
|
"(predefinite: IMAPS=993, POP3S=995)"
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model,name:mail_environment.model_fetchmail_server
|
||||||
|
msgid "Incoming Mail Server"
|
||||||
|
msgstr "Server di posta in arrivo"
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model,name:mail_environment.model_ir_mail_server
|
||||||
|
msgid "Mail Server"
|
||||||
|
msgstr "Server di posta"
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__is_ssl
|
||||||
|
msgid "SSL/TLS"
|
||||||
|
msgstr "SSL/TLS"
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__server_env_defaults
|
||||||
|
#: model:ir.model.fields,field_description:mail_environment.field_ir_mail_server__server_env_defaults
|
||||||
|
msgid "Server Env Defaults"
|
||||||
|
msgstr "Server ambiente predefinito"
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__server_type
|
||||||
|
msgid "Server Type"
|
||||||
|
msgstr "Tipo servizio"
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * mail_environment
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 16.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"Last-Translator: \n"
|
||||||
|
"Language-Team: \n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: \n"
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model.fields,help:mail_environment.field_fetchmail_server__is_ssl
|
||||||
|
msgid ""
|
||||||
|
"Connections are encrypted with SSL/TLS through a dedicated port (default: "
|
||||||
|
"IMAPS=993, POP3S=995)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model,name:mail_environment.model_fetchmail_server
|
||||||
|
msgid "Incoming Mail Server"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model,name:mail_environment.model_ir_mail_server
|
||||||
|
msgid "Mail Server"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__is_ssl
|
||||||
|
msgid "SSL/TLS"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__server_env_defaults
|
||||||
|
#: model:ir.model.fields,field_description:mail_environment.field_ir_mail_server__server_env_defaults
|
||||||
|
msgid "Server Env Defaults"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__server_type
|
||||||
|
msgid "Server Type"
|
||||||
|
msgstr ""
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * mail_environment
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: server-tools (8.0)\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2015-09-29 11:14+0000\n"
|
||||||
|
"PO-Revision-Date: 2019-09-03 01:23+0000\n"
|
||||||
|
"Last-Translator: Rodrigo Macedo <rmsolucoeseminformatic4@gmail.com>\n"
|
||||||
|
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-server-"
|
||||||
|
"tools-8-0/language/pt_BR/)\n"
|
||||||
|
"Language: pt_BR\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=n > 1;\n"
|
||||||
|
"X-Generator: Weblate 3.8\n"
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model.fields,help:mail_environment.field_fetchmail_server__is_ssl
|
||||||
|
msgid ""
|
||||||
|
"Connections are encrypted with SSL/TLS through a dedicated port (default: "
|
||||||
|
"IMAPS=993, POP3S=995)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model,name:mail_environment.model_fetchmail_server
|
||||||
|
msgid "Incoming Mail Server"
|
||||||
|
msgstr "Servidor de Mensagens Recebidas"
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model,name:mail_environment.model_ir_mail_server
|
||||||
|
msgid "Mail Server"
|
||||||
|
msgstr "Servidor de E-mail"
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__is_ssl
|
||||||
|
msgid "SSL/TLS"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__server_env_defaults
|
||||||
|
#: model:ir.model.fields,field_description:mail_environment.field_ir_mail_server__server_env_defaults
|
||||||
|
msgid "Server Env Defaults"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__server_type
|
||||||
|
msgid "Server Type"
|
||||||
|
msgstr "Tipo de Servidor"
|
||||||
|
|
||||||
|
#~ msgid "IMAP Server"
|
||||||
|
#~ msgstr "Servidor IMAP"
|
||||||
|
|
||||||
|
#~ msgid "Local Server"
|
||||||
|
#~ msgstr "Servidor Local"
|
||||||
|
|
||||||
|
#~ msgid "POP Server"
|
||||||
|
#~ msgstr "Servidor POP"
|
||||||
|
|
@ -0,0 +1,63 @@
|
||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * mail_environment
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# Matjaž Mozetič <m.mozetic@matmoz.si>, 2016
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: server-tools (9.0)\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2016-02-27 01:37+0000\n"
|
||||||
|
"PO-Revision-Date: 2016-02-27 16:56+0000\n"
|
||||||
|
"Last-Translator: Matjaž Mozetič <m.mozetic@matmoz.si>\n"
|
||||||
|
"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-server-tools-9-0/"
|
||||||
|
"language/sl/)\n"
|
||||||
|
"Language: sl\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
|
||||||
|
"%100==4 ? 2 : 3);\n"
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model.fields,help:mail_environment.field_fetchmail_server__is_ssl
|
||||||
|
msgid ""
|
||||||
|
"Connections are encrypted with SSL/TLS through a dedicated port (default: "
|
||||||
|
"IMAPS=993, POP3S=995)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model,name:mail_environment.model_fetchmail_server
|
||||||
|
msgid "Incoming Mail Server"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model,name:mail_environment.model_ir_mail_server
|
||||||
|
#, fuzzy
|
||||||
|
msgid "Mail Server"
|
||||||
|
msgstr "ir.mail_server"
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__is_ssl
|
||||||
|
msgid "SSL/TLS"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__server_env_defaults
|
||||||
|
#: model:ir.model.fields,field_description:mail_environment.field_ir_mail_server__server_env_defaults
|
||||||
|
msgid "Server Env Defaults"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__server_type
|
||||||
|
msgid "Server Type"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "IMAP Server"
|
||||||
|
#~ msgstr "POP/IMAP strežnik"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "POP Server"
|
||||||
|
#~ msgstr "POP/IMAP strežnik"
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * mail_environment
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# Jeffery Chenn <jeffery9@gmail.com>, 2016
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: server-tools (9.0)\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2016-08-31 11:58+0000\n"
|
||||||
|
"PO-Revision-Date: 2016-09-04 06:08+0000\n"
|
||||||
|
"Last-Translator: Jeffery Chenn <jeffery9@gmail.com>\n"
|
||||||
|
"Language-Team: Chinese (China) (http://www.transifex.com/oca/OCA-server-"
|
||||||
|
"tools-9-0/language/zh_CN/)\n"
|
||||||
|
"Language: zh_CN\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model.fields,help:mail_environment.field_fetchmail_server__is_ssl
|
||||||
|
msgid ""
|
||||||
|
"Connections are encrypted with SSL/TLS through a dedicated port (default: "
|
||||||
|
"IMAPS=993, POP3S=995)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model,name:mail_environment.model_fetchmail_server
|
||||||
|
msgid "Incoming Mail Server"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model,name:mail_environment.model_ir_mail_server
|
||||||
|
#, fuzzy
|
||||||
|
msgid "Mail Server"
|
||||||
|
msgstr "POP/IMAP 服务器"
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__is_ssl
|
||||||
|
msgid "SSL/TLS"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__server_env_defaults
|
||||||
|
#: model:ir.model.fields,field_description:mail_environment.field_ir_mail_server__server_env_defaults
|
||||||
|
msgid "Server Env Defaults"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mail_environment
|
||||||
|
#: model:ir.model.fields,field_description:mail_environment.field_fetchmail_server__server_type
|
||||||
|
msgid "Server Type"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "IMAP Server"
|
||||||
|
#~ msgstr "POP/IMAP 服务器"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "POP Server"
|
||||||
|
#~ msgstr "POP/IMAP 服务器"
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
from . import ir_mail_server
|
||||||
|
from . import fetchmail_server
|
||||||
|
|
@ -0,0 +1,70 @@
|
||||||
|
# Copyright 2012-2018 Camptocamp SA
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
|
import operator
|
||||||
|
|
||||||
|
from odoo import api, fields, models
|
||||||
|
from odoo.osv.expression import FALSE_DOMAIN
|
||||||
|
|
||||||
|
|
||||||
|
class FetchmailServer(models.Model):
|
||||||
|
"""Incoming POP/IMAP mail server account"""
|
||||||
|
|
||||||
|
_name = "fetchmail.server"
|
||||||
|
_inherit = ["fetchmail.server", "server.env.mixin"]
|
||||||
|
|
||||||
|
@property
|
||||||
|
def _server_env_fields(self):
|
||||||
|
base_fields = super()._server_env_fields
|
||||||
|
mail_fields = {
|
||||||
|
"server": {},
|
||||||
|
"port": {},
|
||||||
|
"server_type": {},
|
||||||
|
"user": {},
|
||||||
|
"password": {},
|
||||||
|
"is_ssl": {},
|
||||||
|
"attach": {},
|
||||||
|
"original": {},
|
||||||
|
}
|
||||||
|
mail_fields.update(base_fields)
|
||||||
|
return mail_fields
|
||||||
|
|
||||||
|
is_ssl = fields.Boolean(search="_search_is_ssl")
|
||||||
|
server_type = fields.Selection(search="_search_server_type")
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _server_env_global_section_name(self):
|
||||||
|
"""Name of the global section in the configuration files
|
||||||
|
|
||||||
|
Can be customized in your model
|
||||||
|
"""
|
||||||
|
return "incoming_mail"
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _search_is_ssl(self, oper, value):
|
||||||
|
"""Keep the is_ssl field searchable to allow domain in search view."""
|
||||||
|
if not isinstance(value, bool):
|
||||||
|
return FALSE_DOMAIN
|
||||||
|
operators = {
|
||||||
|
"=": operator.eq,
|
||||||
|
"!=": operator.ne,
|
||||||
|
}
|
||||||
|
if oper not in operators:
|
||||||
|
return FALSE_DOMAIN
|
||||||
|
servers = self.search([]).filtered(lambda s: operators[oper](value, s.is_ssl))
|
||||||
|
return [("id", "in", servers.ids)]
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _search_server_type(self, oper, value):
|
||||||
|
operators = {
|
||||||
|
"=": operator.eq,
|
||||||
|
"!=": operator.ne,
|
||||||
|
"in": operator.contains,
|
||||||
|
"not in": lambda a, b: not operator.contains(a, b),
|
||||||
|
}
|
||||||
|
if oper not in operators:
|
||||||
|
return [("id", "in", [])]
|
||||||
|
servers = self.search([]).filtered(
|
||||||
|
lambda s: operators[oper](value, s.server_type)
|
||||||
|
)
|
||||||
|
return [("id", "in", servers.ids)]
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
# Copyright 2012-2018 Camptocamp SA
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
|
from odoo import api, models
|
||||||
|
|
||||||
|
|
||||||
|
class IrMailServer(models.Model):
|
||||||
|
_name = "ir.mail_server"
|
||||||
|
_inherit = ["ir.mail_server", "server.env.mixin"]
|
||||||
|
|
||||||
|
@property
|
||||||
|
def _server_env_fields(self):
|
||||||
|
base_fields = super()._server_env_fields
|
||||||
|
mail_fields = {
|
||||||
|
"smtp_host": {},
|
||||||
|
"smtp_port": {},
|
||||||
|
"smtp_user": {},
|
||||||
|
"smtp_pass": {},
|
||||||
|
"smtp_encryption": {},
|
||||||
|
}
|
||||||
|
mail_fields.update(base_fields)
|
||||||
|
return mail_fields
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _server_env_global_section_name(self):
|
||||||
|
"""Name of the global section in the configuration files
|
||||||
|
|
||||||
|
Can be customized in your model
|
||||||
|
"""
|
||||||
|
return "outgoing_mail"
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
With this module installed, the incoming and outgoing mail servers are
|
||||||
|
configured in the `server_environment_files` module (which is a module
|
||||||
|
you should provide, see the documentation of `server_environment` for
|
||||||
|
more information).
|
||||||
|
|
||||||
|
In the configuration file of each environment, you may first use the
|
||||||
|
sections `[outgoing_mail]` and `[incoming_mail]` to configure the
|
||||||
|
default values respectively for SMTP servers and the IMAP/POP servers.
|
||||||
|
|
||||||
|
Then for each server, you can define additional values or override the
|
||||||
|
default values with a section named `[outgoing_mail.resource_name]` or
|
||||||
|
`[incoming_mail.resource_name]` where "resource_name" is the name of
|
||||||
|
the server.
|
||||||
|
|
||||||
|
Example of config file ::
|
||||||
|
|
||||||
|
[outgoing_mail]
|
||||||
|
smtp_host = smtp.myserver.com
|
||||||
|
smtp_port = 587
|
||||||
|
smtp_user =
|
||||||
|
smtp_pass =
|
||||||
|
smtp_encryption = ssl
|
||||||
|
|
||||||
|
[outgoing_mail.odoo_smtp_server1]
|
||||||
|
smtp_user = odoo
|
||||||
|
smtp_pass = odoo
|
||||||
|
|
||||||
|
[incoming_mail.odoo_pop_mail1]
|
||||||
|
server = mail.myserver.com
|
||||||
|
port = 110
|
||||||
|
server_type = pop
|
||||||
|
is_ssl = 0
|
||||||
|
attach = 0
|
||||||
|
original = 0
|
||||||
|
user = odoo@myserver.com
|
||||||
|
password = uas1ohV0
|
||||||
|
|
||||||
|
You will need to create 2 records in the database, one outgoing mail
|
||||||
|
server with the field `name` set to "odoo_smtp_server1" and one
|
||||||
|
incoming mail server with the field `name` set to "odoo_pop_mail1".
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
* Nicolas Bessi <nicolas.bessi@camptocamp.com>
|
||||||
|
* Yannick Vaucher <yannick.vaucher@camptocamp.com>
|
||||||
|
* Guewen Baconnier <guewen.baconnier@camptocamp.com>
|
||||||
|
* Joël Grand-Guillaume <joel.grandguillaume@camptocamp.com>
|
||||||
|
* Holger Brunn <hbrunn@therp.nl>
|
||||||
|
* Alexandre Fayolle <alexandre.fayolle@camptocamp.com>
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
This module allows to configure the incoming and outgoing mail servers
|
||||||
|
using the `server_environment` mechanism: you can then have different
|
||||||
|
mail servers for the production and the test environment.
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
To install this module, you need to have the server_environment module
|
||||||
|
installed and properly configured.
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
* Due to the special nature of this addon, you cannot test it on the OCA
|
||||||
|
runbot.
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
Once configured, Odoo will read the mail servers values from the
|
||||||
|
configuration file related to each environment defined in the main
|
||||||
|
Odoo file.
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
|
|
@ -0,0 +1,490 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
|
||||||
|
<title>Mail configuration with server_environment</title>
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
/*
|
||||||
|
:Author: David Goodger (goodger@python.org)
|
||||||
|
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
|
||||||
|
:Copyright: This stylesheet has been placed in the public domain.
|
||||||
|
|
||||||
|
Default cascading style sheet for the HTML output of Docutils.
|
||||||
|
|
||||||
|
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
||||||
|
customize this style sheet.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* used to remove borders from tables and images */
|
||||||
|
.borderless, table.borderless td, table.borderless th {
|
||||||
|
border: 0 }
|
||||||
|
|
||||||
|
table.borderless td, table.borderless th {
|
||||||
|
/* Override padding for "table.docutils td" with "! important".
|
||||||
|
The right padding separates the table cells. */
|
||||||
|
padding: 0 0.5em 0 0 ! important }
|
||||||
|
|
||||||
|
.first {
|
||||||
|
/* Override more specific margin styles with "! important". */
|
||||||
|
margin-top: 0 ! important }
|
||||||
|
|
||||||
|
.last, .with-subtitle {
|
||||||
|
margin-bottom: 0 ! important }
|
||||||
|
|
||||||
|
.hidden {
|
||||||
|
display: none }
|
||||||
|
|
||||||
|
.subscript {
|
||||||
|
vertical-align: sub;
|
||||||
|
font-size: smaller }
|
||||||
|
|
||||||
|
.superscript {
|
||||||
|
vertical-align: super;
|
||||||
|
font-size: smaller }
|
||||||
|
|
||||||
|
a.toc-backref {
|
||||||
|
text-decoration: none ;
|
||||||
|
color: black }
|
||||||
|
|
||||||
|
blockquote.epigraph {
|
||||||
|
margin: 2em 5em ; }
|
||||||
|
|
||||||
|
dl.docutils dd {
|
||||||
|
margin-bottom: 0.5em }
|
||||||
|
|
||||||
|
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||||
|
dl.docutils dt {
|
||||||
|
font-weight: bold }
|
||||||
|
*/
|
||||||
|
|
||||||
|
div.abstract {
|
||||||
|
margin: 2em 5em }
|
||||||
|
|
||||||
|
div.abstract p.topic-title {
|
||||||
|
font-weight: bold ;
|
||||||
|
text-align: center }
|
||||||
|
|
||||||
|
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||||
|
div.hint, div.important, div.note, div.tip, div.warning {
|
||||||
|
margin: 2em ;
|
||||||
|
border: medium outset ;
|
||||||
|
padding: 1em }
|
||||||
|
|
||||||
|
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||||
|
div.important p.admonition-title, div.note p.admonition-title,
|
||||||
|
div.tip p.admonition-title {
|
||||||
|
font-weight: bold ;
|
||||||
|
font-family: sans-serif }
|
||||||
|
|
||||||
|
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||||
|
div.danger p.admonition-title, div.error p.admonition-title,
|
||||||
|
div.warning p.admonition-title, .code .error {
|
||||||
|
color: red ;
|
||||||
|
font-weight: bold ;
|
||||||
|
font-family: sans-serif }
|
||||||
|
|
||||||
|
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||||
|
compound paragraphs.
|
||||||
|
div.compound .compound-first, div.compound .compound-middle {
|
||||||
|
margin-bottom: 0.5em }
|
||||||
|
|
||||||
|
div.compound .compound-last, div.compound .compound-middle {
|
||||||
|
margin-top: 0.5em }
|
||||||
|
*/
|
||||||
|
|
||||||
|
div.dedication {
|
||||||
|
margin: 2em 5em ;
|
||||||
|
text-align: center ;
|
||||||
|
font-style: italic }
|
||||||
|
|
||||||
|
div.dedication p.topic-title {
|
||||||
|
font-weight: bold ;
|
||||||
|
font-style: normal }
|
||||||
|
|
||||||
|
div.figure {
|
||||||
|
margin-left: 2em ;
|
||||||
|
margin-right: 2em }
|
||||||
|
|
||||||
|
div.footer, div.header {
|
||||||
|
clear: both;
|
||||||
|
font-size: smaller }
|
||||||
|
|
||||||
|
div.line-block {
|
||||||
|
display: block ;
|
||||||
|
margin-top: 1em ;
|
||||||
|
margin-bottom: 1em }
|
||||||
|
|
||||||
|
div.line-block div.line-block {
|
||||||
|
margin-top: 0 ;
|
||||||
|
margin-bottom: 0 ;
|
||||||
|
margin-left: 1.5em }
|
||||||
|
|
||||||
|
div.sidebar {
|
||||||
|
margin: 0 0 0.5em 1em ;
|
||||||
|
border: medium outset ;
|
||||||
|
padding: 1em ;
|
||||||
|
background-color: #ffffee ;
|
||||||
|
width: 40% ;
|
||||||
|
float: right ;
|
||||||
|
clear: right }
|
||||||
|
|
||||||
|
div.sidebar p.rubric {
|
||||||
|
font-family: sans-serif ;
|
||||||
|
font-size: medium }
|
||||||
|
|
||||||
|
div.system-messages {
|
||||||
|
margin: 5em }
|
||||||
|
|
||||||
|
div.system-messages h1 {
|
||||||
|
color: red }
|
||||||
|
|
||||||
|
div.system-message {
|
||||||
|
border: medium outset ;
|
||||||
|
padding: 1em }
|
||||||
|
|
||||||
|
div.system-message p.system-message-title {
|
||||||
|
color: red ;
|
||||||
|
font-weight: bold }
|
||||||
|
|
||||||
|
div.topic {
|
||||||
|
margin: 2em }
|
||||||
|
|
||||||
|
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||||
|
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||||
|
margin-top: 0.4em }
|
||||||
|
|
||||||
|
h1.title {
|
||||||
|
text-align: center }
|
||||||
|
|
||||||
|
h2.subtitle {
|
||||||
|
text-align: center }
|
||||||
|
|
||||||
|
hr.docutils {
|
||||||
|
width: 75% }
|
||||||
|
|
||||||
|
img.align-left, .figure.align-left, object.align-left, table.align-left {
|
||||||
|
clear: left ;
|
||||||
|
float: left ;
|
||||||
|
margin-right: 1em }
|
||||||
|
|
||||||
|
img.align-right, .figure.align-right, object.align-right, table.align-right {
|
||||||
|
clear: right ;
|
||||||
|
float: right ;
|
||||||
|
margin-left: 1em }
|
||||||
|
|
||||||
|
img.align-center, .figure.align-center, object.align-center {
|
||||||
|
display: block;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.align-center {
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.align-left {
|
||||||
|
text-align: left }
|
||||||
|
|
||||||
|
.align-center {
|
||||||
|
clear: both ;
|
||||||
|
text-align: center }
|
||||||
|
|
||||||
|
.align-right {
|
||||||
|
text-align: right }
|
||||||
|
|
||||||
|
/* reset inner alignment in figures */
|
||||||
|
div.align-right {
|
||||||
|
text-align: inherit }
|
||||||
|
|
||||||
|
/* div.align-center * { */
|
||||||
|
/* text-align: left } */
|
||||||
|
|
||||||
|
.align-top {
|
||||||
|
vertical-align: top }
|
||||||
|
|
||||||
|
.align-middle {
|
||||||
|
vertical-align: middle }
|
||||||
|
|
||||||
|
.align-bottom {
|
||||||
|
vertical-align: bottom }
|
||||||
|
|
||||||
|
ol.simple, ul.simple {
|
||||||
|
margin-bottom: 1em }
|
||||||
|
|
||||||
|
ol.arabic {
|
||||||
|
list-style: decimal }
|
||||||
|
|
||||||
|
ol.loweralpha {
|
||||||
|
list-style: lower-alpha }
|
||||||
|
|
||||||
|
ol.upperalpha {
|
||||||
|
list-style: upper-alpha }
|
||||||
|
|
||||||
|
ol.lowerroman {
|
||||||
|
list-style: lower-roman }
|
||||||
|
|
||||||
|
ol.upperroman {
|
||||||
|
list-style: upper-roman }
|
||||||
|
|
||||||
|
p.attribution {
|
||||||
|
text-align: right ;
|
||||||
|
margin-left: 50% }
|
||||||
|
|
||||||
|
p.caption {
|
||||||
|
font-style: italic }
|
||||||
|
|
||||||
|
p.credits {
|
||||||
|
font-style: italic ;
|
||||||
|
font-size: smaller }
|
||||||
|
|
||||||
|
p.label {
|
||||||
|
white-space: nowrap }
|
||||||
|
|
||||||
|
p.rubric {
|
||||||
|
font-weight: bold ;
|
||||||
|
font-size: larger ;
|
||||||
|
color: maroon ;
|
||||||
|
text-align: center }
|
||||||
|
|
||||||
|
p.sidebar-title {
|
||||||
|
font-family: sans-serif ;
|
||||||
|
font-weight: bold ;
|
||||||
|
font-size: larger }
|
||||||
|
|
||||||
|
p.sidebar-subtitle {
|
||||||
|
font-family: sans-serif ;
|
||||||
|
font-weight: bold }
|
||||||
|
|
||||||
|
p.topic-title {
|
||||||
|
font-weight: bold }
|
||||||
|
|
||||||
|
pre.address {
|
||||||
|
margin-bottom: 0 ;
|
||||||
|
margin-top: 0 ;
|
||||||
|
font: inherit }
|
||||||
|
|
||||||
|
pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
||||||
|
margin-left: 2em ;
|
||||||
|
margin-right: 2em }
|
||||||
|
|
||||||
|
pre.code .ln { color: grey; } /* line numbers */
|
||||||
|
pre.code, code { background-color: #eeeeee }
|
||||||
|
pre.code .comment, code .comment { color: #5C6576 }
|
||||||
|
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
||||||
|
pre.code .literal.string, code .literal.string { color: #0C5404 }
|
||||||
|
pre.code .name.builtin, code .name.builtin { color: #352B84 }
|
||||||
|
pre.code .deleted, code .deleted { background-color: #DEB0A1}
|
||||||
|
pre.code .inserted, code .inserted { background-color: #A3D289}
|
||||||
|
|
||||||
|
span.classifier {
|
||||||
|
font-family: sans-serif ;
|
||||||
|
font-style: oblique }
|
||||||
|
|
||||||
|
span.classifier-delimiter {
|
||||||
|
font-family: sans-serif ;
|
||||||
|
font-weight: bold }
|
||||||
|
|
||||||
|
span.interpreted {
|
||||||
|
font-family: sans-serif }
|
||||||
|
|
||||||
|
span.option {
|
||||||
|
white-space: nowrap }
|
||||||
|
|
||||||
|
span.pre {
|
||||||
|
white-space: pre }
|
||||||
|
|
||||||
|
span.problematic {
|
||||||
|
color: red }
|
||||||
|
|
||||||
|
span.section-subtitle {
|
||||||
|
/* font-size relative to parent (h1..h6 element) */
|
||||||
|
font-size: 80% }
|
||||||
|
|
||||||
|
table.citation {
|
||||||
|
border-left: solid 1px gray;
|
||||||
|
margin-left: 1px }
|
||||||
|
|
||||||
|
table.docinfo {
|
||||||
|
margin: 2em 4em }
|
||||||
|
|
||||||
|
table.docutils {
|
||||||
|
margin-top: 0.5em ;
|
||||||
|
margin-bottom: 0.5em }
|
||||||
|
|
||||||
|
table.footnote {
|
||||||
|
border-left: solid 1px black;
|
||||||
|
margin-left: 1px }
|
||||||
|
|
||||||
|
table.docutils td, table.docutils th,
|
||||||
|
table.docinfo td, table.docinfo th {
|
||||||
|
padding-left: 0.5em ;
|
||||||
|
padding-right: 0.5em ;
|
||||||
|
vertical-align: top }
|
||||||
|
|
||||||
|
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||||
|
font-weight: bold ;
|
||||||
|
text-align: left ;
|
||||||
|
white-space: nowrap ;
|
||||||
|
padding-left: 0 }
|
||||||
|
|
||||||
|
/* "booktabs" style (no vertical lines) */
|
||||||
|
table.docutils.booktabs {
|
||||||
|
border: 0px;
|
||||||
|
border-top: 2px solid;
|
||||||
|
border-bottom: 2px solid;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
table.docutils.booktabs * {
|
||||||
|
border: 0px;
|
||||||
|
}
|
||||||
|
table.docutils.booktabs th {
|
||||||
|
border-bottom: thin solid;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||||
|
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||||
|
font-size: 100% }
|
||||||
|
|
||||||
|
ul.auto-toc {
|
||||||
|
list-style-type: none }
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="document" id="mail-configuration-with-server-environment">
|
||||||
|
<h1 class="title">Mail configuration with server_environment</h1>
|
||||||
|
|
||||||
|
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
!! This file is generated by oca-gen-addon-readme !!
|
||||||
|
!! changes will be overwritten. !!
|
||||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
!! source digest: sha256:98c12a3139202085663c933e6fb71273de1950ab8c96e24c2f0ba966a8860bea
|
||||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||||
|
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-env/tree/16.0/mail_environment"><img alt="OCA/server-env" src="https://img.shields.io/badge/github-OCA%2Fserver--env-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-env-16-0/server-env-16-0-mail_environment"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/server-env&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||||
|
<p>This module allows to configure the incoming and outgoing mail servers
|
||||||
|
using the <cite>server_environment</cite> mechanism: you can then have different
|
||||||
|
mail servers for the production and the test environment.</p>
|
||||||
|
<p><strong>Table of contents</strong></p>
|
||||||
|
<div class="contents local topic" id="contents">
|
||||||
|
<ul class="simple">
|
||||||
|
<li><a class="reference internal" href="#installation" id="toc-entry-1">Installation</a></li>
|
||||||
|
<li><a class="reference internal" href="#configuration" id="toc-entry-2">Configuration</a></li>
|
||||||
|
<li><a class="reference internal" href="#usage" id="toc-entry-3">Usage</a></li>
|
||||||
|
<li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-4">Known issues / Roadmap</a></li>
|
||||||
|
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-5">Bug Tracker</a></li>
|
||||||
|
<li><a class="reference internal" href="#credits" id="toc-entry-6">Credits</a><ul>
|
||||||
|
<li><a class="reference internal" href="#authors" id="toc-entry-7">Authors</a></li>
|
||||||
|
<li><a class="reference internal" href="#contributors" id="toc-entry-8">Contributors</a></li>
|
||||||
|
<li><a class="reference internal" href="#maintainers" id="toc-entry-9">Maintainers</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="installation">
|
||||||
|
<h1><a class="toc-backref" href="#toc-entry-1">Installation</a></h1>
|
||||||
|
<p>To install this module, you need to have the server_environment module
|
||||||
|
installed and properly configured.</p>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="configuration">
|
||||||
|
<h1><a class="toc-backref" href="#toc-entry-2">Configuration</a></h1>
|
||||||
|
<p>With this module installed, the incoming and outgoing mail servers are
|
||||||
|
configured in the <cite>server_environment_files</cite> module (which is a module
|
||||||
|
you should provide, see the documentation of <cite>server_environment</cite> for
|
||||||
|
more information).</p>
|
||||||
|
<p>In the configuration file of each environment, you may first use the
|
||||||
|
sections <cite>[outgoing_mail]</cite> and <cite>[incoming_mail]</cite> to configure the
|
||||||
|
default values respectively for SMTP servers and the IMAP/POP servers.</p>
|
||||||
|
<p>Then for each server, you can define additional values or override the
|
||||||
|
default values with a section named <cite>[outgoing_mail.resource_name]</cite> or
|
||||||
|
<cite>[incoming_mail.resource_name]</cite> where “resource_name” is the name of
|
||||||
|
the server.</p>
|
||||||
|
<p>Example of config file</p>
|
||||||
|
<pre class="literal-block">
|
||||||
|
[outgoing_mail]
|
||||||
|
smtp_host = smtp.myserver.com
|
||||||
|
smtp_port = 587
|
||||||
|
smtp_user =
|
||||||
|
smtp_pass =
|
||||||
|
smtp_encryption = ssl
|
||||||
|
|
||||||
|
[outgoing_mail.odoo_smtp_server1]
|
||||||
|
smtp_user = odoo
|
||||||
|
smtp_pass = odoo
|
||||||
|
|
||||||
|
[incoming_mail.odoo_pop_mail1]
|
||||||
|
server = mail.myserver.com
|
||||||
|
port = 110
|
||||||
|
server_type = pop
|
||||||
|
is_ssl = 0
|
||||||
|
attach = 0
|
||||||
|
original = 0
|
||||||
|
user = odoo@myserver.com
|
||||||
|
password = uas1ohV0
|
||||||
|
</pre>
|
||||||
|
<p>You will need to create 2 records in the database, one outgoing mail
|
||||||
|
server with the field <cite>name</cite> set to “odoo_smtp_server1” and one
|
||||||
|
incoming mail server with the field <cite>name</cite> set to “odoo_pop_mail1”.</p>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="usage">
|
||||||
|
<h1><a class="toc-backref" href="#toc-entry-3">Usage</a></h1>
|
||||||
|
<p>Once configured, Odoo will read the mail servers values from the
|
||||||
|
configuration file related to each environment defined in the main
|
||||||
|
Odoo file.</p>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="known-issues-roadmap">
|
||||||
|
<h1><a class="toc-backref" href="#toc-entry-4">Known issues / Roadmap</a></h1>
|
||||||
|
<ul class="simple">
|
||||||
|
<li>Due to the special nature of this addon, you cannot test it on the OCA
|
||||||
|
runbot.</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="bug-tracker">
|
||||||
|
<h1><a class="toc-backref" href="#toc-entry-5">Bug Tracker</a></h1>
|
||||||
|
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-env/issues">GitHub Issues</a>.
|
||||||
|
In case of trouble, please check there if your issue has already been reported.
|
||||||
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
||||||
|
<a class="reference external" href="https://github.com/OCA/server-env/issues/new?body=module:%20mail_environment%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||||
|
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="credits">
|
||||||
|
<h1><a class="toc-backref" href="#toc-entry-6">Credits</a></h1>
|
||||||
|
<div class="section" id="authors">
|
||||||
|
<h2><a class="toc-backref" href="#toc-entry-7">Authors</a></h2>
|
||||||
|
<ul class="simple">
|
||||||
|
<li>Camptocamp</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="contributors">
|
||||||
|
<h2><a class="toc-backref" href="#toc-entry-8">Contributors</a></h2>
|
||||||
|
<ul class="simple">
|
||||||
|
<li>Nicolas Bessi <<a class="reference external" href="mailto:nicolas.bessi@camptocamp.com">nicolas.bessi@camptocamp.com</a>></li>
|
||||||
|
<li>Yannick Vaucher <<a class="reference external" href="mailto:yannick.vaucher@camptocamp.com">yannick.vaucher@camptocamp.com</a>></li>
|
||||||
|
<li>Guewen Baconnier <<a class="reference external" href="mailto:guewen.baconnier@camptocamp.com">guewen.baconnier@camptocamp.com</a>></li>
|
||||||
|
<li>Joël Grand-Guillaume <<a class="reference external" href="mailto:joel.grandguillaume@camptocamp.com">joel.grandguillaume@camptocamp.com</a>></li>
|
||||||
|
<li>Holger Brunn <<a class="reference external" href="mailto:hbrunn@therp.nl">hbrunn@therp.nl</a>></li>
|
||||||
|
<li>Alexandre Fayolle <<a class="reference external" href="mailto:alexandre.fayolle@camptocamp.com">alexandre.fayolle@camptocamp.com</a>></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="maintainers">
|
||||||
|
<h2><a class="toc-backref" href="#toc-entry-9">Maintainers</a></h2>
|
||||||
|
<p>This module is maintained by the OCA.</p>
|
||||||
|
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
||||||
|
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||||
|
mission is to support the collaborative development of Odoo features and
|
||||||
|
promote its widespread use.</p>
|
||||||
|
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-env/tree/16.0/mail_environment">OCA/server-env</a> project on GitHub.</p>
|
||||||
|
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
from . import test_mail_environment
|
||||||
|
|
@ -0,0 +1,77 @@
|
||||||
|
# Copyright 2018 Camptocamp (https://www.camptocamp.com).
|
||||||
|
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html)
|
||||||
|
|
||||||
|
|
||||||
|
from odoo.addons.server_environment.tests.common import ServerEnvironmentCase
|
||||||
|
|
||||||
|
fetchmail_config = """
|
||||||
|
[incoming_mail.fetchmail1]
|
||||||
|
server = safe_server
|
||||||
|
port = 993
|
||||||
|
server_type = imap
|
||||||
|
is_ssl = 1
|
||||||
|
attach = 1
|
||||||
|
original = 1
|
||||||
|
user = admin
|
||||||
|
password = admin
|
||||||
|
state = done
|
||||||
|
priority = 1
|
||||||
|
active = 1
|
||||||
|
|
||||||
|
[incoming_mail.fetchmail2]
|
||||||
|
server = unsafe_server
|
||||||
|
port = 143
|
||||||
|
server_type = imap
|
||||||
|
is_ssl = 0
|
||||||
|
attach = 1
|
||||||
|
original = 1
|
||||||
|
user = admin
|
||||||
|
password = admin
|
||||||
|
state = done
|
||||||
|
priority = 1
|
||||||
|
active = 1
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
class TestMailEnvironment(ServerEnvironmentCase):
|
||||||
|
def test_fetchmail_search_is_ssl(self):
|
||||||
|
fetchmail1 = self.env["fetchmail.server"].create({"name": "fetchmail1"})
|
||||||
|
fetchmail2 = self.env["fetchmail.server"].create({"name": "fetchmail2"})
|
||||||
|
with self.load_config(public=fetchmail_config):
|
||||||
|
# Test basic properties
|
||||||
|
self.assertTrue(fetchmail1.is_ssl)
|
||||||
|
self.assertEqual(fetchmail1.port, 993)
|
||||||
|
self.assertFalse(fetchmail2.is_ssl)
|
||||||
|
self.assertEqual(fetchmail2.port, 143)
|
||||||
|
|
||||||
|
# Test is_ssl search method
|
||||||
|
self.assertIn(
|
||||||
|
fetchmail1, self.env["fetchmail.server"].search([("is_ssl", "=", True)])
|
||||||
|
)
|
||||||
|
self.assertIn(
|
||||||
|
fetchmail1,
|
||||||
|
self.env["fetchmail.server"].search([("is_ssl", "!=", False)]),
|
||||||
|
)
|
||||||
|
self.assertNotIn(
|
||||||
|
fetchmail1,
|
||||||
|
self.env["fetchmail.server"].search([("is_ssl", "=", False)]),
|
||||||
|
)
|
||||||
|
self.assertNotIn(
|
||||||
|
fetchmail1,
|
||||||
|
self.env["fetchmail.server"].search([("is_ssl", "!=", True)]),
|
||||||
|
)
|
||||||
|
self.assertNotIn(
|
||||||
|
fetchmail2, self.env["fetchmail.server"].search([("is_ssl", "=", True)])
|
||||||
|
)
|
||||||
|
self.assertNotIn(
|
||||||
|
fetchmail2,
|
||||||
|
self.env["fetchmail.server"].search([("is_ssl", "!=", False)]),
|
||||||
|
)
|
||||||
|
self.assertIn(
|
||||||
|
fetchmail2,
|
||||||
|
self.env["fetchmail.server"].search([("is_ssl", "=", False)]),
|
||||||
|
)
|
||||||
|
self.assertIn(
|
||||||
|
fetchmail2,
|
||||||
|
self.env["fetchmail.server"].search([("is_ssl", "!=", True)]),
|
||||||
|
)
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
# generated from manifests external_dependencies
|
||||||
|
cryptography
|
||||||
|
|
@ -7,7 +7,7 @@ server configuration environment files
|
||||||
!! This file is generated by oca-gen-addon-readme !!
|
!! This file is generated by oca-gen-addon-readme !!
|
||||||
!! changes will be overwritten. !!
|
!! changes will be overwritten. !!
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
!! source digest: sha256:d9ca614a511f38fa74f55332b9672f1959fa46018462106b58f293eeed487269
|
!! source digest: sha256:681af9ccb320ef4e5866b4dfcb9ed2d8d19abae84f71d251cdc8376303f40c01
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
|
||||||
|
|
@ -17,31 +17,31 @@ server configuration environment files
|
||||||
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
|
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
|
||||||
:alt: License: LGPL-3
|
:alt: License: LGPL-3
|
||||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--env-lightgray.png?logo=github
|
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--env-lightgray.png?logo=github
|
||||||
:target: https://github.com/OCA/server-env/tree/17.0/server_environment
|
:target: https://github.com/OCA/server-env/tree/16.0/server_environment
|
||||||
:alt: OCA/server-env
|
:alt: OCA/server-env
|
||||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||||
:target: https://translation.odoo-community.org/projects/server-env-17-0/server-env-17-0-server_environment
|
:target: https://translation.odoo-community.org/projects/server-env-16-0/server-env-16-0-server_environment
|
||||||
:alt: Translate me on Weblate
|
:alt: Translate me on Weblate
|
||||||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
||||||
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-env&target_branch=17.0
|
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-env&target_branch=16.0
|
||||||
:alt: Try me on Runboat
|
:alt: Try me on Runboat
|
||||||
|
|
||||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||||
|
|
||||||
This module provides a way to define an environment in the main Odoo
|
This module provides a way to define an environment in the main Odoo
|
||||||
configuration file and to read some configurations from files depending
|
configuration file and to read some configurations from files
|
||||||
on the configured environment: you define the environment in the main
|
depending on the configured environment: you define the environment in
|
||||||
configuration file, and the values for the various possible environments
|
the main configuration file, and the values for the various possible
|
||||||
are stored in the ``server_environment_files`` companion module.
|
environments are stored in the ``server_environment_files`` companion
|
||||||
|
module.
|
||||||
|
|
||||||
The ``server_environment_files`` module is optional, the values can be
|
The ``server_environment_files`` module is optional, the values can be set using
|
||||||
set using an environment variable with a fallback on default values in
|
an environment variable with a fallback on default values in the database.
|
||||||
the database.
|
|
||||||
|
|
||||||
The configuration read from the files are visible under the
|
The configuration read from the files are visible under the Configuration
|
||||||
Configuration menu. If you are not in the 'dev' environment you will not
|
menu. If you are not in the 'dev' environment you will not be able to
|
||||||
be able to see the values contained in the defined secret keys (by
|
see the values contained in the defined secret keys
|
||||||
default : '*passw*', '*key*', '*secret*' and '*token*').
|
(by default : '*passw*', '*key*', '*secret*' and '*token*').
|
||||||
|
|
||||||
**Table of contents**
|
**Table of contents**
|
||||||
|
|
||||||
|
|
@ -52,112 +52,104 @@ Installation
|
||||||
============
|
============
|
||||||
|
|
||||||
By itself, this module does little. See for instance the
|
By itself, this module does little. See for instance the
|
||||||
``mail_environment`` addon which depends on this one to allow
|
``mail_environment`` addon which depends on this one to allow configuring
|
||||||
configuring the incoming and outgoing mail servers depending on the
|
the incoming and outgoing mail servers depending on the environment.
|
||||||
environment.
|
|
||||||
|
|
||||||
You can store your configuration values in a companion module called
|
You can store your configuration values in a companion module called
|
||||||
``server_environment_files``. You can copy and customize the provided
|
``server_environment_files``. You can copy and customize the provided
|
||||||
``server_environment_files_sample`` module for this purpose.
|
``server_environment_files_sample`` module for this purpose. Alternatively, you
|
||||||
Alternatively, you can provide them in environment variables
|
can provide them in environment variables ``SERVER_ENV_CONFIG`` and
|
||||||
``SERVER_ENV_CONFIG`` and ``SERVER_ENV_CONFIG_SECRET``.
|
``SERVER_ENV_CONFIG_SECRET``.
|
||||||
|
|
||||||
Configuration
|
Configuration
|
||||||
=============
|
=============
|
||||||
|
|
||||||
To configure this module, you need to edit the main configuration file
|
To configure this module, you need to edit the main configuration file
|
||||||
of your instance, and add a directive called ``running_env``. Commonly
|
of your instance, and add a directive called ``running_env``. Commonly
|
||||||
used values are 'dev', 'test', 'production':
|
used values are 'dev', 'test', 'production'::
|
||||||
|
|
||||||
::
|
[options]
|
||||||
|
running_env=dev
|
||||||
|
|
||||||
[options]
|
Values associated to keys containing 'passw' are only displayed in the 'dev'
|
||||||
running_env=dev
|
environment.
|
||||||
|
|
||||||
Values associated to keys containing 'passw' are only displayed in the
|
If you don't provide any value, `test` is used as a safe default.
|
||||||
'dev' environment.
|
|
||||||
|
|
||||||
If you don't provide any value, test is used as a safe default.
|
|
||||||
|
|
||||||
You have several possibilities to set configuration values:
|
You have several possibilities to set configuration values:
|
||||||
|
|
||||||
server_environment_files
|
server_environment_files
|
||||||
------------------------
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
You can edit the settings you need in the ``server_environment_files``
|
You can edit the settings you need in the ``server_environment_files`` addon. The
|
||||||
addon. The ``server_environment_files_sample`` can be used as an
|
``server_environment_files_sample`` can be used as an example:
|
||||||
example:
|
|
||||||
|
|
||||||
- values common to all / most environments can be stored in the
|
* values common to all / most environments can be stored in the
|
||||||
``default/`` directory using the .ini file syntax;
|
``default/`` directory using the .ini file syntax;
|
||||||
- each environment you need to define is stored in its own directory
|
* each environment you need to define is stored in its own directory
|
||||||
and can override or extend default values;
|
and can override or extend default values;
|
||||||
- you can override or extend values in the main configuration file of
|
* you can override or extend values in the main configuration
|
||||||
your instance;
|
file of your instance;
|
||||||
|
|
||||||
Environment variable
|
Environment variable
|
||||||
--------------------
|
~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
You can define configuration in the environment variable
|
You can define configuration in the environment variable ``SERVER_ENV_CONFIG``
|
||||||
``SERVER_ENV_CONFIG`` and/or ``SERVER_ENV_CONFIG_SECRET``. The 2
|
and/or ``SERVER_ENV_CONFIG_SECRET``. The 2 variables are handled the exact same
|
||||||
variables are handled the exact same way, this is only a convenience for
|
way, this is only a convenience for the deployment where you can isolate the
|
||||||
the deployment where you can isolate the secrets in a different,
|
secrets in a different, encrypted, file. They are multi-line environment variables
|
||||||
encrypted, file. They are multi-line environment variables in the same
|
in the same configparser format than the files.
|
||||||
configparser format than the files. If you used options in
|
If you used options in ``server_environment_files``, the options set in the
|
||||||
``server_environment_files``, the options set in the environment
|
environment variable override them.
|
||||||
variable override them.
|
|
||||||
|
|
||||||
The options in the environment variable are not dependent of
|
The options in the environment variable are not dependent of ``running_env``,
|
||||||
``running_env``, the content of the variable must be set accordingly to
|
the content of the variable must be set accordingly to the running environment.
|
||||||
the running environment.
|
|
||||||
|
|
||||||
Example of setup:
|
Example of setup:
|
||||||
|
|
||||||
A public file, containing that will contain public variables:
|
A public file, containing that will contain public variables::
|
||||||
|
|
||||||
::
|
# These variables are not odoo standard variables,
|
||||||
|
# they are there to represent what your file could look like
|
||||||
|
export WORKERS='8'
|
||||||
|
export MAX_CRON_THREADS='1'
|
||||||
|
export LOG_LEVEL=info
|
||||||
|
export LOG_HANDLER=":INFO"
|
||||||
|
export DB_MAXCONN=5
|
||||||
|
|
||||||
# These variables are not odoo standard variables,
|
# server environment options
|
||||||
# they are there to represent what your file could look like
|
export SERVER_ENV_CONFIG="
|
||||||
export WORKERS='8'
|
[storage_backend.my_sftp]
|
||||||
export MAX_CRON_THREADS='1'
|
sftp_server=10.10.10.10
|
||||||
export LOG_LEVEL=info
|
sftp_login=foo
|
||||||
export LOG_HANDLER=":INFO"
|
sftp_port=22200
|
||||||
export DB_MAXCONN=5
|
directory_path=Odoo
|
||||||
|
"
|
||||||
|
|
||||||
# server environment options
|
A second file which is encrypted and contains secrets::
|
||||||
export SERVER_ENV_CONFIG="
|
|
||||||
[storage_backend.my_sftp]
|
|
||||||
sftp_server=10.10.10.10
|
|
||||||
sftp_login=foo
|
|
||||||
sftp_port=22200
|
|
||||||
directory_path=Odoo
|
|
||||||
"
|
|
||||||
|
|
||||||
A second file which is encrypted and contains secrets:
|
# This variable is not an odoo standard variable,
|
||||||
|
# it is there to represent what your file could look like
|
||||||
::
|
export DB_PASSWORD='xxxxxxxxx'
|
||||||
|
# server environment options
|
||||||
# This variable is not an odoo standard variable,
|
export SERVER_ENV_CONFIG_SECRET="
|
||||||
# it is there to represent what your file could look like
|
[storage_backend.my_sftp]
|
||||||
export DB_PASSWORD='xxxxxxxxx'
|
sftp_password=xxxxxxxxx
|
||||||
# server environment options
|
"
|
||||||
export SERVER_ENV_CONFIG_SECRET="
|
|
||||||
[storage_backend.my_sftp]
|
|
||||||
sftp_password=xxxxxxxxx
|
|
||||||
"
|
|
||||||
|
|
||||||
**WARNING**
|
**WARNING**
|
||||||
|
|
||||||
my_sftp must match the name of the record. If you want something more
|
`my_sftp` must match the name of the record.
|
||||||
reliable use server.env.techname.mixin and use tech_name field to
|
If you want something more reliable use `server.env.techname.mixin`
|
||||||
reference records. See "USAGE".
|
and use `tech_name` field to reference records.
|
||||||
|
See "USAGE".
|
||||||
|
|
||||||
|
|
||||||
Default values
|
Default values
|
||||||
--------------
|
~~~~~~~~~~~~~~
|
||||||
|
|
||||||
When using the ``server.env.mixin`` mixin, for each env-computed field,
|
When using the ``server.env.mixin`` mixin, for each env-computed field, a
|
||||||
a companion field ``<field>_env_default`` is created. This field is not
|
companion field ``<field>_env_default`` is created. This field is not
|
||||||
environment-dependent. It's a fallback value used when no key is set in
|
environment-dependent. It's a fallback value used when no key is set in
|
||||||
configuration files / environment variable.
|
configuration files / environment variable.
|
||||||
|
|
||||||
|
|
@ -165,51 +157,49 @@ When the default field is used, the field is made editable on Odoo.
|
||||||
|
|
||||||
Note: empty environment keys always take precedence over default fields
|
Note: empty environment keys always take precedence over default fields
|
||||||
|
|
||||||
Server environment integration
|
|
||||||
------------------------------
|
|
||||||
|
|
||||||
Read the documentation of the class
|
Server environment integration
|
||||||
`models/server_env_mixin.py <models/server_env_mixin.py>`__.
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Read the documentation of the class `models/server_env_mixin.py
|
||||||
|
<models/server_env_mixin.py>`_.
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
=====
|
=====
|
||||||
|
|
||||||
You can include a mixin in your model and configure the env-computed
|
You can include a mixin in your model and configure the env-computed fields
|
||||||
fields by an override of ``_server_env_fields``.
|
by an override of ``_server_env_fields``.
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
class StorageBackend(models.Model):
|
class StorageBackend(models.Model):
|
||||||
_name = "storage.backend"
|
_name = "storage.backend"
|
||||||
_inherit = ["storage.backend", "server.env.mixin"]
|
_inherit = ["storage.backend", "server.env.mixin"]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def _server_env_fields(self):
|
def _server_env_fields(self):
|
||||||
return {"directory_path": {}}
|
return {"directory_path": {}}
|
||||||
|
|
||||||
Read the documentation of the class and methods in
|
Read the documentation of the class and methods in `models/server_env_mixin.py
|
||||||
`models/server_env_mixin.py <models/server_env_mixin.py>`__.
|
<models/server_env_mixin.py>`__.
|
||||||
|
|
||||||
If you want to have a technical name to reference:
|
|
||||||
|
|
||||||
::
|
If you want to have a technical name to reference::
|
||||||
|
|
||||||
class StorageBackend(models.Model):
|
class StorageBackend(models.Model):
|
||||||
_name = "storage.backend"
|
_name = "storage.backend"
|
||||||
_inherit = ["storage.backend", "server.env.techname.mixin", "server.env.mixin"]
|
_inherit = ["storage.backend", "server.env.techname.mixin", "server.env.mixin"]
|
||||||
|
|
||||||
[...]
|
[...]
|
||||||
|
|
||||||
Known issues / Roadmap
|
Known issues / Roadmap
|
||||||
======================
|
======================
|
||||||
|
|
||||||
- it is not possible to set the environment from the command line. A
|
* it is not possible to set the environment from the command line. A
|
||||||
configuration file must be used.
|
configuration file must be used.
|
||||||
- the module does not allow to set low level attributes such as
|
* the module does not allow to set low level attributes such as database server, etc.
|
||||||
database server, etc.
|
* `server.env.techname.mixin`'s `tech_name` field could leverage the new option
|
||||||
- server.env.techname.mixin's tech_name field could leverage the new
|
for computable / writable fields and get rid of some onchange / read / write code.
|
||||||
option for computable / writable fields and get rid of some onchange
|
|
||||||
/ read / write code.
|
|
||||||
|
|
||||||
Bug Tracker
|
Bug Tracker
|
||||||
===========
|
===========
|
||||||
|
|
@ -217,7 +207,7 @@ Bug Tracker
|
||||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-env/issues>`_.
|
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-env/issues>`_.
|
||||||
In case of trouble, please check there if your issue has already been reported.
|
In case of trouble, please check there if your issue has already been reported.
|
||||||
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
||||||
`feedback <https://github.com/OCA/server-env/issues/new?body=module:%20server_environment%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
`feedback <https://github.com/OCA/server-env/issues/new?body=module:%20server_environment%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||||
|
|
||||||
Do not contact contributors directly about support or help with technical issues.
|
Do not contact contributors directly about support or help with technical issues.
|
||||||
|
|
||||||
|
|
@ -225,28 +215,28 @@ Credits
|
||||||
=======
|
=======
|
||||||
|
|
||||||
Authors
|
Authors
|
||||||
-------
|
~~~~~~~
|
||||||
|
|
||||||
* Camptocamp
|
* Camptocamp
|
||||||
|
|
||||||
Contributors
|
Contributors
|
||||||
------------
|
~~~~~~~~~~~~
|
||||||
|
|
||||||
- Florent Xicluna (Wingo) <florent.xicluna@gmail.com>
|
* Florent Xicluna (Wingo) <florent.xicluna@gmail.com>
|
||||||
- Nicolas Bessi <nicolas.bessi@camptocamp.com>
|
* Nicolas Bessi <nicolas.bessi@camptocamp.com>
|
||||||
- Alexandre Fayolle <alexandre.fayolle@camptocamp.com>
|
* Alexandre Fayolle <alexandre.fayolle@camptocamp.com>
|
||||||
- Daniel Reis <dgreis@sapo.pt>
|
* Daniel Reis <dgreis@sapo.pt>
|
||||||
- Holger Brunn <hbrunn@therp.nl>
|
* Holger Brunn <hbrunn@therp.nl>
|
||||||
- Leonardo Pistone <leonardo.pistone@camptocamp.com>
|
* Leonardo Pistone <leonardo.pistone@camptocamp.com>
|
||||||
- Adrien Peiffer <adrien.peiffer@acsone.com>
|
* Adrien Peiffer <adrien.peiffer@acsone.com>
|
||||||
- Thierry Ducrest <thierry.ducrest@camptocamp.com>
|
* Thierry Ducrest <thierry.ducrest@camptocamp.com>
|
||||||
- Guewen Baconnier <guewen.baconnier@camptocamp.com>
|
* Guewen Baconnier <guewen.baconnier@camptocamp.com>
|
||||||
- Thomas Binfeld <thomas.binsfeld@acsone.eu>
|
* Thomas Binfeld <thomas.binsfeld@acsone.eu>
|
||||||
- Stéphane Bidoul <stefane.bidoul@acsone.com>
|
* Stéphane Bidoul <stefane.bidoul@acsone.com>
|
||||||
- Simone Orsi <simahawk@gmail.com>
|
* Simone Orsi <simahawk@gmail.com>
|
||||||
|
|
||||||
Maintainers
|
Maintainers
|
||||||
-----------
|
~~~~~~~~~~~
|
||||||
|
|
||||||
This module is maintained by the OCA.
|
This module is maintained by the OCA.
|
||||||
|
|
||||||
|
|
@ -258,6 +248,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||||
mission is to support the collaborative development of Odoo features and
|
mission is to support the collaborative development of Odoo features and
|
||||||
promote its widespread use.
|
promote its widespread use.
|
||||||
|
|
||||||
This module is part of the `OCA/server-env <https://github.com/OCA/server-env/tree/17.0/server_environment>`_ project on GitHub.
|
This module is part of the `OCA/server-env <https://github.com/OCA/server-env/tree/16.0/server_environment>`_ project on GitHub.
|
||||||
|
|
||||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": "server configuration environment files",
|
"name": "server configuration environment files",
|
||||||
"version": "17.0.1.0.0",
|
"version": "16.0.1.0.3",
|
||||||
"depends": ["base", "base_sparse_field"],
|
"depends": ["base", "base_sparse_field"],
|
||||||
"author": "Camptocamp,Odoo Community Association (OCA)",
|
"author": "Camptocamp,Odoo Community Association (OCA)",
|
||||||
"summary": "move some configurations out of the database",
|
"summary": "move some configurations out of the database",
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ msgstr ""
|
||||||
"Project-Id-Version: server-tools (9.0)\n"
|
"Project-Id-Version: server-tools (9.0)\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2016-09-10 02:53+0000\n"
|
"POT-Creation-Date: 2016-09-10 02:53+0000\n"
|
||||||
"PO-Revision-Date: 2023-06-26 11:10+0000\n"
|
"PO-Revision-Date: 2024-01-04 10:35+0000\n"
|
||||||
"Last-Translator: Francesco Foresti <francesco.foresti@ooops404.com>\n"
|
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
|
||||||
"Language-Team: Italian (http://www.transifex.com/oca/OCA-server-tools-9-0/"
|
"Language-Team: Italian (http://www.transifex.com/oca/OCA-server-tools-9-0/"
|
||||||
"language/it/)\n"
|
"language/it/)\n"
|
||||||
"Language: it\n"
|
"Language: it\n"
|
||||||
|
|
@ -22,7 +22,7 @@ msgstr ""
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__config
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__config
|
||||||
msgid "Config"
|
msgid "Config"
|
||||||
msgstr ""
|
msgstr "Configurazione"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__create_uid
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__create_uid
|
||||||
|
|
@ -42,7 +42,7 @@ msgstr "Nome visualizzato"
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model,name:server_environment.model_server_config
|
#: model:ir.model,name:server_environment.model_server_config
|
||||||
msgid "Display server configuration"
|
msgid "Display server configuration"
|
||||||
msgstr ""
|
msgstr "Visualizza configurazione server"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__id
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__id
|
||||||
|
|
@ -67,490 +67,490 @@ msgstr "Ultimo aggiornamento il"
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model,name:server_environment.model_server_env_mixin
|
#: model:ir.model,name:server_environment.model_server_env_mixin
|
||||||
msgid "Mixin to add server environment in existing models"
|
msgid "Mixin to add server environment in existing models"
|
||||||
msgstr ""
|
msgstr "Mixin per aggiungere l'ambiente server in modelli esistenti"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_env_mixin__server_env_defaults
|
#: model:ir.model.fields,field_description:server_environment.field_server_env_mixin__server_env_defaults
|
||||||
msgid "Server Env Defaults"
|
msgid "Server Env Defaults"
|
||||||
msgstr ""
|
msgstr "Server ambiente predefinito"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.actions.act_window,name:server_environment.server_env_act_show_config
|
#: model:ir.actions.act_window,name:server_environment.server_env_act_show_config
|
||||||
#: model:ir.ui.menu,name:server_environment.menu_server_show_config
|
#: model:ir.ui.menu,name:server_environment.menu_server_show_config
|
||||||
msgid "Server Environment"
|
msgid "Server Environment"
|
||||||
msgstr ""
|
msgstr "Ambiente server"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model,name:server_environment.model_server_env_techname_mixin
|
#: model:ir.model,name:server_environment.model_server_env_techname_mixin
|
||||||
msgid "Server environment technical name"
|
msgid "Server environment technical name"
|
||||||
msgstr ""
|
msgstr "Nome tecnico ambiente server"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_env_techname_mixin__tech_name
|
#: model:ir.model.fields,field_description:server_environment.field_server_env_techname_mixin__tech_name
|
||||||
msgid "Tech Name"
|
msgid "Tech Name"
|
||||||
msgstr ""
|
msgstr "Nome tecnico"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,help:server_environment.field_server_env_techname_mixin__tech_name
|
#: model:ir.model.fields,help:server_environment.field_server_env_techname_mixin__tech_name
|
||||||
msgid "Unique name for technical purposes. Eg: server env keys."
|
msgid "Unique name for technical purposes. Eg: server env keys."
|
||||||
msgstr ""
|
msgstr "Nome univoco per motivi tecnici. Es: chiavi server ambiente."
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:res.groups,name:server_environment.has_server_configuration_access
|
#: model:res.groups,name:server_environment.has_server_configuration_access
|
||||||
msgid "View Server Environment Configuration"
|
msgid "View Server Environment Configuration"
|
||||||
msgstr ""
|
msgstr "Visualizza configurazione ambiente server"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.constraint,message:server_environment.constraint_server_env_techname_mixin_tech_name_uniq
|
#: model:ir.model.constraint,message:server_environment.constraint_server_env_techname_mixin_tech_name_uniq
|
||||||
msgid "`tech_name` must be unique!"
|
msgid "`tech_name` must be unique!"
|
||||||
msgstr ""
|
msgstr "`tech_name` deve essere univoco!"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_addons_path
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_addons_path
|
||||||
msgid "odoo | addons_path"
|
msgid "odoo | addons_path"
|
||||||
msgstr ""
|
msgstr "odoo | addons_path"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_admin_passwd
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_admin_passwd
|
||||||
msgid "odoo | admin_passwd"
|
msgid "odoo | admin_passwd"
|
||||||
msgstr ""
|
msgstr "odoo | admin_passwd"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_config
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_config
|
||||||
msgid "odoo | config"
|
msgid "odoo | config"
|
||||||
msgstr ""
|
msgstr "odoo | config"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_csv_internal_sep
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_csv_internal_sep
|
||||||
msgid "odoo | csv_internal_sep"
|
msgid "odoo | csv_internal_sep"
|
||||||
msgstr ""
|
msgstr "odoo | csv_internal_sep"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_data_dir
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_data_dir
|
||||||
msgid "odoo | data_dir"
|
msgid "odoo | data_dir"
|
||||||
msgstr ""
|
msgstr "odoo | data_dir"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_db_host
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_db_host
|
||||||
msgid "odoo | db_host"
|
msgid "odoo | db_host"
|
||||||
msgstr ""
|
msgstr "odoo | db_host"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_db_maxconn
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_db_maxconn
|
||||||
msgid "odoo | db_maxconn"
|
msgid "odoo | db_maxconn"
|
||||||
msgstr ""
|
msgstr "odoo | db_maxconn"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_db_name
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_db_name
|
||||||
msgid "odoo | db_name"
|
msgid "odoo | db_name"
|
||||||
msgstr ""
|
msgstr "odoo | db_name"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_db_password
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_db_password
|
||||||
msgid "odoo | db_password"
|
msgid "odoo | db_password"
|
||||||
msgstr ""
|
msgstr "odoo | db_password"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_db_port
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_db_port
|
||||||
msgid "odoo | db_port"
|
msgid "odoo | db_port"
|
||||||
msgstr ""
|
msgstr "odoo | db_port"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_db_sslmode
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_db_sslmode
|
||||||
msgid "odoo | db_sslmode"
|
msgid "odoo | db_sslmode"
|
||||||
msgstr ""
|
msgstr "odoo | db_sslmode"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_db_template
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_db_template
|
||||||
msgid "odoo | db_template"
|
msgid "odoo | db_template"
|
||||||
msgstr ""
|
msgstr "odoo | db_template"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_db_user
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_db_user
|
||||||
msgid "odoo | db_user"
|
msgid "odoo | db_user"
|
||||||
msgstr ""
|
msgstr "odoo | db_user"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_dbfilter
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_dbfilter
|
||||||
msgid "odoo | dbfilter"
|
msgid "odoo | dbfilter"
|
||||||
msgstr ""
|
msgstr "odoo | dbfilter"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_demo
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_demo
|
||||||
msgid "odoo | demo"
|
msgid "odoo | demo"
|
||||||
msgstr ""
|
msgstr "odoo | demo"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_dev_mode
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_dev_mode
|
||||||
msgid "odoo | dev_mode"
|
msgid "odoo | dev_mode"
|
||||||
msgstr ""
|
msgstr "odoo | dev_mode"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_email_from
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_email_from
|
||||||
msgid "odoo | email_from"
|
msgid "odoo | email_from"
|
||||||
msgstr ""
|
msgstr "odoo | email_from"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_from_filter
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_from_filter
|
||||||
msgid "odoo | from_filter"
|
msgid "odoo | from_filter"
|
||||||
msgstr ""
|
msgstr "odoo | from_filter"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_geoip_database
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_geoip_database
|
||||||
msgid "odoo | geoip_database"
|
msgid "odoo | geoip_database"
|
||||||
msgstr ""
|
msgstr "odoo | geoip_database"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_gevent_port
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_gevent_port
|
||||||
msgid "odoo | gevent_port"
|
msgid "odoo | gevent_port"
|
||||||
msgstr ""
|
msgstr "odoo | gevent_port"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_http_enable
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_http_enable
|
||||||
msgid "odoo | http_enable"
|
msgid "odoo | http_enable"
|
||||||
msgstr ""
|
msgstr "odoo | http_enable"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_http_interface
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_http_interface
|
||||||
msgid "odoo | http_interface"
|
msgid "odoo | http_interface"
|
||||||
msgstr ""
|
msgstr "odoo | http_interface"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_http_port
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_http_port
|
||||||
msgid "odoo | http_port"
|
msgid "odoo | http_port"
|
||||||
msgstr ""
|
msgstr "odoo | http_port"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_import_partial
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_import_partial
|
||||||
msgid "odoo | import_partial"
|
msgid "odoo | import_partial"
|
||||||
msgstr ""
|
msgstr "odoo | import_partial"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_init
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_init
|
||||||
msgid "odoo | init"
|
msgid "odoo | init"
|
||||||
msgstr ""
|
msgstr "odoo | init"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_language
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_language
|
||||||
msgid "odoo | language"
|
msgid "odoo | language"
|
||||||
msgstr ""
|
msgstr "odoo | language"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_limit_memory_hard
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_limit_memory_hard
|
||||||
msgid "odoo | limit_memory_hard"
|
msgid "odoo | limit_memory_hard"
|
||||||
msgstr ""
|
msgstr "odoo | limit_memory_hard"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_limit_memory_soft
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_limit_memory_soft
|
||||||
msgid "odoo | limit_memory_soft"
|
msgid "odoo | limit_memory_soft"
|
||||||
msgstr ""
|
msgstr "odoo | limit_memory_soft"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_limit_request
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_limit_request
|
||||||
msgid "odoo | limit_request"
|
msgid "odoo | limit_request"
|
||||||
msgstr ""
|
msgstr "odoo | limit_request"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_limit_time_cpu
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_limit_time_cpu
|
||||||
msgid "odoo | limit_time_cpu"
|
msgid "odoo | limit_time_cpu"
|
||||||
msgstr ""
|
msgstr "odoo | limit_time_cpu"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_limit_time_real
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_limit_time_real
|
||||||
msgid "odoo | limit_time_real"
|
msgid "odoo | limit_time_real"
|
||||||
msgstr ""
|
msgstr "odoo | limit_time_real"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_limit_time_real_cron
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_limit_time_real_cron
|
||||||
msgid "odoo | limit_time_real_cron"
|
msgid "odoo | limit_time_real_cron"
|
||||||
msgstr ""
|
msgstr "odoo | limit_time_real_cron"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_list_db
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_list_db
|
||||||
msgid "odoo | list_db"
|
msgid "odoo | list_db"
|
||||||
msgstr ""
|
msgstr "odoo | list_db"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_log_db
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_log_db
|
||||||
msgid "odoo | log_db"
|
msgid "odoo | log_db"
|
||||||
msgstr ""
|
msgstr "odoo | log_db"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_log_db_level
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_log_db_level
|
||||||
msgid "odoo | log_db_level"
|
msgid "odoo | log_db_level"
|
||||||
msgstr ""
|
msgstr "odoo | log_db_level"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_log_handler
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_log_handler
|
||||||
msgid "odoo | log_handler"
|
msgid "odoo | log_handler"
|
||||||
msgstr ""
|
msgstr "odoo | log_handler"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_log_level
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_log_level
|
||||||
msgid "odoo | log_level"
|
msgid "odoo | log_level"
|
||||||
msgstr ""
|
msgstr "odoo | log_level"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_logfile
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_logfile
|
||||||
msgid "odoo | logfile"
|
msgid "odoo | logfile"
|
||||||
msgstr ""
|
msgstr "odoo | logfile"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_longpolling_port
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_longpolling_port
|
||||||
msgid "odoo | longpolling_port"
|
msgid "odoo | longpolling_port"
|
||||||
msgstr ""
|
msgstr "odoo | longpolling_port"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_max_cron_threads
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_max_cron_threads
|
||||||
msgid "odoo | max_cron_threads"
|
msgid "odoo | max_cron_threads"
|
||||||
msgstr ""
|
msgstr "odoo | max_cron_threads"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_osv_memory_age_limit
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_osv_memory_age_limit
|
||||||
msgid "odoo | osv_memory_age_limit"
|
msgid "odoo | osv_memory_age_limit"
|
||||||
msgstr ""
|
msgstr "odoo | osv_memory_age_limit"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_osv_memory_count_limit
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_osv_memory_count_limit
|
||||||
msgid "odoo | osv_memory_count_limit"
|
msgid "odoo | osv_memory_count_limit"
|
||||||
msgstr ""
|
msgstr "odoo | osv_memory_count_limit"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_overwrite_existing_translations
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_overwrite_existing_translations
|
||||||
msgid "odoo | overwrite_existing_translations"
|
msgid "odoo | overwrite_existing_translations"
|
||||||
msgstr ""
|
msgstr "odoo | overwrite_existing_translations"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_pg_path
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_pg_path
|
||||||
msgid "odoo | pg_path"
|
msgid "odoo | pg_path"
|
||||||
msgstr ""
|
msgstr "odoo | pg_path"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_pidfile
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_pidfile
|
||||||
msgid "odoo | pidfile"
|
msgid "odoo | pidfile"
|
||||||
msgstr ""
|
msgstr "odoo | pidfile"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_proxy_mode
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_proxy_mode
|
||||||
msgid "odoo | proxy_mode"
|
msgid "odoo | proxy_mode"
|
||||||
msgstr ""
|
msgstr "odoo | proxy_mode"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_publisher_warranty_url
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_publisher_warranty_url
|
||||||
msgid "odoo | publisher_warranty_url"
|
msgid "odoo | publisher_warranty_url"
|
||||||
msgstr ""
|
msgstr "odoo | publisher_warranty_url"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_reportgz
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_reportgz
|
||||||
msgid "odoo | reportgz"
|
msgid "odoo | reportgz"
|
||||||
msgstr ""
|
msgstr "odoo | reportgz"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_root_path
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_root_path
|
||||||
msgid "odoo | root_path"
|
msgid "odoo | root_path"
|
||||||
msgstr ""
|
msgstr "odoo | root_path"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_running_env
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_running_env
|
||||||
msgid "odoo | running_env"
|
msgid "odoo | running_env"
|
||||||
msgstr ""
|
msgstr "odoo | running_env"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_save
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_save
|
||||||
msgid "odoo | save"
|
msgid "odoo | save"
|
||||||
msgstr ""
|
msgstr "odoo | save"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_screencasts
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_screencasts
|
||||||
msgid "odoo | screencasts"
|
msgid "odoo | screencasts"
|
||||||
msgstr ""
|
msgstr "odoo | screencasts"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_screenshots
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_screenshots
|
||||||
msgid "odoo | screenshots"
|
msgid "odoo | screenshots"
|
||||||
msgstr ""
|
msgstr "odoo | screenshots"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_server_wide_modules
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_server_wide_modules
|
||||||
msgid "odoo | server_wide_modules"
|
msgid "odoo | server_wide_modules"
|
||||||
msgstr ""
|
msgstr "odoo | server_wide_modules"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_shell_interface
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_shell_interface
|
||||||
msgid "odoo | shell_interface"
|
msgid "odoo | shell_interface"
|
||||||
msgstr ""
|
msgstr "odoo | shell_interface"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_smtp_password
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_smtp_password
|
||||||
msgid "odoo | smtp_password"
|
msgid "odoo | smtp_password"
|
||||||
msgstr ""
|
msgstr "odoo | smtp_password"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_smtp_port
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_smtp_port
|
||||||
msgid "odoo | smtp_port"
|
msgid "odoo | smtp_port"
|
||||||
msgstr ""
|
msgstr "odoo | smtp_port"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_smtp_server
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_smtp_server
|
||||||
msgid "odoo | smtp_server"
|
msgid "odoo | smtp_server"
|
||||||
msgstr ""
|
msgstr "odoo | smtp_server"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_smtp_ssl
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_smtp_ssl
|
||||||
msgid "odoo | smtp_ssl"
|
msgid "odoo | smtp_ssl"
|
||||||
msgstr ""
|
msgstr "odoo | smtp_ssl"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_smtp_ssl_certificate_filename
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_smtp_ssl_certificate_filename
|
||||||
msgid "odoo | smtp_ssl_certificate_filename"
|
msgid "odoo | smtp_ssl_certificate_filename"
|
||||||
msgstr ""
|
msgstr "odoo | smtp_ssl_certificate_filename"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_smtp_ssl_private_key_filename
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_smtp_ssl_private_key_filename
|
||||||
msgid "odoo | smtp_ssl_private_key_filename"
|
msgid "odoo | smtp_ssl_private_key_filename"
|
||||||
msgstr ""
|
msgstr "odoo | smtp_ssl_private_key_filename"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_smtp_user
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_smtp_user
|
||||||
msgid "odoo | smtp_user"
|
msgid "odoo | smtp_user"
|
||||||
msgstr ""
|
msgstr "odoo | smtp_user"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_stop_after_init
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_stop_after_init
|
||||||
msgid "odoo | stop_after_init"
|
msgid "odoo | stop_after_init"
|
||||||
msgstr ""
|
msgstr "odoo | stop_after_init"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_syslog
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_syslog
|
||||||
msgid "odoo | syslog"
|
msgid "odoo | syslog"
|
||||||
msgstr ""
|
msgstr "odoo | syslog"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_test_enable
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_test_enable
|
||||||
msgid "odoo | test_enable"
|
msgid "odoo | test_enable"
|
||||||
msgstr ""
|
msgstr "odoo | test_enable"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_test_file
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_test_file
|
||||||
msgid "odoo | test_file"
|
msgid "odoo | test_file"
|
||||||
msgstr ""
|
msgstr "odoo | test_file"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_test_tags
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_test_tags
|
||||||
msgid "odoo | test_tags"
|
msgid "odoo | test_tags"
|
||||||
msgstr ""
|
msgstr "odoo | test_tags"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_transient_age_limit
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_transient_age_limit
|
||||||
msgid "odoo | transient_age_limit"
|
msgid "odoo | transient_age_limit"
|
||||||
msgstr ""
|
msgstr "odoo | transient_age_limit"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_translate_in
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_translate_in
|
||||||
msgid "odoo | translate_in"
|
msgid "odoo | translate_in"
|
||||||
msgstr ""
|
msgstr "odoo | translate_in"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_translate_modules
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_translate_modules
|
||||||
msgid "odoo | translate_modules"
|
msgid "odoo | translate_modules"
|
||||||
msgstr ""
|
msgstr "odoo | translate_modules"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_translate_out
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_translate_out
|
||||||
msgid "odoo | translate_out"
|
msgid "odoo | translate_out"
|
||||||
msgstr ""
|
msgstr "odoo | translate_out"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_unaccent
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_unaccent
|
||||||
msgid "odoo | unaccent"
|
msgid "odoo | unaccent"
|
||||||
msgstr ""
|
msgstr "odoo | unaccent"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_update
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_update
|
||||||
msgid "odoo | update"
|
msgid "odoo | update"
|
||||||
msgstr ""
|
msgstr "odoo | update"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_upgrade_path
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_upgrade_path
|
||||||
msgid "odoo | upgrade_path"
|
msgid "odoo | upgrade_path"
|
||||||
msgstr ""
|
msgstr "odoo | upgrade_path"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_websocket_keep_alive_timeout
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_websocket_keep_alive_timeout
|
||||||
msgid "odoo | websocket_keep_alive_timeout"
|
msgid "odoo | websocket_keep_alive_timeout"
|
||||||
msgstr ""
|
msgstr "odoo | websocket_keep_alive_timeout"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_websocket_rate_limit_burst
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_websocket_rate_limit_burst
|
||||||
msgid "odoo | websocket_rate_limit_burst"
|
msgid "odoo | websocket_rate_limit_burst"
|
||||||
msgstr ""
|
msgstr "odoo | websocket_rate_limit_burst"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_websocket_rate_limit_delay
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_websocket_rate_limit_delay
|
||||||
msgid "odoo | websocket_rate_limit_delay"
|
msgid "odoo | websocket_rate_limit_delay"
|
||||||
msgstr ""
|
msgstr "odoo | websocket_rate_limit_delay"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_without_demo
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_without_demo
|
||||||
msgid "odoo | without_demo"
|
msgid "odoo | without_demo"
|
||||||
msgstr ""
|
msgstr "odoo | without_demo"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_workers
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_workers
|
||||||
msgid "odoo | workers"
|
msgid "odoo | workers"
|
||||||
msgstr ""
|
msgstr "odoo | workers"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_x_sendfile
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_x_sendfile
|
||||||
msgid "odoo | x_sendfile"
|
msgid "odoo | x_sendfile"
|
||||||
msgstr ""
|
msgstr "odoo | x_sendfile"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__system_I_architecture
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__system_I_architecture
|
||||||
msgid "system | architecture"
|
msgid "system | architecture"
|
||||||
msgstr ""
|
msgstr "system | architecture"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__system_I_locale
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__system_I_locale
|
||||||
msgid "system | locale"
|
msgid "system | locale"
|
||||||
msgstr ""
|
msgstr "system | locale"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__system_I_lsb_release
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__system_I_lsb_release
|
||||||
msgid "system | lsb_release"
|
msgid "system | lsb_release"
|
||||||
msgstr ""
|
msgstr "system | lsb_release"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__system_I_odoo
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__system_I_odoo
|
||||||
msgid "system | odoo"
|
msgid "system | odoo"
|
||||||
msgstr ""
|
msgstr "system | odoo"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__system_I_os_name
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__system_I_os_name
|
||||||
msgid "system | os_name"
|
msgid "system | os_name"
|
||||||
msgstr ""
|
msgstr "system | os_name"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__system_I_platform
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__system_I_platform
|
||||||
msgid "system | platform"
|
msgid "system | platform"
|
||||||
msgstr ""
|
msgstr "system | platform"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__system_I_python
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__system_I_python
|
||||||
msgid "system | python"
|
msgid "system | python"
|
||||||
msgstr ""
|
msgstr "system | python"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__system_I_release
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__system_I_release
|
||||||
msgid "system | release"
|
msgid "system | release"
|
||||||
msgstr ""
|
msgstr "system | release"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__system_I_revision
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__system_I_revision
|
||||||
msgid "system | revision"
|
msgid "system | revision"
|
||||||
msgstr ""
|
msgstr "system | revision"
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__system_I_version
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__system_I_version
|
||||||
msgid "system | version"
|
msgid "system | version"
|
||||||
msgstr ""
|
msgstr "system | version"
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Odoo Server 17.0\n"
|
"Project-Id-Version: Odoo Server 16.0\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"Last-Translator: \n"
|
"Last-Translator: \n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
|
|
@ -43,6 +43,11 @@ msgstr ""
|
||||||
msgid "ID"
|
msgid "ID"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: server_environment
|
||||||
|
#: model:ir.model.fields,field_description:server_environment.field_server_config____last_update
|
||||||
|
msgid "Last Modified on"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__write_uid
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__write_uid
|
||||||
msgid "Last Updated by"
|
msgid "Last Updated by"
|
||||||
|
|
@ -129,11 +134,6 @@ msgstr ""
|
||||||
msgid "odoo | db_maxconn"
|
msgid "odoo | db_maxconn"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: server_environment
|
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_db_maxconn_gevent
|
|
||||||
msgid "odoo | db_maxconn_gevent"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_db_name
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_db_name
|
||||||
msgid "odoo | db_name"
|
msgid "odoo | db_name"
|
||||||
|
|
@ -190,13 +190,8 @@ msgid "odoo | from_filter"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_geoip_city_db
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_geoip_database
|
||||||
msgid "odoo | geoip_city_db"
|
msgid "odoo | geoip_database"
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: server_environment
|
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_geoip_country_db
|
|
||||||
msgid "odoo | geoip_country_db"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
|
|
@ -304,6 +299,11 @@ msgstr ""
|
||||||
msgid "odoo | max_cron_threads"
|
msgid "odoo | max_cron_threads"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: server_environment
|
||||||
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_osv_memory_age_limit
|
||||||
|
msgid "odoo | osv_memory_age_limit"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: server_environment
|
#. module: server_environment
|
||||||
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_osv_memory_count_limit
|
#: model:ir.model.fields,field_description:server_environment.field_server_config__odoo_I_osv_memory_count_limit
|
||||||
msgid "odoo | osv_memory_count_limit"
|
msgid "odoo | osv_memory_count_limit"
|
||||||
|
|
|
||||||
|
|
@ -313,7 +313,7 @@ class ServerEnvMixin(models.AbstractModel):
|
||||||
for elem in view_arch.findall(field_xpath % field):
|
for elem in view_arch.findall(field_xpath % field):
|
||||||
# set env-computed fields to readonly if the configuration
|
# set env-computed fields to readonly if the configuration
|
||||||
# files have a key set for this field
|
# files have a key set for this field
|
||||||
elem.set("readonly", "not is_editable_field")
|
elem.set("attrs", str({"readonly": [(is_editable_field, "=", False)]}))
|
||||||
if not view_arch.findall(field_xpath % is_editable_field):
|
if not view_arch.findall(field_xpath % is_editable_field):
|
||||||
# add the _is_editable fields in the view for the 'attrs'
|
# add the _is_editable fields in the view for the 'attrs'
|
||||||
# domain
|
# domain
|
||||||
|
|
@ -338,7 +338,7 @@ class ServerEnvMixin(models.AbstractModel):
|
||||||
options = self._server_env_fields[base_field_name]
|
options = self._server_env_fields[base_field_name]
|
||||||
if options and options.get("no_default_field"):
|
if options and options.get("no_default_field"):
|
||||||
return ""
|
return ""
|
||||||
return f"x_{base_field_name}_env_default"
|
return "{}_env_default".format(base_field_name)
|
||||||
|
|
||||||
def _server_env_is_editable_fieldname(self, base_field_name):
|
def _server_env_is_editable_fieldname(self, base_field_name):
|
||||||
"""Return the name of the field for "is editable"
|
"""Return the name of the field for "is editable"
|
||||||
|
|
@ -346,7 +346,7 @@ class ServerEnvMixin(models.AbstractModel):
|
||||||
This is the field used to tell if the env-computed field can
|
This is the field used to tell if the env-computed field can
|
||||||
be edited.
|
be edited.
|
||||||
"""
|
"""
|
||||||
return f"x_{base_field_name}_env_is_editable"
|
return "{}_env_is_editable".format(base_field_name)
|
||||||
|
|
||||||
def _server_env_transform_field_to_read_from_env(self, field):
|
def _server_env_transform_field_to_read_from_env(self, field):
|
||||||
"""Transform the original field in a computed field"""
|
"""Transform the original field in a computed field"""
|
||||||
|
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
[build-system]
|
|
||||||
requires = ["whool"]
|
|
||||||
build-backend = "whool.buildapi"
|
|
||||||
|
|
@ -1,94 +0,0 @@
|
||||||
To configure this module, you need to edit the main configuration file
|
|
||||||
of your instance, and add a directive called `running_env`. Commonly
|
|
||||||
used values are 'dev', 'test', 'production':
|
|
||||||
|
|
||||||
[options]
|
|
||||||
running_env=dev
|
|
||||||
|
|
||||||
Values associated to keys containing 'passw' are only displayed in the
|
|
||||||
'dev' environment.
|
|
||||||
|
|
||||||
If you don't provide any value, test is used as a safe default.
|
|
||||||
|
|
||||||
You have several possibilities to set configuration values:
|
|
||||||
|
|
||||||
## server_environment_files
|
|
||||||
|
|
||||||
You can edit the settings you need in the `server_environment_files`
|
|
||||||
addon. The `server_environment_files_sample` can be used as an example:
|
|
||||||
|
|
||||||
- values common to all / most environments can be stored in the
|
|
||||||
`default/` directory using the .ini file syntax;
|
|
||||||
- each environment you need to define is stored in its own directory and
|
|
||||||
can override or extend default values;
|
|
||||||
- you can override or extend values in the main configuration file of
|
|
||||||
your instance;
|
|
||||||
|
|
||||||
## Environment variable
|
|
||||||
|
|
||||||
You can define configuration in the environment variable
|
|
||||||
`SERVER_ENV_CONFIG` and/or `SERVER_ENV_CONFIG_SECRET`. The 2 variables
|
|
||||||
are handled the exact same way, this is only a convenience for the
|
|
||||||
deployment where you can isolate the secrets in a different, encrypted,
|
|
||||||
file. They are multi-line environment variables in the same configparser
|
|
||||||
format than the files. If you used options in
|
|
||||||
`server_environment_files`, the options set in the environment variable
|
|
||||||
override them.
|
|
||||||
|
|
||||||
The options in the environment variable are not dependent of
|
|
||||||
`running_env`, the content of the variable must be set accordingly to
|
|
||||||
the running environment.
|
|
||||||
|
|
||||||
Example of setup:
|
|
||||||
|
|
||||||
A public file, containing that will contain public variables:
|
|
||||||
|
|
||||||
# These variables are not odoo standard variables,
|
|
||||||
# they are there to represent what your file could look like
|
|
||||||
export WORKERS='8'
|
|
||||||
export MAX_CRON_THREADS='1'
|
|
||||||
export LOG_LEVEL=info
|
|
||||||
export LOG_HANDLER=":INFO"
|
|
||||||
export DB_MAXCONN=5
|
|
||||||
|
|
||||||
# server environment options
|
|
||||||
export SERVER_ENV_CONFIG="
|
|
||||||
[storage_backend.my_sftp]
|
|
||||||
sftp_server=10.10.10.10
|
|
||||||
sftp_login=foo
|
|
||||||
sftp_port=22200
|
|
||||||
directory_path=Odoo
|
|
||||||
"
|
|
||||||
|
|
||||||
A second file which is encrypted and contains secrets:
|
|
||||||
|
|
||||||
# This variable is not an odoo standard variable,
|
|
||||||
# it is there to represent what your file could look like
|
|
||||||
export DB_PASSWORD='xxxxxxxxx'
|
|
||||||
# server environment options
|
|
||||||
export SERVER_ENV_CONFIG_SECRET="
|
|
||||||
[storage_backend.my_sftp]
|
|
||||||
sftp_password=xxxxxxxxx
|
|
||||||
"
|
|
||||||
|
|
||||||
**WARNING**
|
|
||||||
|
|
||||||
> my_sftp must match the name of the record. If you want something more
|
|
||||||
> reliable use server.env.techname.mixin and use tech_name field to
|
|
||||||
> reference records. See "USAGE".
|
|
||||||
|
|
||||||
## Default values
|
|
||||||
|
|
||||||
When using the `server.env.mixin` mixin, for each env-computed field, a
|
|
||||||
companion field `<field>_env_default` is created. This field is not
|
|
||||||
environment-dependent. It's a fallback value used when no key is set in
|
|
||||||
configuration files / environment variable.
|
|
||||||
|
|
||||||
When the default field is used, the field is made editable on Odoo.
|
|
||||||
|
|
||||||
Note: empty environment keys always take precedence over default fields
|
|
||||||
|
|
||||||
## Server environment integration
|
|
||||||
|
|
||||||
Read the documentation of the class
|
|
||||||
[models/server_env_mixin.py](models/server_env_mixin.py).
|
|
||||||
|
|
@ -0,0 +1,99 @@
|
||||||
|
To configure this module, you need to edit the main configuration file
|
||||||
|
of your instance, and add a directive called ``running_env``. Commonly
|
||||||
|
used values are 'dev', 'test', 'production'::
|
||||||
|
|
||||||
|
[options]
|
||||||
|
running_env=dev
|
||||||
|
|
||||||
|
Values associated to keys containing 'passw' are only displayed in the 'dev'
|
||||||
|
environment.
|
||||||
|
|
||||||
|
If you don't provide any value, `test` is used as a safe default.
|
||||||
|
|
||||||
|
You have several possibilities to set configuration values:
|
||||||
|
|
||||||
|
server_environment_files
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
You can edit the settings you need in the ``server_environment_files`` addon. The
|
||||||
|
``server_environment_files_sample`` can be used as an example:
|
||||||
|
|
||||||
|
* values common to all / most environments can be stored in the
|
||||||
|
``default/`` directory using the .ini file syntax;
|
||||||
|
* each environment you need to define is stored in its own directory
|
||||||
|
and can override or extend default values;
|
||||||
|
* you can override or extend values in the main configuration
|
||||||
|
file of your instance;
|
||||||
|
|
||||||
|
Environment variable
|
||||||
|
~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
You can define configuration in the environment variable ``SERVER_ENV_CONFIG``
|
||||||
|
and/or ``SERVER_ENV_CONFIG_SECRET``. The 2 variables are handled the exact same
|
||||||
|
way, this is only a convenience for the deployment where you can isolate the
|
||||||
|
secrets in a different, encrypted, file. They are multi-line environment variables
|
||||||
|
in the same configparser format than the files.
|
||||||
|
If you used options in ``server_environment_files``, the options set in the
|
||||||
|
environment variable override them.
|
||||||
|
|
||||||
|
The options in the environment variable are not dependent of ``running_env``,
|
||||||
|
the content of the variable must be set accordingly to the running environment.
|
||||||
|
|
||||||
|
Example of setup:
|
||||||
|
|
||||||
|
A public file, containing that will contain public variables::
|
||||||
|
|
||||||
|
# These variables are not odoo standard variables,
|
||||||
|
# they are there to represent what your file could look like
|
||||||
|
export WORKERS='8'
|
||||||
|
export MAX_CRON_THREADS='1'
|
||||||
|
export LOG_LEVEL=info
|
||||||
|
export LOG_HANDLER=":INFO"
|
||||||
|
export DB_MAXCONN=5
|
||||||
|
|
||||||
|
# server environment options
|
||||||
|
export SERVER_ENV_CONFIG="
|
||||||
|
[storage_backend.my_sftp]
|
||||||
|
sftp_server=10.10.10.10
|
||||||
|
sftp_login=foo
|
||||||
|
sftp_port=22200
|
||||||
|
directory_path=Odoo
|
||||||
|
"
|
||||||
|
|
||||||
|
A second file which is encrypted and contains secrets::
|
||||||
|
|
||||||
|
# This variable is not an odoo standard variable,
|
||||||
|
# it is there to represent what your file could look like
|
||||||
|
export DB_PASSWORD='xxxxxxxxx'
|
||||||
|
# server environment options
|
||||||
|
export SERVER_ENV_CONFIG_SECRET="
|
||||||
|
[storage_backend.my_sftp]
|
||||||
|
sftp_password=xxxxxxxxx
|
||||||
|
"
|
||||||
|
|
||||||
|
**WARNING**
|
||||||
|
|
||||||
|
`my_sftp` must match the name of the record.
|
||||||
|
If you want something more reliable use `server.env.techname.mixin`
|
||||||
|
and use `tech_name` field to reference records.
|
||||||
|
See "USAGE".
|
||||||
|
|
||||||
|
|
||||||
|
Default values
|
||||||
|
~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
When using the ``server.env.mixin`` mixin, for each env-computed field, a
|
||||||
|
companion field ``<field>_env_default`` is created. This field is not
|
||||||
|
environment-dependent. It's a fallback value used when no key is set in
|
||||||
|
configuration files / environment variable.
|
||||||
|
|
||||||
|
When the default field is used, the field is made editable on Odoo.
|
||||||
|
|
||||||
|
Note: empty environment keys always take precedence over default fields
|
||||||
|
|
||||||
|
|
||||||
|
Server environment integration
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Read the documentation of the class `models/server_env_mixin.py
|
||||||
|
<models/server_env_mixin.py>`_.
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
- Florent Xicluna (Wingo) \<<florent.xicluna@gmail.com>\>
|
|
||||||
- Nicolas Bessi \<<nicolas.bessi@camptocamp.com>\>
|
|
||||||
- Alexandre Fayolle \<<alexandre.fayolle@camptocamp.com>\>
|
|
||||||
- Daniel Reis \<<dgreis@sapo.pt>\>
|
|
||||||
- Holger Brunn \<<hbrunn@therp.nl>\>
|
|
||||||
- Leonardo Pistone \<<leonardo.pistone@camptocamp.com>\>
|
|
||||||
- Adrien Peiffer \<<adrien.peiffer@acsone.com>\>
|
|
||||||
- Thierry Ducrest \<<thierry.ducrest@camptocamp.com>\>
|
|
||||||
- Guewen Baconnier \<<guewen.baconnier@camptocamp.com>\>
|
|
||||||
- Thomas Binfeld \<<thomas.binsfeld@acsone.eu>\>
|
|
||||||
- Stéphane Bidoul \<<stefane.bidoul@acsone.com>\>
|
|
||||||
- Simone Orsi \<<simahawk@gmail.com>\>
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
* Florent Xicluna (Wingo) <florent.xicluna@gmail.com>
|
||||||
|
* Nicolas Bessi <nicolas.bessi@camptocamp.com>
|
||||||
|
* Alexandre Fayolle <alexandre.fayolle@camptocamp.com>
|
||||||
|
* Daniel Reis <dgreis@sapo.pt>
|
||||||
|
* Holger Brunn <hbrunn@therp.nl>
|
||||||
|
* Leonardo Pistone <leonardo.pistone@camptocamp.com>
|
||||||
|
* Adrien Peiffer <adrien.peiffer@acsone.com>
|
||||||
|
* Thierry Ducrest <thierry.ducrest@camptocamp.com>
|
||||||
|
* Guewen Baconnier <guewen.baconnier@camptocamp.com>
|
||||||
|
* Thomas Binfeld <thomas.binsfeld@acsone.eu>
|
||||||
|
* Stéphane Bidoul <stefane.bidoul@acsone.com>
|
||||||
|
* Simone Orsi <simahawk@gmail.com>
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
This module provides a way to define an environment in the main Odoo
|
|
||||||
configuration file and to read some configurations from files depending
|
|
||||||
on the configured environment: you define the environment in the main
|
|
||||||
configuration file, and the values for the various possible environments
|
|
||||||
are stored in the `server_environment_files` companion module.
|
|
||||||
|
|
||||||
The `server_environment_files` module is optional, the values can be set
|
|
||||||
using an environment variable with a fallback on default values in the
|
|
||||||
database.
|
|
||||||
|
|
||||||
The configuration read from the files are visible under the
|
|
||||||
Configuration menu. If you are not in the 'dev' environment you will not
|
|
||||||
be able to see the values contained in the defined secret keys (by
|
|
||||||
default : '*passw*', '*key*', '*secret*' and '*token*').
|
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
This module provides a way to define an environment in the main Odoo
|
||||||
|
configuration file and to read some configurations from files
|
||||||
|
depending on the configured environment: you define the environment in
|
||||||
|
the main configuration file, and the values for the various possible
|
||||||
|
environments are stored in the ``server_environment_files`` companion
|
||||||
|
module.
|
||||||
|
|
||||||
|
The ``server_environment_files`` module is optional, the values can be set using
|
||||||
|
an environment variable with a fallback on default values in the database.
|
||||||
|
|
||||||
|
The configuration read from the files are visible under the Configuration
|
||||||
|
menu. If you are not in the 'dev' environment you will not be able to
|
||||||
|
see the values contained in the defined secret keys
|
||||||
|
(by default : '*passw*', '*key*', '*secret*' and '*token*').
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
By itself, this module does little. See for instance the
|
|
||||||
`mail_environment` addon which depends on this one to allow configuring
|
|
||||||
the incoming and outgoing mail servers depending on the environment.
|
|
||||||
|
|
||||||
You can store your configuration values in a companion module called
|
|
||||||
`server_environment_files`. You can copy and customize the provided
|
|
||||||
`server_environment_files_sample` module for this purpose.
|
|
||||||
Alternatively, you can provide them in environment variables
|
|
||||||
`SERVER_ENV_CONFIG` and `SERVER_ENV_CONFIG_SECRET`.
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
By itself, this module does little. See for instance the
|
||||||
|
``mail_environment`` addon which depends on this one to allow configuring
|
||||||
|
the incoming and outgoing mail servers depending on the environment.
|
||||||
|
|
||||||
|
You can store your configuration values in a companion module called
|
||||||
|
``server_environment_files``. You can copy and customize the provided
|
||||||
|
``server_environment_files_sample`` module for this purpose. Alternatively, you
|
||||||
|
can provide them in environment variables ``SERVER_ENV_CONFIG`` and
|
||||||
|
``SERVER_ENV_CONFIG_SECRET``.
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
- it is not possible to set the environment from the command line. A
|
|
||||||
configuration file must be used.
|
|
||||||
- the module does not allow to set low level attributes such as database
|
|
||||||
server, etc.
|
|
||||||
- server.env.techname.mixin's tech_name field could leverage the new
|
|
||||||
option for computable / writable fields and get rid of some onchange /
|
|
||||||
read / write code.
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
* it is not possible to set the environment from the command line. A
|
||||||
|
configuration file must be used.
|
||||||
|
* the module does not allow to set low level attributes such as database server, etc.
|
||||||
|
* `server.env.techname.mixin`'s `tech_name` field could leverage the new option
|
||||||
|
for computable / writable fields and get rid of some onchange / read / write code.
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
You can include a mixin in your model and configure the env-computed
|
You can include a mixin in your model and configure the env-computed fields
|
||||||
fields by an override of `_server_env_fields`.
|
by an override of ``_server_env_fields``.
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
class StorageBackend(models.Model):
|
class StorageBackend(models.Model):
|
||||||
_name = "storage.backend"
|
_name = "storage.backend"
|
||||||
|
|
@ -9,10 +11,11 @@ fields by an override of `_server_env_fields`.
|
||||||
def _server_env_fields(self):
|
def _server_env_fields(self):
|
||||||
return {"directory_path": {}}
|
return {"directory_path": {}}
|
||||||
|
|
||||||
Read the documentation of the class and methods in
|
Read the documentation of the class and methods in `models/server_env_mixin.py
|
||||||
[models/server_env_mixin.py](models/server_env_mixin.py).
|
<models/server_env_mixin.py>`__.
|
||||||
|
|
||||||
If you want to have a technical name to reference:
|
|
||||||
|
If you want to have a technical name to reference::
|
||||||
|
|
||||||
class StorageBackend(models.Model):
|
class StorageBackend(models.Model):
|
||||||
_name = "storage.backend"
|
_name = "storage.backend"
|
||||||
|
|
@ -111,7 +111,9 @@ def _load_config_from_server_env_files(config_p):
|
||||||
try:
|
try:
|
||||||
config_p.read(conf_files)
|
config_p.read(conf_files)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise Exception(f'Cannot read config files "{conf_files}": {e}') from e
|
raise Exception(
|
||||||
|
'Cannot read config files "{}": {}'.format(conf_files, e)
|
||||||
|
) from e
|
||||||
|
|
||||||
|
|
||||||
def _load_config_from_rcfile(config_p):
|
def _load_config_from_rcfile(config_p):
|
||||||
|
|
@ -127,7 +129,7 @@ def _load_config_from_env(config_p):
|
||||||
config_p.read_string(env_config)
|
config_p.read_string(env_config)
|
||||||
except configparser.Error as err:
|
except configparser.Error as err:
|
||||||
raise Exception(
|
raise Exception(
|
||||||
f"{varname} content could not be parsed: {err}"
|
"{} content could not be parsed: {}".format(varname, err)
|
||||||
) from err
|
) from err
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -180,7 +182,7 @@ class ServerConfiguration(models.TransientModel):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _format_key(cls, section, key):
|
def _format_key(cls, section, key):
|
||||||
return f"{section}_I_{key}"
|
return "{}_I_{}".format(section, key)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def show_passwords(self):
|
def show_passwords(self):
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head>
|
<head>
|
||||||
|
|
@ -366,21 +367,21 @@ ul.auto-toc {
|
||||||
!! This file is generated by oca-gen-addon-readme !!
|
!! This file is generated by oca-gen-addon-readme !!
|
||||||
!! changes will be overwritten. !!
|
!! changes will be overwritten. !!
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
!! source digest: sha256:d9ca614a511f38fa74f55332b9672f1959fa46018462106b58f293eeed487269
|
!! source digest: sha256:681af9ccb320ef4e5866b4dfcb9ed2d8d19abae84f71d251cdc8376303f40c01
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-env/tree/17.0/server_environment"><img alt="OCA/server-env" src="https://img.shields.io/badge/github-OCA%2Fserver--env-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-env-17-0/server-env-17-0-server_environment"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/server-env&target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-env/tree/16.0/server_environment"><img alt="OCA/server-env" src="https://img.shields.io/badge/github-OCA%2Fserver--env-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-env-16-0/server-env-16-0-server_environment"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/server-env&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||||
<p>This module provides a way to define an environment in the main Odoo
|
<p>This module provides a way to define an environment in the main Odoo
|
||||||
configuration file and to read some configurations from files depending
|
configuration file and to read some configurations from files
|
||||||
on the configured environment: you define the environment in the main
|
depending on the configured environment: you define the environment in
|
||||||
configuration file, and the values for the various possible environments
|
the main configuration file, and the values for the various possible
|
||||||
are stored in the <tt class="docutils literal">server_environment_files</tt> companion module.</p>
|
environments are stored in the <tt class="docutils literal">server_environment_files</tt> companion
|
||||||
<p>The <tt class="docutils literal">server_environment_files</tt> module is optional, the values can be
|
module.</p>
|
||||||
set using an environment variable with a fallback on default values in
|
<p>The <tt class="docutils literal">server_environment_files</tt> module is optional, the values can be set using
|
||||||
the database.</p>
|
an environment variable with a fallback on default values in the database.</p>
|
||||||
<p>The configuration read from the files are visible under the
|
<p>The configuration read from the files are visible under the Configuration
|
||||||
Configuration menu. If you are not in the ‘dev’ environment you will not
|
menu. If you are not in the ‘dev’ environment you will not be able to
|
||||||
be able to see the values contained in the defined secret keys (by
|
see the values contained in the defined secret keys
|
||||||
default : ‘<em>passw</em>’, ‘<em>key</em>’, ‘<em>secret</em>’ and ‘<em>token</em>’).</p>
|
(by default : ‘<em>passw</em>’, ‘<em>key</em>’, ‘<em>secret</em>’ and ‘<em>token</em>’).</p>
|
||||||
<p><strong>Table of contents</strong></p>
|
<p><strong>Table of contents</strong></p>
|
||||||
<div class="contents local topic" id="contents">
|
<div class="contents local topic" id="contents">
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
|
|
@ -406,14 +407,13 @@ default : ‘<em>passw</em>’, ‘<em>key</em>’, ‘<em>secret</em>’ and
|
||||||
<div class="section" id="installation">
|
<div class="section" id="installation">
|
||||||
<h1><a class="toc-backref" href="#toc-entry-1">Installation</a></h1>
|
<h1><a class="toc-backref" href="#toc-entry-1">Installation</a></h1>
|
||||||
<p>By itself, this module does little. See for instance the
|
<p>By itself, this module does little. See for instance the
|
||||||
<tt class="docutils literal">mail_environment</tt> addon which depends on this one to allow
|
<tt class="docutils literal">mail_environment</tt> addon which depends on this one to allow configuring
|
||||||
configuring the incoming and outgoing mail servers depending on the
|
the incoming and outgoing mail servers depending on the environment.</p>
|
||||||
environment.</p>
|
|
||||||
<p>You can store your configuration values in a companion module called
|
<p>You can store your configuration values in a companion module called
|
||||||
<tt class="docutils literal">server_environment_files</tt>. You can copy and customize the provided
|
<tt class="docutils literal">server_environment_files</tt>. You can copy and customize the provided
|
||||||
<tt class="docutils literal">server_environment_files_sample</tt> module for this purpose.
|
<tt class="docutils literal">server_environment_files_sample</tt> module for this purpose. Alternatively, you
|
||||||
Alternatively, you can provide them in environment variables
|
can provide them in environment variables <tt class="docutils literal">SERVER_ENV_CONFIG</tt> and
|
||||||
<tt class="docutils literal">SERVER_ENV_CONFIG</tt> and <tt class="docutils literal">SERVER_ENV_CONFIG_SECRET</tt>.</p>
|
<tt class="docutils literal">SERVER_ENV_CONFIG_SECRET</tt>.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="configuration">
|
<div class="section" id="configuration">
|
||||||
<h1><a class="toc-backref" href="#toc-entry-2">Configuration</a></h1>
|
<h1><a class="toc-backref" href="#toc-entry-2">Configuration</a></h1>
|
||||||
|
|
@ -424,37 +424,34 @@ used values are ‘dev’, ‘test’, ‘production’:</p>
|
||||||
[options]
|
[options]
|
||||||
running_env=dev
|
running_env=dev
|
||||||
</pre>
|
</pre>
|
||||||
<p>Values associated to keys containing ‘passw’ are only displayed in the
|
<p>Values associated to keys containing ‘passw’ are only displayed in the ‘dev’
|
||||||
‘dev’ environment.</p>
|
environment.</p>
|
||||||
<p>If you don’t provide any value, test is used as a safe default.</p>
|
<p>If you don’t provide any value, <cite>test</cite> is used as a safe default.</p>
|
||||||
<p>You have several possibilities to set configuration values:</p>
|
<p>You have several possibilities to set configuration values:</p>
|
||||||
<div class="section" id="server-environment-files">
|
<div class="section" id="server-environment-files">
|
||||||
<h2><a class="toc-backref" href="#toc-entry-3">server_environment_files</a></h2>
|
<h2><a class="toc-backref" href="#toc-entry-3">server_environment_files</a></h2>
|
||||||
<p>You can edit the settings you need in the <tt class="docutils literal">server_environment_files</tt>
|
<p>You can edit the settings you need in the <tt class="docutils literal">server_environment_files</tt> addon. The
|
||||||
addon. The <tt class="docutils literal">server_environment_files_sample</tt> can be used as an
|
<tt class="docutils literal">server_environment_files_sample</tt> can be used as an example:</p>
|
||||||
example:</p>
|
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li>values common to all / most environments can be stored in the
|
<li>values common to all / most environments can be stored in the
|
||||||
<tt class="docutils literal">default/</tt> directory using the .ini file syntax;</li>
|
<tt class="docutils literal">default/</tt> directory using the .ini file syntax;</li>
|
||||||
<li>each environment you need to define is stored in its own directory
|
<li>each environment you need to define is stored in its own directory
|
||||||
and can override or extend default values;</li>
|
and can override or extend default values;</li>
|
||||||
<li>you can override or extend values in the main configuration file of
|
<li>you can override or extend values in the main configuration
|
||||||
your instance;</li>
|
file of your instance;</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="environment-variable">
|
<div class="section" id="environment-variable">
|
||||||
<h2><a class="toc-backref" href="#toc-entry-4">Environment variable</a></h2>
|
<h2><a class="toc-backref" href="#toc-entry-4">Environment variable</a></h2>
|
||||||
<p>You can define configuration in the environment variable
|
<p>You can define configuration in the environment variable <tt class="docutils literal">SERVER_ENV_CONFIG</tt>
|
||||||
<tt class="docutils literal">SERVER_ENV_CONFIG</tt> and/or <tt class="docutils literal">SERVER_ENV_CONFIG_SECRET</tt>. The 2
|
and/or <tt class="docutils literal">SERVER_ENV_CONFIG_SECRET</tt>. The 2 variables are handled the exact same
|
||||||
variables are handled the exact same way, this is only a convenience for
|
way, this is only a convenience for the deployment where you can isolate the
|
||||||
the deployment where you can isolate the secrets in a different,
|
secrets in a different, encrypted, file. They are multi-line environment variables
|
||||||
encrypted, file. They are multi-line environment variables in the same
|
in the same configparser format than the files.
|
||||||
configparser format than the files. If you used options in
|
If you used options in <tt class="docutils literal">server_environment_files</tt>, the options set in the
|
||||||
<tt class="docutils literal">server_environment_files</tt>, the options set in the environment
|
environment variable override them.</p>
|
||||||
variable override them.</p>
|
<p>The options in the environment variable are not dependent of <tt class="docutils literal">running_env</tt>,
|
||||||
<p>The options in the environment variable are not dependent of
|
the content of the variable must be set accordingly to the running environment.</p>
|
||||||
<tt class="docutils literal">running_env</tt>, the content of the variable must be set accordingly to
|
|
||||||
the running environment.</p>
|
|
||||||
<p>Example of setup:</p>
|
<p>Example of setup:</p>
|
||||||
<p>A public file, containing that will contain public variables:</p>
|
<p>A public file, containing that will contain public variables:</p>
|
||||||
<pre class="literal-block">
|
<pre class="literal-block">
|
||||||
|
|
@ -488,14 +485,15 @@ sftp_password=xxxxxxxxx
|
||||||
</pre>
|
</pre>
|
||||||
<p><strong>WARNING</strong></p>
|
<p><strong>WARNING</strong></p>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
my_sftp must match the name of the record. If you want something more
|
<cite>my_sftp</cite> must match the name of the record.
|
||||||
reliable use server.env.techname.mixin and use tech_name field to
|
If you want something more reliable use <cite>server.env.techname.mixin</cite>
|
||||||
reference records. See “USAGE”.</blockquote>
|
and use <cite>tech_name</cite> field to reference records.
|
||||||
|
See “USAGE”.</blockquote>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="default-values">
|
<div class="section" id="default-values">
|
||||||
<h2><a class="toc-backref" href="#toc-entry-5">Default values</a></h2>
|
<h2><a class="toc-backref" href="#toc-entry-5">Default values</a></h2>
|
||||||
<p>When using the <tt class="docutils literal">server.env.mixin</tt> mixin, for each env-computed field,
|
<p>When using the <tt class="docutils literal">server.env.mixin</tt> mixin, for each env-computed field, a
|
||||||
a companion field <tt class="docutils literal"><field>_env_default</tt> is created. This field is not
|
companion field <tt class="docutils literal"><field>_env_default</tt> is created. This field is not
|
||||||
environment-dependent. It’s a fallback value used when no key is set in
|
environment-dependent. It’s a fallback value used when no key is set in
|
||||||
configuration files / environment variable.</p>
|
configuration files / environment variable.</p>
|
||||||
<p>When the default field is used, the field is made editable on Odoo.</p>
|
<p>When the default field is used, the field is made editable on Odoo.</p>
|
||||||
|
|
@ -503,14 +501,13 @@ configuration files / environment variable.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="server-environment-integration">
|
<div class="section" id="server-environment-integration">
|
||||||
<h2><a class="toc-backref" href="#toc-entry-6">Server environment integration</a></h2>
|
<h2><a class="toc-backref" href="#toc-entry-6">Server environment integration</a></h2>
|
||||||
<p>Read the documentation of the class
|
<p>Read the documentation of the class <a class="reference external" href="models/server_env_mixin.py">models/server_env_mixin.py</a>.</p>
|
||||||
<a class="reference external" href="models/server_env_mixin.py">models/server_env_mixin.py</a>.</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="usage">
|
<div class="section" id="usage">
|
||||||
<h1><a class="toc-backref" href="#toc-entry-7">Usage</a></h1>
|
<h1><a class="toc-backref" href="#toc-entry-7">Usage</a></h1>
|
||||||
<p>You can include a mixin in your model and configure the env-computed
|
<p>You can include a mixin in your model and configure the env-computed fields
|
||||||
fields by an override of <tt class="docutils literal">_server_env_fields</tt>.</p>
|
by an override of <tt class="docutils literal">_server_env_fields</tt>.</p>
|
||||||
<pre class="literal-block">
|
<pre class="literal-block">
|
||||||
class StorageBackend(models.Model):
|
class StorageBackend(models.Model):
|
||||||
_name = "storage.backend"
|
_name = "storage.backend"
|
||||||
|
|
@ -520,8 +517,7 @@ class StorageBackend(models.Model):
|
||||||
def _server_env_fields(self):
|
def _server_env_fields(self):
|
||||||
return {"directory_path": {}}
|
return {"directory_path": {}}
|
||||||
</pre>
|
</pre>
|
||||||
<p>Read the documentation of the class and methods in
|
<p>Read the documentation of the class and methods in <a class="reference external" href="models/server_env_mixin.py">models/server_env_mixin.py</a>.</p>
|
||||||
<a class="reference external" href="models/server_env_mixin.py">models/server_env_mixin.py</a>.</p>
|
|
||||||
<p>If you want to have a technical name to reference:</p>
|
<p>If you want to have a technical name to reference:</p>
|
||||||
<pre class="literal-block">
|
<pre class="literal-block">
|
||||||
class StorageBackend(models.Model):
|
class StorageBackend(models.Model):
|
||||||
|
|
@ -536,11 +532,9 @@ class StorageBackend(models.Model):
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li>it is not possible to set the environment from the command line. A
|
<li>it is not possible to set the environment from the command line. A
|
||||||
configuration file must be used.</li>
|
configuration file must be used.</li>
|
||||||
<li>the module does not allow to set low level attributes such as
|
<li>the module does not allow to set low level attributes such as database server, etc.</li>
|
||||||
database server, etc.</li>
|
<li><cite>server.env.techname.mixin</cite>’s <cite>tech_name</cite> field could leverage the new option
|
||||||
<li>server.env.techname.mixin’s tech_name field could leverage the new
|
for computable / writable fields and get rid of some onchange / read / write code.</li>
|
||||||
option for computable / writable fields and get rid of some onchange
|
|
||||||
/ read / write code.</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="bug-tracker">
|
<div class="section" id="bug-tracker">
|
||||||
|
|
@ -548,7 +542,7 @@ option for computable / writable fields and get rid of some onchange
|
||||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-env/issues">GitHub Issues</a>.
|
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-env/issues">GitHub Issues</a>.
|
||||||
In case of trouble, please check there if your issue has already been reported.
|
In case of trouble, please check there if your issue has already been reported.
|
||||||
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
||||||
<a class="reference external" href="https://github.com/OCA/server-env/issues/new?body=module:%20server_environment%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
<a class="reference external" href="https://github.com/OCA/server-env/issues/new?body=module:%20server_environment%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||||
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="credits">
|
<div class="section" id="credits">
|
||||||
|
|
@ -583,7 +577,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
||||||
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||||
mission is to support the collaborative development of Odoo features and
|
mission is to support the collaborative development of Odoo features and
|
||||||
promote its widespread use.</p>
|
promote its widespread use.</p>
|
||||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-env/tree/17.0/server_environment">OCA/server-env</a> project on GitHub.</p>
|
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-env/tree/16.0/server_environment">OCA/server-env</a> project on GitHub.</p>
|
||||||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,115 @@
|
||||||
|
==================================
|
||||||
|
Server Environment Data Encryption
|
||||||
|
==================================
|
||||||
|
|
||||||
|
..
|
||||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
!! This file is generated by oca-gen-addon-readme !!
|
||||||
|
!! changes will be overwritten. !!
|
||||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
!! source digest: sha256:8b7167f4311edd86055de2f0601f9348263e6b72366abeb835d57f71491b6e33
|
||||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
|
||||||
|
:target: https://odoo-community.org/page/development-status
|
||||||
|
:alt: Alpha
|
||||||
|
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
|
||||||
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
:alt: License: AGPL-3
|
||||||
|
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--env-lightgray.png?logo=github
|
||||||
|
:target: https://github.com/OCA/server-env/tree/16.0/server_environment_data_encryption
|
||||||
|
:alt: OCA/server-env
|
||||||
|
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||||
|
:target: https://translation.odoo-community.org/projects/server-env-16-0/server-env-16-0-server_environment_data_encryption
|
||||||
|
:alt: Translate me on Weblate
|
||||||
|
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
||||||
|
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-env&target_branch=16.0
|
||||||
|
:alt: Try me on Runboat
|
||||||
|
|
||||||
|
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||||
|
|
||||||
|
This module changes a little the behavior of server_environment modules.
|
||||||
|
When Odoo does not find the value of the field in the configuration file,
|
||||||
|
it will fallback on a Odoo encrypted field instead.
|
||||||
|
Also it allows you
|
||||||
|
to configure the environment dependent fields for all your environments
|
||||||
|
from the production server.
|
||||||
|
|
||||||
|
.. IMPORTANT::
|
||||||
|
This is an alpha version, the data model and design can change at any time without warning.
|
||||||
|
Only for development or testing purpose, do not use in production.
|
||||||
|
`More details on development status <https://odoo-community.org/page/development-status>`_
|
||||||
|
|
||||||
|
**Table of contents**
|
||||||
|
|
||||||
|
.. contents::
|
||||||
|
:local:
|
||||||
|
|
||||||
|
Configuration
|
||||||
|
=============
|
||||||
|
|
||||||
|
In order to use this module properly, each environment should have their own encryption key
|
||||||
|
and the production environment should have the keys of all environments.
|
||||||
|
|
||||||
|
Example :
|
||||||
|
Development environment ::
|
||||||
|
|
||||||
|
[options]
|
||||||
|
running_env=dev
|
||||||
|
encryption_key_dev=XXX
|
||||||
|
|
||||||
|
Pre-production environment ::
|
||||||
|
|
||||||
|
[options]
|
||||||
|
running_env=preprod
|
||||||
|
encryption_key_preprod=YYY
|
||||||
|
|
||||||
|
Production environment ::
|
||||||
|
|
||||||
|
[options]
|
||||||
|
running_env=prod
|
||||||
|
encryption_key_dev=XXX
|
||||||
|
encryption_key_preprod=YYY
|
||||||
|
encryption_key_prod=ZZZ
|
||||||
|
|
||||||
|
Bug Tracker
|
||||||
|
===========
|
||||||
|
|
||||||
|
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-env/issues>`_.
|
||||||
|
In case of trouble, please check there if your issue has already been reported.
|
||||||
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
||||||
|
`feedback <https://github.com/OCA/server-env/issues/new?body=module:%20server_environment_data_encryption%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||||
|
|
||||||
|
Do not contact contributors directly about support or help with technical issues.
|
||||||
|
|
||||||
|
Credits
|
||||||
|
=======
|
||||||
|
|
||||||
|
Authors
|
||||||
|
~~~~~~~
|
||||||
|
|
||||||
|
* Akretion
|
||||||
|
|
||||||
|
Contributors
|
||||||
|
~~~~~~~~~~~~
|
||||||
|
|
||||||
|
* Florian da Costa <florian.dacosta@akretion.com>
|
||||||
|
* Sébastien Beau <sebastien.beau@akretion.com>
|
||||||
|
* Benoît Guillot <benoit.guillot@akretion.com>
|
||||||
|
|
||||||
|
Maintainers
|
||||||
|
~~~~~~~~~~~
|
||||||
|
|
||||||
|
This module is maintained by the OCA.
|
||||||
|
|
||||||
|
.. image:: https://odoo-community.org/logo.png
|
||||||
|
:alt: Odoo Community Association
|
||||||
|
:target: https://odoo-community.org
|
||||||
|
|
||||||
|
OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||||
|
mission is to support the collaborative development of Odoo features and
|
||||||
|
promote its widespread use.
|
||||||
|
|
||||||
|
This module is part of the `OCA/server-env <https://github.com/OCA/server-env/tree/16.0/server_environment_data_encryption>`_ project on GitHub.
|
||||||
|
|
||||||
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
from . import models
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
{
|
||||||
|
"name": "Server Environment Data Encryption",
|
||||||
|
"version": "16.0.1.0.0",
|
||||||
|
"development_status": "Alpha",
|
||||||
|
"category": "Tools",
|
||||||
|
"website": "https://github.com/OCA/server-env",
|
||||||
|
"author": "Akretion, Odoo Community Association (OCA)",
|
||||||
|
"license": "AGPL-3",
|
||||||
|
"installable": True,
|
||||||
|
"depends": ["server_environment", "data_encryption"],
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * server_environment_data_encryption
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 14.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"Last-Translator: Automatically generated\n"
|
||||||
|
"Language-Team: none\n"
|
||||||
|
"Language: ca\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||||
|
|
||||||
|
#. module: server_environment_data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/server_environment_data_encryption/models/server_env_mixin.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Define values for "
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: server_environment_data_encryption
|
||||||
|
#: model:ir.model,name:server_environment_data_encryption.model_server_env_mixin
|
||||||
|
msgid "Mixin to add server environment in existing models"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: server_environment_data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/server_environment_data_encryption/models/server_env_mixin.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Modify values for {} environment"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: server_environment_data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/server_environment_data_encryption/models/server_env_mixin.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "The encryption key for current environement is not defined"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: server_environment_data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/server_environment_data_encryption/models/server_env_mixin.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"you need to define the running_env entry in your odoo configuration file"
|
||||||
|
msgstr ""
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * server_environment_data_encryption
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 16.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"PO-Revision-Date: 2023-07-25 13:10+0000\n"
|
||||||
|
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
|
||||||
|
"Language-Team: none\n"
|
||||||
|
"Language: es\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||||
|
"X-Generator: Weblate 4.17\n"
|
||||||
|
|
||||||
|
#. module: server_environment_data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/server_environment_data_encryption/models/server_env_mixin.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Define values for "
|
||||||
|
msgstr "Definir valores para "
|
||||||
|
|
||||||
|
#. module: server_environment_data_encryption
|
||||||
|
#: model:ir.model,name:server_environment_data_encryption.model_server_env_mixin
|
||||||
|
msgid "Mixin to add server environment in existing models"
|
||||||
|
msgstr "Combinación para añadir entorno de servidor en modelos existentes"
|
||||||
|
|
||||||
|
#. module: server_environment_data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/server_environment_data_encryption/models/server_env_mixin.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Modify values for {} environment"
|
||||||
|
msgstr "Modificar los valores del entorno {}"
|
||||||
|
|
||||||
|
#. module: server_environment_data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/server_environment_data_encryption/models/server_env_mixin.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "The encryption key for current environement is not defined"
|
||||||
|
msgstr "La clave de encriptación para el entorno actual no está definida"
|
||||||
|
|
||||||
|
#. module: server_environment_data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/server_environment_data_encryption/models/server_env_mixin.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"you need to define the running_env entry in your odoo configuration file"
|
||||||
|
msgstr ""
|
||||||
|
"necesitas definir la entrada running_env en tu archivo de configuración de "
|
||||||
|
"odoo"
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * server_environment_data_encryption
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 16.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"PO-Revision-Date: 2024-01-03 14:36+0000\n"
|
||||||
|
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
|
||||||
|
"Language-Team: none\n"
|
||||||
|
"Language: it\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||||
|
"X-Generator: Weblate 4.17\n"
|
||||||
|
|
||||||
|
#. module: server_environment_data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/server_environment_data_encryption/models/server_env_mixin.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Define values for "
|
||||||
|
msgstr "Definire valori per "
|
||||||
|
|
||||||
|
#. module: server_environment_data_encryption
|
||||||
|
#: model:ir.model,name:server_environment_data_encryption.model_server_env_mixin
|
||||||
|
msgid "Mixin to add server environment in existing models"
|
||||||
|
msgstr "Mixin per aggiungere l'ambiente server in modelli esistenti"
|
||||||
|
|
||||||
|
#. module: server_environment_data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/server_environment_data_encryption/models/server_env_mixin.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Modify values for {} environment"
|
||||||
|
msgstr "Modificare valori per ambiente {}"
|
||||||
|
|
||||||
|
#. module: server_environment_data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/server_environment_data_encryption/models/server_env_mixin.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "The encryption key for current environement is not defined"
|
||||||
|
msgstr "La chiave di criptazione per l'ambiente attuale non è definita"
|
||||||
|
|
||||||
|
#. module: server_environment_data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/server_environment_data_encryption/models/server_env_mixin.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"you need to define the running_env entry in your odoo configuration file"
|
||||||
|
msgstr "bisogna definire il valore running_env nel file di configruazione odoo"
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * server_environment_data_encryption
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 16.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"Last-Translator: \n"
|
||||||
|
"Language-Team: \n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: \n"
|
||||||
|
|
||||||
|
#. module: server_environment_data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/server_environment_data_encryption/models/server_env_mixin.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Define values for "
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: server_environment_data_encryption
|
||||||
|
#: model:ir.model,name:server_environment_data_encryption.model_server_env_mixin
|
||||||
|
msgid "Mixin to add server environment in existing models"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: server_environment_data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/server_environment_data_encryption/models/server_env_mixin.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Modify values for {} environment"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: server_environment_data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/server_environment_data_encryption/models/server_env_mixin.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "The encryption key for current environement is not defined"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: server_environment_data_encryption
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/server_environment_data_encryption/models/server_env_mixin.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"you need to define the running_env entry in your odoo configuration file"
|
||||||
|
msgstr ""
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
from . import server_env_mixin
|
||||||
|
|
@ -0,0 +1,201 @@
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||||
|
|
||||||
|
import json
|
||||||
|
import logging
|
||||||
|
|
||||||
|
from lxml import etree
|
||||||
|
|
||||||
|
from odoo import _, api, models
|
||||||
|
from odoo.exceptions import ValidationError
|
||||||
|
from odoo.tools.config import config
|
||||||
|
|
||||||
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
class ServerEnvMixin(models.AbstractModel):
|
||||||
|
_inherit = "server.env.mixin"
|
||||||
|
|
||||||
|
def _current_env_encrypted_key_exists(self):
|
||||||
|
env = self.env["encrypted.data"]._retrieve_env()
|
||||||
|
key_name = "encryption_key_%s" % env
|
||||||
|
key_str = config.get(key_name)
|
||||||
|
key_exists = key_str and True or False
|
||||||
|
if not key_exists:
|
||||||
|
logging.warning(
|
||||||
|
"The minimal configuration is missing. You need at least to add an "
|
||||||
|
"encryption key for the current environment : %s. While the "
|
||||||
|
"configuration is missing, the module has no effect",
|
||||||
|
env,
|
||||||
|
)
|
||||||
|
return key_exists
|
||||||
|
|
||||||
|
def _compute_server_env_from_default(self, field_name, options):
|
||||||
|
"""First return database encrypted value then default value"""
|
||||||
|
# in case of bad configuration (no encryption key for current env) the module
|
||||||
|
# is useless, we do fallback directly on serven_environement behavior
|
||||||
|
if not self._current_env_encrypted_key_exists():
|
||||||
|
return super()._compute_server_env_from_default(field_name, options)
|
||||||
|
encrypted_data_name = "{},{}".format(self._name, self.id)
|
||||||
|
env = self.env.context.get("environment", None)
|
||||||
|
|
||||||
|
vals = (
|
||||||
|
self.env["encrypted.data"]
|
||||||
|
.sudo()
|
||||||
|
._encrypted_read_json(encrypted_data_name, env=env)
|
||||||
|
)
|
||||||
|
if vals.get(field_name):
|
||||||
|
self[field_name] = vals[field_name]
|
||||||
|
else:
|
||||||
|
return super()._compute_server_env_from_default(field_name, options)
|
||||||
|
|
||||||
|
def _inverse_server_env(self, field_name):
|
||||||
|
"""
|
||||||
|
When this module is installed, we store values into encrypted data
|
||||||
|
env instead of a default field in database (not env dependent).
|
||||||
|
"""
|
||||||
|
# in case of bad configuration (no encryption key for current env) the module
|
||||||
|
# is useless, we do fallback directly on serven_environement behavior
|
||||||
|
if not self._current_env_encrypted_key_exists():
|
||||||
|
return super()._inverse_server_env(field_name)
|
||||||
|
is_editable_field = self._server_env_is_editable_fieldname(field_name)
|
||||||
|
encrypted_data_obj = self.env["encrypted.data"].sudo()
|
||||||
|
env = self.env.context.get("environment", None)
|
||||||
|
for record in self:
|
||||||
|
if record[is_editable_field]:
|
||||||
|
encrypted_data_name = "{},{}".format(record._name, record.id)
|
||||||
|
values = encrypted_data_obj._encrypted_read_json(
|
||||||
|
encrypted_data_name, env=env
|
||||||
|
)
|
||||||
|
new_val = {field_name: record[field_name]}
|
||||||
|
values.update(new_val)
|
||||||
|
encrypted_data_obj._encrypted_store_json(
|
||||||
|
encrypted_data_name, values, env=env
|
||||||
|
)
|
||||||
|
|
||||||
|
def action_change_env_data_encrypted_fields(self):
|
||||||
|
action_id = self.env.context.get("params", {}).get("action")
|
||||||
|
if not action_id:
|
||||||
|
# We don't know which action we are using... take default one
|
||||||
|
action = self.get_formview_action()
|
||||||
|
else:
|
||||||
|
action = (
|
||||||
|
self.env["ir.actions.act_window"].browse(action_id).sudo().read()[0]
|
||||||
|
)
|
||||||
|
action["view_mode"] = "form"
|
||||||
|
action["res_id"] = self.id
|
||||||
|
views_form = []
|
||||||
|
for view_id, view_type in action.get("views", []):
|
||||||
|
if view_type == "form":
|
||||||
|
views_form.append((view_id, view_type))
|
||||||
|
action["views"] = views_form
|
||||||
|
return action
|
||||||
|
|
||||||
|
def _get_extra_environment_info_div(self, current_env, extra_envs):
|
||||||
|
# if the module configuration is missing (no current env encryption key)
|
||||||
|
# display a warning instead as the module has no effect.
|
||||||
|
if not self._current_env_encrypted_key_exists():
|
||||||
|
button_div = "<div>"
|
||||||
|
warning_string = _(
|
||||||
|
"The encryption key for current environement is not defined"
|
||||||
|
)
|
||||||
|
elem = etree.fromstring(
|
||||||
|
"""
|
||||||
|
<div class="d-flex justify-content-between">
|
||||||
|
<div class="alert lead {} text-center d-inline">
|
||||||
|
<strong>{}</strong>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
""".format(
|
||||||
|
"alert-danger", warning_string
|
||||||
|
)
|
||||||
|
)
|
||||||
|
return elem
|
||||||
|
|
||||||
|
# TODO we could use a qweb template here
|
||||||
|
button_div = "<div>"
|
||||||
|
button_string = _("Define values for ")
|
||||||
|
for environment in extra_envs:
|
||||||
|
button = """
|
||||||
|
<button name="action_change_env_data_encrypted_fields"
|
||||||
|
type="object" string="{}{}"
|
||||||
|
class="btn btn-lg btn-primary ml-2"
|
||||||
|
context="{}"/>
|
||||||
|
""".format(
|
||||||
|
button_string, environment, {"environment": environment}
|
||||||
|
)
|
||||||
|
button_div += "{}".format(button)
|
||||||
|
button_div += "</div>"
|
||||||
|
alert_string = _("Modify values for {} environment").format(current_env)
|
||||||
|
alert_type = (
|
||||||
|
current_env == config.get("running_env") and "alert-info" or "alert-warning"
|
||||||
|
)
|
||||||
|
elem = etree.fromstring(
|
||||||
|
"""
|
||||||
|
<div class="d-flex justify-content-between">
|
||||||
|
<div class="alert lead {} text-center d-inline">
|
||||||
|
<strong>{}</strong>
|
||||||
|
</div>
|
||||||
|
{}
|
||||||
|
</div>
|
||||||
|
""".format(
|
||||||
|
alert_type, alert_string, button_div
|
||||||
|
)
|
||||||
|
)
|
||||||
|
return elem
|
||||||
|
|
||||||
|
def _set_readonly_form_view(self, doc):
|
||||||
|
for field in doc.iter("field"):
|
||||||
|
env_fields = self._server_env_fields.keys()
|
||||||
|
field_name = field.get("name")
|
||||||
|
if field_name in env_fields:
|
||||||
|
continue
|
||||||
|
field.set("readonly", "1")
|
||||||
|
field.set("modifiers", json.dumps({"readonly": True}))
|
||||||
|
|
||||||
|
def _update_form_view_from_env(self, arch, view_type):
|
||||||
|
if view_type != "form":
|
||||||
|
return arch
|
||||||
|
current_env = self.env.context.get("environment") or config.get("running_env")
|
||||||
|
# Important to keep this list sorted. It makes sure the button to
|
||||||
|
# switch environment will always be in the same order. (more user
|
||||||
|
# friendly) and the test would fail without it as the order could
|
||||||
|
# change randomly and the view would then also change randomly
|
||||||
|
other_environments = sorted(
|
||||||
|
[
|
||||||
|
key[15:]
|
||||||
|
for key, val in config.options.items()
|
||||||
|
if key.startswith("encryption_key_") and val and key[15:] != current_env
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
if not current_env:
|
||||||
|
raise ValidationError(
|
||||||
|
_(
|
||||||
|
"you need to define the running_env entry in your odoo "
|
||||||
|
"configuration file"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
node = arch.xpath("//sheet")
|
||||||
|
if node:
|
||||||
|
node = node[0]
|
||||||
|
elem = self._get_extra_environment_info_div(current_env, other_environments)
|
||||||
|
node.insert(0, elem)
|
||||||
|
|
||||||
|
if current_env != config.get("running_env"):
|
||||||
|
self._set_readonly_form_view(arch)
|
||||||
|
else:
|
||||||
|
_logger.error("Missing sheet for form view on object {}".format(self._name))
|
||||||
|
return arch
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _get_view(self, view_id=None, view_type="form", **options):
|
||||||
|
arch, view = super()._get_view(view_id=view_id, view_type=view_type, **options)
|
||||||
|
arch = self._update_form_view_from_env(arch, view_type)
|
||||||
|
return arch, view
|
||||||
|
|
||||||
|
def _get_view_cache_key(self, view_id=None, view_type="form", **options):
|
||||||
|
res = super()._get_view_cache_key(
|
||||||
|
view_id=view_id, view_type=view_type, **options
|
||||||
|
)
|
||||||
|
res += (self.env.context.get("environment", False),)
|
||||||
|
return res
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
In order to use this module properly, each environment should have their own encryption key
|
||||||
|
and the production environment should have the keys of all environments.
|
||||||
|
|
||||||
|
Example :
|
||||||
|
Development environment ::
|
||||||
|
|
||||||
|
[options]
|
||||||
|
running_env=dev
|
||||||
|
encryption_key_dev=XXX
|
||||||
|
|
||||||
|
Pre-production environment ::
|
||||||
|
|
||||||
|
[options]
|
||||||
|
running_env=preprod
|
||||||
|
encryption_key_preprod=YYY
|
||||||
|
|
||||||
|
Production environment ::
|
||||||
|
|
||||||
|
[options]
|
||||||
|
running_env=prod
|
||||||
|
encryption_key_dev=XXX
|
||||||
|
encryption_key_preprod=YYY
|
||||||
|
encryption_key_prod=ZZZ
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
* Florian da Costa <florian.dacosta@akretion.com>
|
||||||
|
* Sébastien Beau <sebastien.beau@akretion.com>
|
||||||
|
* Benoît Guillot <benoit.guillot@akretion.com>
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
This module changes a little the behavior of server_environment modules.
|
||||||
|
When Odoo does not find the value of the field in the configuration file,
|
||||||
|
it will fallback on a Odoo encrypted field instead.
|
||||||
|
Also it allows you
|
||||||
|
to configure the environment dependent fields for all your environments
|
||||||
|
from the production server.
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
|
|
@ -0,0 +1,461 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
|
||||||
|
<title>Server Environment Data Encryption</title>
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
/*
|
||||||
|
:Author: David Goodger (goodger@python.org)
|
||||||
|
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
|
||||||
|
:Copyright: This stylesheet has been placed in the public domain.
|
||||||
|
|
||||||
|
Default cascading style sheet for the HTML output of Docutils.
|
||||||
|
|
||||||
|
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
||||||
|
customize this style sheet.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* used to remove borders from tables and images */
|
||||||
|
.borderless, table.borderless td, table.borderless th {
|
||||||
|
border: 0 }
|
||||||
|
|
||||||
|
table.borderless td, table.borderless th {
|
||||||
|
/* Override padding for "table.docutils td" with "! important".
|
||||||
|
The right padding separates the table cells. */
|
||||||
|
padding: 0 0.5em 0 0 ! important }
|
||||||
|
|
||||||
|
.first {
|
||||||
|
/* Override more specific margin styles with "! important". */
|
||||||
|
margin-top: 0 ! important }
|
||||||
|
|
||||||
|
.last, .with-subtitle {
|
||||||
|
margin-bottom: 0 ! important }
|
||||||
|
|
||||||
|
.hidden {
|
||||||
|
display: none }
|
||||||
|
|
||||||
|
.subscript {
|
||||||
|
vertical-align: sub;
|
||||||
|
font-size: smaller }
|
||||||
|
|
||||||
|
.superscript {
|
||||||
|
vertical-align: super;
|
||||||
|
font-size: smaller }
|
||||||
|
|
||||||
|
a.toc-backref {
|
||||||
|
text-decoration: none ;
|
||||||
|
color: black }
|
||||||
|
|
||||||
|
blockquote.epigraph {
|
||||||
|
margin: 2em 5em ; }
|
||||||
|
|
||||||
|
dl.docutils dd {
|
||||||
|
margin-bottom: 0.5em }
|
||||||
|
|
||||||
|
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||||
|
dl.docutils dt {
|
||||||
|
font-weight: bold }
|
||||||
|
*/
|
||||||
|
|
||||||
|
div.abstract {
|
||||||
|
margin: 2em 5em }
|
||||||
|
|
||||||
|
div.abstract p.topic-title {
|
||||||
|
font-weight: bold ;
|
||||||
|
text-align: center }
|
||||||
|
|
||||||
|
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||||
|
div.hint, div.important, div.note, div.tip, div.warning {
|
||||||
|
margin: 2em ;
|
||||||
|
border: medium outset ;
|
||||||
|
padding: 1em }
|
||||||
|
|
||||||
|
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||||
|
div.important p.admonition-title, div.note p.admonition-title,
|
||||||
|
div.tip p.admonition-title {
|
||||||
|
font-weight: bold ;
|
||||||
|
font-family: sans-serif }
|
||||||
|
|
||||||
|
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||||
|
div.danger p.admonition-title, div.error p.admonition-title,
|
||||||
|
div.warning p.admonition-title, .code .error {
|
||||||
|
color: red ;
|
||||||
|
font-weight: bold ;
|
||||||
|
font-family: sans-serif }
|
||||||
|
|
||||||
|
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||||
|
compound paragraphs.
|
||||||
|
div.compound .compound-first, div.compound .compound-middle {
|
||||||
|
margin-bottom: 0.5em }
|
||||||
|
|
||||||
|
div.compound .compound-last, div.compound .compound-middle {
|
||||||
|
margin-top: 0.5em }
|
||||||
|
*/
|
||||||
|
|
||||||
|
div.dedication {
|
||||||
|
margin: 2em 5em ;
|
||||||
|
text-align: center ;
|
||||||
|
font-style: italic }
|
||||||
|
|
||||||
|
div.dedication p.topic-title {
|
||||||
|
font-weight: bold ;
|
||||||
|
font-style: normal }
|
||||||
|
|
||||||
|
div.figure {
|
||||||
|
margin-left: 2em ;
|
||||||
|
margin-right: 2em }
|
||||||
|
|
||||||
|
div.footer, div.header {
|
||||||
|
clear: both;
|
||||||
|
font-size: smaller }
|
||||||
|
|
||||||
|
div.line-block {
|
||||||
|
display: block ;
|
||||||
|
margin-top: 1em ;
|
||||||
|
margin-bottom: 1em }
|
||||||
|
|
||||||
|
div.line-block div.line-block {
|
||||||
|
margin-top: 0 ;
|
||||||
|
margin-bottom: 0 ;
|
||||||
|
margin-left: 1.5em }
|
||||||
|
|
||||||
|
div.sidebar {
|
||||||
|
margin: 0 0 0.5em 1em ;
|
||||||
|
border: medium outset ;
|
||||||
|
padding: 1em ;
|
||||||
|
background-color: #ffffee ;
|
||||||
|
width: 40% ;
|
||||||
|
float: right ;
|
||||||
|
clear: right }
|
||||||
|
|
||||||
|
div.sidebar p.rubric {
|
||||||
|
font-family: sans-serif ;
|
||||||
|
font-size: medium }
|
||||||
|
|
||||||
|
div.system-messages {
|
||||||
|
margin: 5em }
|
||||||
|
|
||||||
|
div.system-messages h1 {
|
||||||
|
color: red }
|
||||||
|
|
||||||
|
div.system-message {
|
||||||
|
border: medium outset ;
|
||||||
|
padding: 1em }
|
||||||
|
|
||||||
|
div.system-message p.system-message-title {
|
||||||
|
color: red ;
|
||||||
|
font-weight: bold }
|
||||||
|
|
||||||
|
div.topic {
|
||||||
|
margin: 2em }
|
||||||
|
|
||||||
|
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||||
|
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||||
|
margin-top: 0.4em }
|
||||||
|
|
||||||
|
h1.title {
|
||||||
|
text-align: center }
|
||||||
|
|
||||||
|
h2.subtitle {
|
||||||
|
text-align: center }
|
||||||
|
|
||||||
|
hr.docutils {
|
||||||
|
width: 75% }
|
||||||
|
|
||||||
|
img.align-left, .figure.align-left, object.align-left, table.align-left {
|
||||||
|
clear: left ;
|
||||||
|
float: left ;
|
||||||
|
margin-right: 1em }
|
||||||
|
|
||||||
|
img.align-right, .figure.align-right, object.align-right, table.align-right {
|
||||||
|
clear: right ;
|
||||||
|
float: right ;
|
||||||
|
margin-left: 1em }
|
||||||
|
|
||||||
|
img.align-center, .figure.align-center, object.align-center {
|
||||||
|
display: block;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.align-center {
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.align-left {
|
||||||
|
text-align: left }
|
||||||
|
|
||||||
|
.align-center {
|
||||||
|
clear: both ;
|
||||||
|
text-align: center }
|
||||||
|
|
||||||
|
.align-right {
|
||||||
|
text-align: right }
|
||||||
|
|
||||||
|
/* reset inner alignment in figures */
|
||||||
|
div.align-right {
|
||||||
|
text-align: inherit }
|
||||||
|
|
||||||
|
/* div.align-center * { */
|
||||||
|
/* text-align: left } */
|
||||||
|
|
||||||
|
.align-top {
|
||||||
|
vertical-align: top }
|
||||||
|
|
||||||
|
.align-middle {
|
||||||
|
vertical-align: middle }
|
||||||
|
|
||||||
|
.align-bottom {
|
||||||
|
vertical-align: bottom }
|
||||||
|
|
||||||
|
ol.simple, ul.simple {
|
||||||
|
margin-bottom: 1em }
|
||||||
|
|
||||||
|
ol.arabic {
|
||||||
|
list-style: decimal }
|
||||||
|
|
||||||
|
ol.loweralpha {
|
||||||
|
list-style: lower-alpha }
|
||||||
|
|
||||||
|
ol.upperalpha {
|
||||||
|
list-style: upper-alpha }
|
||||||
|
|
||||||
|
ol.lowerroman {
|
||||||
|
list-style: lower-roman }
|
||||||
|
|
||||||
|
ol.upperroman {
|
||||||
|
list-style: upper-roman }
|
||||||
|
|
||||||
|
p.attribution {
|
||||||
|
text-align: right ;
|
||||||
|
margin-left: 50% }
|
||||||
|
|
||||||
|
p.caption {
|
||||||
|
font-style: italic }
|
||||||
|
|
||||||
|
p.credits {
|
||||||
|
font-style: italic ;
|
||||||
|
font-size: smaller }
|
||||||
|
|
||||||
|
p.label {
|
||||||
|
white-space: nowrap }
|
||||||
|
|
||||||
|
p.rubric {
|
||||||
|
font-weight: bold ;
|
||||||
|
font-size: larger ;
|
||||||
|
color: maroon ;
|
||||||
|
text-align: center }
|
||||||
|
|
||||||
|
p.sidebar-title {
|
||||||
|
font-family: sans-serif ;
|
||||||
|
font-weight: bold ;
|
||||||
|
font-size: larger }
|
||||||
|
|
||||||
|
p.sidebar-subtitle {
|
||||||
|
font-family: sans-serif ;
|
||||||
|
font-weight: bold }
|
||||||
|
|
||||||
|
p.topic-title {
|
||||||
|
font-weight: bold }
|
||||||
|
|
||||||
|
pre.address {
|
||||||
|
margin-bottom: 0 ;
|
||||||
|
margin-top: 0 ;
|
||||||
|
font: inherit }
|
||||||
|
|
||||||
|
pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
||||||
|
margin-left: 2em ;
|
||||||
|
margin-right: 2em }
|
||||||
|
|
||||||
|
pre.code .ln { color: grey; } /* line numbers */
|
||||||
|
pre.code, code { background-color: #eeeeee }
|
||||||
|
pre.code .comment, code .comment { color: #5C6576 }
|
||||||
|
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
||||||
|
pre.code .literal.string, code .literal.string { color: #0C5404 }
|
||||||
|
pre.code .name.builtin, code .name.builtin { color: #352B84 }
|
||||||
|
pre.code .deleted, code .deleted { background-color: #DEB0A1}
|
||||||
|
pre.code .inserted, code .inserted { background-color: #A3D289}
|
||||||
|
|
||||||
|
span.classifier {
|
||||||
|
font-family: sans-serif ;
|
||||||
|
font-style: oblique }
|
||||||
|
|
||||||
|
span.classifier-delimiter {
|
||||||
|
font-family: sans-serif ;
|
||||||
|
font-weight: bold }
|
||||||
|
|
||||||
|
span.interpreted {
|
||||||
|
font-family: sans-serif }
|
||||||
|
|
||||||
|
span.option {
|
||||||
|
white-space: nowrap }
|
||||||
|
|
||||||
|
span.pre {
|
||||||
|
white-space: pre }
|
||||||
|
|
||||||
|
span.problematic {
|
||||||
|
color: red }
|
||||||
|
|
||||||
|
span.section-subtitle {
|
||||||
|
/* font-size relative to parent (h1..h6 element) */
|
||||||
|
font-size: 80% }
|
||||||
|
|
||||||
|
table.citation {
|
||||||
|
border-left: solid 1px gray;
|
||||||
|
margin-left: 1px }
|
||||||
|
|
||||||
|
table.docinfo {
|
||||||
|
margin: 2em 4em }
|
||||||
|
|
||||||
|
table.docutils {
|
||||||
|
margin-top: 0.5em ;
|
||||||
|
margin-bottom: 0.5em }
|
||||||
|
|
||||||
|
table.footnote {
|
||||||
|
border-left: solid 1px black;
|
||||||
|
margin-left: 1px }
|
||||||
|
|
||||||
|
table.docutils td, table.docutils th,
|
||||||
|
table.docinfo td, table.docinfo th {
|
||||||
|
padding-left: 0.5em ;
|
||||||
|
padding-right: 0.5em ;
|
||||||
|
vertical-align: top }
|
||||||
|
|
||||||
|
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||||
|
font-weight: bold ;
|
||||||
|
text-align: left ;
|
||||||
|
white-space: nowrap ;
|
||||||
|
padding-left: 0 }
|
||||||
|
|
||||||
|
/* "booktabs" style (no vertical lines) */
|
||||||
|
table.docutils.booktabs {
|
||||||
|
border: 0px;
|
||||||
|
border-top: 2px solid;
|
||||||
|
border-bottom: 2px solid;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
table.docutils.booktabs * {
|
||||||
|
border: 0px;
|
||||||
|
}
|
||||||
|
table.docutils.booktabs th {
|
||||||
|
border-bottom: thin solid;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||||
|
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||||
|
font-size: 100% }
|
||||||
|
|
||||||
|
ul.auto-toc {
|
||||||
|
list-style-type: none }
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="document" id="server-environment-data-encryption">
|
||||||
|
<h1 class="title">Server Environment Data Encryption</h1>
|
||||||
|
|
||||||
|
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
!! This file is generated by oca-gen-addon-readme !!
|
||||||
|
!! changes will be overwritten. !!
|
||||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
!! source digest: sha256:8b7167f4311edd86055de2f0601f9348263e6b72366abeb835d57f71491b6e33
|
||||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||||
|
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Alpha" src="https://img.shields.io/badge/maturity-Alpha-red.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-env/tree/16.0/server_environment_data_encryption"><img alt="OCA/server-env" src="https://img.shields.io/badge/github-OCA%2Fserver--env-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-env-16-0/server-env-16-0-server_environment_data_encryption"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/server-env&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||||
|
<p>This module changes a little the behavior of server_environment modules.
|
||||||
|
When Odoo does not find the value of the field in the configuration file,
|
||||||
|
it will fallback on a Odoo encrypted field instead.
|
||||||
|
Also it allows you
|
||||||
|
to configure the environment dependent fields for all your environments
|
||||||
|
from the production server.</p>
|
||||||
|
<div class="admonition important">
|
||||||
|
<p class="first admonition-title">Important</p>
|
||||||
|
<p class="last">This is an alpha version, the data model and design can change at any time without warning.
|
||||||
|
Only for development or testing purpose, do not use in production.
|
||||||
|
<a class="reference external" href="https://odoo-community.org/page/development-status">More details on development status</a></p>
|
||||||
|
</div>
|
||||||
|
<p><strong>Table of contents</strong></p>
|
||||||
|
<div class="contents local topic" id="contents">
|
||||||
|
<ul class="simple">
|
||||||
|
<li><a class="reference internal" href="#configuration" id="toc-entry-1">Configuration</a></li>
|
||||||
|
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-2">Bug Tracker</a></li>
|
||||||
|
<li><a class="reference internal" href="#credits" id="toc-entry-3">Credits</a><ul>
|
||||||
|
<li><a class="reference internal" href="#authors" id="toc-entry-4">Authors</a></li>
|
||||||
|
<li><a class="reference internal" href="#contributors" id="toc-entry-5">Contributors</a></li>
|
||||||
|
<li><a class="reference internal" href="#maintainers" id="toc-entry-6">Maintainers</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="configuration">
|
||||||
|
<h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
|
||||||
|
<p>In order to use this module properly, each environment should have their own encryption key
|
||||||
|
and the production environment should have the keys of all environments.</p>
|
||||||
|
<p>Example :
|
||||||
|
Development environment</p>
|
||||||
|
<pre class="literal-block">
|
||||||
|
[options]
|
||||||
|
running_env=dev
|
||||||
|
encryption_key_dev=XXX
|
||||||
|
</pre>
|
||||||
|
<p>Pre-production environment</p>
|
||||||
|
<pre class="literal-block">
|
||||||
|
[options]
|
||||||
|
running_env=preprod
|
||||||
|
encryption_key_preprod=YYY
|
||||||
|
</pre>
|
||||||
|
<p>Production environment</p>
|
||||||
|
<pre class="literal-block">
|
||||||
|
[options]
|
||||||
|
running_env=prod
|
||||||
|
encryption_key_dev=XXX
|
||||||
|
encryption_key_preprod=YYY
|
||||||
|
encryption_key_prod=ZZZ
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="bug-tracker">
|
||||||
|
<h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
|
||||||
|
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-env/issues">GitHub Issues</a>.
|
||||||
|
In case of trouble, please check there if your issue has already been reported.
|
||||||
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
||||||
|
<a class="reference external" href="https://github.com/OCA/server-env/issues/new?body=module:%20server_environment_data_encryption%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||||
|
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="credits">
|
||||||
|
<h1><a class="toc-backref" href="#toc-entry-3">Credits</a></h1>
|
||||||
|
<div class="section" id="authors">
|
||||||
|
<h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
|
||||||
|
<ul class="simple">
|
||||||
|
<li>Akretion</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="contributors">
|
||||||
|
<h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
|
||||||
|
<ul class="simple">
|
||||||
|
<li>Florian da Costa <<a class="reference external" href="mailto:florian.dacosta@akretion.com">florian.dacosta@akretion.com</a>></li>
|
||||||
|
<li>Sébastien Beau <<a class="reference external" href="mailto:sebastien.beau@akretion.com">sebastien.beau@akretion.com</a>></li>
|
||||||
|
<li>Benoît Guillot <<a class="reference external" href="mailto:benoit.guillot@akretion.com">benoit.guillot@akretion.com</a>></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="maintainers">
|
||||||
|
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
|
||||||
|
<p>This module is maintained by the OCA.</p>
|
||||||
|
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
||||||
|
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||||
|
mission is to support the collaborative development of Odoo features and
|
||||||
|
promote its widespread use.</p>
|
||||||
|
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-env/tree/16.0/server_environment_data_encryption">OCA/server-env</a> project on GitHub.</p>
|
||||||
|
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
from . import test_server_environment_data_encrypt
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
<form string="Test">
|
||||||
|
<header>
|
||||||
|
<button
|
||||||
|
string="Reset Confirmation"
|
||||||
|
type="object"
|
||||||
|
name="set_draft"
|
||||||
|
states="done"
|
||||||
|
/>
|
||||||
|
</header>
|
||||||
|
<sheet>
|
||||||
|
<group col="4">
|
||||||
|
<field name="test" modifiers="{"required": true}" />
|
||||||
|
<field
|
||||||
|
name="test2"
|
||||||
|
attrs="{'readonly': [('type_env_is_editable', '=', False)]}"
|
||||||
|
on_change="1"
|
||||||
|
modifiers="{"readonly": [["type_env_is_editable", "=", false]]}"
|
||||||
|
/>
|
||||||
|
<field name="date" modifiers="{"readonly": true}" />
|
||||||
|
</group>
|
||||||
|
</sheet>
|
||||||
|
</form>
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
<form string="Test">
|
||||||
|
<header>
|
||||||
|
<button
|
||||||
|
string="Reset Confirmation"
|
||||||
|
type="object"
|
||||||
|
name="set_draft"
|
||||||
|
states="done"
|
||||||
|
/>
|
||||||
|
</header>
|
||||||
|
<sheet>
|
||||||
|
<div class="d-flex justify-content-between">
|
||||||
|
<div class="alert lead alert-info text-center d-inline">
|
||||||
|
<strong>Modify values for test environment</strong>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<button
|
||||||
|
name="action_change_env_data_encrypted_fields"
|
||||||
|
type="object"
|
||||||
|
string="Define values for preprod"
|
||||||
|
class="btn btn-lg btn-primary ml-2"
|
||||||
|
context="{'environment': 'preprod'}"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<button
|
||||||
|
name="action_change_env_data_encrypted_fields"
|
||||||
|
type="object"
|
||||||
|
string="Define values for prod"
|
||||||
|
class="btn btn-lg btn-primary ml-2"
|
||||||
|
context="{'environment': 'prod'}"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div><group col="4">
|
||||||
|
<field name="test" modifiers="{"required": true}" />
|
||||||
|
<field
|
||||||
|
name="test2"
|
||||||
|
attrs="{'readonly': [('type_env_is_editable', '=', False)]}"
|
||||||
|
on_change="1"
|
||||||
|
modifiers="{"readonly": [["type_env_is_editable", "=", false]]}"
|
||||||
|
/>
|
||||||
|
<field name="date" modifiers="{"readonly": true}" />
|
||||||
|
</group>
|
||||||
|
</sheet>
|
||||||
|
</form>
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
<form string="Test">
|
||||||
|
<header>
|
||||||
|
<button
|
||||||
|
string="Reset Confirmation"
|
||||||
|
type="object"
|
||||||
|
name="set_draft"
|
||||||
|
states="done"
|
||||||
|
/>
|
||||||
|
</header>
|
||||||
|
<sheet>
|
||||||
|
<div class="d-flex justify-content-between">
|
||||||
|
<div class="alert lead alert-warning text-center d-inline">
|
||||||
|
<strong>Modify values for prod environment</strong>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<button
|
||||||
|
name="action_change_env_data_encrypted_fields"
|
||||||
|
type="object"
|
||||||
|
string="Define values for preprod"
|
||||||
|
class="btn btn-lg btn-primary ml-2"
|
||||||
|
context="{'environment': 'preprod'}"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<button
|
||||||
|
name="action_change_env_data_encrypted_fields"
|
||||||
|
type="object"
|
||||||
|
string="Define values for test"
|
||||||
|
class="btn btn-lg btn-primary ml-2"
|
||||||
|
context="{'environment': 'test'}"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div><group col="4">
|
||||||
|
<field name="test" modifiers="{"readonly": true}" readonly="1" />
|
||||||
|
<field
|
||||||
|
name="test2"
|
||||||
|
attrs="{'readonly': [('type_env_is_editable', '=', False)]}"
|
||||||
|
on_change="1"
|
||||||
|
modifiers="{"readonly": true}"
|
||||||
|
readonly="1"
|
||||||
|
/>
|
||||||
|
<field name="date" modifiers="{"readonly": true}" readonly="1" />
|
||||||
|
</group>
|
||||||
|
</sheet>
|
||||||
|
</form>
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||||
|
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
from lxml import etree
|
||||||
|
|
||||||
|
from odoo.addons.data_encryption.tests.common import CommonDataEncrypted
|
||||||
|
|
||||||
|
|
||||||
|
class TestServerEnvDataEncrypted(CommonDataEncrypted):
|
||||||
|
def test_dynamic_view_current_env(self):
|
||||||
|
self.maxDiff = None
|
||||||
|
self.set_new_key_env("prod")
|
||||||
|
self.set_new_key_env("preprod")
|
||||||
|
mixin_obj = self.env["server.env.mixin"]
|
||||||
|
base_path = Path(__file__).parent / "fixtures" / "base.xml"
|
||||||
|
xml_str = base_path.read_text()
|
||||||
|
xml = etree.XML(xml_str)
|
||||||
|
res_xml = mixin_obj._update_form_view_from_env(xml, "form")
|
||||||
|
expected_xml_path = Path(__file__).parent / "fixtures" / "res1.xml"
|
||||||
|
expected_xml = expected_xml_path.read_text()
|
||||||
|
# convert both to xml with parser removing space then convert to string to
|
||||||
|
# compare
|
||||||
|
parser = etree.XMLParser(remove_blank_text=True)
|
||||||
|
res_xml_str = etree.tostring(etree.XML(etree.tostring(res_xml), parser=parser))
|
||||||
|
expected_xml_str = etree.tostring(etree.XML(expected_xml, parser=parser))
|
||||||
|
self.assertEqual(res_xml_str, expected_xml_str)
|
||||||
|
|
||||||
|
def test_dynamic_view_other_env(self):
|
||||||
|
self.maxDiff = None
|
||||||
|
self.set_new_key_env("prod")
|
||||||
|
self.set_new_key_env("preprod")
|
||||||
|
mixin_obj = self.env["server.env.mixin"]
|
||||||
|
base_path = Path(__file__).parent / "fixtures" / "base.xml"
|
||||||
|
xml_str = base_path.read_text()
|
||||||
|
xml = etree.XML(xml_str)
|
||||||
|
res_xml = mixin_obj.with_context(environment="prod")._update_form_view_from_env(
|
||||||
|
xml, "form"
|
||||||
|
)
|
||||||
|
expected_xml_path = Path(__file__).parent / "fixtures" / "res2.xml"
|
||||||
|
expected_xml = expected_xml_path.read_text()
|
||||||
|
# convert both to xml with parser removing space then convert to string to
|
||||||
|
# compare
|
||||||
|
parser = etree.XMLParser(remove_blank_text=True)
|
||||||
|
res_xml_str = etree.tostring(etree.XML(etree.tostring(res_xml), parser=parser))
|
||||||
|
expected_xml_str = etree.tostring(etree.XML(expected_xml, parser=parser))
|
||||||
|
self.assertEqual(res_xml_str, expected_xml_str)
|
||||||
|
|
@ -0,0 +1,120 @@
|
||||||
|
======================================
|
||||||
|
Server Environment Ir Config Parameter
|
||||||
|
======================================
|
||||||
|
|
||||||
|
..
|
||||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
!! This file is generated by oca-gen-addon-readme !!
|
||||||
|
!! changes will be overwritten. !!
|
||||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
!! source digest: sha256:29c97aeb304203d7c075a8ff1295720253ea06b1f8d4fc57ef0fa71b45f3a38b
|
||||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
||||||
|
:target: https://odoo-community.org/page/development-status
|
||||||
|
:alt: Beta
|
||||||
|
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
|
||||||
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
:alt: License: AGPL-3
|
||||||
|
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--env-lightgray.png?logo=github
|
||||||
|
:target: https://github.com/OCA/server-env/tree/16.0/server_environment_ir_config_parameter
|
||||||
|
:alt: OCA/server-env
|
||||||
|
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||||
|
:target: https://translation.odoo-community.org/projects/server-env-16-0/server-env-16-0-server_environment_ir_config_parameter
|
||||||
|
:alt: Translate me on Weblate
|
||||||
|
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
||||||
|
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-env&target_branch=16.0
|
||||||
|
:alt: Try me on Runboat
|
||||||
|
|
||||||
|
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||||
|
|
||||||
|
Override System Parameters from server environment file.
|
||||||
|
|
||||||
|
**Table of contents**
|
||||||
|
|
||||||
|
.. contents::
|
||||||
|
:local:
|
||||||
|
|
||||||
|
Configuration
|
||||||
|
=============
|
||||||
|
|
||||||
|
To configure this module, you need to add a section ``[ir.config_parameter]`` to
|
||||||
|
you server_environment_files configurations, where the keys are the same
|
||||||
|
as would normally be set in the Systems Parameter Odoo menu.
|
||||||
|
|
||||||
|
When first using a value, the system will read it from the configuration file
|
||||||
|
and override any value that would be present in the database, so the configuration
|
||||||
|
file has precedence.
|
||||||
|
|
||||||
|
When creating or modifying values that are in the configuration file, the
|
||||||
|
module replace changes, enforcing the configuration value.
|
||||||
|
|
||||||
|
For example you can use this module in combination with web_environment_ribbon:
|
||||||
|
|
||||||
|
.. code::
|
||||||
|
|
||||||
|
[ir.config_parameter]
|
||||||
|
ribbon.name=DEV
|
||||||
|
|
||||||
|
Usage
|
||||||
|
=====
|
||||||
|
|
||||||
|
Before using this module, you must be familiar with the
|
||||||
|
server_environment module.
|
||||||
|
|
||||||
|
Known issues / Roadmap
|
||||||
|
======================
|
||||||
|
|
||||||
|
When the user modifies System Parameters that are defined in the config
|
||||||
|
file, the changes are ignored. It would be nice to display which system
|
||||||
|
parameters come from the config file and possibly make their key and value
|
||||||
|
readonly in the user interface.
|
||||||
|
|
||||||
|
Bug Tracker
|
||||||
|
===========
|
||||||
|
|
||||||
|
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-env/issues>`_.
|
||||||
|
In case of trouble, please check there if your issue has already been reported.
|
||||||
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
||||||
|
`feedback <https://github.com/OCA/server-env/issues/new?body=module:%20server_environment_ir_config_parameter%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||||
|
|
||||||
|
Do not contact contributors directly about support or help with technical issues.
|
||||||
|
|
||||||
|
Credits
|
||||||
|
=======
|
||||||
|
|
||||||
|
Authors
|
||||||
|
~~~~~~~
|
||||||
|
|
||||||
|
* ACSONE SA/NV
|
||||||
|
|
||||||
|
Contributors
|
||||||
|
~~~~~~~~~~~~
|
||||||
|
|
||||||
|
* Stéphane Bidoul <stephane.bidoul@acsone.eu> (https://acsone.eu)
|
||||||
|
* Thierry Ducrest <thierry.ducrest@camptocamp.com>
|
||||||
|
* Gilles Meyomesse <gilles.meyomesse@acsone.eu> (https://acsone.eu)
|
||||||
|
* Sylvain LE GAL (https://www.twitter.com/legalsylvain)
|
||||||
|
|
||||||
|
Other credits
|
||||||
|
~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
This module is maintained by:
|
||||||
|
* Odoo Community Association
|
||||||
|
|
||||||
|
Maintainers
|
||||||
|
~~~~~~~~~~~
|
||||||
|
|
||||||
|
This module is maintained by the OCA.
|
||||||
|
|
||||||
|
.. image:: https://odoo-community.org/logo.png
|
||||||
|
:alt: Odoo Community Association
|
||||||
|
:target: https://odoo-community.org
|
||||||
|
|
||||||
|
OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||||
|
mission is to support the collaborative development of Odoo features and
|
||||||
|
promote its widespread use.
|
||||||
|
|
||||||
|
This module is part of the `OCA/server-env <https://github.com/OCA/server-env/tree/16.0/server_environment_ir_config_parameter>`_ project on GitHub.
|
||||||
|
|
||||||
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
from . import models
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
# Copyright 2016-2018 ACSONE SA/NV
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
{
|
||||||
|
"name": "Server Environment Ir Config Parameter",
|
||||||
|
"summary": """
|
||||||
|
Override System Parameters from server environment file""",
|
||||||
|
"version": "16.0.1.1.0",
|
||||||
|
"license": "AGPL-3",
|
||||||
|
"author": "ACSONE SA/NV, Odoo Community Association (OCA)",
|
||||||
|
"website": "https://github.com/OCA/server-env",
|
||||||
|
"depends": ["server_environment"],
|
||||||
|
"data": [
|
||||||
|
"views/view_ir_config_parameter.xml",
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,46 @@
|
||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * server_environment_ir_config_parameter
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# Niki Waibel <niki.waibel@gmail.com>, 2017
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2017-06-22 01:12+0000\n"
|
||||||
|
"PO-Revision-Date: 2017-06-22 01:12+0000\n"
|
||||||
|
"Last-Translator: Niki Waibel <niki.waibel@gmail.com>, 2017\n"
|
||||||
|
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
|
||||||
|
"Language: de\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
#. module: server_environment_ir_config_parameter
|
||||||
|
#: model:ir.model.fields,field_description:server_environment_ir_config_parameter.field_ir_config_parameter__is_environment
|
||||||
|
msgid "Defined by environment"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: server_environment_ir_config_parameter
|
||||||
|
#: model:ir.model.fields,help:server_environment_ir_config_parameter.field_ir_config_parameter__is_environment
|
||||||
|
msgid ""
|
||||||
|
"If check, the value in the database will be ignored and alternatively, the "
|
||||||
|
"system will use the key defined in your odoo.cfg environment file."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: server_environment_ir_config_parameter
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/server_environment_ir_config_parameter/models/ir_config_parameter.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Key %s is empty in server_environment_file"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: server_environment_ir_config_parameter
|
||||||
|
#: model:ir.model,name:server_environment_ir_config_parameter.model_ir_config_parameter
|
||||||
|
msgid "System Parameter"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#~ msgid "ir.config_parameter"
|
||||||
|
#~ msgstr "ir.config_parameter"
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * server_environment_ir_config_parameter
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# Pedro M. Baeza <pedro.baeza@gmail.com>, 2017
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2017-06-22 01:12+0000\n"
|
||||||
|
"PO-Revision-Date: 2023-07-25 13:10+0000\n"
|
||||||
|
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
|
||||||
|
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
|
||||||
|
"Language: es\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||||
|
"X-Generator: Weblate 4.17\n"
|
||||||
|
|
||||||
|
#. module: server_environment_ir_config_parameter
|
||||||
|
#: model:ir.model.fields,field_description:server_environment_ir_config_parameter.field_ir_config_parameter__is_environment
|
||||||
|
msgid "Defined by environment"
|
||||||
|
msgstr "Definido por el entorno"
|
||||||
|
|
||||||
|
#. module: server_environment_ir_config_parameter
|
||||||
|
#: model:ir.model.fields,help:server_environment_ir_config_parameter.field_ir_config_parameter__is_environment
|
||||||
|
msgid ""
|
||||||
|
"If check, the value in the database will be ignored and alternatively, the "
|
||||||
|
"system will use the key defined in your odoo.cfg environment file."
|
||||||
|
msgstr ""
|
||||||
|
"Si se marca, el valor en la base de datos será ignorado y alternativamente, "
|
||||||
|
"el sistema utilizará la clave definida en su archivo de entorno odoo.cfg."
|
||||||
|
|
||||||
|
#. module: server_environment_ir_config_parameter
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/server_environment_ir_config_parameter/models/ir_config_parameter.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Key %s is empty in server_environment_file"
|
||||||
|
msgstr "La clave %s está vacía en server_environment_file"
|
||||||
|
|
||||||
|
#. module: server_environment_ir_config_parameter
|
||||||
|
#: model:ir.model,name:server_environment_ir_config_parameter.model_ir_config_parameter
|
||||||
|
msgid "System Parameter"
|
||||||
|
msgstr "Parámetros del sistema"
|
||||||
|
|
||||||
|
#~ msgid "ir.config_parameter"
|
||||||
|
#~ msgstr "ir.config_parameter"
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * server_environment_ir_config_parameter
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# Paolo Valier <paolo.valier@hotmail.it>, 2018
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2018-01-06 02:25+0000\n"
|
||||||
|
"PO-Revision-Date: 2024-01-02 11:39+0000\n"
|
||||||
|
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
|
||||||
|
"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n"
|
||||||
|
"Language: it\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||||
|
"X-Generator: Weblate 4.17\n"
|
||||||
|
|
||||||
|
#. module: server_environment_ir_config_parameter
|
||||||
|
#: model:ir.model.fields,field_description:server_environment_ir_config_parameter.field_ir_config_parameter__is_environment
|
||||||
|
msgid "Defined by environment"
|
||||||
|
msgstr "Definito dall'ambiente"
|
||||||
|
|
||||||
|
#. module: server_environment_ir_config_parameter
|
||||||
|
#: model:ir.model.fields,help:server_environment_ir_config_parameter.field_ir_config_parameter__is_environment
|
||||||
|
msgid ""
|
||||||
|
"If check, the value in the database will be ignored and alternatively, the "
|
||||||
|
"system will use the key defined in your odoo.cfg environment file."
|
||||||
|
msgstr ""
|
||||||
|
"Se selezionata, il valore nel database verrà ignorato e in alternativa il "
|
||||||
|
"sistema utilizzerà la chiave definita nel file ambiente odoo.cfg."
|
||||||
|
|
||||||
|
#. module: server_environment_ir_config_parameter
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/server_environment_ir_config_parameter/models/ir_config_parameter.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Key %s is empty in server_environment_file"
|
||||||
|
msgstr "La chiave %s è vuota in server_environment_file"
|
||||||
|
|
||||||
|
#. module: server_environment_ir_config_parameter
|
||||||
|
#: model:ir.model,name:server_environment_ir_config_parameter.model_ir_config_parameter
|
||||||
|
msgid "System Parameter"
|
||||||
|
msgstr "Parametro di sistema"
|
||||||
|
|
||||||
|
#~ msgid "ir.config_parameter"
|
||||||
|
#~ msgstr "ir.config_parameter"
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue