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

Update our tooling to support Odoo 18.0 #628

Open
23 of 30 tasks
sbidoul opened this issue Sep 12, 2024 · 60 comments
Open
23 of 30 tasks

Update our tooling to support Odoo 18.0 #628

sbidoul opened this issue Sep 12, 2024 · 60 comments

Comments

@sbidoul
Copy link
Member

sbidoul commented Sep 12, 2024

Improvements we may want to do


See #582 for links to similar PRs for 17.0.

@simahawk
Copy link
Contributor

generate 18.0 branches (oca-create-branch), using the bot account

I'd rather add another tool on https://github.com/OCA/repo-maintainer as we need to add a branch to all repos of https://github.com/OCA/repo-maintainer-conf.

I could have a look at that. Then we can trash oca-create-branch IMO, unless you see any reason to keep it.

@pedrobaeza
Copy link
Member

I have assigned to me the OCB first part and the OpenUpgrade one.

@simahawk
Copy link
Contributor

set OCB 18.0 branch as default

same for this -> we must use the repo-maintainer. I'll include an option in the new tool mentioned above.

@pedrobaeza I take over this one if ok for you

@legalsylvain
Copy link
Contributor

Hi @sbidoul. Thanks for enumerating all the tasks to do.
The majority of tasks cannot be performed, as version 18.0 has not been released but as soon as 18.0 is released, we can go forward.
The last year, the release was done october 26, 2023 : (odoo/odoo@dd05f0a) 13 days before the Odoo days. (8 - 10 November 2023)

@sbidoul
Copy link
Member Author

sbidoul commented Sep 12, 2024

@simahawk feel free to give it a try. For oca-create-branch I used this PR last time: #541 which tries to preserve some copier answer from previous branch (not all, as we use different more modern defaults each year).

@pedrobaeza
Copy link
Member

@simahawk OK

