From 08549d10f91e5417541306d02da8f5180e97c13a Mon Sep 17 00:00:00 2001 From: Andrea Date: Sat, 11 Mar 2017 16:55:25 +0100 Subject: [PATCH] Robustness in fields retrieval --- bi_view_editor/models/ir_model.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bi_view_editor/models/ir_model.py b/bi_view_editor/models/ir_model.py index 44507974..f498d364 100644 --- a/bi_view_editor/models/ir_model.py +++ b/bi_view_editor/models/ir_model.py @@ -50,10 +50,11 @@ class IrModel(models.Model): name = ir_model_field_obj.name model = ir_model_field_obj.model_id model_name = model.model - Model = self.env[model_name] - if name in Model._columns: - f = Model._columns[name] - return f._classic_write + if model_name[0:6] != 'x_bve.': + Model = self.env[model_name] + if name in Model._columns: + f = Model._columns[name] + return f._classic_write return False @api.model