odoo-lsp icon indicating copy to clipboard operation
odoo-lsp copied to clipboard

Diagnostics

Open Desdaemon opened this issue 2 years ago • 2 comments

Reuse the completion mechanism to provide diagnostics.

  • [x] Non-existent fields on models
  • [x] Invalid mapped access
  • [x] Non-existent XML records
  • [x] Incorrect use of constrains (no dotted access)
  • [x] Non-existent method name passed to compute=
  • [x] ~~Field used in compute method but not listed in @api.depends~~

Usability issues:

  • [ ] Incremental diagnostics
    • [x] Calculate damage zone
    • [ ] Separate update-independent AST nodes from dependent ones

Desdaemon avatar Dec 01 '23 20:12 Desdaemon

I was looking at this one, made a base implementation. but while testing, I got the scenario where I use fields in the computed method that I don't want to have in the depends.

at first I though about adding a comment to ignore some fields. but I dont like that. Do you had any thought on it?

gbrito avatar Jul 02 '25 11:07 gbrito

Yeah a lot of things have changed since then and I think it's no longer good advice to add everything into depends.

Desdaemon avatar Jul 02 '25 11:07 Desdaemon