diff --git a/addons/crm/crm_lead_menu.xml b/addons/crm/crm_lead_menu.xml index 623131cbf79..823e0595354 100644 --- a/addons/crm/crm_lead_menu.xml +++ b/addons/crm/crm_lead_menu.xml @@ -11,8 +11,7 @@ { 'default_type':'lead', - 'stage_type':'lead', - 'help_alias': {'type': 'lead'} + 'stage_type':'lead' }

@@ -51,8 +50,7 @@ { 'stage_type': 'opportunity', 'default_type': 'opportunity', - 'default_user_id': uid, - 'help_alias': {'type': 'lead'} + 'default_user_id': uid } diff --git a/addons/crm/crm_salesteams.xml b/addons/crm/crm_salesteams.xml index e6caa03c042..9a76c98a985 100644 --- a/addons/crm/crm_salesteams.xml +++ b/addons/crm/crm_salesteams.xml @@ -9,8 +9,10 @@ crm.lead tree,form ['|', ('type','=','lead'), ('type','=',False)] + + { - 'search_default_section_id': [active_id], 'default_section_id': active_id, 'search_default_new': True, 'search_default_open': True, 'help_alias': {'type': "lead", 'section_id': active_id} + 'search_default_section_id': [active_id], 'default_section_id': active_id, 'default_type':'lead', 'stage_type':'lead' }

@@ -27,32 +29,67 @@ + + + tree + + + + + + + form + + + + - Leads + Opportunities crm.lead - kanban,tree,form + kanban,tree,graph,form,calendar [('type','=','opportunity')] + { - 'search_default_section_id': [active_id], 'default_section_id': active_id, 'search_default_new': True, 'search_default_open': True, 'help_alias': {'type': "lead", 'section_id': active_id} + 'search_default_section_id': [active_id], 'default_section_id': active_id, 'stage_type': 'opportunity', 'default_type': 'opportunity', 'default_user_id': uid }

- Click to create a new lead. + Click to create a new opportunity.

- Use leads if you need a qualification step before creating an - opportunity or a customer. It can be a business card you received, - a contact form filled in your website, or a file of unqualified - prospects you import, etc. + OpenERP helps you keep track of your sales pipeline to follow + up potential sales and better forecast your future revenues.

- Once qualified, the lead can be converted into a business - opportunity and/or a new customer in your address book. + You will be able to plan meetings and phone calls from + opportunities, convert them into quotations, attach related + documents, track all discussions, and much more.

+ + + kanban + + + + + + + tree + + + + + + + form + + + + @@ -65,7 +102,6 @@ - @@ -80,7 +116,7 @@

-
+
%%
diff --git a/addons/crm/res_partner_view.xml b/addons/crm/res_partner_view.xml index 9faf86b12a6..150c1eeebbe 100644 --- a/addons/crm/res_partner_view.xml +++ b/addons/crm/res_partner_view.xml @@ -33,8 +33,7 @@ { 'search_default_partner_id': active_id, 'stage_type': 'opportunity', - 'default_type': 'opportunity', - 'help_alias': {'type': 'lead'} + 'default_type': 'opportunity' } diff --git a/addons/hr_recruitment/hr_recruitment_menu.xml b/addons/hr_recruitment/hr_recruitment_menu.xml index e8865042cff..dbd4335d730 100644 --- a/addons/hr_recruitment/hr_recruitment_menu.xml +++ b/addons/hr_recruitment/hr_recruitment_menu.xml @@ -9,7 +9,6 @@ kanban,tree,form,graph,calendar - {'help_alias': {}}

