[CNG] don't filter out function fields from import or export, only readonly fields
bzr revid: xmo@openerp.com-20120209090214-84d6jjr1jnf32kpi
This commit is contained in:
parent
ddf38fa38b
commit
c120ee72a6
|
@ -1433,8 +1433,6 @@ class Export(View):
|
|||
if import_compat:
|
||||
if exclude and field_name in exclude:
|
||||
continue
|
||||
if 'function' in field:
|
||||
continue
|
||||
if field.get('readonly'):
|
||||
# If none of the field's states unsets readonly, skip the field
|
||||
if all(dict(attrs).get('readonly', True)
|
||||
|
|
|
@ -109,9 +109,10 @@ openerp.web.DataImport = openerp.web.Dialog.extend({
|
|||
_(fields).each(function (field, field_name) {
|
||||
// Ignore spec for id field
|
||||
// Don't import function fields (function and related)
|
||||
if (field_name === 'id' || 'function' in field) {
|
||||
if (field_name === 'id' || field.readonly) {
|
||||
return;
|
||||
}
|
||||
|
||||
var f = {
|
||||
id: field_name,
|
||||
name: field_name,
|
||||
|
|
Loading…
Reference in New Issue