[ADD] tentative removal of attachments
authorXavier Morel <xmo@openerp.com>
Tue, 4 Mar 2014 11:07:16 +0000 (12:07 +0100)
committerXavier Morel <xmo@openerp.com>
Tue, 4 Mar 2014 11:07:16 +0000 (12:07 +0100)
commite78a3b18cc6c049a712d594ab70287c486447f0a
treef7bc1bd00c6c1407497eaf0c66de58eb105a3b17
parentf3638567738cdc242fa43dc0a1770ea7bd4b4b6e
[ADD] tentative removal of attachments

Attachments ought be removed only if they are not used in an existing page/web
view.

Theoretically this could be set directly in unlink(), but:
* that would make a nice error message significantly harder
* the expenses of performing a text search in all view archs would be a bit expensive

Notes:
* the views set could be reduced to only "web" views
* the search is likely sensible to false negatives e.g. different order of
  query parameters. It *will* remove images still being used.

bzr revid: xmo@openerp.com-20140304110716-u14w6uo8fbkfa42i
addons/website/models/website.py
addons/website/static/src/css/editor.css
addons/website/static/src/css/editor.sass
addons/website/static/src/js/website.editor.js
addons/website/static/src/xml/website.editor.xml