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 17 #582

Open
29 of 33 tasks
sbidoul opened this issue Oct 22, 2023 · 20 comments
Open
29 of 33 tasks

Update our tooling to support Odoo 17 #582

sbidoul opened this issue Oct 22, 2023 · 20 comments

Comments

@sbidoul
Copy link
Member

sbidoul commented Oct 22, 2023

What needs to be done to create the 17.0 branches

Replace setup.py with pyproject.toml

This year I'd like to replace setup.py files with a pyproject.toml at the root of each addon, using setuptools-odoo's successor:
whool. This will get rid of most of the setup directory.

This is less intrusive, standards-based and necessary because setuptools-odoo relied on setuptools features that are being deprecated. There are a few pre-requisites for that:

Use ruff

If the community agrees, we could use ruff to improve pre-commit run performance:

  • Convert our pre-commit config to replace flake8, isort and pyupgrade with ruff. A
    .ruff.toml at the repo root can replace .flake8 and .isort.cfg.
  • Use ruff-format instead of black

PR here: OCA/oca-addons-repo-template#219

This can be done as a copier question in the addons repo template to switch between ruff and other linters.

Update pylint config

  • It's a good time to review or mandatory and optional pylint checks in the addons repo template

Usual tasks

See #537 for links to similar PRs for 16.0.

@celm1990
Copy link

For click-odoo-contrib is need adapt code according this commit odoo/odoo#68491

https://github.com/acsone/click-odoo-contrib/blob/1f2c6323b85520007f8cfbec16d6147a25d5d349/click_odoo_contrib/_dbutils.py#L20

When branch for 17.0 are available? I ask this for Doodba adaptations so

@sbidoul
Copy link
Member Author

sbidoul commented Oct 22, 2023

@celm1990 thanks for the hint about click-odoo. Would you like to do a PR there?

When branch for 17.0 are available? I ask this for Doodba adaptations so

We'll likely create the OCA 17.0 branches in the next couple of week after Odoo has released opened the 17.0 branch, depending on volunteers availability.

@pedrobaeza
Copy link
Member

It would be better to have them available for OCA days, as there a lot of module migrations happen, although it depends if Odoo have a 17.0 branch already available at odoo/odoo.

@celm1990
Copy link

Use ruff

If the community agrees, we could use ruff to improve pre-commit run performance:

  • Convert our pre-commit config to replace flake8, isort and pyupgrade with ruff. A
    .ruff.toml at the repo root can replace .flake8 and .isort.cfg.

Just out of curiosity, how much of a difference is there in the file changes when using pre-commit with ruff?

@sbidoul
Copy link
Member Author

sbidoul commented Oct 23, 2023

how much of a difference is there in the file changes when using pre-commit with ruff?

Normally not much or none at all as it is possible to configure ruff to do the same as isort+flake8.
I'll see if I can find the time to setup an example on some repo.

@celm1990
Copy link

It would be better to have them available for OCA days, as there a lot of module migrations happen, although it depends if Odoo have a 17.0 branch already available at odoo/odoo.

Branch is here now https://github.com/odoo/odoo/tree/17.0 ;)

@sbidoul
Copy link
Member Author

sbidoul commented Oct 27, 2023

Great! Anyone planning to work on some the above tasks, please announce yourself to avoid duplicate work.

@pedrobaeza
Copy link
Member

I will do the OCB and OpenUpgrade stuff.

@pedrobaeza
Copy link
Member

OCA branch 17.0 is now pushed (it needs to be done in several push batches, as GitHub limits the index of one push to 2 GB, and this exceeds such size). @sbidoul please put it as default branch and after merging the ocb sync change, deploy it in the server.

@sbidoul
Copy link
Member Author

sbidoul commented Oct 29, 2023

Ok, good progress so far.

Main next step now is to update the addon repo template, and particularly review the hook versions and pylint-odoo config. Help welcome.

@bosd
Copy link

bosd commented Oct 31, 2023

The addon icon menu generator is ready for merge.
However, only icons for versions pre 17 are supported.
Where is a good place to start the discussion about generating v17 community icons?

Can be quite a challenge to switch something which is compatible with the new odoo *milk theme.
Sticking to the old pre V17 icons is not an good option either because of the huge style mismatch.

Is there already some discussion about this in the community?

@pedrobaeza
Copy link
Member

Not yet. About icons, we are using https://ivantodorovich.github.io/odoo-icon/ as a versatile one. I have told @ivantodorovich about transferring it to OCA.

@ivantodorovich
Copy link
Contributor

ivantodorovich commented Oct 31, 2023

Not yet. About icons, we are using https://ivantodorovich.github.io/odoo-icon/ as a versatile one. I have told @ivantodorovich about transferring it to OCA.

Hey! I'm happy to transfer it to the OCA. I might need some assistance with the process, though 😓


About v17 icons, I don't think it'll be possible to have a tool for this. It's not like you can pick a fontawesome glyph and add a background color.. the new style, for better and for worse, requires a little bit of graphics design skills.

The good news is that after you get that done, there's no tedious repetitive work to do. Unlike the previous versions, the icon card and background is handled by the web client with css, so the app icon really just is a picture with transparent background, like this:

account

That means tools like https://ivantodorovich.github.io/odoo-icon/ won't really be needed. There's no gradient background, no shadow.. nothing to handle, really

@bosd
Copy link

bosd commented Nov 2, 2023

It's not like you can pick a fontawesome glyph and add a background color.. the new style, for better and for worse, requires a little bit of graphics design skills.

Considered the options IMO this is still the way to go. Pick an multi-color icon font, use an icon generator tool to adjust it to the colors used in the new menu.

Other options:

  1. Keep using pre-17 Icons. --> Huge style mismatch 😞
  2. Expect a programmer to have time and skills to create an icon which matches the new Milk theme. 🤔
  3. Do nothing, (Almost the same as point 2 🙊 )

There are some critics of the new Milk design. That the icons are to hard to interpret.
While switching to an multicolor icon font. We have the posibilitie to still keep the clarity of the functions. Making the colors (programmically) match the Milk theme, will prevent a huge style clash.
As example. an candidate could be core flat icon pack.

@sbidoul
Copy link
Member Author

sbidoul commented Nov 8, 2023

I'm adding the conversion of fragments to markdown in OCA/oca-addons-repo-template#228

@gurneyalex
Copy link
Member

Do we have something about the XML declaration in static/description/index.html?

see OCA/partner-contact#1625 and possibly many other.

@sbidoul
Copy link
Member Author

sbidoul commented Dec 8, 2023

It's a TODO, now tracked in #595. It's unlikely that I will have time for that in the coming weeks, so PR welcome :)

@mymage
Copy link
Member

mymage commented Feb 2, 2024

Hi @sbidoul, any outlook for the activity to activate Weblate for 17.0? Thanks

@sbidoul
Copy link
Member Author

sbidoul commented Feb 2, 2024

@mymage I'll try to give weblate some love soon. Thanks for your patience.

@mymage
Copy link
Member

mymage commented Feb 4, 2024

@mymage I'll try to give weblate some love soon. Thanks for your patience.

Now there are! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants