odoo/addons/website
Xavier Morel 8ab5f3979b [ADD] deduplication of website images being uploaded
There is a deduplication in ir.attachment, but it's only for FS-stored content
*and* it only deduplicates storage not models (as there are access rights
issues involved).
  
The goal here is to always return the same attachment when a user uploads the
exact same image multiple times (because it's simpler or whatever).
  
Initially tried to use a binary field & digest(), but search() blows up
because it tries to utf-8 encode raw binary data. So use char & hexdigest
instead.
  
_compute_checksum returns None if the provided attachment data does not look
like a website image attachment.
  
Unhandled: multiple existing matches, maybe a UNIQUE constraint on the
checksum field would be a good idea just in case.

cherrypicked from saas-3's xmo@openerp.com-20140303153855-5f2l8v0jq2mgb26f
which had to be backed out (as the patch adds a new stored field)

bzr revid: xmo@openerp.com-20140304133117-r88p9zl2tc9tsh75
2014-03-04 14:31:17 +01:00
..
controllers [MERGE] upstream 2014-02-27 11:17:25 +01:00
data [REM] Removed lazy response usage 2014-02-19 11:30:32 +01:00
models [ADD] deduplication of website images being uploaded 2014-03-04 14:31:17 +01:00
security [FIX] remove outdated & unnecessary security rules 2014-01-28 16:10:09 +01:00
static [IMP] 3 cols to respect icon and make it easier for new users to start with 2014-02-24 12:01:48 +01:00
tests [FIX] re-enable website_sale tests because they pass so whatever 2014-02-19 15:47:54 +01:00
views [MERGE] trunk 2014-02-25 10:11:21 +01:00
__init__.py [FIX] website tests 2014-02-17 01:11:48 +01:00
__openerp__.py [IMP] website: ir_actions_server: only published server action can be invoked from the front-end 2014-02-05 10:45:30 +01:00