Skip to content

[15.0][OU-ADD] l10n_it remove safely xmlids - #5098

Merged
pedrobaeza merged 2 commits into
OCA:15.0from
efatto:15.0-fix-l10n_it-migration
May 4, 2026
Merged

[15.0][OU-ADD] l10n_it remove safely xmlids#5098
pedrobaeza merged 2 commits into
OCA:15.0from
efatto:15.0-fix-l10n_it-migration

Conversation

@sergiocorato

@sergiocorato sergiocorato commented Jun 11, 2025

Copy link
Copy Markdown

Remove safely xmlids as they are deleted:

DEL account.tax.group: l10n_it.tax_group_iva_10_de_50

@pedrobaeza

pedrobaeza commented Jun 11, 2025

Copy link
Copy Markdown
Member

AFAIK this would be [OU-ADD] and you should mark the module as Done in the RST file.

@pedrobaeza pedrobaeza added this to the 15.0 milestone Jun 11, 2025
@sergiocorato sergiocorato changed the title [FIX] l10n_it remove safely xmlids [OU-ADD] l10n_it remove safely xmlids Jun 11, 2025
@pedrobaeza

Copy link
Copy Markdown
Member

And create openupgrade_analysis_work.txt file.

@sergiocorato
sergiocorato force-pushed the 15.0-fix-l10n_it-migration branch 2 times, most recently from e6f6d5f to 3944e34 Compare June 11, 2025 10:22
@sergiocorato

sergiocorato commented Jun 11, 2025

Copy link
Copy Markdown
Author

And create openupgrade_analysis_work.txt file.

Manually? I've found the how-to.
Thanks.

@sergiocorato
sergiocorato force-pushed the 15.0-fix-l10n_it-migration branch 2 times, most recently from 739c9c6 to f7a80db Compare June 11, 2025 10:35
NEW account.account.tag: l10n_it.account_tag_E_PL
NEW account.account.tag: l10n_it.account_tag_IMPEGNI
NEW account.account.tag: l10n_it.account_tag_RISCHI
# DONE Deleted safely

@MiquelRForgeFlow MiquelRForgeFlow Jun 12, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put here # nothing to do, as it references the NEW ones. The # DONE Deleted safely should go below the DEL ones.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MiquelRForgeFlow this is for not deleting them if they are used. That's why the method is called safely.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still, the message "done" should go below the DEL lines.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still, the message "done" should go below the DEL lines.

Fixed in da38169

"l10n_it.tax_group_iva_22_inde",
"l10n_it.tax_group_iva_4_de_50",
]
openupgrade.delete_records_safely_by_xml_id(env, to_delete_xml_ids)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, why delete them? Cannot ORM handle it? They are not noupdate records.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, why in pre-migration (instead of post-migration)?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, why in pre-migration (instead of post-migration)?

Fixed in da38169

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, why delete them? Cannot ORM handle it? They are not noupdate records.

Because of these errors, those account.tax.group were present in 14.0 but removed in 15.0

https://github.com/OCA/OCB/blob/14.0/addons/l10n_it/data/account.tax.group.csv
https://github.com/OCA/OCB/blob/15.0/addons/l10n_it/data/account.tax.group.csv

DETAIL:  Key (id)=(24) is still referenced from table "account_tax".

XXX 21:45:55,456 1 WARNING test_db odoo.addons.openupgrade_framework.odoo_patch.odoo.models: Could not delete obsolete record with ids [24] of model account.tax.group: update or delete on table "account_tax_group" violates foreign key constraint "account_tax_tax_group_id_fkey" on table "account_tax"
DETAIL:  Key (id)=(24) is still referenced from table "account_tax".

XXX 21:45:55,463 1 ERROR test_db odoo.sql_db: bad query: DELETE FROM account_tax_group WHERE id IN (23)
ERROR: update or delete on table "account_tax_group" violates foreign key constraint "account_tax_tax_group_id_fkey" on table "account_tax"
DETAIL:  Key (id)=(23) is still referenced from table "account_tax".

