Repository navigation
[19.0][FIX] kpi: history name default evaluated when the server starts - #1241
Open
parabol123654 wants to merge 1 commit into
Open
parabol123654 wants to merge 1 commit into
parabol123654 wants to merge 1 commit into
Conversation
Contributor
|
Hi @max3903, |
fields.Datetime.now() was called when the module was imported, so every KPI history line got the time the Odoo server was started as its name. Assisted-by: Claude Opus 5.5
parabol123654
force-pushed
the
19.0-fw-kpi-history-name
branch
from
November 14, 2026 18:53
a34a92a to
83f42ef
Compare
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.
Forward port of #1229 (merged in 18.0).
The
nameofkpi.historyhaddefault=fields.Datetime.now(), evaluated once when the module is imported, so every history line computed afterwards was named after the time the server started. 19.0 has the same code; the default is now a lambda.Test
test_kpi_history_name: fails without the fix ('2026-11-13 16:33:11' != '2030-02-15 08:00:00'), and the 19 tests ofkpipass with it.Assisted-by: Claude Opus 5.5