diff options
| author | Raphael Collet <rco@openerp.com> | 2015-08-04 16:58:58 +0200 |
|---|---|---|
| committer | Raphael Collet <rco@openerp.com> | 2015-08-14 15:09:04 +0200 |
| commit | 9f81c6d651cc3f66e50681a7e13433b2e89257ef (patch) | |
| tree | 9e875c3c05d886105b94e9784ac977623efbe67e /addons/web/static/src/js/framework/time.js | |
| parent | 36ffa5bc691cd44c32d5c5fc877c6b810c561fe4 (diff) | |
[IMP] models, fields: change output format of method `onchange` for x2many fields
Use `field.convert_to_onchange` to format the output of method `onchange`. By
default it behaves like `convert_to_read`. This is useful for the many2one
case, as the client automatically receives the display name of the record.
For the *2many case, we return a list of dicts values, in recordset order, with
all the known fields in the view:
[{id: 42, name: "Existing record"}, {name: "New record"}, ...]
Each dictionary contains the values of all known fields in the view. The
client is responsible of determining which fields are dirty by computing the
difference with former values.
Since the method `onchange` now uses `field.convert_to_onchange`, the method
`field.convert_to_write` has been simplified, as it no longer needs its extra
parameters `target` and `fnames`.
Diffstat (limited to 'addons/web/static/src/js/framework/time.js')
0 files changed, 0 insertions, 0 deletions
