Replies: 7 comments 1 reply
-
Hello @BerndHme , There is 2 ways to use a virtual environment with odoo-ls. Let me know if you succeeded to set it up, else it would be a pleasure to answer your questions :) |
Beta Was this translation helpful? Give feedback.
-
Hi, Thank you for your response. user settings:
If I add this in a .py file
I still don't get intellisense while typing it. my current default setup is
with this in my user settings
This works, except for the dynamically created objects by the odoo ORM I guess.
I also get intellisense for the default class attributes. I also have nice coloring using the ms extensions. Would be nice to have this all with the odoo extension. Using the odoo extension I disable the Pylance extension. What extensions should I use to get proper code:
? |
Beta Was this translation helpful? Give feedback.
-
Indeed, OdooLS is not able to provide autocompletion on symbols that has not been loaded already. Import statement are not fully auto-completable too. That's a current limitation we still have to work on. It should be able to show you documentation on 'hover' and follow 'go to definition' on symbols to your virtualenv however. Outside of the import statement you should be able to see autocompletion too, by typing "relativedelta." for example. I'm not sure to understand your second question though. If you mean that it would be nice to have coloration in OdooLS, that's not planned soon, as the extension is made to work alongside the Microsoft Python Extension if you want and it is providing these feature. Indeed, Pylance will conflict with OdooLS and will show you a lot of duplicates results. You will have definitions, autocompletion, etc... in double. You should then set up your language server of Python to 'None' instead of 'pylance', like you did in the first part of your message:
Actually the development of OdooLS is focusing on:
Debugging is planned, but not included yet. Let me know if you still have some questions ! |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
That's a good question, and I think that the answer will depend on your needs. The warning you got can happen if the file you opened iis not in your configuration or is not imported by another file of the project (and so not detected as part of it). If that's the case, it could be a bug. Do not hesitate to give us feedback on the project to help us improve it :) |
Beta Was this translation helpful? Give feedback.
-
Hi, I think if the automcompletion for the imports would work, it would give a nice extra touch for the dev. experience. Also, the configuration id count keeps counting up, you can't reset it. I think the configuration count is stored somewhere in |
Beta Was this translation helpful? Give feedback.
-
That's in our plans to add the autocompletion for imports, but this is not supported right now because the code to scan for available imports is not ready yet, so you would only see already imported items. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
On the bottom of this page.
https://github.com/odoo/odoo-ls/wiki/How-to-use
There is noted that
"You can choose a python that is in a virtual environment, it will be used in it."
How can you choose your .venv folder?
Because when you select it at "additional addons"
it gives a red light.
My folder structure is
root
--- .venv
--- odoo (community)
--- enterprise
How can I get intellisense from the packages stored in the .venv?
i.e.:
~.venv\Lib\site-packages\dateutil
because now it doesn't.
Beta Was this translation helpful? Give feedback.
All reactions