[ADD] qweb: handling of t-att=mapping
authorXavier Morel <xmo@openerp.com>
Thu, 11 Sep 2014 06:38:08 +0000 (08:38 +0200)
committerXavier Morel <xmo@openerp.com>
Mon, 6 Oct 2014 17:13:44 +0000 (19:13 +0200)
commit2ffcff8fa9bd58beee33170be5a11649ec282602
tree167ead2b9aa1f49b98782f6843464bf6fdabf49d
parent14a677090bacea426152b7287d20a00155415c8e
[ADD] qweb: handling of t-att=mapping

Changed render_att_att to return an iterable of pairs instead of a pair, and
dispatched t-att on whether its result is a Mapping.

Also changed qweb test runner so it uses ordereddict for JSON mapping in
params, otherwise iteration order (and thus order of attributes in output) is
unpredictable and results don't/can't match expectations (as both are
strings).

Note that this relies on JS implementation details wrt iteration order of
mappings. Tests would probably be somewhat less brittle if rendering output
was parsed to XML... if that's possible (?)
addons/website/models/ir_qweb.py
openerp/addons/base/ir/ir_qweb.py
openerp/addons/base/tests/test_qweb.py