mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[IMP] display a helper to add a tooltip on a field. Display the tooltip on list views. One tooltip per field and do not handle user specific tooltips
This commit is contained in:
19
web_field_tooltip/models/ir_http.py
Normal file
19
web_field_tooltip/models/ir_http.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# Copyright 2023 ACSONE SA/NV
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import models
|
||||
|
||||
|
||||
class Http(models.AbstractModel):
|
||||
_inherit = "ir.http"
|
||||
|
||||
def session_info(self):
|
||||
result = super().session_info()
|
||||
user = self.env.user
|
||||
result.update(
|
||||
{
|
||||
"can_manage_tooltips": user._is_tooltip_manager(),
|
||||
"tooltip_show_add_helper": user.tooltip_show_add_helper,
|
||||
}
|
||||
)
|
||||
return result
|
||||
Reference in New Issue
Block a user