XXX 21:45:55,464 1 WARNING test_db odoo.addons.openupgrade_framework.odoo_patch.odoo.models: Could not delete obsolete record with ids [23] of model account.tax.group: update or delete on table "account_tax_group" violates foreign key constraint "account_tax_tax_group_id_fkey" on table "account_tax"
DETAIL:  Key (id)=(23) is still referenced from table "account_tax".

XXX 21:45:55,471 1 ERROR test_db odoo.sql_db: bad query: DELETE FROM account_tax_group WHERE id IN (22)
ERROR: update or delete on table "account_tax_group" violates foreign key constraint "account_tax_tax_group_id_fkey" on table "account_tax"
DETAIL:  Key (id)=(22) is still referenced from table "account_tax".

XXX 21:45:55,471 1 WARNING test_db odoo.addons.openupgrade_framework.odoo_patch.odoo.models: Could not delete obsolete record with ids [22] of model account.tax.group: update or delete on table "account_tax_group" violates foreign key constraint "account_tax_tax_group_id_fkey" on table "account_tax"
DETAIL:  Key (id)=(22) is still referenced from table "account_tax".

XXX 21:45:55,478 1 ERROR test_db odoo.sql_db: bad query: DELETE FROM account_tax_group WHERE id IN (21)
ERROR: update or delete on table "account_tax_group" violates foreign key constraint "account_tax_tax_group_id_fkey" on table "account_tax"
DETAIL:  Key (id)=(21) is still referenced from table "account_tax".

XXX 21:45:55,479 1 WARNING test_db odoo.addons.openupgrade_framework.odoo_patch.odoo.models: Could not delete obsolete record with ids [21] of model account.tax.group: update or delete on table "account_tax_group" violates foreign key constraint "account_tax_tax_group_id_fkey" on table "account_tax"
DETAIL:  Key (id)=(21) is still referenced from table "account_tax".

XXX 21:45:55,486 1 ERROR test_db odoo.sql_db: bad query: DELETE FROM account_tax_group WHERE id IN (20)
ERROR: update or delete on table "account_tax_group" violates foreign key constraint "account_tax_tax_group_id_fkey" on table "account_tax"
DETAIL:  Key (id)=(20) is still referenced from table "account_tax".

XXX 21:45:55,487 1 WARNING test_db odoo.addons.openupgrade_framework.odoo_patch.odoo.models: Could not delete obsolete record with ids [20] of model account.tax.group: update or delete on table "account_tax_group" violates foreign key constraint "account_tax_tax_group_id_fkey" on table "account_tax"
DETAIL:  Key (id)=(20) is still referenced from table "account_tax".

XXX 21:45:55,494 1 ERROR test_db odoo.sql_db: bad query: DELETE FROM account_tax_group WHERE id IN (19)
ERROR: update or delete on table "account_tax_group" violates foreign key constraint "account_tax_tax_group_id_fkey" on table "account_tax"
DETAIL:  Key (id)=(19) is still referenced from table "account_tax".

XXX 21:45:55,494 1 WARNING test_db odoo.addons.openupgrade_framework.odoo_patch.odoo.models: Could not delete obsolete record with ids [19] of model account.tax.group: update or delete on table "account_tax_group" violates foreign key constraint "account_tax_tax_group_id_fkey" on table "account_tax"
DETAIL:  Key (id)=(19) is still referenced from table "account_tax".

XXX 21:45:55,502 1 ERROR test_db odoo.sql_db: bad query: DELETE FROM account_tax_group WHERE id IN (18)
ERROR: update or delete on table "account_tax_group" violates foreign key constraint "account_tax_tax_group_id_fkey" on table "account_tax"
DETAIL:  Key (id)=(18) is still referenced from table "account_tax".

