Skip to content

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

Open
DenerWilliam wants to merge 17 commits intoOCA:19.0from
DenerWilliam:19.0-mig-fleet_vehicle_fuel_type_ethanol
Open

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

Conversation

@DenerWilliam
Copy link

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
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
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
Copy link
Member

marcelsavegnago commented Jan 28, 2026

@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
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)"),
]
)


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
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

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)",
Copy link
Member

@CristianoMafraJunior CristianoMafraJunior Jan 30, 2026

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
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.

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
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
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
Copy link
Member

@marcelsavegnago marcelsavegnago left a comment

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
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
Contributor

@WesleyOliveira98 WesleyOliveira98 left a comment

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
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

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.