Files
odoo_source/addons/digest/models/digest_tip.py
T
Thibault Delavallée b1037eb2d1 [IMP] digest, various: add name on tips to ease their understanding
PURPOSE

Ease edition of digest tips by adding a name.

SPECIFICATIONS

Add a name on digest tips. Even if technical and not send to customers it
allows to see them at a glance in list view without having to guess their
content.

LINKS

Task ID 2214325
Com PR odoo/odoo#47416

Related: odoo/upgrade#933
Related: odoo/enterprise#9167
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-11 16:24:32 +00:00

23 lines
831 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
from odoo.tools.translate import html_translate
class DigestTip(models.Model):
_name = 'digest.tip'
_description = 'Digest Tips'
_order = 'sequence'
sequence = fields.Integer(
'Sequence', default=1,
help='Used to display digest tip in email template base on order')
name = fields.Char('Name', translate=True)
user_ids = fields.Many2many(
'res.users', string='Recipients',
help='Users having already received this tip')
tip_description = fields.Html('Tip description', translate=html_translate)
group_id = fields.Many2one(
'res.groups', string='Authorized Group',
default=lambda self: self.env.ref('base.group_user'))