From 4d8400d0bf689d271fdd220b6da54a3b1d583e40 Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Thu, 9 Feb 2017 11:44:52 +0100 Subject: [PATCH] Fix Contacts view too slow to display The 'base' Kanban view for res.partner in 9.0 loads the large 'image' field in the 'search_read' but display the 'small_image'. The js code also has to issue js calls to get the small images as they have not been prefetched. This is noticeably slow to load when the large images are read from S3 which is slower than a local filesystem/database. This fix loads the 'small_image' instead of the large one. This bug has been fixed in Odoo 10.0. --- attachment_s3/__openerp__.py | 4 ++- attachment_s3/views/res_partner_views.xml | 31 +++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 attachment_s3/views/res_partner_views.xml diff --git a/attachment_s3/__openerp__.py b/attachment_s3/__openerp__.py index 2c7d68f..a0971ff 100644 --- a/attachment_s3/__openerp__.py +++ b/attachment_s3/__openerp__.py @@ -14,6 +14,8 @@ 'python': ['boto'], }, 'website': 'http://www.camptocamp.com', - 'data': [], + 'data': [ + 'views/res_partner_views.xml', + ], 'installable': True, } diff --git a/attachment_s3/views/res_partner_views.xml b/attachment_s3/views/res_partner_views.xml new file mode 100644 index 0000000..471c857 --- /dev/null +++ b/attachment_s3/views/res_partner_views.xml @@ -0,0 +1,31 @@ + + + + + + res.partner.kanban + res.partner + + + + + + + + + + record.image_small.raw_value + + + + !record.image_small.raw_value + + + + + + +