İç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 attach a Company and Customer to the same Odoo invoice

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
xmlrpcinvocesnodejs
1 Cevapla
2418 Görünümler
Avatar
Mohammed Fathi

I'm using Nodejs (odoo-xmlrpc lib)to integrate with Odoo.

the customer record has been created and attached correctly to the invoice but when trying to attach a company record as well it is returning an error as described below.


example of code.

const params = [];
params.push({
partner_id:1,
company_id:9,
ref:`order_${order.id}`,
payment_state:'paid',
invoice_line_ids: lineEntries,
move_type:'out_invoice'});
// Create the Invoice
const invoiceId = await this.run('account.move','create',params);

this code returns the following error: 

faultString: 'Record does not exist or has been deleted.\n' +
'(Record: res.company(9,), User: 2)'

but when checking the Odoo dashboard I can see the company is created with ID 9 successfully.


Update: 24 Jan 2023
According to the answer by @S.M Firoz Ahmed
I changed the company creation model from (res.partner with option {is_company:true}) to (res.company). the company and assigned to a journal after creating it by the following code 

params = { 'name': 'My Journal', 'code': 'MJ', 'company_id': 1 } 
const journal_id = models.execute_kw('account.journal', 'create', [params])

and then assigned the company_id and journal_id to the invoice

const invoiceParams ={
partner_id:customer.id,
journal_id:2,company_id:1,
ref:`order_123`,
payment_state:'paid',
invoice_line_ids:lineEntries,
move_type:'out_invoice'
}
invoice_id = models.execute_kw('account.move', 'create', [params])

but nothing new, the same error returned 

0
Avatar
Vazgeç
Avatar
S.M Firoz Ahmed ( Daffodil Software Limited )
En İyi Yanıt

It appears that the error is occurring when you are trying to attach a company record to the invoice. The error message suggests that the record with ID 9 in the "res.company" model does not exist or has been deleted. However, you have confirmed that the company record with ID 9 is present in the Odoo dashboard.

Here are a few things you can check to troubleshoot the issue:

  1. Verify that the "company_id" field is correctly defined as a many2one field in the "account.move" model and that it is correctly linked to the "res.company" model.

  2. Make sure that the user that you are using to create the invoice has the appropriate permissions to access and modify the "res.company" model and the specific record with ID 9.

  3. Confirm that the company record with ID 9 is in the correct state and has not been archived or deleted.

  4. Check that you're passing correct values to all the fields, especially the required fields.

  5. Check that you're passing the correct context.

  6. Make sure that the company_id is present in the create method of account.move

2
Avatar
Vazgeç
Mohammed Fathi
Üretici

Thank you for answering, can you please check my question again since I update it according to your answer

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
check if user exists in odoo database
xmlrpc nodejs
Avatar
Avatar
2
Eyl 22
4424
xmlrpc Error when attempting to connect to my local instance Çözüldü
xmlrpc
Avatar
Avatar
Avatar
3
Tem 25
4152
Cannot marshal None unless allow_none is enabled
xmlrpc
Avatar
1
Eki 24
3014
How to run a method from external api as the superuser
xmlrpc
Avatar
Avatar
1
Nis 24
3084
mail.message Attachment through XMLRPC Çözüldü
attachment xmlrpc helpdesk comment nodejs
Avatar
Avatar
2
May 24
3734
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