Odoo Help

Welcome!

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.

0

In Lead list view Search box i want stage wise without selection

By
sridhar
on 5/14/13, 3:39 AM 859 views

If i selecting customer means that search able box automatically its a customer, at a same time in CRM Lead i need filter as stage wise in List view. How can i do this help me experts.

2

Priyesh Solanki (pso)

--Priyesh Solanki (pso)--
Tiny ERP Pvt Ltd
http://www.odoo.com
1110
| 2 2 4
--Priyesh Solanki (pso)--
Priyesh Solanki (pso)
On 5/14/13, 3:48 AM

In search view of Leads, In group by section, Add new attribute name="stage_id" in Stage filter line and add that stage_id in Action of Lead in context like this:

<field name="context">{'default_type':'lead', 'stage_type':'lead', 'search_default_stage_id':1}

After making these both changes, Update crm module and check. It should work.

Thanks, Priyesh Solanki

thanks... @ Priyesh Solanki, this changes is making in crm.py and crm_view.xml right

sridhar
on 5/14/13, 4:02 AM

crm_lead_view.xml to improve search view and crm_lead_menu.xml to improve action for passing context.

Priyesh Solanki (pso)
on 5/14/13, 4:15 AM

i making changes in crm_lead._view.xml but it making XMLSyntaxError: attributes construct error, line 333, column 32

sridhar
on 5/14/13, 4:20 AM

in crm_lead_view.xml, there is a "Group By .." section around line no. 352 and in that section, you will find the filter for stage_id, starting with this <filter string="Stage"... > , you need to add name="stage_id" in that line like this: <filter string="Stage" domain="[]" name="stage_id" context="{'group_by':'stage_id'}"/>

Priyesh Solanki (pso)
on 5/14/13, 4:23 AM

It is not working one more stage added in the group view but default stage is not come.

sridhar
on 5/14/13, 4:37 AM

Means after making these both changes, when you open Leads, Is it not coming by default Stage wise ?

Priyesh Solanki (pso)
on 5/14/13, 4:41 AM

<group expand="0" string="Group By..."> <filter string="Stage" domain="[]" name="stage_id" context="{'group_by':'stage_id'}"/> <filter string="Salesperson" domain="[]" context="{'group_by':'user_id'}"/> <filter string="Team" domain="[]" context="{'group_by':'section_id'}"/> <filter string="Stage" domain="[]" context="{'group_by':'stage_id'}"/>

sridhar
on 5/14/13, 4:42 AM

i want without selection of stages automatically display in list view is it possible.

sridhar
on 5/14/13, 4:50 AM

you did wrong thing! In Group by , You need to add that line by replacing the existing one, Here in code, I can see it twice. In action window, you need to pass the context , i specified in answer, by replacing the existing one. After making these both changes, Update your module and check it.

Priyesh Solanki (pso)
on 5/14/13, 4:55 AM

<group expand="0" string="Group By..."> <filter string="Stage" domain="[]" name="stage_id" context="{'group_by':'stage_id'}"/> this line for stage will come forward correct. then where is the code for default display in lead list view.

sridhar
on 5/14/13, 5:03 AM

in crm_lead_menu.xml, There is an action, created for leads at the starting. In that action, There is a context passed by default and that you need to replace with my context, described in answer.

Priyesh Solanki (pso)
on 5/14/13, 5:06 AM

please tel where i replace where is the code please paste here...

sridhar
on 5/14/13, 5:08 AM

in crm_lead_menu.xml, in action of Leads, replace the context with this: <field name="context">{ 'default_type':'lead', 'stage_type':'lead', 'search_default_stage_id':1, } </field>

Priyesh Solanki (pso)
on 5/14/13, 5:12 AM

s got it it is working perfectly thank u lot

sridhar
on 5/14/13, 5:15 AM

line no 12 in crm_lead_menu.xml

Priyesh Solanki (pso)
on 5/14/13, 5:15 AM

Good luck and enjoy! :)

Priyesh Solanki (pso)
on 5/14/13, 5:15 AM

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

1 follower(s)

Stats

Asked: 5/14/13, 3:39 AM
Seen: 859 times
Last updated: 3/16/15, 8:10 AM