Py
from openerp import models, fields
class YourModel(models.Model):
_name = 'your.model'
def your_function(self):
# CODE TO GET VALUE
return value
JS
odoo.define('custom_webpage.my_js', function (require) {'use strict';
var Model = require('web.Model');
(new Model('your.model')).call('your_function').then(function (your_return_value) {
console.log(your_return_value);
});
Avatar
Shameem Babu @ iWesabe
14 octobre 2016
Best Answer
You can get the value through many ways
First way is
Py