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

[12.0][FIX] account_financial_report: Support Postgres v14+ #1056

Merged
merged 1 commit into from
Aug 24, 2023

Conversation

carmenbianca
Copy link
Member

@carmenbianca carmenbianca commented Jul 31, 2023

Postgres 14+ expects the argument anycompatiblearray instead of anyarray to array_cat. We detect the Postgres version and proceed with the correct type.

The refactoring in #660 would also fix this problem, and certainly fixes it for future Odoo versions, but that PR is marked do-not-merge.

Internal task: https://gestion.coopiteasy.be/web#view_type=form&model=project.task&id=10965&active_id=10965&menu_id=

Postgres 14+ expects the argument anycompatiblearray instead of anyarray
to array_cat. We detect the Postgres version and proceed with the
correct type.

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
@carmenbianca
Copy link
Member Author

For clarity, I have tested this against a Postgres 12 and a Postgres 14 database.

For easy testing, use:

podman run --name postgres[version_here] -e POSTGRES_HOST_AUTH_METHOD=trust -p [YOUR_PORT]:5432 postgres:[version_here]
createuser -p [YOUR_PORT] -U postgres -s $USER

and then set db_port in odoo.conf.

Alternatively, use Docker instead of podman. They have the same command-line arguments, I think.

Copy link

@robinkeunen robinkeunen left a comment

Choose a reason for hiding this comment

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

👍

Copy link

@remytms remytms left a comment

Choose a reason for hiding this comment

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

LGTM

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

Copy link

@sergiocorato sergiocorato left a comment

Choose a reason for hiding this comment

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

LGTM

@sergiocorato
Copy link

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 12.0-ocabot-merge-pr-1056-by-sergiocorato-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit d862760 into OCA:12.0 Aug 24, 2023
3 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 370d135. Thanks a lot for contributing to OCA. ❤️

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.

5 participants