Skip to content

Conversation

@mmahrouss
Copy link
Collaborator

@mmahrouss mmahrouss commented Dec 10, 2025

Since we added CachedModel for 19.1. All commit that target 19.1 that were not rebased on master after adding the CachedModel were failing because we were always returning false in test_symbol_is_model because we do not find CachedModel.

However, I think it is incorrect to return false anyway, when CachedModel does not exist. Because a model can inherit from models.Model, and be fine, even before CachedModel is needed, same with TransientModel.

@mmahrouss mmahrouss added this to the 1.1.3 milestone Dec 10, 2025
@mmahrouss mmahrouss self-assigned this Dec 10, 2025
@mmahrouss mmahrouss added the bug Something isn't working label Dec 10, 2025
Copy link
Collaborator

@cammarosano cammarosano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is a fix, then I suggest you include in the commit message what you are fixing...
(I suppose this function returns false when it should not, in case CachedModel is not there).

Which leads to my next question: do we really need to support branches that haven't rebased yet into master?

@mmahrouss mmahrouss force-pushed the alpha-ignore-cached-model-nonexistence-mdms branch from 865c25a to 2d5ed6b Compare December 11, 2025 09:46
@mmahrouss mmahrouss changed the title [FIX] avoid exiting test_symbol_is_model if CachedModel is not there [FIX] fix failure to detect models when CachedModel is missing Dec 11, 2025
@mmahrouss mmahrouss force-pushed the alpha-ignore-cached-model-nonexistence-mdms branch 2 times, most recently from 464ae72 to 1fe060c Compare December 11, 2025 10:37
CachedModel is not required to define Odoo models, so we should not
fail to detect models if CachedModel is not found in the Odoo source code.

Treat `Model` and `TransientModel` similarly.
only exit if `BaseModel` does not exist.
@mmahrouss mmahrouss force-pushed the alpha-ignore-cached-model-nonexistence-mdms branch from 1fe060c to 893bc7c Compare December 11, 2025 11:41
@mmahrouss mmahrouss merged commit 15a120a into alpha Dec 11, 2025
1 of 2 checks passed
@mmahrouss mmahrouss deleted the alpha-ignore-cached-model-nonexistence-mdms branch December 11, 2025 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants