From e739b47980ac411bb920d9af30f128e7fbb15b90 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20-=20Le=20Filament?= <remi@le-filament.com>
Date: Tue, 5 Sep 2023 14:06:40 +0200
Subject: [PATCH] [FIX] replace deprecated password management

---
 README.md              | 3 ++-
 templates/odoo.conf.j2 | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 3c798bf..e8eaafb 100644
--- a/README.md
+++ b/README.md
@@ -17,7 +17,8 @@ This role is taking advantage of [Le Filament Odoo Docker image](https://hub.doc
 Requirements
 ------------
 
-None
+This role requires Ansible collection community.docker
+Also, this role requires passlib (either python package or python3-passlib apt package) for proper encryption of passwords and specific filter as per https://sources.le-filament.com/-/snippets/3.
 
 Role Variables
 --------------
diff --git a/templates/odoo.conf.j2 b/templates/odoo.conf.j2
index 7d4b02b..0caa36f 100644
--- a/templates/odoo.conf.j2
+++ b/templates/odoo.conf.j2
@@ -1,7 +1,7 @@
 [options]
 ;; COMMON OPTIONS
 addons_path = /opt/odoo/odoo/addons,/opt/odoo/additional_addons,/opt/odoo/private_addons
-admin_passwd = {{ odoo_instances[item.value.prod_instance | default(item.key )].master_pass | password_hash('pbkdf2_sha512', 65534 | random(seed=inventory_hostname) | string) }}
+admin_passwd = {{ odoo_instances[item.value.prod_instance | default(item.key )].master_pass | pbkdf2_passwd(65534 | random(seed=inventory_hostname) | string) }}
 data_dir = /opt/odoo/data
 {% if instance_odoo_setup.odoo_version == '12.0' or instance_odoo_setup.odoo_version == '14.0' or instance_odoo_setup.odoo_version == '16.0' %}
 server_wide_modules = base,web,module_change_auto_install{% if item.value.odoo_server_wide_modules is defined %},{{ item.value.odoo_server_wide_modules }}{% endif %}
-- 
GitLab