İçereği Atla
Odoo Menü
  • Portal
  • Ücretsiz deneyin
  • Uygulamalar
    Finans
    • Muhasebe
    • Faturalama
    • Masraf Yönetimi
    • Elektronik Çizelge (BI)
    • Belgeler
    • İmza
    Satış
    • Müşteri İlişkileri Yönetimi (CRM)
    • Satış
    • Satış Noktası Mağaza
    • Satış Noktası Restoran
    • Abonelikler
    • Kiralama
    Web Sitesi
    • Web Sitesi Oluşturucu
    • eTicaret
    • Blog
    • Forum
    • Canlı Sohbet
    • eÖğrenme
    Tedarik Zinciri
    • Envanter
    • Üretim
    • Ürün Yaşam Döngüsü Yönetimi
    • Satın Alma
    • Bakım
    • Kalite
    İnsan Kaynakları
    • Çalışanlar
    • İşe Alım
    • İzin
    • Değerlendirme
    • Referans
    • Filo Yönetimi
    Pazarlama
    • Sosyal Medyada Pazarlama
    • E-posta ile Pazarlama
    • SMS ile Pazarlama
    • Etkinlikler
    • Pazarlama Otomasyonu
    • Anket
    Hizmetler
    • Proje Yönetimi
    • Çalışma Çizelgeleri
    • Saha Hizmeti
    • Yardım Masası
    • Planlama
    • Randevular
    Verimlilik
    • Sohbet
    • Onay
    • Nesnelerin İnterneti
    • VoIP
    • Bilgi Bankası
    • WhatsApp
    Üçüncü taraf uygulamalar Odoo Stüdyo Odoo Bulut Platformu
  • Sektörler
    Perakende satış
    • Kitapçı
    • Giyim Mağazası
    • Mobilya Mağazası
    • Gıda Marketi
    • Hırdavat Dükkanı
    • Oyuncak Dükkanı
    Gıda ve Konaklama
    • Bar ve Pub
    • Restoran
    • Fast Food Restoranı
    • Konuk Evi
    • İçecek Distribütörü
    • Otel
    Gayrimenkul
    • Emlak Acentesi
    • Mimarlık Firması
    • İnşaat
    • Emlak Yönetimi
    • Bahçe Tasarımı
    • Mülk Sahipleri Derneği
    Uzmanlık
    • Muhasebe Firması
    • Odoo Partner
    • Pazarlama Ajansı
    • Hukuk Firması
    • Yetenek Kazanımı
    • Denetim ve Belgelendirme
    Üretim
    • Tekstil
    • Metal
    • Mobilyalar
    • Gıda
    • Bira fabrikası
    • Kurumsal Hediye
    Sağlık ve Spor
    • Spor Kulübü
    • Optik Mağazası
    • Fitness Merkezi
    • Sağlıklı Yaşam Merkezi
    • Eczane
    • Kuaför Salonu
    Ticaret
    • Tamirci
    • BT Donanım & Destek
    • Güneş Enerjisi Sistemleri
    • Ayakkabı İmalatçısı
    • Temizlik Hizmetleri
    • HVAC Hizmetleri
    Diğerleri
    • Kar Amacı Gütmeyen Kuruluş
    • Çevre Ajansı
    • Reklam Panosu Kiralama
    • Fotoğrafçılık
    • Bisiklet Kiralama
    • Yazılım Bayisi
    Tüm Sektörlere Göz Atın
  • Topluluk
    Öğrenim
    • Eğitim Araçları
    • Dokümantasyon
    • Sertifikasyonlar
    • Eğitim Etkinlikleri
    • Blog
    • Podcast
    Eğitim ve Gelişim
    • Eğitim Programı
    • Scale Up! İşletme Oyunu
    • Odoo'yu Ziyaret Edin
    Yazılım
    • İndirin
    • Sürümleri Kıyaslayın
    • Sürümler
    İş Birliği
    • Github
    • Forum
    • Etkinlikler
    • Çeviriler
    • Partner Olun
    • Partnerler için Hizmetler
    • Muhasebe Firmanızı Kaydettirin
    Hizmetler
    • Partner Bulun
    • Muhasebeci Bulun
    • Bir danışmanla görüşün
    • Kurulum Hizmetleri
    • Müşteri Referansları
    • Destek
    • Sürüm Yükseltme
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Demo randevusu alın
  • Fiyatlandırma
  • Yardım

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • Müşteri İlişkileri Yönetimi
  • e-Commerce
  • Muhasebe
  • Envanter
  • PoS
  • Proje Yönetimi
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
Yardım

How to properly import odoo in VisualStudio Code

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
configurationimportwarningodoo11
9 Cevaplar
27233 Görünümler
Avatar
Sebastian


First of i want to say that this issue is not breaking my installation its just hindering in my workflow.

When i import the odoo module like so: "from odoo import api, models, fields" i get the follwing warning:

'unresolved import 'odoo'Python(unresolved-import)' and there is a wavy line  underneath the word odoo.

Also because VSCode doesnt recognize odoo everytime the work fields is written i get a warning: 'Undefined variable:' fields'

As i said before i can compile and everything runs like expected but i see alot of warning i cant get rid of.

I googled the issue but couldnt find anything that fixed the problem.

I am probably missing something in my config files somewhere. 

Thanks for your help in advance.

Best wishes,

 Sebastian


2
Avatar
Vazgeç
Avatar
Hayagreeva Aditya Kasibhotla
En İyi Yanıt

