Hi everyone
I have code javascript : static/src/js/cvs_quoations.js:
openerp.cnd_quotations = function (openerp)
{
openerp.web.form.widgets.add('test', 'openerp.cnd_quotations.Mywidget');
openerp.cnd_quotations.Mywidget = openerp.web.form.FieldChar.extend(
{
template : "test",
init: function (view, code) {
var self = this;
this._super(view, code);
this.rpc('/cnd_quotations/_getdataproductCutByIdSales',{}).done(function(result){
$("div#showdata").html("ok men")
})
}
});
}
view widget : static/src/xml/cvs_quotations.xml :
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-name="test">
<html>
<body>
<div style="float:left">
<table style="width:500px;text-align:center" border="1">
<thread>
<tr>
<th colspan="5" style="text-align:center">Ok 1</th>
</tr>
<tr>
<th style="text-align:center">Ký Hiá»u</th>
<th style="text-align:center">Ngang</th>
<th style="text-align:center">Cao</th>
<th style="text-align:center">Sá» Bá»</th>
</tr>
</thread>
</table>
</div>
<div style="float:left;width:50px;min-height:100px"></div>
<div style="float:left">
<table style="width:500px" border="1">
<thread>
<th style="text-align:center">Váºt Tư Sản Xuất</th>
<th style="text-align:center">SỠLượng</th>
<th style="text-align:center">Giá</th>
</thread>
<tbody>
<tr>
<td><div id="showdata"></div></td>
</tr>
</tbody>
</table>
</div>
<div style="clear:left"></div>
</body>
</html>
</t>
</templates>
but it not show text "ok men" on view of widget
can you help me ?