[IMP] web_create_write_confirm: fix JS, usage. Minor refactoring.

This commit is contained in:
Ilyas
2023-07-27 12:14:14 +02:00
parent 9582e11639
commit a9f22438ca
6 changed files with 15 additions and 16 deletions

View File

@@ -6,10 +6,9 @@ from odoo import models
class BaseModel(models.AbstractModel):
_inherit = "base"
def get_message_informations(self, values=False):
def get_popup_message_info(self, values=False):
"""
This function gives us the possibility to know
if we display the message or not
Retrieve popup messages' data.
- In create self is empty
- In write self is not empty contains current ID
:param values:
@@ -22,7 +21,7 @@ class BaseModel(models.AbstractModel):
"""
return False
def execute_processing(self, values=False):
def process_popup_message(self, values=False):
"""
This function gives us the possibility to execute a
specific treatment after the confirmation of the message

View File

@@ -20,8 +20,8 @@ class PopupMessage(models.Model):
default="confirm",
selection=[("confirm", "Confirmation"), ("alert", "Alert")],
)
title = fields.Char(string="Title")
message = fields.Text(string="Message", required=True)
title = fields.Char(string="Title", translate=True)
message = fields.Text(string="Message", required=True, translate=True)
active = fields.Boolean(string="Active", default=True)
@api.depends("field_ids")