Files
odoo_source/addons/mail/static/tests/models/throttle_qunit_tests.js
T
2022-11-06 02:16:48 +01:00

29 lines
657 B
JavaScript

/** @odoo-module **/
import { one, Patch } from '@mail/model';
Patch({
name: 'Throttle',
fields: {
duration: {
compute() {
if (this.qunitTestOwner1) {
return 0;
}
if (this.qunitTestOwner2) {
return 1000;
}
return this._super();
},
},
qunitTestOwner1: one('QUnitTest', {
identifying: true,
inverse: 'throttle1',
}),
qunitTestOwner2: one('QUnitTest', {
identifying: true,
inverse: 'throttle2',
}),
},
});