I am new to Webpos in Openbravo and have been given to load the data from server to client using Javascript. I have written the following code - clientsidemodel.js. but, when i run in Webpos terminal I am encountering the following error:
Uncaught SyntaxError: Invalid or unexpected token and appending characters like ​ ​.
var ServeOption = OB.Data.ExtensibleModel.extend({
modelName: 'ServeOption',
tableName: 'ServeOption',
entityName: 'ServeOption',
modelFunc: 'ServeOption',
source: 'com.promantiatraining.webpos.ServeOption',
dataLimit: 300
});
ServeOption: addProperties([{
name: 'id',
column: 'id',
primaryKey: 'true',
type: 'TEXT'
}, {
name: 'name',
column: 'name',
text: 'TEXT'
}, {
name: 'description',
column: 'description',
type: 'TEXT'
}, {
name: 'TMOptioncategory',
column: 'tmOptioncategory',
type: 'TEXT'
}, {
name: '_identifier',
column: '_identifier',
type: 'TEXT'
}]);
OB.Data.Registry.registerModel(ServeOption);
OB.OBPOSPointOfSale.Model.PointOfSale.prototpe.models.push(ServeOption);
OB.Model.Product.addProperties([{
name: 'TMOptionCategory',
column: 'tmOptioncategory',
type: 'TEXT'
}]);