Original commit by chm.
[FIX] cleditor: When the DOM is modify, the event resize try to call refresh and refresh has not DOM available. Correction : If the DOM as no prent, don't call refresh.
bzr revid: tde@openerp.com-20140305105455-1ewix4pm9m5ob1bm
One rpc call won
Moreover, res_company in server overwrite name_search for company field in res users preferences, to display all allowed companies of the user, and not just the one allowed by record rules, so the user can change to the companies he is allowed to.
bzr revid: dle@openerp.com-20140304173838-c7uimmey8gvi3b64
Local URLs are converted into absolute URLs, notably because when using the
email designer, images are added using local URLs. Previously to this fix
the template was analyzed to find local URLs and make them absolute.
However this causes 2 issues :
- mako-based URLs are broken because a scheme is added before the mako that
generated the image src
- when changing the base url, the templates are not updated
The URLs are now converted dynamically when generating the content of the
html. This is done by passing a new parameter that enable the post processing
of the generated content.
Also fixed double body generation when using templates; fields parameter
was not propagated correctly.
bzr revid: tde@openerp.com-20140304112957-l9b10gyjqphs5fgc
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
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.
bzr revid: xmo@openerp.com-20140303153855-5f2l8v0jq2mgb26f
In some cases the authentication check can fail
for an unknown reason (e.g. connection pool is
temporarily full). This should not be treated
as an authentication failure, as the status is
really unknown. Let those exceptions bubble up
instead.
bzr revid: odo@openerp.com-20140228170712-l8smq6u3cmvjtd5e
- fixed composer using template that were rendering the body twice, once form the template and
once from the composer body. Only the latter one is used, so avoid generating the template body
that is not necessary
- fixed email_template generating values for a set of given fields, ignoring the field list
given into parameter
- fixed post processing of templates to transform local urls into absolute urls; now urls are
transformed after body generation, when sending email based on templates , or when generating
the content when using the composer.
bzr revid: tde@openerp.com-20140227153835-gmqnxrzed9fnbxhm
Indeed its content may contain invalid html that could be stripped by the
sanitizer. The content generated based on the template will be sanitized
when stored in the mail_mail or mail_message body field, thus after
rendering.
bzr revid: tde@openerp.com-20140227144228-d275lxz6ryarkg4t