Example:
odoo.define('module name.module name', function (require) {
"use strict";
var calenderView = require('web_calendar.CalendarView');
var form_common = require('web.form_common');
var core = require('web.core');
var _t = core._t;
var QWeb = core.qweb;
var session = require('web.session');
var form_widgets = require('web.form_widgets');
form_widgets.FieldStatus.include({
render_value: function() {
var self = this;
if(self.view.model=='obj.obj'){
var content = QWeb.render("FieldStatus.content.extended", {
'widget': self,
'value_folded': _.find(self.selection.folded, function(i){return i[0] === self.get('value');})
});
self.$el.html(content);
}else{
this._super();
}
}
})
odoo.define('module name.module name', function (require) {
"use strict";
var calenderView = require('web_calendar.CalendarView');
var form_common = require('web.form_common');
var core = require('web.core');
var _t = core._t;
var QWeb = core.qweb;
var session = require('web.session');
var form_widgets = require('web.form_widgets');
form_widgets.FieldStatus.include({
render_value: function() {
var self = this;
if(self.view.model=='obj.obj'){
var content = QWeb.render("FieldStatus.content.extended", {
'widget': self,
'value_folded': _.find(self.selection.folded, function(i){return i[0] === self.get('value');})
});
self.$el.html(content);
}else{
this._super();
}
}
})
Nice and Impressive Post!Thanks for sharing...
ReplyDeleteOdoo Development Company