[IMP] required=true on alias_id field and create alias_force_id field.
bzr revid: bth@tinyerp.com-20120821105513-lq4am6na04rjqncc
This commit is contained in:
parent
f313d35c85
commit
f444fe0876
|
@ -54,10 +54,11 @@ class mail_alias(osv.Model):
|
|||
|
||||
def _get_alias_domain(self, cr, uid, ids, name, args, context=None):
|
||||
ir_config_parameter = self.pool.get("ir.config_parameter")
|
||||
domain = ir_config_parameter.get_param(cr, uid, "mail.catchall.domain", context=context)
|
||||
domain = ir_config_parameter.get_param(cr, uid, "mail.catchall.domain", context=context)
|
||||
return dict.fromkeys(ids, domain or "")
|
||||
|
||||
_columns = {
|
||||
'alias_force_id': fields.integer('Alias Force Id'),
|
||||
'alias_name': fields.char('Alias', required=True,
|
||||
help="The name of the email alias, e.g. 'jobs' "
|
||||
"if you want to catch emails for <jobs@example.my.openerp.com>",),
|
||||
|
|
|
@ -98,7 +98,7 @@ class mail_group(osv.Model):
|
|||
"Use this field anywhere a small image is required."),
|
||||
'last_month_msg_nbr': fields.function(_get_last_month_msg_nbr, type='integer',
|
||||
string='Messages count for last month'),
|
||||
'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="cascade",
|
||||
'alias_id': fields.many2one('mail.alias', 'Alias', required=True, ondelete="cascade",
|
||||
help="The email address associated with this group. New emails received will automatically "
|
||||
"create new topics."),
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue