summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields/relational_fields.js
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2018-01-05 10:07:35 +0100
committerGéry Debongnie <ged@odoo.com>2018-01-05 14:42:55 +0100
commit1efc9d0b5eb9b256c5c0e4d10c920d11c757ae7f (patch)
treeeedfa1553231a2d10c3107ef6bf9d59686efb042 /addons/web/static/src/js/fields/relational_fields.js
parente8634b60c9dccb844f445d9980453f370c1443e9 (diff)
[FIX] web: transfer attributes to subnodes in list views
In many cases, we allow class and style attributes in the arch of a view. However, it did not work in a list view, and there is not really a good reason for that (only cost is a few runtime checks). So, with this commit, we allow those attributes in list views (and x2manys obviously). However, note that there is a subtle (maybe slightly confusing) behavior: when a list renderer is in 'readonly' mode, it does not actually instantiate any field widgets. In that case, it optimizes the rendering by putting only the formatted value inside a cell: <td>some value</td> So, in that case, the only valid target for the attributes is the td: <td class="hello">some value</td> But when we are in edit mode, we actually have a field widget inside a td: <td><input>some value</input></td> And in that case, the natural home for the attributes is the field widget. This is quite important, because this is the way attributes are done in the form view, and we do not want different behaviour. <td><input class="hello">some value</input></td>
Diffstat (limited to 'addons/web/static/src/js/fields/relational_fields.js')
0 files changed, 0 insertions, 0 deletions