Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions data_encryption/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,19 @@ 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())'.
You can generate keys with
``python -c 'from cryptography.fernet import Fernet; print(Fernet.generate_key())'``.

At the moment (November 2026), odoo pins the cryptography dependency to:

::

# https://github.com/odoo/odoo/blob/18.0/requirements.txt
cryptography==3.4.8; python_version < '3.12' # incompatibility between pyopenssl 19.0.0 and cryptography>=37.0.0
cryptography==42.0.8 ; python_version >= '3.12' # (Noble) min 41.0.7, pinning 42.0.8 for security fixes

``cryptography==50.0.0`` works with odoo on python3.12
``cryptography==50.0.0`` does not work with odoo on python3.11

Known issues / Roadmap
======================
Expand Down
8 changes: 1 addition & 7 deletions data_encryption/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,7 @@
"license": "AGPL-3",
"application": False,
"installable": True,
"external_dependencies": {
# Use the same pin as Odoo to avoid compatibility issues
"python": [
"cryptography==3.4.8; python_version < '3.12'",
"cryptography==42.0.8 ; python_version >= '3.12'",
]
},
"external_dependencies": {"python": ["cryptography"]},
"depends": ["base"],
"data": ["security/ir.model.access.csv"],
}
15 changes: 13 additions & 2 deletions data_encryption/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,16 @@ 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())'.
You can generate keys with `python -c 'from cryptography.fernet import
Fernet; print(Fernet.generate_key())'`.


At the moment (November 2026), odoo pins the cryptography dependency to:
```
# https://github.com/odoo/odoo/blob/18.0/requirements.txt
cryptography==3.4.8; python_version < '3.12' # incompatibility between pyopenssl 19.0.0 and cryptography>=37.0.0
cryptography==42.0.8 ; python_version >= '3.12' # (Noble) min 41.0.7, pinning 42.0.8 for security fixes
```

`cryptography==50.0.0` works with odoo on python3.12
`cryptography==50.0.0` does not work with odoo on python3.11
12 changes: 10 additions & 2 deletions data_encryption/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,16 @@ <h2><a class="toc-backref" href="#toc-entry-1">Configuration</a></h2>
<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>
<p>You can generate keys with
<tt class="docutils literal">python <span class="pre">-c</span> 'from cryptography.fernet import Fernet; <span class="pre">print(Fernet.generate_key())'</span></tt>.</p>
<p>At the moment (November 2026), odoo pins the cryptography dependency to:</p>
<pre class="literal-block">
# https://github.com/odoo/odoo/blob/18.0/requirements.txt
cryptography==3.4.8; python_version &lt; '3.12' # incompatibility between pyopenssl 19.0.0 and cryptography&gt;=37.0.0
cryptography==42.0.8 ; python_version &gt;= '3.12' # (Noble) min 41.0.7, pinning 42.0.8 for security fixes
</pre>
<p><tt class="docutils literal"><span class="pre">cryptography==50.0.0</span></tt> works with odoo on python3.12
<tt class="docutils literal"><span class="pre">cryptography==50.0.0</span></tt> does not work with odoo on python3.11</p>
</div>
<div class="section" id="known-issues-roadmap">
<h2><a class="toc-backref" href="#toc-entry-2">Known issues / Roadmap</a></h2>
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# generated from manifests external_dependencies
cryptography==3.4.8; python_version < '3.12'
cryptography==42.0.8 ; python_version >= '3.12'
cryptography
3 changes: 3 additions & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
odoo-test-helper
# pin cryptography to same version as odoo (nov 26)
cryptography==3.4.8; python_version < '3.12'
cryptography==42.0.8 ; python_version >= '3.12'