In the following piece of code , I am getting error on line no 2 . I want to convert line no 2 as per new syntax suitable for odoo 11. Please help in this.
var ShowTaskBoard = Widget.extend({
model_iteration: new instance.web.Model('my_module.iteration'),
self.model_iteration.query()
.filter([["is_active","=","true"]])
.order_by("project_id")
.all().done(function (records) {
_(records).each(display);
// create board for first entry
self.initBoard();
}
)};
That widget will be failing even on OpenERP 7.0 because of errors with the syntax. Maybe will be better if you provide the original code. For example you are defining the property
model_iterationasnew instance.web.Model('my_module.iteration')which will work without issues but as long a you put a comma you are saying that next you will be defining another property. Maybe you wanna definemodel_iterationas a function to be able to define the code like:You will need to find a way to call the function
model_iterationand I assume that there will be functions nameddisplayandinitBoardto complete the usage defined in your code