mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[IMP] web_widget_x2many_2d_matrix_example: add field_label_x_axis / field_label_y_axis features in tests module
This commit is contained in:
13
web_widget_x2many_2d_matrix_example/models/res_users.py
Normal file
13
web_widget_x2many_2d_matrix_example/models/res_users.py
Normal file
@@ -0,0 +1,13 @@
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
from odoo import models, api, fields
|
||||
|
||||
|
||||
class ResUsers(models.Model):
|
||||
_inherit = 'res.users'
|
||||
|
||||
matrix_display_name = fields.Char(compute="_compute_matrix_display_name")
|
||||
|
||||
@api.depends("name", "email")
|
||||
def _compute_matrix_display_name(self):
|
||||
for user in self:
|
||||
user.matrix_display_name = "%s (%s)" % (user.name, user.email)
|
||||
Reference in New Issue
Block a user