Open cabbage89 opened 2 years ago
_.each(relativeFields, function (field) {
try{
record[field] = eval(`value.${field}`);
}catch (e){}
});
Object.keys(record).filter(x=>x.includes('.')).forEach(a=>a.split('.').reduce((x,y,i,arr)=>x[y]=(i==arr.length-1?record[a]:(x[y]||{})),record));
https://github.com/axelor/axelor-open-platform/blob/dev/axelor-web/src/main/webapp/js/axelor.app.js#L184
When there are dotted fields in the context object, AngularJS cannot use the $eval expression
fix
Convert the above context object into