diff --git a/runbot/static/src/js/fields/fields.js b/runbot/static/src/js/fields/fields.js index e6e16a02..169f082e 100644 --- a/runbot/static/src/js/fields/fields.js +++ b/runbot/static/src/js/fields/fields.js @@ -67,11 +67,11 @@ export class FrontendUrl extends Component {
`; - static components = { Many2OneField } + static components = { Many2OneField }; get route() { const model = this.props.relation || this.props.record.fields[this.props.name].relation; - const id = this.props.value[0]; + const id = this.props.record.data[this.props.name][0]; if (model.startsWith('runbot.') ) { return '/runbot/' + model.split('.')[1] + '/' + id; } else { diff --git a/runbot/static/src/js/fields/tracking_value.js b/runbot/static/src/js/fields/tracking_value.js index 47312046..58fff6a2 100644 --- a/runbot/static/src/js/fields/tracking_value.js +++ b/runbot/static/src/js/fields/tracking_value.js @@ -11,10 +11,9 @@ patch(Message.prototype, { console.log(trackingValue) const oldValue = trackingValue.oldValue.value; const newValue = trackingValue.newValue.value; - return ((oldValue && oldValue.includes('\n')) && (newValue && newValue.includes('\n'))) + return ((oldValue && typeof oldValue=== 'string' && oldValue.includes('\n')) && (newValue && typeof oldValue=== 'string' && newValue.includes('\n'))) }, formatTracking(trackingType, trackingValue) { - console.log('aaa') return super.formatTracking(trackingType, trackingValue) }, toggleKept() {