mirror of
https://github.com/bringout/oca-ocb-core.git
synced 2026-04-21 01:52:03 +02:00
Initial commit: Core packages
This commit is contained in:
commit
12c29a983b
9512 changed files with 8379910 additions and 0 deletions
|
|
@ -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',
|
||||
}),
|
||||
},
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue