Skip to content

"unknown attribute" diagnostic #604

Description

@nmarotte

Hello. I think the current extension (vscode) already detects issues and store them in the "Problems" tab which is filled with standard code (odoo and enterprise) warnings/errors too.

In my team, we work on upgrading custom code written in one version of Odoo and making sure it works in the next version. Very often, we reference fields that were removed or renamed between the versions (search for commit 91dfbffdda19822c13f3cd245fe6ba50497f5859 in https://github.com/odoo-ps/ to find a PR where this was the case.

For instance, company_id on account.account does not exist in Odoo 19 anymore, and company_ids should be used instead.

However, I was not able to trigger an error with the Odoo LS extension by explicitely calling self.account_id.company_id in an account.move.line like in the image example
Image

Trying to find it in the list of all errors does not show up
Image

Even though this is my configuration
Image
so it should definitely look for that folder

So here is my question/issue/improvement request.

  1. Are those use cases supported ? It looks like yes but maybe it is my config that is not setup properly ? Or too many files ?

  2. If they are not, could this kind of feature be added ? It will prove very very valuable for our team. The framework seems already there (CTRL+Click on company_id does not do anything, but if I add the missing "s" then it finds the field definition, so it definitely knows company_id is wrong)
    I would definitely be able to help by looking for or providing examples like this to be able to test the feature

Thanks !

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions