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

New invoice created, state is 'paid' instead of 'open'

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
accountinginvoiceaccount.invoicestateodoo10
10 Cevaplar
10633 Görünümler
Avatar
Deborah Joy Adeva

I created invoice through a customized button, and wanted that 'open' will be automatically it's state once it's created. Current output, 'paid' is the state. Hope you can help me, thank you.

Here's my code:

    @api.multi

    def create_invoice(self,count):

        # print 'create_invoice'

        customer = self.partner_id.id

        product = self.env['product.template'].search([('default_code', '=', 'HOST')]) 

        account_id = self.env['account.account'].search([('internal_type','=','receivable')]).id

        journal_id = self.env['account.journal'].search([('code','=','INV')]).id


        # create invoice

        invoice_header = self.env['account.invoice'].create({

            'partner_id': customer,

            # 'number': self.get_invoice_sequence(),

            # 'date_invoice': today_date,

            'account_id': account_id,

            'journal_id': journal_id,

            'user_id': self.env.user.id,

        })

        invoice_lines = self.env['account.invoice.line'].create({

            'invoice_id': invoice_header.id,

            'product_id': product[0].id,

            'name':product[0].name,

            'quantity': count,

            'price_unit': product[0].list_price,

            'account_id': account_id,

        })

        invoice_header.action_invoice_open()


1
Avatar
Vazgeç
Avatar
Simplify-ERP® Developers
En İyi Yanıt

When creating an invoice thru code on odoo, even though the default state is draft, i think that you will need to pass that again in your dict as follows,

      # create invoice

        invoice_header = self.env['account.invoice'].create({

            'partner_id': customer,

            # 'number': self.get_invoice_sequence(),

            # 'date_invoice': today_date,

            'account_id': account_id,

            'journal_id': journal_id,

            'user_id': self.env.user.id,

            'state': 'draft',

        })

After that call the action as you did before in your code and it will be okay:

invoice_header.action_invoice_open()

If there are other issues when this invoice is created, you can always inherit the action_invoice_open def and make your changes in the function itself to avoid complications.

Just make sure to call it with super so that other things get calculated as well.


I hope it is helpfull

Riste Kabranov

Odoo developer at simplify-erp.com

1
Avatar
Vazgeç
Avatar
Mohammed Amal N
En İyi Yanıt

Hi,

An open invoice with total amount  zero or is reconciled with full payment will be automatically converted to paid state.

Make sure your invoice's total amount is not zero and you are not creating any payment for this invoice.

1
Avatar
Vazgeç
Deborah Joy Adeva
Üretici

Hello, I see that invoice that I create is reconciled. how can I make it to false? even though I assigned it to false, it automatically becomes false. Is there anything that triggers reconciled to true?

Mohammed Amal N

I think the code you provided cannot trigger a payment creation or reconcile.

Mohammed Amal N

Also check how a payment is created against the customer in the invoice.

Deborah Joy Adeva
Üretici

I really appreciate your help, can you please give me a sample code where it can trigger a payment creation or reconcile? thank you.

Mohammed Amal N

Journal entry for the invoice is called inside function action_invoice_open(), payment creation is maintained in validate button click in register payment wizard. Check if you have edited any of these files

Deborah Joy Adeva
Üretici

once I clicked validate, it doesn't go to register payment, instead, it's already in 'paid' state.

Avatar
subbarao
En İyi Yanıt

Hello,

If you call validate button it will create one Journal entry for that invoice.

If the Journal entry  having debit and credit accounts both are payable/receivable then the invoice due amount is zero, so invoice moved to paid state.

Note : Either debit account or credit account only payable/receivable but not both.

0
Avatar
Vazgeç
Avatar
Raul Contreras Martinez
En İyi Yanıt

Hi.

Did you get a solution?... I am having the same problem...The invoice is getting the paid state instead of open state.



0
Avatar
Vazgeç
Deborah Joy Adeva
Üretici

I removed the journal_id in the create of invoice_header, because it would automatically create it's journal_id

Dhivya N

Hi Raul, please check your accounting configuration in "Customer Invoice" Journal.

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 make dynamic account_id based on parent field? v12
accounting invoice account.invoice
Avatar
Avatar
1
Ağu 19
3625
How to show value from currency in account_invoice? Çözüldü
accounting invoice currency odoo10
Avatar
Avatar
1
Eyl 17
4239
How to setup default account in invoices?
invoice account.invoice openerp odoo10
Avatar
Avatar
2
Eyl 17
9118
How to Invoice to All Account Contacts
accounting invoice contacts account.invoice sending mail with attachment
Avatar
0
Nis 22
3371
[odoo10] How to filter payment_move_line_ids.date in account.invoice ?
invoice payment account.invoice odoo10 account.move.line
Avatar
Avatar
1
Ara 18
5232
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