[IMP] removing some FP Note
bzr revid: fp@tinyerp.com-20120822083608-2q98p1758erm8f7t
This commit is contained in:
parent
6c109e7d7e
commit
2f9f57cc46
|
@ -105,8 +105,6 @@ class mail_group(osv.Model):
|
|||
'alias_domain': False, # always hide alias during creation
|
||||
}
|
||||
|
||||
# FP Note: code to be improved. Check we have a code for res.users
|
||||
# when we give them a new group.
|
||||
def _subscribe_users(self, cr, uid, ids, context=None):
|
||||
for mail_group in self.browse(cr, uid, ids, context=context):
|
||||
partner_ids = []
|
||||
|
|
|
@ -19,22 +19,16 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
# FP Note: can we remove some dependencies ? Use lint
|
||||
|
||||
import base64
|
||||
import dateutil.parser
|
||||
import email
|
||||
import logging
|
||||
import re
|
||||
import time
|
||||
import datetime
|
||||
from email.header import decode_header
|
||||
from email.message import Message
|
||||
|
||||
from osv import osv
|
||||
from osv import fields
|
||||
import pytz
|
||||
from tools import DEFAULT_SERVER_DATETIME_FORMAT
|
||||
import tools
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
|
|
@ -638,8 +638,6 @@ class mail_thread(osv.Model):
|
|||
# Thread_state
|
||||
#------------------------------------------------------
|
||||
|
||||
# FP Note: this should be a invert function on message_unread field
|
||||
# not sure because if not readonly, it may often write to this field?
|
||||
def message_mark_as_unread(self, cr, uid, ids, context=None):
|
||||
""" Set as read. """
|
||||
notobj = self.pool.get('mail.notification')
|
||||
|
|
|
@ -137,7 +137,7 @@ class res_users_mail_group(osv.Model):
|
|||
_name = 'res.users'
|
||||
_inherit = ['res.users']
|
||||
|
||||
# FP Note: to improve
|
||||
# FP Note: to improve, post processing may be better ?
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
write_res = super(res_users_mail_group, self).write(cr, uid, ids, vals, context=context)
|
||||
if vals.get('groups_id'):
|
||||
|
@ -158,7 +158,7 @@ class res_groups_mail_group(osv.Model):
|
|||
_name = 'res.groups'
|
||||
_inherit = 'res.groups'
|
||||
|
||||
# FP Note: to improve
|
||||
# FP Note: to improve, post processeing, after the super may be better
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
if vals.get('users'):
|
||||
# form: {'group_ids': [(3, 10), (3, 3), (4, 10), (4, 3)]} or {'group_ids': [(6, 0, [ids]}
|
||||
|
|
|
@ -28,12 +28,6 @@ from osv import fields
|
|||
from tools.safe_eval import safe_eval as eval
|
||||
from tools.translate import _
|
||||
|
||||
# FP Note: refactor in tools ?
|
||||
def mail_tools_to_email(text):
|
||||
"""Return a list of the email addresses found in ``text``"""
|
||||
if not text: return []
|
||||
return re.findall(r'([^ ,<@]+@[^> ,]+)', text)
|
||||
|
||||
# main mako-like expression pattern
|
||||
EXPRESSION_PATTERN = re.compile('(\$\{.+?\})')
|
||||
|
||||
|
|
Loading…
Reference in New Issue