diff options
| author | Olivier Dony <odo@openerp.com> | 2012-07-03 18:01:55 +0200 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2012-07-03 18:01:55 +0200 |
| commit | f66753362b5d83ba0bef5cb7da2be8d257e5fbb3 (patch) | |
| tree | 74a1a9244693ea1ce0ffb7b90f8e1c754e5af1dd /addons/project_issue/project_issue.py | |
| parent | 234118ddb76f6d72a773fd5dda086522aba3ae6a (diff) | |
| parent | 790f64cca643d6ef2a259c56552a3b17895f3b87 (diff) | |
[MERGE] Implementation of mail.alias by Jigar Amin
bzr revid: odo@openerp.com-20120703160155-gw8po01vmm0q30ow
Diffstat (limited to 'addons/project_issue/project_issue.py')
| -rw-r--r-- | addons/project_issue/project_issue.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index 2aa6d4e1bcd..a7322959e70 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -581,6 +581,9 @@ project_issue() class project(osv.osv): _inherit = "project.project" + def _get_alias_model(self, cr, uid, context=None): + return [('model_project_task', "Tasks"),("model_project_issue", "Issue")] + def _issue_count(self, cr, uid, ids, field_name, arg, context=None): res = dict.fromkeys(ids, 0) issue_ids = self.pool.get('project.issue').search(cr, uid, [('project_id', 'in', ids)]) @@ -592,6 +595,7 @@ class project(osv.osv): 'project_escalation_id' : fields.many2one('project.project','Project Escalation', help='If any issue is escalated from the current Project, it will be listed under the project selected here.', states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}), 'reply_to' : fields.char('Reply-To Email Address', size=256), 'issue_count': fields.function(_issue_count, type='integer'), + 'alias_model': fields.selection(_get_alias_model, "Alias Model"), } def _check_escalation(self, cr, uid, ids, context=None): |
