Re: [odoo/odoo] [FIX] Deleting model still referenced in \'ir_model_relation\' (#43368)

From: notifications@github.com
Domain: IP info github.com
MX-server: IP info out-3.smtp.github.com
Size: 2366 Bytes
Create: 2020-01-16
Update: 2020-01-16
Score: 0
Safe: Yes

Outbound domains: github.com |

@mart-e why this breaks database schema? I think on contrary, as this case provokes a problem in case you modify an addon. Imagine following flow:

  • You add a many2many in a model in your custom model.
  • Then you remove the model (or rename it).
  • Update the model and you will face the problem:
DELETE FROM ir_model WHERE id IN (225)
ERROR: update or delete on table "ir_model" violates foreign key constraint "ir_model_relation_model_fkey" on table "ir_model_relation"
DETAIL:  Key (id)=(225) is still referenced from table "ir_model_relation".


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Want to protect your real email from messages like this? Use TempM email and be more secure on the internet.