[IMP] project, project_issue: improve get_empty_list_help
bzr revid: chm@openerp.com-20130325104012-h5ryupgzglia4twg
This commit is contained in:
parent
e4cffe267e
commit
9845f41c09
|
@ -88,7 +88,7 @@ class crm_lead(base_stage, format_address, osv.osv):
|
|||
if context.get('default_type', None) == 'lead':
|
||||
context['empty_list_help_model'] = 'crm.case.section'
|
||||
context['empty_list_help_id'] = context.get('default_section_id', None)
|
||||
context['empty_list_help_document_name'] = _("leads")
|
||||
context['empty_list_help_document_name'] = _("leads")
|
||||
return super(crm_lead, self).get_empty_list_help(cr, uid, help, context=context)
|
||||
|
||||
def onchange_user_id(self, cr, uid, ids, section_id, user_id, context=None):
|
||||
|
|
|
@ -90,8 +90,8 @@ class mail_thread(osv.AbstractModel):
|
|||
_track = {}
|
||||
|
||||
def get_empty_list_help(self, cr, uid, help, context=None):
|
||||
if not context.get('empty_list_help_model', None):
|
||||
if context.get('empty_list_help_id', None):
|
||||
if context.get('empty_list_help_model'):
|
||||
if context.get('empty_list_help_id'):
|
||||
object_id = self.pool.get(context.get('empty_list_help_model')).browse(cr, uid, context.get('empty_list_help_id'), context=context)
|
||||
alias = object_id.alias_id and object_id.alias_id.name_get() or False
|
||||
if alias and alias[0] and alias[0][1]:
|
||||
|
|
|
@ -890,8 +890,9 @@ class task(base_stage, osv.osv):
|
|||
|
||||
|
||||
def get_empty_list_help(self, cr, uid, help, context=None):
|
||||
context['empty_list_help_model'] = 'project.project'
|
||||
context['empty_list_help_id'] = context.get('default_project_id', None)
|
||||
if context.get('active_id') and self.pool.get('project.project').browse(cr, uid, context['active_id'], context=context).alias_model == 'project.task':
|
||||
context['empty_list_help_model'] = 'project.project'
|
||||
context['empty_list_help_id'] = context.get('default_project_id', None)
|
||||
context['empty_list_help_document_name'] = _("tasks")
|
||||
return super(task, self).get_empty_list_help(cr, uid, help, context=context)
|
||||
|
||||
|
|
|
@ -421,8 +421,9 @@ class project_issue(base_stage, osv.osv):
|
|||
return res
|
||||
|
||||
def get_empty_list_help(self, cr, uid, help, context=None):
|
||||
context['empty_list_help_model'] = 'project.project'
|
||||
context['empty_list_help_id'] = context.get('default_project_id', None)
|
||||
if context.get('active_id') and self.pool.get('project.project').browse(cr, uid, context['active_id'], context=context).alias_model == 'project.issue':
|
||||
context['empty_list_help_model'] = 'project.project'
|
||||
context['empty_list_help_id'] = context.get('default_project_id', None)
|
||||
context['empty_list_help_document_name'] = _("issues")
|
||||
return super(project_issue, self).get_empty_list_help(cr, uid, help, context=context)
|
||||
|
||||
|
|
|
@ -307,9 +307,7 @@
|
|||
'default_project_id': active_id
|
||||
}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Click to report a new issue.
|
||||
</p><p>
|
||||
<p>
|
||||
The OpenERP issues tacker allows you to efficiantly manage things
|
||||
like internal requests, software development bugs, customer
|
||||
complaints, project troubles, material breakdowns, etc.
|
||||
|
|
Loading…
Reference in New Issue