diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 1e6783e6a69..205e0122709 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -94,7 +94,7 @@ class crm_lead(base_stage, format_address, osv.osv): def onchange_user_id(self, cr, uid, ids, section_id, user_id, context=None): if user_id: section_ids = self.pool.get('crm.case.section').search(cr, uid, ['|', ('user_id', '=', user_id), ('member_ids', '=', user_id)], context=context) - if section_id and section_id not in section_ids: + if section_id and len(section_ids) > 0 and section_id not in section_ids: section_id = section_ids[0] return {'value': {'section_id': section_id}} diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index 6fdee2d42e5..579b0744ad1 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -326,7 +326,8 @@ - + + @@ -544,7 +545,8 @@ - + + diff --git a/addons/mail/mail_followers.py b/addons/mail/mail_followers.py index d729efc0f5c..450b81dabbf 100644 --- a/addons/mail/mail_followers.py +++ b/addons/mail/mail_followers.py @@ -139,10 +139,10 @@ class mail_notification(osv.Model): company = user.company_id.website and "%s" % (user.company_id.website, user.company_id.name) or user.company_id.name else: company = user.name - signature_company = _('Send by %(company)s using %(openerp)s.' % { + signature_company = _('Send by %(company)s using %(openerp)s.') % { 'company': company, 'openerp': "OpenERP" - }) + } footer = tools.append_content_to_html(footer, signature_company, plaintext=False, container_tag='div') return footer