To properly import odoo without a sweat, there's a simple tutorial: 


1
Avatar
Vazgeç
Avatar
ANGEL ADAN RAMIREZ ISEA
En İyi Yanıt

File -> Preferences -> Settings -> type import -> Choose Python on the left

Click on "Edit in settings.json":

"python.analysis.extraPaths": ["/your/path/to/odoo-16.0/" ]

Restart VS Code and enjoy.

4
Avatar
Vazgeç
Avatar
Michael
En İyi Yanıt

Following process worked for me:

Open Workspace Settings:

  • In the Command Palette, search for Preferences: Open Workspace Settings (JSON), or select the workspace tab if you see it in the settings menu.

Add python.analysis.extraPaths in Workspace settings.json:

  • Add the following line with the path to your Odoo source:
    jsonCopy code"python.analysis.extraPaths": [
        "/your/path/to/odoo-16.0/"
    ]
    
  • Replace "/your/path/to/odoo-16.0/" with the actual path to your Odoo source folder.

Save and Restart:

  • Save your changes in the settings.json file and restart VS Code to apply the settings.
0
Avatar
Vazgeç
Avatar
Rome Maristany
En İyi Yanıt

Hi, I know your question was a long time ago but I'm new to odoo and I have this same problem. Finally, how did you solve it? I tried the solutions they gave you but it didn't work.

0
Avatar
Vazgeç
Avatar
osvaldo farfan
En İyi Yanıt

Hello, I find myself having the same problem, did you manage to solve it????

I have spent several days looking for a way to solve the problem but still can't find it... 

0
Avatar
Vazgeç
Avatar
IB Teguh TM
En İyi Yanıt

Do you have how to solve this problem ?

i have temporary problem to solve it
1. add the folder script in setting.json and add python.analysis.extraPaths setting for the workspace.
'Import "Path.to.own.script" could not be resolved Pylance (reportMissingImports)' in VS Code using Python 3.x on Ubuntu 20.04 LTS. but this is not work for me
2. below the SO answer, there are (1) 
In VS code you can edit the setting.json file. If you add "python.analysis.useImportHeuristic": true the linting error will be removed. i think this is dangerous because make you not cant see problem
3. (2) The alternative is to add # type: ignore at the end of the import code. i like this answer after compile and there are no error, i can put #type : ignore and problem is gone

0
Avatar
Vazgeç
Avatar
Shringar Gupta
En İyi Yanıt

That wavy line you are seeing because you may be opening a folder which contains odoo. Try opening only odoo named folder that you have downloaded at the time of installation. Your issue will be solved.

It troubled me as well when i initially started using odoo.

0
Avatar
Vazgeç
Raymond Ho

On the contrary, the squiggly line appears because the odoo folder is not included, so the vscode app opens the directory at the next level. For example, your vscode works in the odoo-dev/my_library folder, and the odoo module from odoo import models, fields will have wavy lines. To solve it simply, vscode can open the directory odoo-dev at the next level as the working directory. Tip: There's odoo-dev/odoo inside

Avatar
Sebastian
Üretici En İyi Yanıt

Sorry our company only uses VSCode so PyCharm is not an option for us. Thank you anyways

0
Avatar
Vazgeç
Avatar
Fernando La Chica Mera
En İyi Yanıt

Have you tried PyCharm? This editor has many advantages over VSCode as is its search for code based on regex. It does not answer your question but the alternative is worth trying.

0
Avatar
Vazgeç
André Canilho

VS Code does everything you can do with Pycharm and more, Regex search is possible.
The only issue I've seen, which is more of a Windows + VsCode issue, is that it doesn't always end the process on rebuild.

PS: I've used PyCharm for 3 Years, and VS Code since it was released for multiple languages and stacks.

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Üye Ol
İlgili Gönderiler Cevaplar Görünümler Aktivite
Show warning in a wizard
wizard warning odoo11
Avatar
Avatar
1
Ağu 25
8212
Import data for accounting module
configuration import counting
Avatar
Avatar
Avatar
2
May 24
3085
Odoo 11 - MemoryError - RuntimeError: can't start new thread - The Connection Pool Is Full
configuration server500 odoo11
Avatar
0
Eki 20
7023
Odoo losing connection when few people working at the same time
configuration performance odoo11
Avatar
Avatar
6
Eyl 20
5656
I can't import data to odoo from an excel table Çözüldü
import employee odoo11
Avatar
Avatar
2
Kas 19
7980
Topluluk
  • Eğitim Araçları
  • Dokümantasyon
  • Forum
Açık Kaynak
  • İndirin
  • Github
  • Runbot
  • Çeviriler
Hizmetler
  • Odoo.sh Hosting
  • Destek
  • Sürüm Yükseltme
  • Özel Geliştirmeler
  • Eğitim
  • Muhasebeci Bulun
  • Partner Bulun
  • Partner Olun
Hakkında
  • Şirketimiz
  • Pazarlama Gereçleri
  • İletişim
  • Kariyer
  • Etkinlikler
  • Podcast
  • Blog
  • Müşteriler
  • Hukuki • Gizlilik
  • Güvenlik
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo, müşteri ilişkileri yönetimi, eTicaret, muhasebe, envanter, satış noktası, proje yönetimi gibi şirketinizin tüm ihtiyaçlarını karşılayan bir açık kaynak işletme uygulamaları paketidir.

Odoo’nun eşsiz değer önermesi, aynı anda hem kullanımının çok kolay olup hem de tamamen entegre olmasıdır.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now