@legalsylvain I predict this year the date will be more constrained, as they still have some big things to merge (for example, company dependent fields to JSON - let's hope it enters this version -), but maybe they still create the branch on advance even if not completed as a favor to the community.

@sbidoul
Copy link
Member Author

sbidoul commented Sep 12, 2024

@legalsylvain it's true some tasks can't be done yet. PRs can be prepared, though.

But more importantly there are the improvements mentioned at the beginning that can be worked on if we want to address them.

@simahawk
Copy link
Contributor

@simahawk feel free to give it a try. For oca-create-branch I used this PR last time: #541 which tries to preserve some copier answer from previous branch (not all, as we use different more modern defaults each year).

hmm the repo-maintainer will bootstrap the branch w/o that tool. We have to find a different way likely. I'll have a look, thanks for the pointer.

@simahawk
Copy link
Contributor

@simahawk feel free to give it a try. For oca-create-branch I used this PR last time: #541 which tries to preserve some copier answer from previous branch (not all, as we use different more modern defaults each year).

hmm the repo-maintainer will bootstrap the branch w/o that tool. We have to find a different way likely. I'll have a look, thanks for the pointer.

I had a look at your work but I think we don't need it anymore. Please see #541 (comment)
If that's correct, here we have the new tool to manage branches and here the result for v18

@pedrobaeza
Copy link
Member

I have added a point for the migration guide.

@sbidoul
Copy link
Member Author

sbidoul commented Sep 13, 2024

I have added a point for the migration guide.

@pedrobaeza was that not the third item already?

@pedrobaeza
Copy link
Member

Ouch, I didn't see it...

@PabloEForgeFlow
Copy link

Hello, I was wondering if I could contribute somehow, perhaps one of the improvements mentioned above. I looked through OCA/oca-ci#10 and I think I could do that, if nobody's working on it currently.

@sbidoul
Copy link
Member Author

sbidoul commented Sep 13, 2024

Hello, I was wondering if I could contribute somehow, perhaps one of the improvements mentioned above. I looked through OCA/oca-ci#10 and I think I could do that, if nobody's working on it currently.

@PabloEForgeFlow cool, that is most welcome. Just checking if @rousseldenis was not planning to do the same.

@rousseldenis
Copy link
Contributor

rousseldenis commented Sep 13, 2024

Hello, I was wondering if I could contribute somehow, perhaps one of the improvements mentioned above. I looked through OCA/oca-ci#10 and I think I could do that, if nobody's working on it currently.

@PabloEForgeFlow cool, that is most welcome. Just checking if @rousseldenis was not planning to do the same.

@PabloEForgeFlow You can do it as the solution proposed is simpler than mine.

Ping me if you want review.

@PabloEForgeFlow
Copy link

Great I'll be working on it then, thanks @sbidoul @rousseldenis.

@PabloEForgeFlow
Copy link

Hey @sbidoul @rousseldenis , I've implemented a first version of OCA/oca-ci#10 in OCA/oca-ci#77, let me know what you think.

@pedrobaeza
Copy link
Member

pedrobaeza commented Sep 25, 2024

The 18.0 branch is already there:

https://github.com/odoo/odoo/tree/18.0

so this unblocks certain things.

@sbidoul
Copy link
Member Author

sbidoul commented Sep 25, 2024

@pedrobaeza let me know when the OCB 18 branch is ready. I'll then get a few things moving.

The big thing where help is most welcome is the repo template (modernize the linters, check the pylint-odoo configs, etc).

@pedrobaeza
Copy link
Member

Already completed:

  • create OCB 18.0 branch
  • set OCB 18.0 branch as default
  • Change OCB README to OCB one

@sbidoul
Copy link
Member Author

sbidoul commented Sep 26, 2024

The updated OCB sync script is up and running.

@sbidoul
Copy link
Member Author

sbidoul commented Sep 26, 2024

Wrt the python version, I suspect Odoo will continue to support 3.10, so we'll continue to use that version in ci and require python >= 3.10 in our wheels. To be confirmed when they create the official docker image.

postgres, 9.6 is not supported anymore by Odoo 18. Basic tests pass with the oldest supported version, which is postgres 12.

@sbidoul
Copy link
Member Author

sbidoul commented Sep 26, 2024

The oca-ci images are ready.

@omalbastin
Copy link

FYI in js side
@web/webclient/actions/action_hook changed to @web/search/action_hook

@JordiBForgeFlow
Copy link
Member

@pedrobaeza let me know when the OCB 18 branch is ready. I'll then get a few things moving.

The big thing where help is most welcome is the repo template (modernize the linters, check the pylint-odoo configs, etc).

@PabloEForgeFlow and @ArnauCForgeFlow can help. But will need some guidance. They are coming to OCA Days.

@gurneyalex
Copy link
Member

Wrt the python version, I suspect Odoo will continue to support 3.10, so we'll continue to use that version in ci and require python >= 3.10 in our wheels. To be confirmed when they create the official docker image.

From the setup.py of odoo 18, it requires python >= 3.10.

postgres, 9.6 is not supported anymore by Odoo 18. Basic tests pass with the oldest supported version, which is postgres 12.

If the goal is to use the oldest supported version, and count on the forward compatibility of postgresql, then yes.

@sbidoul
Copy link
Member Author

sbidoul commented Sep 30, 2024

First Odoo 18 PR here: OCA/server-env#204

There are a couple of pre-commit issues to sort out.

@sbidoul
Copy link
Member Author

sbidoul commented Oct 2, 2024

oca-github-bot updated and restarted.

@sbidoul
Copy link
Member Author

sbidoul commented Oct 4, 2024

click-odoo-makepot works, although there are issues in the click-odoo and click-odoo-contrib test suite.

@sbidoul
Copy link
Member Author

sbidoul commented Oct 6, 2024

The migration issues have been created.

@pedrobaeza
Copy link
Member

One interesting thing to add to the linters is this one: OCA/odoo-module-migrator#98

@rven
Copy link

rven commented Oct 7, 2024

When will the 18.0 branches be created?

@sbidoul
Copy link
Member Author

sbidoul commented Oct 7, 2024

When will the 18.0 branches be created?

Soon. You can follow progress in https://github.com/OCA/repo-maintainer-conf

@simahawk
Copy link
Contributor

simahawk commented Oct 8, 2024

When will the 18.0 branches be created?

Coming in few mins as long as the build on https://github.com/OCA/repo-maintainer-conf/actions gets green :)

@EdgarRetes
Copy link

image
Hi, I'm getting this error while migrating a module to v18.0. Is there a way to fix this?

@pedrobaeza
Copy link
Member

Uhm, if no tests, is there a warning on Odoo?

@PabloEForgeFlow
Copy link

It's definetely due to no tests being run and checklog-odoo, which is enabled by default on v18.

@sanderlienaerts
Copy link

sanderlienaerts commented Oct 9, 2024

We use the following entry in checklog-odoo.cfg to bypass the error:

[checklog-odoo]
ignore=
    WARNING.*0 failed, 0 error\(s\).*

edit: thanks for clarifying @PabloEForgeFlow - use the statement above with caution since you may want to know if no tests are being run

@PabloEForgeFlow
Copy link

There are probably some other warnings which we want to ignore. As the feature is tested on more repos we might want to add a generic checklog-odoo.cfg to the template ignoring those, I guess we'll see.

@rousseldenis
Copy link
Contributor

There are probably some other warnings which we want to ignore. As the feature is tested on more repos we might want to add a generic checklog-odoo.cfg to the template ignoring those, I guess we'll see.

I don't recommend using template for warnings (except the one for 0 tests).

Usually, they really means something that should be fixed. That should be done case by case depending the repository

@rousseldenis
Copy link
Contributor

(except the one for 0 tests).

But, @EdgarRetes, the question is maybe, why aren't there any tests ? 😅

@ap-wtioit
Copy link

ap-wtioit commented Oct 9, 2024

also got an issue with i guess oca_checklog_odoo, for expected test errors do we need to silence the logger during the test? is there sample code to assert the error messages in a mock logger?

with self.assertRaises(...):
    ...

should in my case produce an error in the log.

https://github.com/OCA/server-auth/actions/runs/11253916523/job/31290197142?pr=705

2024-10-09 11:23:20,294 242 INFO odoo odoo.addons.auth_oidc.tests.test_auth_oidc_auth_code: Starting TestAuthOIDCAuthorizationCodeFlow.test_login_without_any_key ... 
2024-10-09 11:23:20,327 242 ERROR odoo odoo.addons.auth_oidc.models.res_users: user_id claim not found in id_token (after mapping). 

@sbidoul
Copy link
Member Author

sbidoul commented Oct 9, 2024

@ap-wtioit you can try with self.assertLogs. See for instance OCA/server-tools@7d2e3d8.

@ap-wtioit
Copy link

@sbidoul thanks, that works perfectly.

@bealdav
Copy link
Member

bealdav commented Oct 9, 2024

@EdgarRetes the same here OCA/server-ux#950

Really need a test here @rousseldenis ?

@rousseldenis
Copy link
Contributor

@EdgarRetes the same here OCA/server-ux#950

Really need a test here @rousseldenis ?

Yes, a dummy test is maybe a workaround.

@bealdav
Copy link
Member

bealdav commented Oct 10, 2024

Yes I can make a dummy test on my side, but is it an expected for other case ?

@rousseldenis
Copy link
Contributor

Yes I can make a dummy test on my side, but is it an expected for other case ?

Which other case?

I would say it can be good to say: Hey, nothing to test here, so the add of dummy test is IMHO a convenient solution

@bealdav
Copy link
Member

bealdav commented Oct 10, 2024

We use the following entry in checklog-odoo.cfg to bypass the error:

It works on my PR, thanks

@AlexanderPashuk
Copy link

Hey there,

Any timeline of publishing OCA modules for Odoo 18.0 on Odoo Apps? Some of our products depend on OCA modules, so it blocks us from publishing them... Will be happy to help if needed.

Thanks!

@EdgarRetes
Copy link

EdgarRetes commented Oct 23, 2024

def _check_recursion(self, parent=None):
warnings.warn("Since 18.0, one must use not _has_cycle() instead", DeprecationWarning, 2)
return not self._has_cycle(parent)

I found this warning while migrating to v18, maybe it should be included in the Wiki (?)

@pedrobaeza
Copy link
Member

Yes, it can be added. What is the replacement for such method?

@EdgarRetes
Copy link

Yes, it can be added. What is the replacement for such method?

"_has_cycle()" instead of "_check_recursion()"

@pedrobaeza
Copy link
Member

@rven
Copy link

rven commented Oct 24, 2024

@pedrobaeza

odoo/odoo@728d9f8
[REF] stock: remove product type

is replaced by boolean is_storable

@pedrobaeza
Copy link
Member

@rven

imagen

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

No branches or pull requests