[IMP] mail: tests: add a new simple base model for testing
Purpose: have simple test models to use in various modules and be independent from standard models behavior / tweaking.
This commit is contained in:
committed by
Yannick Tivisse
parent
af2620a443
commit
0296f198b2
@@ -35,6 +35,7 @@ access_mail_shortcode,mail.shortcode,model_mail_shortcode,base.group_user,1,1,1,
|
||||
access_mail_shortcode_portal,mail.shortcode.portal,model_mail_shortcode,base.group_portal,1,0,0,0
|
||||
access_mail_test_user,mail.test.all,model_mail_test,base.group_user,1,1,1,1
|
||||
access_mail_test_portal,mail.test.all,model_mail_test,base.group_portal,1,1,0,0
|
||||
access_mail_test_simple,mail.test.simple.all,model_mail_test_simple,base.group_user,1,1,1,1
|
||||
access_mail_activity_all,mail.activity.all,model_mail_activity,,1,0,0,0
|
||||
access_mail_activity_user,mail.activity.user,model_mail_activity,base.group_user,1,1,1,1
|
||||
access_mail_activity_type_all,mail.activity.type.all,model_mail_activity_type,,1,0,0,0
|
||||
|
||||
|
@@ -1,16 +1,23 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import api, fields, models
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class MailTestSimple(models.Model):
|
||||
_description = 'Test Simple Chatter Record'
|
||||
_name = 'mail.test.simple'
|
||||
_inherit = ['mail.thread']
|
||||
|
||||
name = fields.Char()
|
||||
email_from = fields.Char()
|
||||
description = fields.Text()
|
||||
|
||||
|
||||
class MailTest(models.Model):
|
||||
""" A mail.channel is a discussion group that may behave like a listener
|
||||
on documents. """
|
||||
_description = 'Test Mail Model'
|
||||
_name = 'mail.test'
|
||||
_mail_post_access = 'read'
|
||||
# _mail_flat_thread = False
|
||||
_inherit = ['mail.thread', 'mail.alias.mixin']
|
||||
|
||||
name = fields.Char()
|
||||
|
||||
Reference in New Issue
Block a user