XXX 21:45:55,502 1 WARNING test_db odoo.addons.openupgrade_framework.odoo_patch.odoo.models: Could not delete obsolete record with ids [18] of model account.tax.group: update or delete on table "account_tax_group" violates foreign key constraint "account_tax_tax_group_id_fkey" on table "account_tax"
DETAIL:  Key (id)=(18) is still referenced from table "account_tax".

XXX 21:45:55,509 1 ERROR test_db odoo.sql_db: bad query: DELETE FROM account_tax_group WHERE id IN (17)
ERROR: update or delete on table "account_tax_group" violates foreign key constraint "account_tax_tax_group_id_fkey" on table "account_tax"
DETAIL:  Key (id)=(17) is still referenced from table "account_tax".

XXX 21:45:55,510 1 WARNING test_db odoo.addons.openupgrade_framework.odoo_patch.odoo.models: Could not delete obsolete record with ids [17] of model account.tax.group: update or delete on table "account_tax_group" violates foreign key constraint "account_tax_tax_group_id_fkey" on table "account_tax"
DETAIL:  Key (id)=(17) is still referenced from table "account_tax".

XXX 21:45:55,517 1 ERROR test_db odoo.sql_db: bad query: DELETE FROM account_tax_group WHERE id IN (16)
ERROR: update or delete on table "account_tax_group" violates foreign key constraint "account_tax_tax_group_id_fkey" on table "account_tax"
DETAIL:  Key (id)=(16) is still referenced from table "account_tax".

XXX 21:45:55,518 1 WARNING test_db odoo.addons.openupgrade_framework.odoo_patch.odoo.models: Could not delete obsolete record with ids [16] of model account.tax.group: update or delete on table "account_tax_group" violates foreign key constraint "account_tax_tax_group_id_fkey" on table "account_tax"
DETAIL:  Key (id)=(16) is still referenced from table "account_tax".

XXX 21:45:55,525 1 ERROR test_db odoo.sql_db: bad query: DELETE FROM account_tax_group WHERE id IN (15)
ERROR: update or delete on table "account_tax_group" violates foreign key constraint "account_tax_tax_group_id_fkey" on table "account_tax"
DETAIL:  Key (id)=(15) is still referenced from table "account_tax".

XXX 21:45:55,526 1 WARNING test_db odoo.addons.openupgrade_framework.odoo_patch.odoo.models: Could not delete obsolete record with ids [15] of model account.tax.group: update or delete on table "account_tax_group" violates foreign key constraint "account_tax_tax_group_id_fkey" on table "account_tax"
DETAIL:  Key (id)=(15) is still referenced from table "account_tax".

XXX21:45:55,533 1 ERROR test_db odoo.sql_db: bad query: DELETE FROM account_tax_group WHERE id IN (14)
ERROR: update or delete on table "account_tax_group" violates foreign key constraint "account_tax_tax_group_id_fkey" on table "account_tax"
DETAIL:  Key (id)=(14) is still referenced from table "account_tax".

XXX 21:45:55,533 1 WARNING test_db odoo.addons.openupgrade_framework.odoo_patch.odoo.models: Could not delete obsolete record with ids [14] of model account.tax.group: update or delete on table "account_tax_group" violates foreign key constraint "account_tax_tax_group_id_fkey" on table "account_tax"
DETAIL:  Key (id)=(14) is still referenced from table "account_tax".

XXX 21:45:55,541 1 ERROR test_db odoo.sql_db: bad query: DELETE FROM account_tax_group WHERE id IN (13)
ERROR: update or delete on table "account_tax_group" violates foreign key constraint "account_tax_tax_group_id_fkey" on table "account_tax"
DETAIL:  Key (id)=(13) is still referenced from table "account_tax".

XXX 21:45:55,541 1 WARNING test_db odoo.addons.openupgrade_framework.odoo_patch.odoo.models: Could not delete obsolete record with ids [13] of model account.tax.group: update or delete on table "account_tax_group" violates foreign key constraint "account_tax_tax_group_id_fkey" on table "account_tax"
DETAIL:  Key (id)=(13) is still referenced from table "account_tax".

