[19.0][MIG] crm_timesheet#843
Open
norlinhenrik wants to merge 28 commits intoOCA:19.0from
Open
Conversation
This addon assumed one will always fill the analytic account before the project, but current behavior does not let you choose a project outside current analytic account, which in practice means you can never change the project if `analytic_account_id` field is hidden (as it happens in other addons such as `project_issue_timesheet_time_control`). Now, if you choose a project it will fill the analytic account, and also the other way around, so why bother about the domains?
As now hr_timesheet bases all their functionality on projects, there's no sense to keep the old behavior linking crm.lead times to analytic account instead of projects, so I have changed this, making easier the associated logic (which, in the other hand, was not fully correct previously).
* Limit timesheet field addition in view to authorized users * Use proper view in lead embedded timesheet page * Don't show lead field in embedded timesheet page
Following the changes from OCA/project#586, here I implement the same UX when using it with CRM leads.
Imagine this scenario: 1. In tab 1 of the browser, you have opened lead 1. 2. In tab 2 of the browser, you have opened lead 2. 3. You go to tab 1 and start a timer. 4. Work, work, work... 5. You go to tab 2 and start a timer, stopping that of lead 1. 6. Work, work, work... 7. You go to tab 1 and see that timer as running (it is not, but you didn't refresh). You hit stop. Before this commit, it just seemed like the timer was actually stopped. What did happen behind the scenes is that your view was refreshed, but no timer was touched fortunately. After this commit, you get a message telling you that there's no timer to stop and that your browser is most likely out of sync. This mimics the behavior previously found when doing the same, but directly in the AAL. Now it's present in leads too.
Models related to timesheet time controls now inherit from a mixin that adds most needed logic automatically. This requires the changes introduced in OCA/project#596.
- README and manifest adapted - Views changed
[UPD] Update crm_timesheet.pot [BOT] post-merge updates Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: timesheet-16.0/timesheet-16.0-crm_timesheet Translate-URL: https://translation.odoo-community.org/projects/timesheet-16-0/timesheet-16-0-crm_timesheet/ Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: timesheet-16.0/timesheet-16.0-crm_timesheet Translate-URL: https://translation.odoo-community.org/projects/timesheet-16-0/timesheet-16-0-crm_timesheet/
Currently translated at 100.0% (11 of 11 strings) Translation: timesheet-16.0/timesheet-16.0-crm_timesheet Translate-URL: https://translation.odoo-community.org/projects/timesheet-16-0/timesheet-16-0-crm_timesheet/it/
Currently translated at 100.0% (11 of 11 strings) Translation: timesheet-16.0/timesheet-16.0-crm_timesheet Translate-URL: https://translation.odoo-community.org/projects/timesheet-16-0/timesheet-16-0-crm_timesheet/es/
Currently translated at 100.0% (11 of 11 strings) Translation: timesheet-16.0/timesheet-16.0-crm_timesheet Translate-URL: https://translation.odoo-community.org/projects/timesheet-16-0/timesheet-16-0-crm_timesheet/pt_BR/
[IMP]crm_timesheet: make column optional [BOT] post-merge updates
[UPD] Update crm_timesheet.pot [BOT] post-merge updates
[BOT] post-merge updates
TT56039 Co-authored-by: jdebetaz
CRogos
approved these changes
Nov 25, 2025
| "name": "CRM Timesheet", | ||
| "category": "Customer Relationship Management", | ||
| "version": "19.0.1.0.0", | ||
| "depends": ["crm", "project_timesheet_time_control"], |
Contributor
There was a problem hiding this comment.
I've renamed project_timesheet_time_control to hr_timesheet_time_control
You can add a temporary link to this PR, so that you can test.
Contributor
alexey-pelykh
left a comment
There was a problem hiding this comment.
Thanks for working on this. Tests are currently failing on both OCB and Odoo CI — might be related to the project_timesheet_time_control dependency or API changes in 19.0. Pre-commit is green so the scaffolding looks fine; just the runtime tests need fixing.
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.
I have not ported the dependency project_timesheet_time_control