Browse Source

Merge pull request #75 from acsone/8.0-fix-base-optional-quick-create-attributeerror

[FIX] This fixes #73
pull/63/merge
Pedro M. Baeza 10 years ago
parent
commit
14f5fcd6f1
  1. 2
      base_optional_quick_create/model.py

2
base_optional_quick_create/model.py

@ -44,7 +44,7 @@ class ir_model(orm.Model):
if model.avoid_quick_create: if model.avoid_quick_create:
model_name = model.model model_name = model.model
model_obj = self.pool.get(model_name) model_obj = self.pool.get(model_name)
if not hasattr(model_obj, 'check_quick_create'):
if model_obj and not hasattr(model_obj, 'check_quick_create'):
model_obj.name_create = self._wrap_name_create( model_obj.name_create = self._wrap_name_create(
model_obj.name_create, model_name) model_obj.name_create, model_name)
model_obj.check_quick_create = True model_obj.check_quick_create = True

Loading…
Cancel
Save