XXX 21:45:55,548 1 ERROR test_db odoo.sql_db: bad query: DELETE FROM account_tax_group WHERE id IN (12)
ERROR: update or delete on table "account_tax_group" violates foreign key constraint "account_tax_tax_group_id_fkey" on table "account_tax"
DETAIL:  Key (id)=(12) is still referenced from table "account_tax".

XXX 21:45:55,549 1 WARNING test_db odoo.addons.openupgrade_framework.odoo_patch.odoo.models: Could not delete obsolete record with ids [12] of model account.tax.group: update or delete on table "account_tax_group" violates foreign key constraint "account_tax_tax_group_id_fkey" on table "account_tax"
DETAIL:  Key (id)=(12) is still referenced from table "account_tax".

XXX 21:45:55,556 1 ERROR test_db odoo.sql_db: bad query: DELETE FROM account_tax_group WHERE id IN (11)
ERROR: update or delete on table "account_tax_group" violates foreign key constraint "account_tax_tax_group_id_fkey" on table "account_tax"
DETAIL:  Key (id)=(11) is still referenced from table "account_tax".

XXX 21:45:55,556 1 WARNING test_db odoo.addons.openupgrade_framework.odoo_patch.odoo.models: Could not delete obsolete record with ids [11] of model account.tax.group: update or delete on table "account_tax_group" violates foreign key constraint "account_tax_tax_group_id_fkey" on table "account_tax"
DETAIL:  Key (id)=(11) is still referenced from table "account_tax".

XXX 21:45:55,564 1 ERROR test_db odoo.sql_db: bad query: DELETE FROM account_tax_group WHERE id IN (10)
ERROR: update or delete on table "account_tax_group" violates foreign key constraint "account_tax_tax_group_id_fkey" on table "account_tax"
DETAIL:  Key (id)=(10) is still referenced from table "account_tax".

XXX 21:45:55,564 1 WARNING test_db odoo.addons.openupgrade_framework.odoo_patch.odoo.models: Could not delete obsolete record with ids [10] of model account.tax.group: update or delete on table "account_tax_group" violates foreign key constraint "account_tax_tax_group_id_fkey" on table "account_tax"
DETAIL:  Key (id)=(10) is still referenced from table "account_tax".

XXX 21:45:55,571 1 ERROR test_db odoo.sql_db: bad query: DELETE FROM account_tax_group WHERE id IN (9)
ERROR: update or delete on table "account_tax_group" violates foreign key constraint "account_tax_tax_group_id_fkey" on table "account_tax"
DETAIL:  Key (id)=(9) is still referenced from table "account_tax".

XXX 21:45:55,572 1 WARNING test_db odoo.addons.openupgrade_framework.odoo_patch.odoo.models: Could not delete obsolete record with ids [9] of model account.tax.group: update or delete on table "account_tax_group" violates foreign key constraint "account_tax_tax_group_id_fkey" on table "account_tax"
DETAIL:  Key (id)=(9) is still referenced from table "account_tax".

@sergiocorato
sergiocorato force-pushed the 15.0-fix-l10n_it-migration branch from f7a80db to 39d71c5 Compare June 16, 2025 09:17
@sergiocorato
sergiocorato marked this pull request as draft June 16, 2025 09:50
@sergiocorato
sergiocorato marked this pull request as ready for review April 3, 2026 08:15
@sergiocorato
sergiocorato force-pushed the 15.0-fix-l10n_it-migration branch from da38169 to 48ea976 Compare April 3, 2026 08:19
@pedrobaeza pedrobaeza changed the title [OU-ADD] l10n_it remove safely xmlids [15.0][OU-ADD] l10n_it remove safely xmlids May 4, 2026
@pedrobaeza
pedrobaeza merged commit 9068a5d into OCA:15.0 May 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants