Skip to content

[19.0][MIG] fleet_vehicle_fuel_type_ethanol: Migration to 19.0 - #212

Closed
DenerWilliam wants to merge 17 commits into
OCA:19.0from
DenerWilliam:19.0-mig-fleet_vehicle_fuel_type_ethanol
Closed

[19.0][MIG] fleet_vehicle_fuel_type_ethanol: Migration to 19.0#212
DenerWilliam wants to merge 17 commits into
OCA:19.0from
DenerWilliam:19.0-mig-fleet_vehicle_fuel_type_ethanol

Conversation

@DenerWilliam

Copy link
Copy Markdown

Up to 19.0

marcelsavegnago and others added 15 commits January 27, 2026 18:58
Currently translated at 100.0% (10 of 10 strings)

Translation: fleet-12.0/fleet-12.0-fleet_vehicle_fuel_type_ethanol
Translate-URL: https://translation.odoo-community.org/projects/fleet-12-0/fleet-12-0-fleet_vehicle_fuel_type_ethanol/pt_BR/
Currently translated at 100.0% (5 of 5 strings)

Translation: fleet-15.0/fleet-15.0-fleet_vehicle_fuel_type_ethanol
Translate-URL: https://translation.odoo-community.org/projects/fleet-15-0/fleet-15-0-fleet_vehicle_fuel_type_ethanol/it/
Currently translated at 100.0% (4 of 4 strings)

Translation: fleet-16.0/fleet-16.0-fleet_vehicle_fuel_type_ethanol
Translate-URL: https://translation.odoo-community.org/projects/fleet-16-0/fleet-16-0-fleet_vehicle_fuel_type_ethanol/es/
Currently translated at 100.0% (4 of 4 strings)

Translation: fleet-16.0/fleet-16.0-fleet_vehicle_fuel_type_ethanol
Translate-URL: https://translation.odoo-community.org/projects/fleet-16-0/fleet-16-0-fleet_vehicle_fuel_type_ethanol/sv/
@marcelsavegnago marcelsavegnago changed the title 19.0 mig fleet vehicle fuel type ethanol [19.0][MIG] fleet_vehicle_fuel_type_ethanol: Migration from 18.0 Jan 28, 2026
@marcelsavegnago

Copy link
Copy Markdown
Member

@DenerWilliam

Thanks for the contribution and welcome to OCA 🙂

Just a small note about the commit structure, following the official migration guide. According to the Migration to version 19.0 wiki, the expected flow is to first commit only the pre-commit auto-fixes, and then have a separate migration commit.
See: https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-19.0

In the current state of the PR, the changes that should belong to the migration (for example, version bump and other migration tasks) were included in the [IMP] : pre-commit auto fixes commit. Because of that, there is effectively no dedicated [MIG] : Migration to 19.0 commit.

Could you please adjust the commits so that:

the pre-commit commit contains only formatting / linter auto-fixes, and

the actual migration changes are moved into a separate [MIG] commit, as described in the wiki?

This helps keep the history clean and makes reviews and future migrations much easier.

@DenerWilliam
DenerWilliam force-pushed the 19.0-mig-fleet_vehicle_fuel_type_ethanol branch from 231f8ce to 12c64f3 Compare January 28, 2026 10:37
@DenerWilliam

Copy link
Copy Markdown
Author

Thank you for the welcome and for the feedback 🙂
I've reorganized the history so that the [IMP] commit only contains the pre-commit auto fixes, and the migration changes are now in a separate [MIG] fleet_vehicle_fuel_type_ethanol: Migration to 19.0 commit, as requested.

@marcelsavegnago

marcelsavegnago commented Jan 28, 2026

Copy link
Copy Markdown
Member

@DenerWilliam drop this please

image

@DenerWilliam
DenerWilliam force-pushed the 19.0-mig-fleet_vehicle_fuel_type_ethanol branch from 12c64f3 to f70c4e7 Compare January 29, 2026 18:34
@DenerWilliam

Copy link
Copy Markdown
Author

@marcelsavegnago, done.

Comment on lines +7 to +16
class FleetVehicleModel(models.Model):
_inherit = "fleet.vehicle.model"
default_fuel_type = fields.Selection(
selection_add=[
("ethanol", "Ethanol"),
("flex", "Flex (Gasoline/Ethanol)"),
]
)


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.

I think this code is not correct. I don’t see the need for this, since default_fuel_type is not an extensible selection field. You can remove this.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

When we remove this class, the field for selecting created models still appears normal, but when we try to create a new model, the selection field comes from default.fuel.type; in this case, these two options would not appear there.

Captura de tela de 2026-01-31 09-01-14 Captura de tela de 2026-01-31 09-02-36 Captura de tela de 2026-01-31 09-05-18

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.

When we remove this class, the field for selecting created models still appears normal, but when we try to create a new model, the selection field comes from default.fuel.type; in this case, these two options would not appear there.

Captura de tela de 2026-01-31 09-01-14 Captura de tela de 2026-01-31 09-02-36 Captura de tela de 2026-01-31 09-05-18

Thanks for the explanation. I understand it now — my apologies for the confusion earlier. This approach makes sense and looks fine to me.

"version": "19.0.1.0.0",
"license": "AGPL-3",
"category": "Human Resources/Fleet",
"author": "Escodoo,Odoo Community Association (OCA)",

@CristianoMafraJunior CristianoMafraJunior Jan 30, 2026

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.

Could you add spacing here as well? Please translate this too
"author": "Escodoo, Odoo Community Association (OCA)",

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I followed the step-by-step instructions and, as indicated, did not edit the author field, keeping it exactly as it was in the project from version 18.
Regarding the translation, I chose not to perform it since it was not a blocker for the migration. In this way, I kept the existing pattern and focused only on the adaptation needed to ensure the project runs correctly in version 19.

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.

I followed the step-by-step instructions and, as indicated, did not edit the author field, keeping it exactly as it was in the project from version 18. Regarding the translation, I chose not to perform it since it was not a blocker for the migration. In this way, I kept the existing pattern and focused only on the adaptation needed to ensure the project runs correctly in version 19.

It would just be the spacing, you know? Something simple

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done

@CristianoMafraJunior

Copy link
Copy Markdown
Member

I don’t see any blockers, but the commit name could be: f70c4e7
[MIG] fleet_vehicle_fuel_type_ethanol: Migration to 19.0

@DenerWilliam DenerWilliam changed the title [19.0][MIG] fleet_vehicle_fuel_type_ethanol: Migration from 18.0 [19.0][MIG] fleet_vehicle_fuel_type_ethanol: Migration to 19.0 Jan 31, 2026
@DenerWilliam
DenerWilliam force-pushed the 19.0-mig-fleet_vehicle_fuel_type_ethanol branch from f70c4e7 to 8db65e5 Compare January 31, 2026 18:06

@marcelsavegnago marcelsavegnago left a comment

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.

@OCA-git-bot

Copy link
Copy Markdown
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). 🤖

@WesleyOliveira98 WesleyOliveira98 left a comment

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.

CODE REVIEW - OK

@BhaveshHeliconia

Copy link
Copy Markdown
Contributor

@DenerWilliam Could you please check whether a PR already exists for a module before opening a new one?
In this case, a PR was already open before yours, and the same issue has happened with other modules in this repository as well.

PR - #198

@marcelsavegnago

Copy link
Copy Markdown
Member

@BhaveshHeliconia

Apologies for this — this one is on me.
I suggested this module to @DenerWilliam as part of the migration learning process and failed to check beforehand whether there was already an open PR.

Thanks for flagging it, @BhaveshHeliconia. We’ll make sure to reinforce this check internally to avoid this happening again.

@BhaveshHeliconia BhaveshHeliconia left a comment

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.

@marcelsavegnago @DenerWilliam This PR can be closed, as the module has already been merged in #213.

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.