[FIX] runbot: fix various js issues for 17.0

This commit is contained in:
Christophe Monniez 2024-02-01 16:22:42 +01:00 committed by xdo
parent 8f34312967
commit 6dd2580e21
2 changed files with 3 additions and 4 deletions

View File

@ -67,11 +67,11 @@ export class FrontendUrl extends Component {
<div><a t-att-href="route" target="_blank"><span class="fa fa-play ms-2"/></a></div>
</div>`;
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 {

View File

@ -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() {