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

Domain: IP info
MX-server: IP info
Size: 2366 Bytes
Create: 2020-01-16
Update: 2020-01-16
Score: 0
Safe: Yes

Outbound domains: |

@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.