Skip to content

[20.0][MIG] vault: Migration to 20.0 - #1055

Open
CarlosRoca13 wants to merge 49 commits into
OCA:20.0from
Tecnativa:20.0-mig-vault
Open

CarlosRoca13 wants to merge 49 commits into
OCA:20.0from
Tecnativa:20.0-mig-vault

Conversation

@CarlosRoca13

Copy link
Copy Markdown

fkantelberg and others added 30 commits October 29, 2026 12:32
Fix website in manifest

Run pre-commit

Move models to own files. Apply OCA conventions

Remove logging causing the tests to fail

Add application icon

Split models into files. Use lambda for defaults

Add icon to menuitem

Use lambda as suggested

Add missing keepass lib

Show information if user lacks public key

Add note about no https

Fix domain for user_id in send wizard. Add permanent note to wizard
…lect all possible users due to access rights - Disable the features if browser isn't using a secure context (https/localhost) - Load required assets in inbox and share frontends - Allow the user to switch a parent of an entry within the same vault - Allow to create entries for vaults using the main menu Entries - Fix bug that encrypted a share twice due to multiple extension with VaultAbstract - Fix a bug on share create that throws a warning about changed values
…changed

Note about disaster recovery project

Add missing dependency to base_setup for res.config.settings view
Before the path if we create a new child entry from other entry, the
complte_name of the entry is not changing when we save the new entry.

Doing this changes, we are getting the complete_name correctly.

TT38729
vault: Searchpanel improvements:

- Add a domain to only show records with children.
- Set limit to False.

TT38731

vault: Add Vaults to searchpanel view. TT38731
… Re-encrypt vaults if the user changes the private key - Recompute access. Unittests
With the changes introduced on odoo/odoo@a251b14#diff-99de14b6e0a411718ac3adaaf779395155841c7ca9d95fa258369656dae63d18
the tests of vault and vault_share are failing.
…th more than 2 defined rigths.

Before the patch, an error would occur when clicking on OK after warning about key re-encryption. This is because the public_key field of user rights other than the one initiating the deletion is not available.

After the patch, the public_key field is computed, and therefore, when re-encrypting, the error no longer occurs.
…for vault.entry

vault: Ensure that the keys are loaded before blocking UI

vault: Button to verify and re-encrypt a vault. Right deletion only flags the vault. Unittests
Currently translated at 96.3% (184 of 191 strings)

Translation: server-auth-15.0/server-auth-15.0-vault
Translate-URL: https://translation.odoo-community.org/projects/server-auth-15-0/server-auth-15-0-vault/es/
Currently translated at 100.0% (197 of 197 strings)

Translation: server-auth-15.0/server-auth-15.0-vault
Translate-URL: https://translation.odoo-community.org/projects/server-auth-15-0/server-auth-15-0-vault/es/
…d. Improve readme documentation about this requirement
Currently translated at 99.5% (202 of 203 strings)

Translation: server-auth-16.0/server-auth-16.0-vault
Translate-URL: https://translation.odoo-community.org/projects/server-auth-16-0/server-auth-16-0-vault/it/
Currently translated at 100.0% (203 of 203 strings)

Translation: server-auth-16.0/server-auth-16.0-vault
Translate-URL: https://translation.odoo-community.org/projects/server-auth-16-0/server-auth-16-0-vault/es/
When a field has assigned a value and we try to change it by
using the secrets generator, the new value is not saved. It is
happening because the click event on wizard buttons is propagated
and this trigger the bus event RELATIONAL_MODEL:NEED_LOCAL_CHANGES.

By doing this changes the value generated is assigned to the field
without loosing the focus. So the value is saved.

Steps to reproduce the problem:

1. Create a Vault
2. Create an Entry for the Vault
3. Create a Field for the Entry
4. Assign a value
5. Edit the value using the button to generate secrets
6. Save the new secret

You will see that the value salected on wizard is
not saved.

TT49554
Before this changes, when the password was required
some other click events can be thrown.

To reproduce this problem:

1. Create a vault with an entry and a field
2. Clean session coockies
3. Without entering the private key, go to try change the field value
4. Set the private key and press enter

The system will ask for the private key once again.
Up until now, when a field was decrypted, making a change would cause
it to be lost, which could confuse the user. After fixing this, it
happened that discarding the changes made it seem like the change had
not been discarded.

The measure that has been taken is to, upon discarding, do as saving
does: hide the value of the field, and the change remains in the input
as long as it is not saved, discarded, or hidden.
CarlosRoca13 and others added 19 commits October 29, 2026 12:32
Before this changes, the list view does not allow to see the buttons to interact with the secret.

With this changes, is added a kanban view where we can press the buttons to interact with the secret
Before this changes, the list view does not allow to see the buttons to interact with the secret.

With this changes, is added a kanban view where we can press the buttons to interact with the secret
Before this changes when a user clicks on reencrypt button of a vault, an error is thrown.

With this changes, the problem does not occur anymore, and it works normally.
Currently translated at 100.0% (206 of 206 strings)

Translation: server-auth-18.0/server-auth-18.0-vault
Translate-URL: https://translation.odoo-community.org/projects/server-auth-18-0/server-auth-18-0-vault/it/
Right now the data of a bynary field is not saving the real value but is saving the size of the file. So we were trying to decrypt a string like "300 kB".

With this changes, we get the crypted value from the db so it will be decrypted correctly.
_ensure_keys() threw 'Failed to import keys from database' for a
first-time user with no key pair yet (e.g. opening the vault module and
pressing New then Save). It now generates a new key pair when none exist
in the database, matching the fallback already present in
_initialize_keys(). A genuine import failure with existing keys still
raises the error. Added a QUnit test covering the first-usage flow.
When sharing a vault, the user search dialog offered a 'New' button to
create a new user. This does not make sense because the target user must
first manually create a key in their own profile before a vault can be
shared with them.
The /vault/inbox/<token> route renders the vault.inbox template which
calls web.login_layout. When the website module is installed it overrides
web.login_layout to render website.layout, which requires the 'website'
value in the render context. That value is only injected when the request
is flagged as a frontend request (request.is_frontend), which in turn is
derived from the route's website=True flag. Without it, rendering the
shared-secret page crashed with KeyError: 'website'.
A batched create() results in several records and the guard
accessed the non-stored related field allowed_share on the whole set,
triggering ensure_one() -> 'Expected singleton: vault.right(...)'.
…fault

Add two search filters on vault.entry: "With Content" (has at least
one field or file) and "Without Content" (pure tree/organizational
entries, neither field nor file of their own).

"With Content" is active by default wherever entries are listed
(vault's own "Entries" smart button, and the global "All Entries"
menu), so purely organizational entries no longer clutter the list
by default; "Without Content" lets a user isolate them when needed.

Assisted-by: Claude Sonnet 5
Currently translated at 100.0% (207 of 207 strings)

Translation: server-auth-18.0/server-auth-18.0-vault
Translate-URL: https://translation.odoo-community.org/projects/server-auth-18-0/server-auth-18-0-vault/it/
@oca-cla-bot

oca-cla-bot Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

The following commit authors need to sign the Contributor License Agreement:

CLA not signed

@pedrobaeza

Copy link
Copy Markdown
Member

/ocabot migration vault

@OCA-git-bot OCA-git-bot added this to the 20.0 milestone Oct 29, 2026
@OCA-git-bot OCA-git-bot mentioned this pull request Oct 29, 2026
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants