In odoo13 i have a python function like this
def get_data(self, params):
json_string = [{"SKU": "A4110","Unit": "PC"}]
return json_string
and file xml view like this
<record id="view_report_product_qweb" model="ir.ui.view">
<field name="name">report.view.qweb</field>
<field name="model">view.product</field>
<field name="mode">primary</field>
<field name="arch" type="xml">
<qweb>
<div id="pivot-container1"></div>
<script>
new WebDataRocks({
"container": "#pivot-container1",
"width": "100%",
"height": 430,
"toolbar": true,
"report": {
"dataSource": {
"type": "json", "data": json_string
},
"slice": {
"rows": [{"uniqueName": "Product"}],
"columns": [{"uniqueName": "[Measures]"}],
"measures": [{"uniqueName": "Quantity", "aggregation": "sum"}]
}
}
});
</script>
</qweb>
</field>
</record>
how i get data from function push to xml view to render webdatarock excel
thank @Eric for rep but this is not what i need that xml view i access from action menu button like this and to render webdatarock table i need add scrpit tag in form view like thís
and what i need is get data from python function put in this line