diff --git a/addons/crm/crm_phonecall.py b/addons/crm/crm_phonecall.py index 1ee36cefab2..fa32c1b28b1 100644 --- a/addons/crm/crm_phonecall.py +++ b/addons/crm/crm_phonecall.py @@ -53,7 +53,7 @@ class crm_phonecall(crm_case, osv.osv): ('draft', 'Draft'), ('open', 'Todo'), ('cancel', 'Cancelled'), - ('done', 'Done'), + ('done', 'Held'), ('pending', 'Pending'), ], 'State', size=16, readonly=True, help='The state is set to \'Draft\', when a case is created.\ @@ -79,14 +79,19 @@ class crm_phonecall(crm_case, osv.osv): the canall which is this opportunity source."), 'date_closed': fields.datetime('Closed', readonly=True), 'date': fields.datetime('Date'), - 'opportunity_id': fields.many2one ('crm.lead', 'Opportunity'), + 'opportunity_id': fields.many2one ('crm.lead', 'Lead/Opportunity'), 'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('model','=',_name)]), } + def _get_default_state(self, cr, uid, context=None): + if context and context.get('default_state', False): + return context.get('default_state') + return 'open' + _defaults = { 'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'), 'priority': crm.AVAILABLE_PRIORITIES[2][0], - 'state': 'open', + 'state': _get_default_state, 'user_id': lambda self,cr,uid,ctx: uid, 'active': 1, } diff --git a/addons/crm/crm_phonecall_demo.xml b/addons/crm/crm_phonecall_demo.xml index 683cbd9735f..8f0661ab8be 100644 --- a/addons/crm/crm_phonecall_demo.xml +++ b/addons/crm/crm_phonecall_demo.xml @@ -18,6 +18,7 @@ + @@ -33,6 +34,7 @@ + @@ -49,6 +51,7 @@ + diff --git a/addons/crm/crm_phonecall_menu.xml b/addons/crm/crm_phonecall_menu.xml index 41975d9ced4..c3d7e1d8df6 100644 --- a/addons/crm/crm_phonecall_menu.xml +++ b/addons/crm/crm_phonecall_menu.xml @@ -61,15 +61,15 @@ parent="base.menu_base_partner" sequence="4" /> - Inbound + Log a call crm.phonecall form tree,calendar - - - + + [('state','=','done')] + - The Inbound Calls tool allows you to log your inbound calls on the fly. Each call you get will appear on the partner form to trace every contact you have with a partner. From the phone call form, you can trigger a request for another call, a meeting or an opportunity. + This tool allows you to log your inbound calls on the fly. Each call you get will appear on the partner form to trace every contact you have with a partner. From the phone call form, you can trigger a request for another call, a meeting or an opportunity. @@ -90,24 +90,24 @@ form - + - - Outbound + Schedule a call crm.phonecall form tree,calendar - - + [('state','!=','done')] + - Outbound Calls list all the calls to be done by your sales team. A salesman can record the information about the call in the form view. This information will be stored in the partner form to trace every contact you have with a customer. You can also import a .CSV file with a list of calls to be done by your sales team. + Schedule a call lists all the calls to be done by your sales team. A salesman can record the information about the call in the form view. This information will be stored in the partner form to trace every contact you have with a customer. You can also import a .CSV file with a list of calls to be done by your sales team. @@ -131,7 +131,7 @@ - diff --git a/addons/crm/crm_phonecall_view.xml b/addons/crm/crm_phonecall_view.xml index 44487e2aef5..9ef661e5eb9 100644 --- a/addons/crm/crm_phonecall_view.xml +++ b/addons/crm/crm_phonecall_view.xml @@ -31,7 +31,7 @@ - +