İç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 import excel file in ODOO 9

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
xls
2 Cevaplar
15221 Görünümler
Avatar
sridhar

I developed a custom import option for update the one2many table, for example I have a binary field for selecting xls or csv, then I have one button for import, this function will need to reterive the csv or xls data to create one2many records. In this code .csv is working fine but can't import .xls file. How to import .xls file.

    def records_import(self, cr, uid, ids, context=None):
supplier_obj = self.pool.get('res.partner')
for price in self.browse(cr, uid, ids, context=context):
fileName, fileExtension = os.path.splitext(price.file_to_import_fname)
if fileExtension != '.csv':
raise osv.except_osv(_("Warning !"), _("Change the file type as CSV"))
price_file = unicode(base64.decodestring(price.import_payment), 'windows-1252', 'strict').split('\n')
line_count = 0
ss = len(price_file)
for line in price_file:
line_count += 1
if line_count > 1:
if line_count < ss -1:
line_contents = line.split(',')
if not line_contents:
break
Name = line_contents[0].strip()
Amount = line_contents[1].strip()
supplier_id = supplier_obj.search(cr, uid, [('name', '=', Name)])
if supplier_id == []:
supplier = {
'name':Name
}
new_supplier = supplier_obj.create(cr, uid, supplier)
else:
for supp in supplier_obj.browse(cr, uid, supplier_id):
new_supplier = supp.id
price_line_exist = self.pool.get('sample.lines').search(cr, uid, [('name', '=', new_supplier),('payment_id', '=', price.id),('amount', '=', Amount)])
if price_line_exist == []:
price_upload_dict = {
'name' : new_supplier,
'amount': Amount
}
self.pool.get('sample.lines').create(cr, uid, price_upload_dict)
self.write(cr, uid, price.id,{'upload':True},context=context)
return {}
1
Avatar
Vazgeç
Avatar
Axel Mendoza
En İyi Yanıt

You need to use a xls/xlsx library to allow you to read that files formats and better use xlrd that read both.

Install this package

https://pypi.python.org/pypi/xlrd


Here some examples:

https://github.com/python-excel/xlrd/tree/master/xlrd/examples

https://github.com/python-excel/tutorial/tree/master/students/xlrd

You need to know from where(rows and cols) you will read the data

1
Avatar
Vazgeç
Avatar
DOCCA OutSource IT Kft. TAX ID: 11962144-2-43
En İyi Yanıt

Hi Axel,

I am a beginner so can you help how I could install this library to our local v9 instance? Any howto link would do where I could learn installing libraries. 

Thanks in advance,

Peter

0
Avatar
Vazgeç
Axel Mendoza

Hi Péter Mikó

In python the most used install method of libraries is using pip that is used to install libraries from

https://pypi.python.org/pypi/

if the library does not install from pypi, then you need to check the library docs about how to install it. To install anything from pypi you could issue the command

pip install library_name

to install for example https://pypi.python.org/pypi/xlrd

pip install xlrd

there are a lot of resources out there of how to install libraries in python, also if you have an already running odoo v9 instance, you already had installed some libraries for that

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
Is there a good guide to learn how to export some fields to a xls file (Excel)?
xls
Avatar
Avatar
1
Mar 15
4448
How to use report_xls module in Odoo ?
xls xls_reports
Avatar
0
Kas 17
3984
Get data of xls file loaded to a binary field as two dimensional list[SOLVED] Çözüldü
xls odoo10
Avatar
Avatar
1
Mar 17
18187
error at installing module "import_order_xls"
xls odoo8
Avatar
Avatar
3
Şub 16
4519
How to Download xls file stored in Ir_attachment or open an xls file saved in local? Çözüldü
download xls
Avatar
1
Eki 15
7102
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