Initial commit: Core packages

This commit is contained in:
Ernad Husremovic 2025-08-29 15:20:45 +02:00
commit 12c29a983b
9512 changed files with 8379910 additions and 0 deletions

View file

@ -0,0 +1,48 @@
/** @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',
}),
},
});