I have created a custom rating widget in openerp using Rateit.
But the widget is always editable, How can i make it editable only when i click 'Edit' button and How do i know it is in readonly mode?
xml
<field name="rating" widget="rating"/>
js
instance.my_module.Rating = instance.web.form.FieldChar.extend({
template : "rating",
init: function(field_manager, node){
this._super.apply(this, arguments);},
start: function() {
var self = this;
$('#rateit').rateit({
value: 0,
resetable: false
});
},
});