| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 290 |
| Technical Name |
universal_action_confirm |
| Versions | 17.0 18.0 |
Universal Action Confirmation | 通用操作确认模块
防止意外数据丢失,提升数据安全性和用户体验。不仅是基础的确认功能,更是完整的数据保护解决方案。
Prevent accidental data loss, enhance data security and user experience. More than just basic confirmation features, this is a complete data protection solution.
核心功能 | Key Features
删除确认 | Delete Confirmation
防止意外删除重要记录,通过确认对话框确保用户有意执行删除操作。提升数据安全性。
Prevent accidental deletion of important records through confirmation dialog, ensuring users intentionally execute delete operations. Enhance data security.
复制确认 | Copy Confirmation
确保用户有意复制记录,通过确认对话框避免误操作。提升数据处理准确性。
Ensure users intentionally duplicate records through confirmation dialog, avoiding misoperations. Improve data processing accuracy.
列表视图集成 | List View Integration
自动在列表视图中添加复制按钮,与删除按钮并列显示,用户操作直观便捷。使用 Odoo Web Library (OWL) 和补丁机制实现。
Automatically add copy buttons in list views, positioned next to delete buttons for intuitive and convenient user operations. Implemented using Odoo Web Library (OWL) and patching mechanisms.
高级特性 | Advanced Features
Mixin 架构 | Mixin Architecture
简单的单行继承即可为任意模型添加确认功能,无需复杂配置。轻松集成到现有模块。
Simple one-line inheritance adds confirmation functionality to any model without complex configuration. Easy integration into existing modules.
上下文控制 | Context Control
通过上下文标志可跳过确认,适用于自动化流程或程序化操作。保持系统灵活性。
Skip confirmation through context flags for automated processes or programmatic operations. Maintain system flexibility.
开发者友好 | Developer Friendly
完整的API和测试套件,遵循Odoo开发最佳实践。便于二次开发和定制化。
Complete API and test suite, following Odoo development best practices. Facilitate secondary development and customization.
技术特性 | Technical Features
OWL 组件架构 | OWL Component Architecture
使用现代 Odoo Web Library (OWL) 架构,实现动态列表视图增强。组件化设计便于维护和扩展。
Using modern Odoo Web Library (OWL) architecture for dynamic list view enhancement. Component-based design for easy maintenance and extension.
智能补丁机制 | Smart Patching Mechanism
通过补丁机制扩展 ListRenderer 和 ListController,无需修改核心代码。动态添加复制按钮到现有视图。
Extending ListRenderer and ListController via patching mechanism without modifying core code. Dynamically adding copy buttons to existing views.
Mutation Observer 支持 | Mutation Observer Support
使用 Mutation Observer 监听动态添加的行,确保新添加的行也包含复制按钮。实时响应界面变化。
Using Mutation Observer to listen for dynamically added rows, ensuring new rows also contain copy buttons. Real-time response to UI changes.
上下文感知 | Context Awareness
智能判断只读上下文、可用操作等,确保复制按钮在适当的情况下显示。提供安全的用户体验。
Intelligently detects read-only contexts, available actions, etc., ensuring copy buttons are displayed appropriately. Providing a secure user experience.
应用场景 | Use Cases
客户数据保护 | Customer Data Protection
防止误删除客户记录,在删除前显示确认对话框,保护重要的客户资料。
Prevent accidental deletion of customer records, display confirmation dialog before deletion, protect important customer data.
销售订单安全 | Sales Order Security
对重要的销售订单删除操作进行确认,避免因误操作导致的业务损失。
Confirm important sales order deletion operations to avoid business losses caused by misoperations.
快速记录复制 | Quick Record Duplication
在列表视图中快速复制记录,减少重复数据录入时间,提高工作效率。
Quickly duplicate records in list view, reduce time for repeated data entry, improve work efficiency.
数据治理 | Data Governance
通过确认机制建立数据治理流程,确保数据操作的规范性和可追溯性。
Establish data governance processes through confirmation mechanisms, ensuring the standardization and traceability of data operations.
快速集成 | Quick Integration
# 在您的模型中添加继承
from odoo import models, fields
class YourModel(models.Model):
_name = 'your.model'
_inherit = ['confirmation.mixin'] # 集成确认功能
name = fields.Char(string='Name', required=True)
description = fields.Text(string='Description')
仅需在模型中继承 confirmation.mixin 即可获得完整的确认功能
Simply inherit from confirmation.mixin in your model to get complete confirmation functionality
技术支持 | Technical Support
联系我们 | Contact Us
如需定制开发或技术支持,请联系我们
Please contact us for customization or technical support
Please log in to comment on this module