OdooWiki OCA HUB

Confirm/Alert pop-up before saving

web_create_write_confirm folder_open OCA/web open_in_new
Tools License: AGPL-3

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.

auto_awesome What this module does

AI-generated from the code · Odoo 14.0

Lets developers show a confirmation or alert pop-up before a record is saved in Odoo. Pop-up rules are configured in a new 'Popup message' screen, but a developer must still add the code that triggers them.

This module adds a new configuration screen called Popup message, found under the Settings menu. There, an administrator can create rules that decide which pop-up appears when a record is saved.

For each rule you choose: - the model (the type of record, e.g. a sales order), - the fields to watch, - the type: Confirmation (the user can accept or cancel) or Alert (just an information message), - a title and a message, which can be translated, - and whether the rule is active.

When a user saves a form, Odoo asks the record for matching pop-up rules. A Confirmation pop-up lets the user continue or cancel the save; an Alert pop-up only informs. If several rules match, they are shown one after another. After the user confirms, the module can run a follow-up action defined by the developer.

Important: the module only provides the technical hooks. The code that decides when a pop-up should appear must be written by a developer on the model concerned. Without that code, no pop-up is shown. Regular users can only read the pop-up rules; only administrators can create, edit or delete them.

Depends on

web

Menus it adds

Popup messagePopup message
Models and fields (2)
  • base · extends an existing model
  • popup.message · new modelmodel, title (Title), active (Active), message (Message), model_id (Model), field_ids (Fields), field_name, popup_type (Type)

Text generated by AI (DeepSeek) from reading the Odoo 14.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 1 confirmed, 8 with no information of 9 versions.

terminal Installation and usage

OCA documentation · Odoo 14.0

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()

No verified information in OCA: Installation, Configuration.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.