Monday, January 2, 2017
1 change
Enhancements to existing features
This update improves Odoo's template rendering so documents that use XML namespaces are generated more accurately and with fewer duplicate declarations. It also improves view matching for namespaced elements, helping complex document formats render and inherit correctly, though namespaced attributes are not yet covered.
Original PR description
- handle ns prefixes in static template (only print the xmlns attribute when needed) - handle ns prefixes in dynamic template (same) - pass the nsmap of the parent during t-call (so that redundant xmlns declaration aren't printed) - allow xpath on a ns prefixed element @Gorash is the last commit safe to merge? Still todo: handle ns prefixed attributes: in some complex document format like the office open xml for .docx, a tag can be ns prefixed and its attributes can also be ns prefixed but with others namespaces. This should be pretty easy to do (sanitize all attributes at the top of `_compile_static_node` and `_compile_tag` to restore the ns prefix). Not done because we don't need that feature at the moment. this pr contains #14816