summaryrefslogtreecommitdiff
path: root/odoo/addons/base/tests/test_mail_examples.py
AgeCommit message (Collapse)Author
2018-05-14[MERGE] forward port branch saas-15 up to d818b516c14Christophe Simonis
2018-05-08[FIX] tools: mail transcoding css space consistentNicolas Lempereur
The transcoding of a mail (transforming CSS into inline styles on the element nodes of the mail) used the form: property:value; So when a mail is saved, it would be eg. with `style="property:value;"` and when it is being edited "property:value" is removed if available via CSS stylesheet given the structure. But the sanitize_style (introduced in bfe7aafa7) adds an espace before the value (which is more pretty but was probably not choosen in transcoding to decrease size of mail): property: value; so the inline style would not be removed when editing possibly causing conflict with the editor. With this commit, the sanitize_style doesn't add a space. It could have been changed in transcoding but the code is already rather slow and we don't want to use a regex replace or two string replace instead of the current one string replace. opw-1841107
2017-08-20[FIX] P3: text model in various mail bitsXavier Morel
No formal decision there, and the stdlib API seems like a PITA as it's based around native strings, not bytes and not text. * try to use cross-model API instead of random encode/decode * unicode all the mail_template things * formataddr *requires* a text tuple now In P2, formataddr((False, False)) "worked" (generated "False <False>"), in P3 it will fail and blow up. * attachments are quite definitely bytes * remove try_coerce_ascii because it's garbage
2017-06-12[FIX] P3: hash randomisation in XML/HTML stuffXavier Morel
* Have the cleaned up style attributes be dumped in the same order they were originally so that we can easily validate against text content. * While lxml's attributes are stored in an ordereddict, namespaces are not and thus when comparing text serialisation of namespaced documents the ordering of namespaces can differ between runs. Fix by comparing the LXML trees directly.
2016-09-02[REF] openerp: move `openerp` to `odoo`Raphael Collet