Odoo Help


javascript function in Xml file

on 1/17/14, 7:46 AM 1,058 views

I'm trying to call a javascript code in XML file but it doesnt fires the action.

    <script type="text/javascript">
        function drawTree() {
          var data = [          
             "firstname": "S",
              "lastname": "Brown",
              "age": 16,
          var options = {
            'width': '400px',
            'height': '200px'
        var container = document.getElementById('mytree');
        var tree = new links.TreeGrid(container, options);      
 <body onload="drawTree();">
  <div id="mytree"></div>

Could please Anyone help me how to refine my code ?

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

0 follower(s)


Asked: 1/17/14, 7:46 AM
Seen: 1058 times
Last updated: 3/16/15, 8:10 AM