Moved subscription model from mail_group to mail_subscription file

bzr revid: tde@openerp.com-20120201164902-ensm98a517vdz9nb
This commit is contained in:
Thibault Delavallée 2012-02-01 17:49:02 +01:00
parent 58f68b3ec2
commit fe065c137d
5 changed files with 50 additions and 24 deletions

View File

@ -22,6 +22,7 @@
import mail_message
import mail_thread
import mail_group
import mail_subscription
import res_partner
import wizard

View File

@ -59,6 +59,7 @@ The main features are:
"wizard/mail_compose_message_view.xml",
"mail_message_view.xml",
"mail_group_view.xml",
"mail_subscription_view.xml",
"mail_thread_view.xml",
"res_partner_view.xml",
'security/ir.model.access.csv',

View File

@ -124,27 +124,3 @@ class mail_group(osv.osv):
mail_group()
class mail_subscription(osv.osv):
"""
mail_subscription holds the data related to the follow mechanism inside OpenERP.
A subscription can be of following:
- res_model: model of the followed objects
- res_id: ID of resource OR
- res_domain: a domain filtering followed objects
"""
_name = 'mail.subscription'
_rec_name = 'id'
_columns = {
'res_model': fields.char('Related Document model', size=128, select=1),
'res_id': fields.integer('Related Document ID', select=1),
'res_domain': fields.char('res_domain', size=256),
'user_id': fields.integer('Related User ID', select=1),
}
_defaults = {
}
mail_subscription()

View File

@ -0,0 +1,48 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010-2011 OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>
#
##############################################################################
import tools
from osv import osv
from osv import fields
from tools.translate import _
class mail_subscription(osv.osv):
"""
mail_subscription holds the data related to the follow mechanism inside OpenERP.
A subscription can be of following:
- res_model: model of the followed objects
- res_id: ID of resource OR
- res_domain: a domain filtering followed objects
"""
_name = 'mail.subscription'
_rec_name = 'id'
_columns = {
'res_model': fields.char('Related Document model', size=128, select=1),
'res_id': fields.integer('Related Document ID', select=1),
'res_domain': fields.char('res_domain', size=256),
'user_id': fields.integer('Related User ID', select=1),
}
_defaults = {
}
mail_subscription()

View File