diff --git a/addons/base_status/base_stage.py b/addons/base_status/base_stage.py index 9db3ece7d8b..2cb5a4c1859 100644 --- a/addons/base_status/base_stage.py +++ b/addons/base_status/base_stage.py @@ -307,7 +307,7 @@ class base_stage(object): destination=False) def remind_user(self, cr, uid, ids, context=None, attach=False, destination=True): - if 'message_post' in self: + if hasattr(self, 'message_post'): for case in self.browse(cr, uid, ids, context=context): if destination: recipient_id = case.user_id.partner_id.id diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index fff47205582..d8b7fb58e49 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -300,6 +300,10 @@ class crm_lead(base_stage, format_address, osv.osv): 'city' : partner.city, 'state_id' : partner.state_id and partner.state_id.id or False, 'country_id' : partner.country_id and partner.country_id.id or False, + 'email_from' : partner.email, + 'phone' : partner.phone, + 'mobile' : partner.mobile, + 'fax' : partner.fax, } return {'value' : values} @@ -594,6 +598,8 @@ class crm_lead(base_stage, format_address, osv.osv): 'stage_id': stage_id or False, 'date_action': time.strftime('%Y-%m-%d %H:%M:%S'), 'date_open': time.strftime('%Y-%m-%d %H:%M:%S'), + 'email_from': customer and customer.email or lead.email_from, + 'phone': customer and customer.phone or lead.phone, } def convert_opportunity(self, cr, uid, ids, partner_id, user_ids=False, section_id=False, context=None): diff --git a/addons/crm/security/crm_security.xml b/addons/crm/security/crm_security.xml index 3b382a072f4..9bb54441aa3 100644 --- a/addons/crm/security/crm_security.xml +++ b/addons/crm/security/crm_security.xml @@ -60,5 +60,18 @@ ['|',('user_id','=',user.id),('show_as','=','busy')] + + Personal Phone Calls + + ['|',('user_id','=',user.id),('user_id','=',False)] + + + + All Phones + + [(1,'=',1)] + + + diff --git a/addons/crm/wizard/crm_lead_to_partner.py b/addons/crm/wizard/crm_lead_to_partner.py index a9e74f306e5..c201f484989 100644 --- a/addons/crm/wizard/crm_lead_to_partner.py +++ b/addons/crm/wizard/crm_lead_to_partner.py @@ -55,6 +55,8 @@ class crm_lead2partner(osv.osv_memory): partner = self.pool.get('res.partner') lead = self.pool.get('crm.lead') this = lead.browse(cr, uid, context.get('active_id'), context=context) + if this.partner_id: + return this.partner_id.id partner_id = False if this.email_from: partner_ids = partner.search(cr, uid, [('email', '=', this.email_from)], context=context) diff --git a/addons/crm_claim/crm_claim_menu.xml b/addons/crm_claim/crm_claim_menu.xml index bb881d62a58..3782a3a7c00 100644 --- a/addons/crm_claim/crm_claim_menu.xml +++ b/addons/crm_claim/crm_claim_menu.xml @@ -10,7 +10,7 @@ + parent="base.menu_base_partner" sequence="2" /> diff --git a/addons/crm_helpdesk/crm_helpdesk.py b/addons/crm_helpdesk/crm_helpdesk.py index 612537bdb77..9bd56cf3944 100644 --- a/addons/crm_helpdesk/crm_helpdesk.py +++ b/addons/crm_helpdesk/crm_helpdesk.py @@ -20,6 +20,7 @@ ############################################################################## from base_status.base_state import base_state +from base_status.base_stage import base_stage from crm import crm from osv import fields, osv import tools @@ -31,7 +32,7 @@ CRM_HELPDESK_STATES = ( crm.AVAILABLE_STATES[4][0], # Pending ) -class crm_helpdesk(base_state, osv.osv): +class crm_helpdesk(base_state, base_stage, osv.osv): """ Helpdesk Cases """ _name = "crm.helpdesk" diff --git a/addons/crm_helpdesk/crm_helpdesk_menu.xml b/addons/crm_helpdesk/crm_helpdesk_menu.xml index b70662e3339..58b522d0dee 100644 --- a/addons/crm_helpdesk/crm_helpdesk_menu.xml +++ b/addons/crm_helpdesk/crm_helpdesk_menu.xml @@ -3,11 +3,10 @@ - + - + diff --git a/addons/crm_profiling/wizard/open_questionnaire_view.xml b/addons/crm_profiling/wizard/open_questionnaire_view.xml index 8da8533f494..d51d36425d0 100644 --- a/addons/crm_profiling/wizard/open_questionnaire_view.xml +++ b/addons/crm_profiling/wizard/open_questionnaire_view.xml @@ -34,7 +34,7 @@
- +