Browse Source

[10.0] Avoid crash in base_optional_quick_create during migration (#1222)

pull/1462/head
Alexis de Lattre 6 years ago
committed by Pedro M. Baeza
parent
commit
2f7e3cbc09
  1. 2
      base_optional_quick_create/models/ir_model.py

2
base_optional_quick_create/models/ir_model.py

@ -27,7 +27,7 @@ class IrModel(models.Model):
method_name = 'name_create'
for model in self:
model_obj = self.env.get(model.model)
if model.avoid_quick_create:
if model.avoid_quick_create and model_obj is not None:
model_obj._patch_method(method_name, _wrap_name_create())
else:
method = getattr(model_obj, method_name, None)

Loading…
Cancel
Save