[FIX] website: improve performance for attachment creation
authorDenis Ledoux <dle@odoo.com>
Tue, 25 Nov 2014 13:36:56 +0000 (14:36 +0100)
committerDenis Ledoux <dle@odoo.com>
Tue, 25 Nov 2014 13:39:54 +0000 (14:39 +0100)
commita3e578068e170df41ef95c00026bc2351c9e2c13
tree2b862be2f11d1a151ed8e04225a0d7614c1d9298
parent20a8b0e66a86c130f7b005aa9a5efead05eb0014
[FIX] website: improve performance for attachment creation

website introduces two new stored function fields, which depend on the attachment data
The thing is, these two fields are pertinent for website attachments only
Therefore, we avoid to read the datas field when the attachment is not a website attachment(when not needed), as this is the most costly field to read
addons/website/models/website.py