İç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 Payment Date as a field in Inovice List View - Accounting App

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
accountinginvoicereportpaymentsv15
3 Cevaplar
4041 Görünümler
Avatar
Naz

Hi,

 

All I need to do is (in Odoo 15 web):

 

When we make payment in Register Payment,

 

We get this Payment date right?

 

I need this payment date as a field, in accounting app > customers > Invoices(List view) with data being populated. 


So that, I would know when the payment is made.

 

If it is possible, kindly guide me with,


Thank You in Advance.
Email: nazeersaleem385@gmail.com


0
Avatar
Vazgeç
Avatar
Renata Carrillo
En İyi Yanıt

Hello, Naz.
Você pode fazer o seguinte (eu fiz e deu certo):
01) With Studio, create a Date type field in account.move [x_studio_data_de_pagamento_1] (and make it visible only when the entry type is equal to "Vendor Invoice": move_type != "in_invoice");

02) Add it to the tree view;

03) Create an automation with python code in Base Automation so that we can take the value of the 'date' field in account.payment and assign it to this field created with Studio, as follows:

for record in records:

    # Check if the payment state is 'not_paid'

    if record.payment_state == 'not_paid':

        # If the payment state is 'not_paid', clear the field 'x_studio_data_de_pagamento_1'

        record.update({'x_studio_data_de_pagamento_1': False})

    else:

        # Check if the invoice has associated payments

        if record.invoice_payments_widget:

            payments = record.invoice_payments_widget.get('content')

            dates = []

            for payment_info in payments:

                # Extract the payment date

                payment = payment_info.get('date', '')

                if payment:  # Add the date only if it is present

                    # Check if 'payment' is of type datetime.date

                    if isinstance(payment, datetime.date):

                        # Format the date in D/M/Y (Day/Month/Year) for display

                        formatted_date = payment.strftime('%d/%m/%Y')

                        dates.append(formatted_date)  # Use the formatted date

                    else:

                        # Otherwise, assume that 'payment' is a string in the format 'YYYY-MM-DD'

                        formatted_date = payment.split("-")

                        formatted_date = f"{formatted_date[2]}/{formatted_date[1]}/{formatted_date[0]}"

                        dates.append(formatted_date)  # Use the formatted date

            # Update the field 'x_studio_data_de_pagamento_1' with the first payment date

            if dates:  # Check if there are dates to update

                # The first payment date (in 'DD/MM/YYYY' format) will be converted to 'Date' without using fields

                first_payment_date_str = dates[0]  # Example: "26/03/2025"

                try:

                    # Converting the string 'DD/MM/YYYY' to the format 'YYYY-MM-DD'

                    day, month, year = first_payment_date_str.split('/')

                    first_payment_date = f"{year}-{month}-{day}"  # Format 'YYYY-MM-DD'

                    record.update({'x_studio_data_de_pagamento_1': first_payment_date})

                except ValueError:

                    # In case of conversion error, clear the field 'x_studio_data_de_pagamento_1'

                    record.update({'x_studio_data_de_pagamento_1': False})

            else:

                # If there are no dates, clear the field 'x_studio_data_de_pagamento_1'

                record.update({'x_studio_data_de_pagamento_1': False})

In my case, I needed to convert the date presentation to the Brazilian format, but you do not need to include this part of the code in your automation.

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

Hi Mily Shajan,

Thanks for your response. 

am working on odoo 15 web studio, above mentioned code did not work for me but using that code i have modified as per need. The modified code works well for me, i have created a field (date) and include that in my list view and i created one 'automated action' for 'model journal entry', i set trigger for 'on update' and triggers field is 'payment status' and action to do is 'execute python code' this is what i did, I will give that code here :

all_records = env['account.move'].search([])

#model name -> env['account.move']
#to get all the records ->  .search([])

for rec in all_records:    
if rec.payment_state == 'paid':        
​if rec.invoice_payments_widget:
​ ​try:                
​ ​ ​# Parse the JSON string into a dictionary                ​ ​ ​ ​ ​
​ ​ ​invoice_payments_widget_dict = json.loads(rec.invoice_payments_widget)                                
​ ​ ​# Access the required information                
​ ​ ​content_list = invoice_payments_widget_dict.get('content', [])                                
​ ​ ​if content_list:                    
​ ​ ​ ​content_data = content_list[0]                    
​ ​ ​ ​date_str = content_data.get('date', '')                                        
​ ​ ​ ​if date_str:                        
​ ​ ​ ​ ​rec['x_studio_date_field_a1MrW'] = date_str            
​ ​except Exception:                
​ ​ ​rec['x_studio_date_field_a1MrW'] = None

(Please check the indentation) 
 

0
Avatar
Vazgeç
Avatar
Mily Shajan
En İyi Yanıt

Hi Naz

Create a field payment_date in the 'account. move' model  and compute the value 

Try the following code 

class AccountMoveInherit(models.Model):
_inherit = 'account.move'

payment_date = fields.Char(compute='_compute_payment_date')

def _compute_payment_date(self):
self.payment_date = False
for inv in self:
dates = []
if inv.invoice_payments_widget:
payment = inv.invoice_payments_widget.get('content')
for payment_info in payment:
dates.append(str(payment_info.get('date', '')))
inv.payment_date = ', '.join(dates)


Inherit the tree view of the Invoices 'view_out_invoice_tree' and add this field 


Regards


0
Avatar
Vazgeç
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 to display Payment Date as a field in Inovice List View - Accounting App
accounting invoice payments v15
Avatar
Avatar
Avatar
Avatar
4
Oca 24
4762
Add Payment Date field in Accounting Invoice view
accounting invoice payments v15
Avatar
Avatar
1
Kas 25
3971
Adding Payment Details to Invoice Reports
invoice report payments
Avatar
Avatar
Avatar
2
Şub 25
2693
Add total no of quantities in the invoice report in odoo 17
accounting invoice report
Avatar
Avatar
Avatar
2
Nis 24
3617
Get this user error "Cannot create unbalanced journal entry." when i write 'quantity' or 'price_unit' in invoice_line_ids
accounting invoice v15
Avatar
Avatar
Avatar
2
Nis 24
2448
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