diff --git a/sao/src/model.js b/sao/src/model.js index 0d278cdc79..9ae15d2b31 100644 --- a/sao/src/model.js +++ b/sao/src/model.js @@ -721,7 +721,8 @@ ((fdescription.loading || 'lazy') == 'eager')) { fnames_to_fetch.push(fname + ':string'); } else if ( - ['many2many', 'one2many'].includes(fdescription.type)) { + ['many2many', 'one2many'].includes(fdescription.type) && + (loading == 'lazy')) { var sub_fields = get_x2m_sub_fields(fdescription, fname); fnames_to_fetch = [ ...fnames_to_fetch, ...sub_fields]; if (sub_fields.length > 0) { diff --git a/tryton/tryton/gui/window/view_form/model/record.py b/tryton/tryton/gui/window/view_form/model/record.py index b61c8d8aef..665bb1e4f7 100644 --- a/tryton/tryton/gui/window/view_form/model/record.py +++ b/tryton/tryton/gui/window/view_form/model/record.py @@ -115,7 +115,8 @@ class Record: elif (f_attrs['type'] in {'selection', 'multiselection'} and f_attrs.get('loading', 'lazy') == 'eager'): fnames.append('%s:string' % fname) - elif f_attrs['type'] in {'many2many', 'one2many'}: + elif (f_attrs['type'] in {'many2many', 'one2many'} + and loading == 'lazy'): sub_fields = get_x2m_sub_fields(f_attrs, fname) fnames.extend(sub_fields) if sub_fields: