Files
odoo_source/addons/mail/static/tests/clock_watcher_qunit_tests.js
T
Louis Wicket (wil) e16976ddfc [IMP] mail, *: move up model files
Move model definition files from `models/thing/thing.js` to
`models/thing.js` and remove the now empty intermediate directory.

Task-2759582
 * = calendar, crm_livechat, hr, im_livechat, mail_bot, sms, snailmail,
     website_livechat, website_slides

closes odoo/odoo#86464

Related: odoo/enterprise#25291
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-17 11:27:59 +01:00

18 lines
498 B
JavaScript

/** @odoo-module **/
import { addFields, patchIdentifyingFields } from '@mail/model/model_core';
import { one } from '@mail/model/model_field';
// ensure that the model definition is loaded before the patch
import '@mail/models/clock_watcher';
patchIdentifyingFields('ClockWatcher', identifyingFields => {
identifyingFields[0].push('qunitTestOwner');
});
addFields('ClockWatcher', {
qunitTestOwner: one('QUnitTest', {
inverse: 'clockWatcher',
readonly: true,
}),
});