[IMP] account_advanced_protection_features: remove group group_account_super_user and create group_account_protection_manager which gives access to protection features

This commit is contained in:
2025-08-22 10:25:31 +02:00
parent 0785c49c96
commit 581589afc8
7 changed files with 29 additions and 17 deletions

View File

@@ -21,6 +21,7 @@
},
# always loaded
"data": [
"security/res_groups.xml",
"views/account_journal_views.xml"
],
# only loaded in demonstration mode

View File

@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-08-21 16:39+0000\n"
"PO-Revision-Date: 2025-08-21 16:39+0000\n"
"POT-Creation-Date: 2025-08-22 08:18+0000\n"
"PO-Revision-Date: 2025-08-22 08:18+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -15,6 +15,21 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: account_advanced_protection_features
#: model:res.groups,name:account_advanced_protection_features.group_account_advanced_manager
msgid "Access to account advanced protection features"
msgstr "Accès aux fonctionnalités avancées de protection des journaux"
#. module: account_advanced_protection_features
#: model:ir.model.fields,field_description:account_advanced_protection_features.field_account_journal__allow_bank_statement_deletion
msgid "Allow bank statement deletion"
msgstr "Autoriser la suppression de relevé bancaire"
#. module: account_advanced_protection_features
#: model:ir.model,name:account_advanced_protection_features.model_account_bank_statement
msgid "Bank Statement"
msgstr "Relevé bancaire"
#. module: account_advanced_protection_features
#: model:ir.model,name:account_advanced_protection_features.model_account_journal
msgid "Journal"
@@ -43,6 +58,7 @@ msgid "Sent By Email"
msgstr "Envoyée par email"
#. module: account_advanced_protection_features
#: model:ir.model.fields,field_description:account_advanced_protection_features.field_account_bank_statement__smart_search
#: model:ir.model.fields,field_description:account_advanced_protection_features.field_account_journal__smart_search
#: model:ir.model.fields,field_description:account_advanced_protection_features.field_account_move__smart_search
msgid "Smart Search"

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="group_account_protection_manager" model="res.groups">
<field name="name">Access to account advanced protection features</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
</odoo>

View File

@@ -8,13 +8,16 @@
<xpath expr="//field[@name='restrict_mode_hash_table']" position="after">
<field
name="prevent_deletion_of_posted_account_move"
groups="account_advanced_protection_features.group_account_protection_manager"
/>
<field
name="prevent_reset_to_draft_sent_invoice"
groups="account_advanced_protection_features.group_account_protection_manager"
attrs="{'invisible': [('type', '!=', 'sale')]}"
/>
<field
name="allow_bank_statement_deletion"
groups="account_advanced_protection_features.group_account_protection_manager"
attrs="{'invisible': [('type', 'not in', ['bank', 'cash'])]}"
/>
</xpath>

View File

@@ -14,8 +14,6 @@
'account_statement_base',
],
'data': [
'security/res_groups.xml',
'security/ir.model.access.csv',
'views/account_search.xml',
'views/account_tree_view.xml',
'views/bank_statement_line_views.xml',

View File

@@ -1,5 +0,0 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
account.access_account_bank_statement,account.bank.statement,account.model_account_bank_statement,account.group_account_user,1,1,1,0
account.access_account_bank_statement_line,account.bank.statement.line,account.model_account_bank_statement_line,account.group_account_user,1,1,1,0
access_account_bank_statement,account.bank.statement,account.model_account_bank_statement,group_account_super_user,1,1,1,1
access_account_bank_statement_line,account.bank.statement.line,account.model_account_bank_statement_line,group_account_super_user,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 account.access_account_bank_statement account.bank.statement account.model_account_bank_statement account.group_account_user 1 1 1 0
3 account.access_account_bank_statement_line account.bank.statement.line account.model_account_bank_statement_line account.group_account_user 1 1 1 0
4 access_account_bank_statement account.bank.statement account.model_account_bank_statement group_account_super_user 1 1 1 1
5 access_account_bank_statement_line account.bank.statement.line account.model_account_bank_statement_line group_account_super_user 1 1 1 1

View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="group_account_super_user" model="res.groups">
<field name="name">Right to delete bank statement and bank statement lines
</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
</odoo>