Skip to Content
Menu
This question has been flagged

Hi all,

I have a http route that render a template with some variables.

{"foo":"bar"}

In template I want to use variables that returned from controller as a javascript variable.

For example, I want to log foo

console.log(foo);


But I can not find where foo is

Please help me to use controller variables in javascript

Avatar
Discard

<script>

var x_axis = <t t-esc="value_comes_from_controller"/>;

</script>

Reference: http://bit.ly/odoo-web-controller

Related Posts Replies Views Activity
0
Aug 23
194
1
Jun 23
1699
1
Feb 22
1732
1
Nov 20
4205
0
Aug 18
4734