title: How can I create a widget in Odoo 8?
body: <p>I am beginner in JS.
  I have tried to create a simple widget <a href="https://www.odoo.com/documentation/8.0/howtos/web.html" rel="nofollow">using this doc</a></p>
  
  <p><strong>simple.js</strong></p>
  
  <pre class="lang-javascript prettyprint-override"><code>openerp.web_sample_widget = function(instance,local) {
      var _t = instance.web._t,
      _lt = instance.web._lt;
      var QWeb = instance.web.qweb;
      console.log("sample widget head"); //It prints fine
  
      local.WidgetName = instance.Widget.extend({
          start: function() {
              console.log("sample widget"); // this not print
          }
      });
  
      instance.web.client_actions.add(
        'sample.widget', 'instance.web_sample_widget.WidgetName');
  }
  </code></pre>
  
  <p>The first <code>console.log</code> is printed fine but the second is not.</p>
  
  <p><strong>views.xml</strong></p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;openerp&gt;
      &lt;data&gt;
      &lt;template id="assets_backend" name="web_graph assets" inherit_id="web.assets_backend"&gt;
          &lt;xpath expr="." position="inside"&gt;
              &lt;script type="text/javascript" src="/web_sample_widget/static/src/js/simple.js"&gt;&lt;/script&gt;
          &lt;/xpath&gt;
      &lt;/template&gt;
    &lt;/data&gt;
  &lt;/openerp&gt;
  </code></pre>
  
  <p>How can I solve this?</p>