[IMP] account_advanced_protection_features : apply changes proposed by pre-commit

This commit is contained in:
2025-10-07 17:19:57 +02:00
parent 95dc32803f
commit e45ad867c0
9 changed files with 72 additions and 52 deletions

View File

@@ -1,24 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="view_account_journal_form_inherit_prevent_reset_to_draft" model="ir.ui.view">
<record
id="view_account_journal_form_inherit_prevent_reset_to_draft"
model="ir.ui.view"
>
<field name="name">account.journal.form</field>
<field name="model">account.journal</field>
<field name="inherit_id" ref="account.view_account_journal_form"/>
<field name="inherit_id" ref="account.view_account_journal_form" />
<field name="arch" type="xml">
<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"
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')]}"
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'])]}"
name="allow_bank_statement_deletion"
groups="account_advanced_protection_features.group_account_protection_manager"
attrs="{'invisible': [('type', 'not in', ['bank', 'cash'])]}"
/>
</xpath>
</field>