Hello... here am using Odoo v11
When i am calling custom module function and getting return value like
{evenrow: "#32F91B", groupby: "#F84A00", oddrow: "#2331F8"} up to here it is fine.
The above html color codes need to add html table odd and even rows( <tr>).
So.. How can i call html table tags using JS functions.
And this is my table class: table-striped
rpc.query({
model: 'list.view.theme', //Module modle
method: 'get_listview_color', //Model function
args: [self.controllerParams.modelName], // Arguments
}).then(function (result) {
console.log(result); //{evenrow: "#32F91B", groupby: "#F84A00", oddrow: "#2331F8"} -> This is my result.
this.$el.children('.table-striped > tbody > tr:nth-of-type(odd)').css({'background-color':result['oddrow']});
this.$el.children('.table-striped > tbody > tr:nth-of-type(even)').css({'background-color':result['evenrow']});
});
console this.$el and check the children object is there