İç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 display result WSDL in list view xml odoo?

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
treeviewwebservicesparseodoo8.0
4 Cevaplar
10138 Görünümler
Avatar
Salma

Hi ! please can someone tell me how to parse an WSDL file in python and how to display the result in a tree view ?

0
Avatar
Vazgeç
Thanh Loyal

Hello, I think your question is too short, you should describle your problem in more details like: How is your WSDL file got read by Odoo? is it in your server file system? To display data in a tree view, after parsing wsdl file, you may create a set of records and display it like other models.

Salma
Üretici

Hi Thanh Loyal ! Thank you for your response : ) so I connect to the url of my WSDL with the suds library (Python 2.7.9) and this is the code : import suds from suds.client import Client from suds.transport.https import WindowsHttpAuthenticated ntlm = WindowsHttpAuthenticated(username='xxxxx', password='yyyyy') url = 'http://xxxxxxx' client = Client(url, transport=ntlm) print (client) # this will return the methods and types available from the codeunit result = client.service.ReadMultiple() client.service.ReadMultiple() return an array that contain objects and I want to display this list of object in a tree view, that's why I create a new class which its attributs are computed fields that contain the fields of the object returned by the web service . Code : class ProductImpo(models.Model): _name = 'product.impo' ...... Serial_No = fields.Char(string="N° de série", compute='_compute_serial_no') ....... And the function code is : @api.multi def _compute_serial_no(self): i=-1 for record in self: i=i+1 record.Serial_No=result.Stock_Vehicule[i].Serial_No And the view : product.impo.tree product.impo ..... .... For this exemple the array returned contain 14 rows so those 14 rows are displayed in the tree view only if I create manually 14 rows empty just with ID in the table ProductImpo in PostgreSQL so my question is how to create a new row in the table by using python adding rows = len(result.Stock_Vehicule) PS : Stock_Vehicule is the arry returned which is 14 in this example

Avatar
Thanh Loyal
En İyi Yanıt

Hi,

Your question is clearer now.

I dont know when your first python code section runs? I usually write functions in a model class or in a controller.

And I think you may follow these steps:

1. Retrieve the model

   1.1 In case of a model class

     product_impo = self.env['product.impo']

   1.2 In case of a controller:

     product_impo = http.request.env['product.impo']


2. Write data that your client retrieved to DB using the above model:

     # for each row in 14 rows

   product_impo.sudo().write({   # think more about sudo() for more secure

     'Serial_No': self.Serial_No # If your method is in a Model class

  })


OR


   product_impo.sudo().write({

     'Serial_No': row.Serial_No # If your method is in a controller

  })

0
Avatar
Vazgeç
Avatar
Salma
Üretici En İyi Yanıt

Hi Thanh Loyal ! Thank you for your response : ) so I connect to the url of my WSDL with the suds library (Python 2.7.9) and this is the code :

import suds

from suds.client import Client

from suds.transport.https import WindowsHttpAuthenticated

 ntlm = WindowsHttpAuthenticated(username='xxxxx', password='yyyyy')

url = 'http://xxxxxxx'

client = Client(url, transport=ntlm)

print (client) # this will return the methods and types available from the codeunit

result = client.service.ReadMultiple()

client.service.ReadMultiple() return an array that contain objects and I want to display this list of object in a tree view, that's why I create a new class which its attributs are computed fields that contain the fields of the object returned by the web service . Code :

class ProductImpo(models.Model):

_name = 'product.impo'

......

Serial_No = fields.Char(string="N° de série", compute='_compute_serial_no')

.......

and the function code is :

@api.multi

def _compute_serial_no(self):

i=-1

for record in self:

i=i+1

record.Serial_No=result.Stock_Vehicule[i].Serial_No

and the view :

<record id="product_impo_tree_view" model="ir.ui.view">

<field name="name">product.impo.tree</field>

<field name="model">product.impo</field>

<field name="arch" type="xml">

<tree string="Disponibilité">

.....

<field name="Serial_No"/>

....

</tree>

</field>

</record>

For this exemple the array returned contain 14 rows so those 14 rows are displayed in the tree view only if I create manually 14 rows empty just with ID in the table ProductImpo in PostgreSQL so my question is how to create a new row in the table by using python adding rows = len(result.Stock_Vehicule)

PS : Stock_Vehicule is the arry returned which is 14 in this example

0
Avatar
Vazgeç
Salma
Üretici

when I try to retrieve the model I obtain this error : impo_obj = self.env['product.impo'] NameError: name 'self' is not defined and this is the code : class ProductImpo(models.Model): _name = 'product.impo' ..... Serial_No = fields.Char(string="N° de série", compute='_compute_serial_no') ...... impo_obj = self.env['product.impo'] ...... When I try to put it in a function like : def _tester(self): impo_obj = self.env['product.impo'] ...... after that when I call the function self still inknown

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
How display invoice lines items in tree view - Odoo8
treeview odoo8.0
Avatar
Avatar
1
Tem 19
4149
Internal reference column sortable Çözüldü
treeview column odoo8.0 sortable
Avatar
Avatar
Avatar
3
Ağu 23
10927
Odoo8 incoming email parse html
email html parse odoo8.0
Avatar
Avatar
1
Oca 16
3972
Vertical labels in tree view Çözüldü
treeview labels odoo8.0 vertical
Avatar
Avatar
1
Kas 15
6680
Account Invoice subtotal comes on top side. Is it possible to shift bottom?
accounting invoice treeview odooV8 odoo8.0
Avatar
0
Şub 16
3798
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