odoo/packs/odoo.v18/base/main_menu/models/menu_bookmark.py

14 lines
485 B
Python
Raw Normal View History

from odoo import fields, models
class MenuBookmark(models.Model):
_name = 'menu.bookmark'
_description = 'Bookmark'
_order = 'sequence, name'
name = fields.Char(required=True)
url = fields.Char(string='URL', required=True)
target = fields.Selection([('_self', 'Current Tab'), ('_blank', 'New Tab')], default='_self', required=True)
user_id = fields.Many2one('res.users', default=lambda self: self.env.user, required=True)
sequence = fields.Integer()