summaryrefslogtreecommitdiff
path: root/addons/share/wizard/share_wizard.py
diff options
context:
space:
mode:
authorMartin Trigaux <mat@openerp.com>2013-06-05 11:04:53 +0200
committerMartin Trigaux <mat@openerp.com>2013-06-05 11:04:53 +0200
commitccb38117ee79fdf5aba6e530efdebeed886cd31f (patch)
treebfcc643127864c8112a702b275194e7e7450e6d0 /addons/share/wizard/share_wizard.py
parent5cc8c30adfeccc6db22ebf7487b8e4ebdbe10423 (diff)
parent45c3fd063b10a8da77ee21ad3e1a2c892977e369 (diff)
[MERGE] Forward porting of saas-1 until rev 8739
bzr revid: mat@openerp.com-20130605090453-e4mg37kms5j1r18n
Diffstat (limited to 'addons/share/wizard/share_wizard.py')
-rw-r--r--addons/share/wizard/share_wizard.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/share/wizard/share_wizard.py b/addons/share/wizard/share_wizard.py
index b45e3b17ea2..68c30949161 100644
--- a/addons/share/wizard/share_wizard.py
+++ b/addons/share/wizard/share_wizard.py
@@ -414,7 +414,8 @@ class share_wizard(osv.TransientModel):
relation_model_id = model_obj.search(cr, UID_ROOT, [('model','=',coldef._obj)])[0]
relation_model_browse = model_obj.browse(cr, UID_ROOT, relation_model_id, context=context)
relation_osv = self.pool[coldef._obj]
- if coltype == 'one2many':
+ #skip virtual one2many fields (related, ...) as there is no reverse relationship
+ if coltype == 'one2many' and hasattr(coldef, '_fields_id'):
# don't record reverse path if it's not a real m2o (that happens, but rarely)
dest_model_ci = relation_osv._all_columns
reverse_rel = coldef._fields_id