[FIX] mail: model manager is debug during tests
Since the PR introducing the wowl environment in the discuss app, the model manager is not set in debug mode during tests. The debug mode is usefull since it adds integrity checks and more verbose error messages. This commit restores it. closes odoo/odoo#99556 Related: odoo/enterprise#31086 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
@@ -15,12 +15,6 @@ registerModel({
|
||||
download() {
|
||||
return this.attachmentOwner.download();
|
||||
},
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
_computeAccessToken() {
|
||||
return this.attachmentOwner.accessToken;
|
||||
},
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
@@ -97,9 +91,6 @@ registerModel({
|
||||
identifying: true,
|
||||
inverse: 'attachmentViewerViewable',
|
||||
}),
|
||||
accessToken: attr({
|
||||
compute: "_computeAccessToken",
|
||||
}),
|
||||
defaultSource: attr({
|
||||
compute: "_computeDefaultSource",
|
||||
}),
|
||||
|
||||
@@ -62,10 +62,11 @@ function setupMessagingServiceRegistries({
|
||||
const serviceRegistry = registry.category('services');
|
||||
|
||||
patchWithCleanup(messagingService, {
|
||||
async _startModelManager() {
|
||||
async _startModelManager(modelManager, messagingValues) {
|
||||
modelManager.isDebug = true;
|
||||
const _super = this._super.bind(this);
|
||||
await messagingBeforeCreationDeferred;
|
||||
return _super(...arguments);
|
||||
return _super(modelManager, messagingValues);
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user