Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0] fatturapa_out Update pre-migrate.py #3915

Closed
wants to merge 1 commit into from

Conversation

scigghia
Copy link
Contributor

fix issue #3914 (comment)

@@ -19,8 +19,9 @@ def migrate(env, version):
""",
(table_name, "%s" % constraint_name),
)
result = env.cr.fetchall()
Copy link
Member

Choose a reason for hiding this comment

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

Probabilmente il vincolo wizard_export_fatturapa_report_print_menu_fkey dopo b32a0b6#diff-914565354eea6151b103fe044fbc59e9406e4df75dd4143da361a2873a4c246e non esisterà più, ma potrebbero esserci dei DB vecchi che lo hanno ancora.

LGTM

@francesco-ooops francesco-ooops linked an issue Jan 29, 2024 that may be closed by this pull request

if env.cr.fetchall()[0]:
if result and result[0]:
alter_table_sql = sql.SQL("ALTER TABLE {} DROP CONSTRAINT {}").format(
Copy link
Contributor

Choose a reason for hiding this comment

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

Forse si può semplificare il tutto con
ALTER TABLE wizard_export_fatturapa DROP CONSTRAINT IF EXIST wizard_export_fatturapa_report_print_menu_fkey.
Così la query precedente manco serve, giusto?
(ho verificato, IF EXIST è stato introdotto in pg 9.0, Odoo 16 richiede minimo 10).

@salvorapi
Copy link
Contributor

+1 ho lo stesso problema anche io

@francesco-ooops
Copy link
Contributor

@salvorapi approva la PR se risolve :)

Copy link
Contributor

@salvorapi salvorapi left a comment

Choose a reason for hiding this comment

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

Per me è ok, grazie.

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@eLBati
Copy link
Member

eLBati commented Feb 2, 2024

chiudo in favore di #3696

@eLBati eLBati closed this Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[16.0] fatturapa_out crasha durante update
6 participants