Click to add a new job applicant. diff --git a/addons/mail/mail_alias.py b/addons/mail/mail_alias.py index f7cf115be55..a079448487d 100644 --- a/addons/mail/mail_alias.py +++ b/addons/mail/mail_alias.py @@ -118,8 +118,13 @@ class mail_alias(osv.Model): mail catchall domain from config. e.g. `jobs@openerp.my.openerp.com` or `sales@openerp.my.openerp.com` """ - return [(record['id'], "%s@%s" % (record['alias_name'], record['alias_domain'])) - for record in self.read(cr, uid, ids, ['alias_name', 'alias_domain'], context=context)] + res = [] + for record in self.browse(cr, uid, ids, context=context): + if record.alias_name and record.alias_domain: + res.append((record['id'], "%s@%s" % (record.alias_name, record.alias_domain))) + else: + res.append((record['id'], False)) + return res def _find_unique(self, cr, uid, name, context=None): """Find a unique alias name similar to ``name``. If ``name`` is @@ -197,51 +202,3 @@ class mail_alias(osv.Model): model_id = self.pool.get('ir.model').search(cr, uid, [('model', '=', model_name)], context=context)[0] vals['alias_model_id'] = model_id return self.create(cr, uid, vals, context=context) - - def get_alias(self, cr, uid, model, alias_defaults={}, context=None): - """Return the mail alias for a document (or the default mail alias of the model) - This method is used by the web client (method web.view.insert_alias) - Arguments: - model (model OpenERP) - alias_defaults (A Python dictionary to provide default values when creating new records for this alias.) - """ - model_id = self.pool.get('ir.model').search(cr, uid, [('model', '=', model)], context=context)[0] - - result = [] - # get the value with required attribute - domain = [('alias_model_id', '=', model_id)] - if alias_defaults: - for item in alias_defaults.items(): - domain += ['|', '|', '|', - ('alias_defaults', 'like', ("%%'%s': %s%%" % (item[0], item[1]))), - ('alias_defaults', 'like', ("%%'%s':%s%%" % (item[0], item[1]))), - ('alias_defaults', 'like', ("%%'%s': '%s'%%" % (item[0], item[1]))), - ('alias_defaults', 'like', ("%%'%s':'%s'%%" % (item[0], item[1])))] - else: - domain += [('alias_defaults', 'like', "{}")] - - ids = self.search(cr, uid, domain, context=context) - if ids: - for record in self.browse(cr, uid, ids, context=context): - test = True - if alias_defaults: - for item in ast.literal_eval(record.alias_defaults).items(): - if alias_defaults.get(item[0]) == None or alias_defaults.get(item[0]) != item[1]: - test = False - continue - if test: - result.append( {'id': record.id, 'email': "%s@%s" % (record.alias_name, record.alias_domain), 'global': False}) - - # get the default value - if alias_defaults: - domain = [('alias_model_id', '=', model_id)] - for item in alias_defaults.items(): - domain += [ - ('alias_defaults', 'not like', ("%%'%s'%%" % (item[0])))] - - ids = self.search(cr, uid, domain, context=context) - if ids: - for record in self.browse(cr, uid, ids, context=context): - result.append( {'id': record.id, 'email': "%s@%s" % (record.alias_name, record.alias_domain), 'global': True}) - - return result 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, _("

You can also create documents by sending an email to: %s
" % alias[0][1])) + return help + # ---------------------------------------- # Case management # ---------------------------------------- diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 893eae68dcd..da05f4ba259 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -53,7 +53,6 @@ { 'search_default_project_id': [active_id], 'default_project_id': active_id, - 'help_alias': {'project_id': active_id} } @@ -232,7 +231,6 @@ - @@ -247,7 +245,7 @@

-
+
%%
@@ -617,7 +615,6 @@ project.task kanban,tree,form,calendar,gantt,graph - {'help_alias': {}}

Click to create a new task. diff --git a/addons/project_issue/project_issue_menu.xml b/addons/project_issue/project_issue_menu.xml index 38d0e830af8..78841f56156 100644 --- a/addons/project_issue/project_issue_menu.xml +++ b/addons/project_issue/project_issue_menu.xml @@ -13,9 +13,6 @@ - { - 'help_alias': {} - }

Click to report a new issue. diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index 4ee6508c3b4..2cdf8f0c943 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -303,8 +303,7 @@ kanban,tree,form,calendar,graph { 'search_default_project_id': [active_id], - 'default_project_id': active_id, - 'help_alias': {'project_id': active_id} + 'default_project_id': active_id }