Skip to content

Conversation

@mmahrouss
Copy link
Collaborator

No description provided.

mmahrouss and others added 29 commits January 27, 2026 11:47
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.
While validating search domain, for relational
fields, i.e. "m2ofield.normalfield", we should
check all the symbols m2ofield on the model, not
just one, so we set true on get member symbol
We are trying to do that by checking _register = False.
The check was failing because we handled only one evaluation.
However, in latest versions we also have a type hint, which is its own evaluation.
For that, we implement here a smarter search that only looks are evaluations with values.
In that case, we should be more generic in catching cases.
Consider using this as the check, instead of checking symbol trees
Check if class model is in a module, otherwise do not mark it as a model
This is to avoid crashing later due to the class not being in a model.
The crash to avoid is in `core.model.Model.get_symbols`
The base model's search method should have an evaluation of
EvaluationSymbolPtr::SELF.

This used to be the case, but it got lost in a refactor ([1]).

[1]: ca26c3e
Before we were checking if inverse_name arg
points to a M2O field, but it can also be a
Many2oneReference

Fixed false positives for OLS03022
__init_subclass__ and __class_getitem__ have a special behavior
where they are implicitly classmethods without the decorator
This is added here to avoid, for example, wrong diagnostics
Fix arg index to account for is on instance if it is true
We were reading client config every time the config file changes.
We got crash reports for unwrapping a None for Config.
Already, we restart if the config change, so the check is redundant and causes unnecessary errors
Additionally, it is safer to return and Err instead of calling unwrap
This could happen when building base, that One2many is
not built yet, which caused a wrong diagnostic.
The issue:
In follow_ref's main loop, popping from the front of the results Deque
when meaning to replace an evaluation would not necessarily remove the
correct one.

In order to fix this and reduce complexity of the main loop with a
moving index over a Deque, we switch to a work queue approach:
- evaluations that need to be processed are pushed to and popped from
the work queue,
- final evaluations are pushed to the results vector.

Other changes:
- `acc` was renamed to `visited` for clarity.
- some indentation could be reduced with `let else` constructs, improving
readability.
This is done because functions that have a
return value that refers to a field with a descriptor
were not correctly transferred
and were showing Many2One instead of
ModelName
We were receiving crash reports for file infos already borrowed

Thus, this PR avoids file info references from living too long whenever possible
A panic was happening on `werkzeug/middleware/proxy_fix.py` from site packages
which had an import to `werkzeug/urls`, which has an arch builder hook calling get_local_tree on it
So the resulting path is shorter than the EP path, causing an out of bounds panic.

This PR assures we cannot get an invalid range
Named expression targets need to be a name expression to be valid syntax.

But now we allow invalid files in, so this PR makes sure we do not panic when it happens
Module packages are now built in the same order as the Odoo server loads
them.
@mmahrouss mmahrouss added this to the 1.3.0 milestone Feb 6, 2026
@mmahrouss mmahrouss requested a review from fda-odoo February 6, 2026 17:12
@mmahrouss mmahrouss self-assigned this Feb 6, 2026
@mmahrouss mmahrouss marked this pull request as ready for review February 6, 2026 17:12
@github-actions
Copy link

github-actions bot commented Feb 6, 2026

⚠️ The file 'Cargo.toml or constant.rs' has been modified in this PR. Please review the changes carefully.

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.

3 participants