diff options
| author | Raphael Collet <rco@openerp.com> | 2014-07-06 16:44:26 +0200 |
|---|---|---|
| committer | Antony Lesuisse <al@openerp.com> | 2014-07-06 17:05:41 +0200 |
| commit | cbe2dbb672a6c55d86f2e515f9d1cdfee426ef80 (patch) | |
| tree | d6ff62b719fce32392397783c961b734b1e4c50e /addons/base_import/models.py | |
| parent | d78192c489d3be66cd6487b39f5ce7ba4733a187 (diff) | |
[MERGE] new v8 api by rco
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.
- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes
Diffstat (limited to 'addons/base_import/models.py')
| -rw-r--r-- | addons/base_import/models.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/addons/base_import/models.py b/addons/base_import/models.py index 2b683bd8927..bc4bb0a268f 100644 --- a/addons/base_import/models.py +++ b/addons/base_import/models.py @@ -74,6 +74,7 @@ class ir_import(orm.TransientModel): :param str model: name of the model to get fields form :param int landing: depth of recursion into o2m fields """ + model_obj = self.pool[model] fields = [{ 'id': 'id', 'name': 'id', @@ -81,8 +82,11 @@ class ir_import(orm.TransientModel): 'required': False, 'fields': [], }] - fields_got = self.pool[model].fields_get(cr, uid, context=context) + fields_got = model_obj.fields_get(cr, uid, context=context) + blacklist = orm.MAGIC_COLUMNS + [model_obj.CONCURRENCY_CHECK_FIELD] for name, field in fields_got.iteritems(): + if name in blacklist: + continue # an empty string means the field is deprecated, @deprecated must # be absent or False to mean not-deprecated if field.get('deprecated', False) is not False: |
