I am trying to get sale order data on ecommerce, I found that there is something like this odoo addon
order = request.website.sale_get_order()
I debugged and found this is the function I am looking for, but I do not know how to use it in javascript
I tried
_onClick: function () {
return this._rpc({
model: 'website',
method: 'sale_get_order',
args: [""]
})
.then(function (result) {
console.log(result)
});
}
ValueError: Expected singleton: website()