İç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

Reduce time to ejecution in report balance

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
balanceaccountreportopenerp7move_lines
2 Cevaplar
4831 Görünümler
Avatar
Jose Vasquez

I'm working on OpenERP7 in a customized report of balance.

print "registers ", len(account_move_line_search)
            print "start ", time.strftime("%Y-%m-%d %H:%M:%S")
            account_account_search = account_account_pool.search(cr, uid, [('level','=',5)])
            for account_account in account_account_pool.browse(cr,uid,account_account_search):
                    account_move_line_search_inicial = account_move_line_pool.search(cr,uid,[('move_id.date','<=',self_browse.end_date),
                                                                                             ('account_id','=',account_account.id)])
                    sum_cuenta_debit = 0.00
                    sum_cuenta_credit = 0.00
                    for account_move_line in account_move_line_pool.browse(cr,uid,account_move_line_search_inicial):
                        sum_cuenta_debit += account_move_line.debit
                        sum_cuenta_credit += account_move_line.credit
                        total_asientos += 1
                    mis_cuentas.append([account_account.id,
                                        account_account.parent_id.id,
                                        account_account.parent_id.parent_id.id,
                                        account_account.parent_id.parent_id.parent_id.id,
                                        account_account.parent_id.parent_id.parent_id.parent_id.id,
                                        sum_cuenta_debit,
                                        sum_cuenta_credit])
            print "end ", time.strftime("%Y-%m-%d %H:%M:%S")

The report takes seats, in Date Range (do not take the date of account_move_line).

My work code it's to get the necessary values (debit,credit,account_id,account_id_level_4,account_id_level_3,account_id_level_2,account_id_level_1). 

With a sample of 14580 records of 10 days, movements of my jornuas, it takes 47 seconds (too in my opinion).

When I place my search more filters, takes longer.

Is there any way to simplify this time ?.

or, my work code its bad?, I should do?

It welcomes comments.

0
Avatar
Vazgeç
Avatar
Ludo - 21South
En İyi Yanıt

Well, for each account in your for-loop, you will execute another for loop searching for move_lines, effectively searching the 14580 records aroudn 300 times ( based on the Dutch accounting schema). Since the data does not change in your for loop, perhaps you could move the search outside of your loop. That would surely already make a little difference.

Furthermore, maybe you can use the methods for gathering move lines that the existing reports use, as they tend to be quite fast? 

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

Hi Ludo, and thanks for responding.

The date filter is for table "account_move" but the debit and credit are in "account_move_line", but I have to build it so:

http://bit.ly/1Bahtba

Given that the sum of level 5, adds to level 4, and level 4 adds to level 3, so on until the level 0 or level 1.

There is another way you suggest? or that is my fault in work code??

Thanks.

0
Avatar
Vazgeç
Jose Vasquez
Üretici

I solved. It was more effective by a query to get the values. cr.execute(''' SELECT SUM (aml.debit) ,SUM (aml.credit) ,ac.id ,ac.code FROM account_move_line AS aml JOIN account_move AS am ON am.id = aml.move_id JOIN account_account AS ac ON ac.id = aml.account_id WHERE am.date BETWEEN %s AND %s AND (aml.debit > 0 OR aml.credit > 0) AND am.state IN ('posted') GROUP BY ac.id, ac.code ORDER BY code ASC ''',(self_browse.start_date,self_browse.end_date))

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
CASH FLOW STATEMENT REPORTS WITH SPANISH ACCOUNTING
account report
Avatar
0
Mar 23
2180
ERROR openerp openerp.netsvc: AttValue: " or ' expected, line 44, column 11 Çözüldü
report openerp7
Avatar
1
Ağu 15
5373
SyntaxError: JSON.parse: unexpected end of data at line 2 column 1 of the JSON data Çözüldü
report openerp7
Avatar
Avatar
3
Ağu 15
14920
Account Statutory Reports?
account report
Avatar
0
Mar 15
4187
How to view full descriptions in General Ledger Report Odoo 13
account report Odoo13
Avatar
1
Mar 24
4003
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