@returns {Boolean}
*/
couldRead: function (model) {
- var editableModel = this.prototype.editableModel || model.editableModel,
- Klass = Backbone.Relational.store.getObjectByName(editableModel);
+ var Klass = Backbone.Relational.store.getObjectByName(this.prototype.editableModel);
return Klass ? Klass.canRead(model || this) : false;
},
correct model will be fetched and this function will be called again
recursively with the model.
+ *In case of "order" models, each order's workspace is different depending on the order type.
+ This causes the Workspace var to be null so get the value from the getWorkspace
+ defined on the relation.js sub-kind.
+
@param {XM.Model|Number|String} Value; can be a model or the id of a model.
@param {Object} options
*/