Skip to content

Conversation

@rpsjr
Copy link

@rpsjr rpsjr commented Sep 16, 2025

Motivation
The standard driver assignation log in Odoo tracks assignments by date, which lacks the precision needed to determine responsibility for time-sensitive events like traffic infractions. This module introduces datetime precision to solve this problem.

Implementation
Adds datetime_start and datetime_end fields to fleet.vehicle.assignation.log.
Replaces the original date fields in the view with the new datetime fields for a better user experience.
Keeps the original date fields invisible and synchronized via onchange methods to ensure backward compatibility.
Overrides fleet.vehicle.write() to set the datetime_start and datetime_end to the exact moment a driver is changed from the vehicle's form view.

@rpsjr rpsjr force-pushed the 18.0-add-fleet_vehicle_assignation_log_datetime branch from 109ab29 to 10b20eb Compare September 16, 2025 15:44
@rpsjr rpsjr marked this pull request as draft September 16, 2025 16:20
@rpsjr rpsjr force-pushed the 18.0-add-fleet_vehicle_assignation_log_datetime branch 2 times, most recently from 18db92e to f59fbc1 Compare September 16, 2025 20:34
@rpsjr rpsjr marked this pull request as ready for review September 16, 2025 20:36
@rpsjr
Copy link
Author

rpsjr commented Sep 16, 2025

@marcelsavegnago
Copy link
Member

@rpsjr I wouldn’t include the i18n folder. Once the PR is merged, GitHub automatically generates the .pot file. Translations can then be handled later through Weblate.

@rpsjr
Copy link
Author

rpsjr commented Sep 23, 2025

@rpsjr I wouldn’t include the i18n folder. Once the PR is merged, GitHub automatically generates the .pot file. Translations can then be handled later through Weblate.

Made it

@marcelsavegnago
Copy link
Member

@rpsjr could you please squash the commits and keep only the ADD commit? Thanks!

@rpsjr rpsjr force-pushed the 18.0-add-fleet_vehicle_assignation_log_datetime branch from 26f7a42 to fc1c81b Compare September 23, 2025 22:24
@rpsjr
Copy link
Author

rpsjr commented Sep 23, 2025 via email

@marcelsavegnago
Copy link
Member

@rpsjr, could you fix the commit message?
It looks like during the squash you kept all the intermediate fix and pre-commit messages. Ideally, it should be cleaned up and replaced with a single descriptive message.

Suggested final message:

[18.0][ADD] fleet_vehicle_assignation_log_datetime: add new module

To edit the commit message, you can run:

git rebase -i HEAD~1

In the editor, change pick to edit for the commit, then run:

git commit --amend
# edit the message to the final version suggested
git rebase --continue

This way the history stays clean without all the "fix" noise.

image

@rpsjr rpsjr force-pushed the 18.0-add-fleet_vehicle_assignation_log_datetime branch from fc1c81b to f698614 Compare September 24, 2025 10:51
@rpsjr rpsjr force-pushed the 18.0-add-fleet_vehicle_assignation_log_datetime branch from f698614 to 8234bb9 Compare September 24, 2025 10:57
@rpsjr
Copy link
Author

rpsjr commented Sep 24, 2025

@rpsjr, could you fix the commit message? It looks like during the squash you kept all the intermediate fix and pre-commit messages. Ideally, it should be cleaned up and replaced with a single descriptive message.

Suggested final message:

[18.0][ADD] fleet_vehicle_assignation_log_datetime: add new module

To edit the commit message, you can run:

git rebase -i HEAD~1

In the editor, change pick to edit for the commit, then run:

git commit --amend
# edit the message to the final version suggested
git rebase --continue

This way the history stays clean without all the "fix" noise.

image

Done!

Thx for ur patience.

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.

2 participants