diff options
| author | Christophe Matthieu <chm@openerp.com> | 2013-02-04 16:00:58 +0100 |
|---|---|---|
| committer | Christophe Matthieu <chm@openerp.com> | 2013-02-04 16:00:58 +0100 |
| commit | bd8cefa073eb97368edef60308d2a1ab722331e6 (patch) | |
| tree | 834ec5e385116751cce846de090bbf1d16de2f5b /addons/project/project.py | |
| parent | 18da8cdc5b22e63f3f43e941408cbe98d2c2e368 (diff) | |
[IMP] project: use dynamic_help to add alias on help
bzr revid: chm@openerp.com-20130204150058-x2erdwbt71d1lz1p
Diffstat (limited to 'addons/project/project.py')
| -rw-r--r-- | addons/project/project.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/addons/project/project.py b/addons/project/project.py index f89ce8391fc..f2b104315d0 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -887,8 +887,18 @@ class task(base_stage, osv.osv): for f in res['fields']: if 'Hours' in res['fields'][f]['string']: res['fields'][f]['string'] = res['fields'][f]['string'].replace('Hours',tm) + return res + + def dynamic_help(self, cr, uid, help, context=None): + if context.get('default_project_id'): + project_id = self.pool.get('project.project').browse(cr, uid, context.get('default_project_id'), context=context) + alias = project_id.alias_id and project_id.alias_id.name_get() or False + if alias and alias[0] and alias[0][1]: + help = "%s%s" % (help, _("<div>You can also create documents by sending an email to: %s</div>" % alias[0][1])) + return help + # ---------------------------------------- # Case management # ---------------------------------------- |
