diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-01-23 14:51:11 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-01-23 14:51:11 +0100 |
| commit | fded0065ae217ed3f3ccda24a230677e92a0e8d1 (patch) | |
| tree | dff3b3970e89ab546b7fb64d74df0090d0ec8332 /odoo/fields.py | |
| parent | ad766ba20db73ceb433b9afe3b5db3e52cf1494a (diff) | |
| parent | 6c4389df41fb29f9707b205a8dcca13b3bf8a322 (diff) | |
[MERGE] forward port branch saas-14 up to 6c4389df41f
Diffstat (limited to 'odoo/fields.py')
| -rw-r--r-- | odoo/fields.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/odoo/fields.py b/odoo/fields.py index 4a7a5174272..f0e3b3baf63 100644 --- a/odoo/fields.py +++ b/odoo/fields.py @@ -2095,9 +2095,8 @@ class One2many(_RelationalMulti): _description_relation_field = property(attrgetter('inverse_name')) def convert_to_onchange(self, value, record, fnames=()): - if fnames: - # do not serialize self's inverse field - fnames = [name for name in fnames if name != self.inverse_name] + fnames = set(fnames or value.fields_view_get()['fields']) + fnames.discard(self.inverse_name) return super(One2many, self).convert_to_onchange(value, record, fnames) def check_schema(self, model): |
