[19.0][IMP] hr_timesheet_time_control_begin_end: handle str default_date_time in default_get#927
Merged
OCA-git-bot merged 1 commit intoMay 21, 2026
Conversation
…me in default_get
deacb26 to
1a76b79
Compare
Member
|
And why it can't be a datetime? |
Contributor
Author
|
I assume that the cause is in the calendar module and how it builds is buildRawRecord: https://github.com/odoo/odoo/blob/19.0/addons/web/static/src/views/calendar/calendar_model.js#L379 |
pedrobaeza
approved these changes
May 21, 2026
pedrobaeza
left a comment
Member
There was a problem hiding this comment.
OK then.
/ocabot merge patch
Contributor
|
On my way to merge this fine PR! |
Contributor
|
Congratulations, your PR was merged at 06be484. Thanks a lot for contributing to OCA. ❤️ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@pedrobaeza when useing hr_timesheet_calendar and hr_timesheet_time_control_begin_end the default_date_time in the context comming from the calendar is str not datetime.
Therefore the change we recently did https://github.com/OCA/timesheet/pull/899/changes is not working.
This error occurs when creating a new entry in the calendar view. runboat

Therefore I would like to re-add the string handling.
Another possible solution would be to make hr_timesheet_calendar dependent of hr_timesheet_time_control_begin_end instead of hr_timesheet_time_control. In this case the execution order is correct and the str can be handled in hr_timesheet_calendar. (but I prefer adding the str handling here).
What do you think?