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

How could I unfold the drawer by default in the search view at the top?

By
Pascal Tremblay
on 1/10/15, 3:34 PM 1,888 views

Hello all,

How could I unfold, by default, this advanced search view in a particular view? It is not displayed by default.

Thanks

Update :

In the file /addons/web/static/src/xml/base.xml, even with this, the drawer only appears when we click. Not by default :

<div t-name="SearchViewDrawer" class="oe_searchview_drawer" style="display:block;">
    <div class="col-md-7"></div>
    <div class="col-md-5"></div>
</div>

???

still not found.

Pascal Tremblay
on 1/14/15, 7:54 AM

Somebody has a solution for this?

Pascal Tremblay
on 7/11/15, 6:09 AM
3

Emipro Technologies Pvt. Ltd.

--Emipro Technologies Pvt. Ltd.--
Tiny ERP Pvt Ltd
http://www.odoo.com
5975
| 6 7 8
Rajkot, India
--Emipro Technologies Pvt. Ltd.--

Being an emerging leader in IT market since 2011, Emipro Technologies Pvt. Ltd. has been providing a wide range of business solutions in Odoo & Magento. We are pleased to have a large pool of contented customers with our meticulous work in the domain of ERP & e-Commerce. A ray of relief & satisfaction to  our customers heart by our successful deployment in their organization, purely represents our success in Odoo platform. Hence, we take pride for being an Odoo partner with a vision of expanding our strategic alliances with our customers to offer them high value-added, trustworthy & cost effective solutions.

 

Since establishment, our business has span across 11 countries of the world. Our customers are companies of all sizes ranging from start-ups to large enterprises, who realize that they need a professional business solutions to generate revenue streams, establish proper communication channels or streamline business operations. Standing with strong determination of customer satisfaction, observing each minute detail of their business processes, providing proper guidance and moving forth to develop product accordingly adds our value and reliability among our customers. 

 

We are blessed with efficient, passionate & eclectic young developers who have come across almost all kinds of business profiles, working with full dedication, applying creativity & new features in existing modules and completing customer's projects successfully on predefined target. Our in-depth knowledge while giving business solutions in Odoo allows us to offer following services to our customers :

 

  • Consulting
  • Installation, Configuration & Customization
  • Training & Support
  • Maintenance
  • Upgradation
  • Documentation
  • Crafting community modules
  • Drafting videos on demand
  • Smart Apps development

We will be :) to welcome you @ www.emiprotechnologies.com to solve any kind of your business needs around Odoo. However we are just an inch away from you by email info@emiprotechnologies.com or a tweet to @EmiproTech

Emipro Technologies Pvt. Ltd.
On 7/11/15, 8:31 AM

Hello Pascal,

Your problem is very easy to deal with.

Here I am giving the place where you need to change. However you need to extend the code yourself in your custom module. (I guess you know how to build custom web module)

Step 1 : Go to web/static/src/js folder and open search.js file

In class instance.web.SearchView there is one function named as start. You need to change your code here.

Step 2 : Little change in start function. 

From line no. 440 to 445 (this the updated Odoo of july 11, 2015 from github) you will find this code block,

        if (view_manager) {
            this.view_manager = view_manager;
            view_manager.on('switch_mode', this, function (e) {
                self.drawer.toggle(e === 'graph');
            });
        }

You just need to replace following line,

self.drawer.toggle(e === 'graph'); 

with this line, 

self.drawer.toggle(e!=='form'); 

So finally that code block will look like as follows,

        if (view_manager) {
this.view_manager = view_manager;
view_manager.on('switch_mode', this, function (e) {
//self.drawer.toggle(e === 'graph');
self.drawer.toggle(e!=='form');
});
}


Reason of why I replaced line :  By default only at "graph" view, search view was showing unfolded. I made search view unfolded in every view except "form" view.

Perfact Solution : You can make your custom web module, extend the class instance.web.SearchView & override the function "start". It is very easy. 

Suggetion : Never do direct change on base addons of Odoo. Once you update from git, all your custom changes will be deleted.

Finally I hope this post will help you to achieve exactly what you want.  "(whew):skype"

Latest update : This module is freely available at this link .

You are great. I will try it soon!!!!1

Pascal Tremblay
on 7/11/15, 11:09 AM

Hello Pascal, Empiro Tech... this is a related question: https://www.odoo.com/forum/help-1/question/expand-search-results-by-default-83657 .... if possible, could you please have a look at this and let me know in case you have some idea? I think some JS tweaking should do the trick for my question as well, but I'm not able to get it right.

Shawn Varghese
on 7/11/15, 11:32 AM

Hello Shawn, Already that module is available at Odoo shop. https://www.odoo.com/apps/modules/8.0/web_search_results_unfold/

Emipro Technologies Pvt. Ltd.
on 7/12/15, 6:18 AM

Oh ok. Thanks !

Shawn Varghese
on 7/14/15, 12:14 PM
0

zbik

--zbik--
5941
| 6 4 7
Lodz, Poland
--zbik--


zbik
On 1/10/15, 3:48 PM

UPDATE: I removed my answer

PS. If you have edited and changed the question after answer, my answer has become stupid. It is not fair.

 

ok. I try it an I come back here. THANKS

Pascal Tremblay
on 1/10/15, 3:49 PM

With this tip, the advanced search view will be expanded?

Pascal Tremblay
on 1/10/15, 4:13 PM

sorry zbik. 1000 excuses. It won't arrive anymore.

Pascal Tremblay
on 1/10/15, 5:48 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

3 follower(s)

Stats

Asked: 1/10/15, 3:34 PM
Seen: 1888 times
Last updated: 8/4/15, 12:20 AM