Files
odoo_source/addons/mail/static/tests/models/qunit_test.js
T
Alexandre Kühn 03b59ae410 [IMP] mail: move component handlers to models (step 5)
This commit moves some handler methods from components to models,
as a step closer to having most of business code in models.

Having business code in models is desirable so that the code is much more maintainable:
easier to change and more robust code.

Task-2579306

closes odoo/odoo#88878

Related: odoo/enterprise#26277
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-15 19:08:35 +02:00

39 lines
1.1 KiB
JavaScript

/** @odoo-module **/
import { registerModel } from '@mail/model/model_core';
import { one } from '@mail/model/model_field';
registerModel({
name: 'QUnitTest',
identifyingFields: [], // singleton acceptable (only one test at a time)
fields: {
clockWatcher: one('ClockWatcher', {
inverse: 'qunitTestOwner',
isCausal: true,
}),
composer: one('Composer', {
isCausal: true,
}),
composerView: one('ComposerView', {
inverse: 'qunitTest',
isCausal: true,
}),
followerListMenuView: one('FollowerListMenuView', {
inverse: 'qunitTest',
isCausal: true,
}),
messageView: one('MessageView', {
inverse: 'qunitTest',
isCausal: true,
}),
notificationListView: one('NotificationListView', {
inverse: 'qunitTestOwner',
isCausal: true,
}),
threadViewer: one('ThreadViewer', {
inverse: 'qunitTest',
isCausal: true,
}),
},
});