India

ZestyBeanz Technologies Pvt Ltd 4th Floor, Nila, Technopark Thiruvananthapuram,
India – 695581
Phone: +91 471 4063254
Fax : +91 471 2700171

   .

ZestyBeanz Technologies Pvt Ltd
61/3236, Manikkath Cross Road
Ravipuram, Kochi, India - 682016
Phone: +91 484 4063254

  UAE

Zesty Labs
Office # 2003, Millennium Plaza Building
Sheikh Zayed Rd, Dubai, UAE
Phone: +971 4333 2222​
Mobile: +971-52-7553466

  Germany​

ZestyBeanz Technologies GmbH
Reuterstraße 1
90408 Nürnberg
Fon: +49 911 4801 444
Fax: +49 911 4801 445

Contact Form


Shelton's picture

Adding a widget in OpenERP Web Client

Recently I came across a post in a forum about adding a widget in OpenERP Web Client. I thought it would be nice to share the information through our blog.

In the OpenERP v6 Web Client, at the right handside we can see a twitter widget by default. Also, we can add more widgets like google maps, facebook etc. which are available by default. Our aim is to add a custom Search box widget which will search the blogs in Zesty Beanz website.

We can do this via PostgreSQL phppgadmin. In the database, we can find a table named res_widget. This is the table where the widgets are defined. We can add another row to create our new widget. Here we have some values to be entered in the table.

First of all, it asks for an id. The id field have a default expression " nextval('res_widget_id_seq'::regclass) ". We leave this field as such. The following fields are also entered as given below:

create_uid - 1

create_date - the date when it is created

write_date - the field is left blank and the Null field is checked.

write_uid - the field is left blank and the Null field is checked.

content - The following code is entered here.

  1. <div id="cse" style="width: 100%;">Loading</div>
  2. <script src="http://www.google.com/jsapi" type="text/javascript"></script>
  3. <script type="text/javascript">
  4.   google.load('search', '1', {language : 'en', style : google.loader.themes.MINIMALIST});
  5.   google.setOnLoadCallback(function() {
  6.     var customSearchControl = new google.search.CustomSearchControl('017699803165190727778:3vmr-8xg18u');
  7.     customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
  8.     customSearchControl.draw('cse');
  9.   }, true);
  10. </script>
  11.  
  12. <style type="text/css">
  13.   .gsc-control-cse {
  14.     font-family: Arial, sans-serif;
  15.     border-color: #FFFFFF;
  16.     background-color: #FFFFFF;
  17.   }
  18.   input.gsc-input {
  19.     border-color: #777777;
  20.   }
  21.   input.gsc-search-button {
  22.     border-color: #333333;
  23.     background-color: #333333;
  24.   }
  25.   .gsc-tabHeader.gsc-tabhInactive {
  26.     border-color: #777777;
  27.     background-color: #777777;
  28.   }
  29.   .gsc-tabHeader.gsc-tabhActive {
  30.     border-color: #333333;
  31.     background-color: #333333;
  32.   }
  33.   .gsc-tabsArea {
  34.     border-color: #333333;
  35.   }
  36.   .gsc-webResult.gsc-result {
  37.     border-color: #FFFFFF;
  38.     background-color: #FFFFFF;
  39.   }
  40.   .gsc-webResult.gsc-result:hover {
  41.     border-color: #000000;
  42.     background-color: #FFFFFF;
  43.   }
  44.   .gs-webResult.gs-result a.gs-title:link,
  45.   .gs-webResult.gs-result a.gs-title:link b {
  46.     color: #444444;
  47.   }
  48.   .gs-webResult.gs-result a.gs-title:visited,
  49.   .gs-webResult.gs-result a.gs-title:visited b {
  50.     color: #444444;
  51.   }
  52.   .gs-webResult.gs-result a.gs-title:hover,
  53.   .gs-webResult.gs-result a.gs-title:hover b {
  54.     color: #444444;
  55.   }
  56.   .gs-webResult.gs-result a.gs-title:active,
  57.   .gs-webResult.gs-result a.gs-title:active b {
  58.     color: #777777;
  59.   }
  60.   .gsc-cursor-page {
  61.     color: #444444;
  62.   }
  63.   a.gsc-trailing-more-results:link {
  64.     color: #444444;
  65.   }
  66.   .gs-webResult .gs-snippet {
  67.     color: #333333;
  68.   }
  69.   .gs-webResult div.gs-visibleUrl {
  70.     color: #000000;
  71.   }
  72.   .gs-webResult div.gs-visibleUrl-short {
  73.     color: #000000;
  74.   }
  75.   .gs-webResult div.gs-visibleUrl-short {
  76.     display: none;
  77.   }
  78.   .gs-webResult div.gs-visibleUrl-long {
  79.     display: block;
  80.   }
  81.   .gsc-cursor-box {
  82.     border-color: #FFFFFF;
  83.   }
  84.   .gsc-results .gsc-cursor-page {
  85.     border-color: #777777;
  86.     background-color: #FFFFFF;
  87.   }
  88.   .gsc-results .gsc-cursor-page.gsc-cursor-current-page {
  89.     border-color: #333333;
  90.     background-color: #333333;
  91.   }
  92.   .gs-promotion {
  93.     border-color: #CCCCCC;
  94.     background-color: #E6E6E6;
  95.   }
  96.   .gs-promotion a.gs-title:link,
  97.   .gs-promotion a.gs-title:link *,
  98.   .gs-promotion .gs-snippet a:link {
  99.     color: #0000CC;
  100.   }
  101.   .gs-promotion a.gs-title:visited,
  102.   .gs-promotion a.gs-title:visited *,
  103.   .gs-promotion .gs-snippet a:visited {
  104.     color: #0000CC;
  105.   }
  106.   .gs-promotion a.gs-title:hover,
  107.   .gs-promotion a.gs-title:hover *,
  108.   .gs-promotion .gs-snippet a:hover {
  109.     color: #444444;
  110.   }
  111.   .gs-promotion a.gs-title:active,
  112.   .gs-promotion a.gs-title:active *,
  113.   .gs-promotion .gs-snippet a:active {
  114.     color: #00CC00;
  115.   }
  116.   .gs-promotion .gs-snippet,
  117.   .gs-promotion .gs-title .gs-promotion-title-right,
  118.   .gs-promotion .gs-title .gs-promotion-title-right *  {
  119.     color: #333333;
  120.   }
  121.   .gs-promotion .gs-visibleUrl,
  122.   .gs-promotion .gs-visibleUrl-short {
  123.     color: #00CC00;
  124.   }
  125. </style>

title - The title of the widget. I've given the title as Zesty Beanz Search.

Now our new widget will be available in the Homepage Widgets Management in the web client. We can add the widget from here and the widget will be available at the right hand side of the web client.

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. The supported tag styles are: <foo>, [foo], [[foo]]. PHP source code can also be enclosed in <?php ... ?> or <% ... %>.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image. Ignore spaces and be careful about upper and lower case.