The Time model is deleted and replaced with the new Clock model. The differences are that there can be several clocks, whereas Time was a singleton, and that a clock must define the frequency at which it updates. The new model ClockWatcher is added to model a record that makes use of a clock. This is currently useful for the clocks to set or clear intervals as needed. closes odoo/odoo#86219 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
18 lines
512 B
JavaScript
18 lines
512 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/clock_watcher';
|
|
|
|
patchIdentifyingFields('ClockWatcher', identifyingFields => {
|
|
identifyingFields[0].push('qunitTestOwner');
|
|
});
|
|
|
|
addFields('ClockWatcher', {
|
|
qunitTestOwner: one('QUnitTest', {
|
|
inverse: 'clockWatcher',
|
|
readonly: true,
|
|
}),
|
|
});
|