odoo/addons/website/models
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
..
__init__.py [ADD] website: added support for invoking a server action through controller 2014-02-05 10:04:47 +01:00
ir_actions.py [CLEAN] website: ir_actions: removed commented line + small reordering of columns definition + fixed an help string 2014-02-12 11:42:27 +01:00
ir_http.py [IMP] make page lookup case-insensitive during completion 2014-02-07 16:06:23 +01:00
ir_qweb.py [IMP] Merge bananas and cumcumbers in order to prepare the t-href|t-action removal 2014-01-28 21:14:17 +01:00
ir_ui_view.py [IMP] website: extra safe check for qcontext's flag 2014-02-17 10:33:11 +01:00
res_config.py [FIX] website: config settings does write the values on the website model 2014-02-07 18:21:57 +01:00
test_models.py [IMP] website tests: unicode test attributes to avoid warnings in auto_init when comparing attr values 2014-01-30 17:26:15 +01:00
website.py [ADD] deduplication of website images being uploaded 2014-03-04 14:31:17 +01:00