Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better domains - autocompletion, diagnostics, hover #167

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

fda-odoo
Copy link
Collaborator

The PR contains all changes and fixs about search domains.

  • Autocompletion for fields
  • comprehension of fields that contains dots
  • fix wrong diagnostics of invalid fields
  • hover of fields

on models, get_symbols returns all symbols that build the model, but there was no easy way to get all symbols that build the model with inherited models. get_full_model_symbols do it now. It doesn't contain inheritS howevers.
@fda-odoo fda-odoo self-assigned this Dec 19, 2024
@fda-odoo fda-odoo added bug Something isn't working enhancement New feature or request labels Dec 19, 2024
@fda-odoo fda-odoo added this to the 0.4.0 milestone Dec 19, 2024
@fda-odoo fda-odoo force-pushed the master-domains-auto-fda branch from 02e2c6c to 1cb2e18 Compare January 7, 2025 12:07
@fda-odoo fda-odoo marked this pull request as ready for review January 7, 2025 13:20
@fda-odoo fda-odoo requested a review from mmahrouss January 9, 2025 15:16
Copy link
Collaborator

@mmahrouss mmahrouss left a comment

Choose a reason for hiding this comment

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

Nice really cool!
Just one question on a comment, otherwise looks great!

let from_module = file.borrow().find_module().clone();
Symbol::all_members(&parent, session, &mut all_symbols, true, from_module, &mut None, false);
for (_symbol_name, symbols) in all_symbols {
//we could use symbol_name to remove duplicated names, but it would hide functions vs variables
Copy link
Collaborator

Choose a reason for hiding this comment

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

But we cannot have functions and variables with the same name, can we?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We could. Some would be shadowed, but as we are searching here in classes, inheritance, co-models,... we could find different symbols type with the same name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants