Odoo Help


Problem implementing simple Javascript first example in documentation

Anders Wallenquist
on 3/24/16, 5:13 AM 563 views


1) create a new page on a demo database

2) Edit page in HTML-editor:

<?xml version="1.0"?>

<t t-name="website.js">

<t t-call="website.layout">

<div id="wrap" class="oe_structure oe_empty"/>


function Button(){

var Users = new openerp.Model('res.users');

Users.query(['name', 'login', 'user_email', 'signature'])

.filter([['active', '=', true]])


.all().then(function (users) {




     <button onclick='Button()' >Click Me</button>

I got TypeError: Users.query is not a function

Any Idea?

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

1 follower(s)


Asked: 3/24/16, 5:13 AM
Seen: 563 times
Last updated: 3/24/16, 5:13 AM