mirror of
https://github.com/bringout/oca-ocb-core.git
synced 2026-04-20 14:12:05 +02:00
48 lines
1.4 KiB
JavaScript
48 lines
1.4 KiB
JavaScript
/** @odoo-module **/
|
|
|
|
import { registerPatch } from '@mail/model/model_core';
|
|
import { one } from '@mail/model/model_field';
|
|
import { clear } from '@mail/model/model_field_command';
|
|
|
|
registerPatch({
|
|
name: 'Dialog',
|
|
fields: {
|
|
componentClassName: {
|
|
compute() {
|
|
if (this.snailmailErrorView) {
|
|
return 'o_Dialog_componentMediumSize align-self-start mt-5';
|
|
}
|
|
return this._super();
|
|
},
|
|
},
|
|
componentName: {
|
|
compute() {
|
|
if (this.snailmailErrorView) {
|
|
return 'SnailmailError';
|
|
}
|
|
return this._super();
|
|
},
|
|
},
|
|
messageViewOwnerAsSnailmailError: one('MessageView', {
|
|
identifying: true,
|
|
inverse: 'snailmailErrorDialog',
|
|
}),
|
|
record: {
|
|
compute() {
|
|
if (this.snailmailErrorView) {
|
|
return this.snailmailErrorView;
|
|
}
|
|
return this._super();
|
|
},
|
|
},
|
|
snailmailErrorView: one('SnailmailErrorView', {
|
|
compute() {
|
|
if (this.messageViewOwnerAsSnailmailError) {
|
|
return {};
|
|
}
|
|
return clear();
|
|
},
|
|
inverse: 'dialogOwner',
|
|
}),
|
|
},
|
|
});
|