Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Create "Next Activity" In Lead Form

Colleen Jenkins
on 6/16/16, 12:15 PM 321 views

I would like to create a Next Activity field in the lead form, just as there is a "Next Activity" in the Opportunities screen.  The goal is to allow sales people to schedule next activity for leads just like you can with opportunities.  I cannot seem to find the form to view to edit the Lead form and add a field like this.  Does anyone have any advise?

You can take a look in view : crm_case_form_view_oppor and try to do it in crm_case_form_view_leads.

The field is next_activity_id and date action ...

Jérémy Kersten (jke)
on 6/16/16, 4:50 PM
Colleen Jenkins
On 7/7/16, 3:48 PM

Thank you for the help Jeremy.  That view is not available in Enterprise V9, but I was able to solve the issue by doing the following:

Turn on Developer Mode > Go to Sales > Leads, Open Lead in Edit view, Click Edit View in the bottom developer tab and



<field name="last_activity_id" invisible="1"/>

<label for="next_activity_id"/>


<div class="o_row">

<field name="next_activity_id" options="{'no_create': True, 'no_open': True}" domain="['|',('team_id','=',False),('team_id','=',team_id)]" on_change="onchange_next_activity_id(next_activity_id)"/>

<span class="oe_form_field" attrs="{'invisible': ['|', ('next_activity_id', '=', False), ('date_action', '=', False)]}"> on </span>

<field name="date_action" attrs="{'invisible': [('next_activity_id', '=', False)]}" placeholder="Choose a date..."/>

<div attrs="{'invisible': ['|', ('last_activity_id', '=', False), ('next_activity_id', '!=', False)]}">

<button name="log_next_activity_1" type="object" class="btn-link" attrs="{'invisible': [('next_activity_1','=',False)]}">

<field name="next_activity_1" readonly="1"/>


<span attrs="{'invisible': [('next_activity_2','=',False)]}">|</span>

<button name="log_next_activity_2" type="object" class="btn-link" attrs="{'invisible': [('next_activity_2','=',False)]}">

<field name="next_activity_2" readonly="1"/>


<span attrs="{'invisible': [('next_activity_3','=',False)]}">|</span>

<button name="log_next_activity_3" type="object" class="btn-link" attrs="{'invisible': [('next_activity_3','=',False)]}">

<field name="next_activity_3" readonly="1"/>




<div class="o_row">

<field name="title_action" placeholder="e.g. Discuss proposal" attrs="{'invisible': [('next_activity_id', '=', False)]}"/>

<div attrs="{'invisible': [('next_activity_id', '=', False)]}">

<button name="log_next_activity_done" string="Done" type="object" class="btn-link"/>

<button name="cancel_next_activity" string="Cancel" type="object" class="btn-link"/>




<field name="date_deadline"/>


To also add this information to the list view for leads, I did the same thing when in the List view:


<field name="next_activity_id"/>

<field name="title_action"/>

<field name="date_action"/>

Perfect! Thank you! This works well in Community 9 as well.

Lead Form View Name: CRM - Leads Form

Lead List View Name: Leads

Ken Woychesko
on 9/29/16, 8:39 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)


Asked: 6/16/16, 12:15 PM
Seen: 321 times
Last updated: 9/29/16, 8:39 PM