OCA / OpenUpgrade

Open source upgrade path for Odoo/OpenERP
https://oca.github.io/OpenUpgrade/
GNU Affero General Public License v3.0
740 stars 696 forks source link

[12.0] violates not-null constraint decimal.precision #4357

Open marcos-mendez opened 7 months ago

marcos-mendez commented 7 months ago

Baiscally is an odoo12 straight from source to an odoo13

2024-03-22 17:13:32,728 840 DEBUG bailaki-staging odoo.sql_db: query: INSERT INTO "ir_model_access" ("id", "create_uid", "create_date", "write_uid", "write_date", "active", "group_id", "name", "perm_create", "perm_read", "perm_unlink", "perm_write") VALUES (nextval('ir_model_access_id_seq'), 1, (now() at time zone 'UTC'), 1, (now() at time zone 'UTC'), true, 3, 'decimal.precision configuration', true, true, true, true) RETURNING id 2024-03-22 17:13:32,728 840 ERROR bailaki-staging odoo.sql_db: bad query: INSERT INTO "ir_model_access" ("id", "create_uid", "create_date", "write_uid", "write_date", "active", "group_id", "name", "perm_create", "perm_read", "perm_unlink", "perm_write") VALUES (nextval('ir_model_access_id_seq'), 1, (now() at time zone 'UTC'), 1, (now() at time zone 'UTC'), true, 3, 'decimal.precision configuration', true, true, true, true) RETURNING id ERROR: null value in column "model_id" violates not-null constraint DETAIL: Failing row contains (520, decimal.precision configuration, t, null, 3, t, t, t, t, 1, 2024-03-22 17:13:30.654659, 1, 2024-03-22 17:13:30.654659).

In my opinion there should be a querry before this one checking the model_id BUT as i am not expirienced in OpenUpgrade i don't know where to findit.

This BUG is not only in this Instance but in another instances where I have:

partner-contact event server-tools web social

How can I find where this INSERT is being generated?

How can i adjust the OpenUpgrade to the OCA best practices.

legalsylvain commented 7 months ago

hi. @marcos-mendez . could you mention the technical name of the module that try to insert "decimal.precision configuration" in your target instance. (13 if in understand correctly) + github url. thanks !

marcos-mendez commented 7 months ago

@legalsylvain yes of course, Altought I will need some orientation if you don't mind.

How can i check this?

marcos-mendez commented 7 months ago

@legalsylvain the Odoo log shows a previous line referred as: odoo/addons/product/security/product_security.xml

I don't know if this has something to do with your question in case.

marcos-mendez commented 7 months ago

I found this, don't know if has something to do

https://github.com/odoo/odoo/blob/13.0/addons/product/security/product_security.xml#L3