~openerp-dev/openerp-web/7.0-bug-1092846-nwi

Viewing all changes in revision 3722.

  • Committer: Xavier Morel
  • Date: 2013-01-24 14:40:18 UTC
  • Revision ID: xmo@openerp.com-20130124144018-0g3sl2nej2aj6syp
[FIX] domain returned by onchange

The "new" form engine performs a bunch of conversions on the form arch
from json to xml to text to json again (or something), thus the
``node`` attribute on form fields might be json but it's got no more
relation to the form's own arch (and the fields defined therein).

Meanwhile the domains processing for onchange recursively traversed
the *form*'s arch trying to find a node matching the key it had to set
its @domain to what it was given. It long predates the "new" form
engine, and since it alters the *original* arch not a copy the "new"
form engine broke it. And since that's untested, it's been broken for
a bunch of months (probably).

Fix by looking up the field according to the domain key (in
form.fields), and setting the domain in the node of the field, rather
than the node of the form's arch.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: