diff options
| author | Mohammed Shekha <msh@odoo.com> | 2020-10-30 11:10:53 +0000 |
|---|---|---|
| committer | Mohammed Shekha <msh@odoo.com> | 2021-02-17 12:20:13 +0000 |
| commit | f7b2a5825e3786be53d04276af4c4c403b7a293e (patch) | |
| tree | d04a1091297dd98d850fcf10a099dffd43e04db7 /addons/web/static/src/js | |
| parent | 572ba1be7d8b47192c98aec10cfe1b0b3dbbeb45 (diff) | |
[FIX] web: do not display cover images in sample data
Before this commit, in sample mode, cover images might be displayed
in kanban views. It isn't what we want as those images are real
images from the database, not sample ones, but randomly linked to
the sample records (the id of many2one fields is randomly generated).
This commit tweaks the SampleServer to always set many2one fields
pointing to model 'ir.attachment' to false.
task-2368505
closes odoo/odoo#66350
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Diffstat (limited to 'addons/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/views/sample_server.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/web/static/src/js/views/sample_server.js b/addons/web/static/src/js/views/sample_server.js index 43c5594413b..8af27feb2ac 100644 --- a/addons/web/static/src/js/views/sample_server.js +++ b/addons/web/static/src/js/views/sample_server.js @@ -251,6 +251,9 @@ odoo.define('web.SampleServer', function (require) { if (field.relation === 'res.currency') { return session.company_currency_id; } + if (field.relation === 'ir.attachment') { + return false; + } return this._getRandomSubRecordId(); case "one2many": case "many2many": { |
