diff --git a/edi_oca/migrations/14.0.1.20.0/post-migrate.py b/edi_oca/migrations/14.0.1.20.0/post-migrate.py index 84e1007bff6..8c8b6a8b914 100644 --- a/edi_oca/migrations/14.0.1.20.0/post-migrate.py +++ b/edi_oca/migrations/14.0.1.20.0/post-migrate.py @@ -28,8 +28,8 @@ def migrate(cr, version): for item in res: kind = "form_btn" if item.pop("form_btn", False) else "custom" vals = dict(item, name="Default", kind=kind) - model.create(vals) - item.type_id.button_wipe_deprecated_rule_fields() + rec = model.create(vals) + rec.type_id.button_wipe_deprecated_rule_fields() cr.execute("DROP TABLE exc_type_model_rel_bkp") _logger.info("edi.exchange.type.rule created")