Skip to content

Conversation

@fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Feb 10, 2025

Current behavior:
As of now, whenever a journal is set to "Hash on Post", the user is granted the secured group rights. This allows the user to see the lock icon in the status bar, the extra default filters in the list views of Journal Entries and Journal Items, and access to the Secure Entries wizard.

However, if only entries from journals with "Hash on Post" are secured, these features are not necessary. The user trusts Odoo to hash any and all entries that are posted in that specific journal.

Expected behavior:
When "Hash on Post" is active, the user does not need any additional user group. However, if even one entry is secured and does not belong to a journal with the "hash on post" feature, the user will then need access to the new features, such as the lock icon, default filters, and the Secure Entries wizard.

Approach:
This commit removes the calls to _activate_group_account_secured() when setting a journal to "Hash on Post". It also removes it from the Secure Entries wizard. Instead, we add the key 'journal_restrict_mode' to the chains_to_hash, which indicates the value of the journal's restrict_mode_hash_table field. If at least one chain with moves does not have 'journal_restrict_mode', only then we call _activate_group_account_secured() from _hash_moves(). This will only happen when the Secure Entries wizard is used, hashing entries from all journals.

task-4348380


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

Forward-Port-Of: #197075
Forward-Port-Of: #196748

Current behavior:
As of now, whenever a journal is set to "Hash on Post", the user is
granted the secured group rights. This allows the user to see the
lock icon in the status bar, the extra default filters in the list
views of Journal Entries and Journal Items, and access to the Secure
Entries wizard.

However, if only entries from journals with "Hash on Post" are secured,
these features are not necessary. The user trusts Odoo to hash any and
all entries that are posted in that specific journal.

Expected behavior:
When "Hash on Post" is active, the user does not need any additional
user group. However, if even one entry is secured and does not belong
to a journal with the "hash on post" feature, the user will then need
access to the new features, such as the lock icon, default filters,
and the Secure Entries wizard.

Approach:
This commit removes the calls to _activate_group_account_secured()
when setting a journal to "Hash on Post". It also removes it from
the Secure Entries wizard. Instead, we add the key
'journal_restrict_mode' to the chains_to_hash, which indicates the
value of the journal's restrict_mode_hash_table field. If at least
one chain with moves does not have 'journal_restrict_mode', only
then we call _activate_group_account_secured() from _hash_moves().
This will only happen when the Secure Entries wizard is used,
hashing entries from all journals.

task-4348380

X-original-commit: f105ee4
@robodoo robodoo added the forwardport This PR was created by @fw-bot label Feb 10, 2025
@robodoo
Copy link
Contributor

robodoo commented Feb 10, 2025

Pull request status dashboard

@fw-bot
Copy link
Contributor Author

fw-bot commented Feb 10, 2025

@mairasalazar @william-andre this PR targets master and is the last of the forward-port chain.

To merge the full chain, use

@robodoo r+

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@william-andre
Copy link
Contributor

@robodoo r+

@C3POdoo C3POdoo added the RD research & development, internal work label Feb 10, 2025
robodoo pushed a commit that referenced this pull request Feb 10, 2025
Current behavior:
As of now, whenever a journal is set to "Hash on Post", the user is
granted the secured group rights. This allows the user to see the
lock icon in the status bar, the extra default filters in the list
views of Journal Entries and Journal Items, and access to the Secure
Entries wizard.

However, if only entries from journals with "Hash on Post" are secured,
these features are not necessary. The user trusts Odoo to hash any and
all entries that are posted in that specific journal.

Expected behavior:
When "Hash on Post" is active, the user does not need any additional
user group. However, if even one entry is secured and does not belong
to a journal with the "hash on post" feature, the user will then need
access to the new features, such as the lock icon, default filters,
and the Secure Entries wizard.

Approach:
This commit removes the calls to _activate_group_account_secured()
when setting a journal to "Hash on Post". It also removes it from
the Secure Entries wizard. Instead, we add the key
'journal_restrict_mode' to the chains_to_hash, which indicates the
value of the journal's restrict_mode_hash_table field. If at least
one chain with moves does not have 'journal_restrict_mode', only
then we call _activate_group_account_secured() from _hash_moves().
This will only happen when the Secure Entries wizard is used,
hashing entries from all journals.

task-4348380

closes #197165

X-original-commit: f105ee4
Signed-off-by: Maira Salazar <srma@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
@robodoo robodoo added the 18.2 label Feb 10, 2025
@robodoo robodoo closed this Feb 10, 2025
@fw-bot fw-bot deleted the master-18.0-secured-entries-srma-415074-fw branch February 24, 2025 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

18.2 forwardport This PR was created by @fw-bot RD research & development, internal work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants