Confirm/Alert pop-up before saving
Project description
This module provides feature to create custom confirmation or alert dialog when user creates or writes record. Module includes only methods that you can use in your code. That means programming is always required. See usage section for more information.
Table of contents
Usage
Create popup.message record. Specify model_id, field_ids (which fields will trigger alert) and other fields. Put you code into get_message_informations or execute_processing method of you model. Return dict (perform read() to get it). Here is some examples how you can use this module features in your code.
Confirm res.partner change:
msg = self.env['popup.message'].create(
{
'model_id': self.env['ir.model']._get_id('res.partner')
'field_ids': [(6, 0, self.env['ir.model.fields'].search([('model', '=', 'res.partner')]).ids)],
'popup_type': 'confirm',
'title': 'Warning',
'message': 'Are you sure want to update record?',
}
)
return msg.read()
Sale order alert:
msg = self.env['popup.message'].create(
{
'model_id': self.env['ir.model']._get_id('sale.order'),
'field_ids': [(6, 0, self.env['ir.model.fields'].search([('model', '=', 'sale.order')]).ids)],
'popup_type': 'alert',
'title': 'Attention',
'message': 'Sale order was updated.',
}
)
return msg.read()
Bug Tracker
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.
Do not contact contributors directly about support or help with technical issues.
Credits
Contributors
-
Ilyas <irazor147@gmail.com>
Maintainers
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
Current maintainer:
This module is part of the OCA/web project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file odoo14_addon_web_create_write_confirm-14.0.1.2.0-py3-none-any.whl
.
File metadata
- Download URL: odoo14_addon_web_create_write_confirm-14.0.1.2.0-py3-none-any.whl
- Upload date:
- Size: 28.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10879d1a4473a6dacd88b23c46cfb735b7d41339aa100137c70803be003b2561 |
|
MD5 | 3d87c1b7c4d1c9749cdc34ffdc82b43c |
|
BLAKE2b-256 | 8bc024dc99f91ef540fc17c525bb7b79eddddf1b14b1ef3a5725f6b035897095 |