Odoo Help


Add Meetings to Leads - Odoo v9

Randall Risser
on 7/15/16, 8:02 PM 1,144 views

Trying to get meetings button and function on leads like it is on opportunities.

Please note I am Odoo v9 online so I can't edit/add any python.

I added the code below to the view of "CRM - Leads Form" that I got from the "Opportunities" view.

It works to create a meeting on the calendar but it does not link it back to the lead.

How do I get it to link back to the lead so that it shows the number count and also takes me right to the events with same lead id on the calendar?

			<button class="oe_stat_button" type="object" context="{'partner_id': partner_id}" name="action_schedule_meeting" icon="fa-calendar">
				<div class="o_stat_info">
					<field name="meeting_count" class="o_stat_value" modifiers="{'readonly': true}"/>
					<span class="o_stat_text" attrs="{'invisible': [('meeting_count', '&lt;', 2)]}" modifiers="{'invisible': [['meeting_count', '&lt;', 2]]}">
					<span class="o_stat_text" attrs="{'invisible': [('meeting_count', '&gt;', 1)]}" modifiers="{'invisible': [['meeting_count', '&gt;', 1]]}">
Najeeb Z
On 10/10/16, 4:58 PM

Make a custom field in calendar.event model title it x_lead_id and then modify the first line of your code (context to be specific)

context="{'x_lead_id': id}"

It should work.


About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 7/15/16, 8:02 PM
Seen: 1144 times
Last updated: 10/10/16, 4:58 PM