Zum Inhalt springen
Odoo Menü
  • Anmelden
  • Jetzt gratis testen
  • Apps
    Finanzen
    • Buchhaltung
    • Rechnungsstellung
    • Spesenabrechnung
    • Tabellenkalkulation (BI)
    • Dokumente
    • E-Signatur
    Vertrieb
    • CRM
    • Vertrieb
    • Kassensystem – Shop
    • Kassensystem – Restaurant
    • Abonnements
    • Vermietung
    Websites
    • Website-Builder
    • E-Commerce
    • Blog
    • Forum
    • Livechat
    • E-Learning
    Lieferkette
    • Lager
    • Fertigung
    • PLM
    • Einkauf
    • Wartung
    • Qualität
    Personalwesen
    • Mitarbeiter
    • Personalbeschaffung
    • Abwesenheiten
    • Mitarbeiterbeurteilung
    • Personalempfehlungen
    • Fuhrpark
    Marketing
    • Social Marketing
    • E-Mail-Marketing
    • SMS-Marketing
    • Veranstaltungen
    • Marketing-Automatisierung
    • Umfragen
    Dienstleistungen
    • Projekte
    • Zeiterfassung
    • Außendienst
    • Kundendienst
    • Planung
    • Termine
    Produktivität
    • Dialog
    • Genehmigungen
    • IoT
    • VoIP
    • Wissensdatenbank
    • WhatsApp
    Apps von Drittanbietern Odoo Studio Odoo Cloud-Plattform
  • Branchen
    Einzelhandel
    • Buchladen
    • Kleidergeschäft
    • Möbelhaus
    • Lebensmittelgeschäft
    • Baumarkt
    • Spielwarengeschäft
    Essen & Gastgewerbe
    • Bar und Kneipe
    • Restaurant
    • Fast Food
    • Gästehaus
    • Getränkehändler
    • Hotel
    Immobilien
    • Immobilienagentur
    • Architekturbüro
    • Baugewerbe
    • Immobilienverwaltung
    • Gartenarbeit
    • Eigentümervereinigung
    Beratung
    • Buchhaltungsfirma
    • Odoo-Partner
    • Marketingagentur
    • Anwaltskanzlei
    • Talentakquise
    • Prüfung & Zertifizierung
    Fertigung
    • Textil
    • Metall
    • Möbel
    • Speisen
    • Brauerei
    • Firmengeschenke
    Gesundheit & Fitness
    • Sportklub
    • Brillengeschäft
    • Fitnessstudio
    • Therapeut
    • Apotheke
    • Friseursalon
    Handel
    • Handyman
    • IT-Hardware & -Support
    • Solarenergiesysteme
    • Schuster
    • Reinigungsdienstleistungen
    • HLK-Dienstleistungen
    Sonstiges
    • Gemeinnützige Organisation
    • Umweltschutzagentur
    • Plakatwandvermietung
    • Fotostudio
    • Fahrrad-Leasing
    • Software-Händler
    Alle Branchen ansehen
  • Community
    Lernen
    • Tutorials
    • Dokumentation
    • Zertifizierungen
    • Schulung
    • Blog
    • Podcast
    Bildung fördern
    • Bildungsprogramm
    • Scale-Up! Planspiel
    • Odoo besuchen
    Software anfragen
    • Herunterladen
    • Editionen vergleichen
    • Releases
    Zusammenarbeiten
    • Github
    • Forum
    • Veranstaltungen
    • Übersetzungen
    • Partner werden
    • Dienstleistungen für Partner
    • Buchhaltungsfirma registrieren
    Services anfragen
    • Partner finden
    • Buchhalter finden
    • Einen Experten treffen
    • Implementierungsservices
    • Kundenreferenzen
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Eine Demo erhalten
  • Preiskalkulation
  • Hilfe

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Buchhaltung
  • Lager
  • PoS
  • Projekte
  • MRP
All apps
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo accounting v14 pos v15
Über dieses Forum
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo accounting v14 pos v15
Über dieses Forum
Hilfe

Account.move avec Odoo V14.0 does not work

Abonnieren

Erhalten Sie eine Benachrichtigung, wenn es eine Aktivität zu diesem Beitrag gibt

Diese Frage wurde gekennzeichnet
apiv14PHP
4344 Ansichten
Avatar
Chris Lefevre

I am a beginner with Odoo ( V14.0 ) and its API. 

I managed to perform some actions with trial and error and here, I try to create an invoice based on what I saw passing as data in the Chrome console. 
 
I have advanced step by step and now I don't get any error but I still don't see any invoice appearing. 

Can you help me or give me a procedure? Thanks in advance. 



function new_invoice()  {

$doc = [
"date" => "2021-08-18",
"asset_id" => false,
"show_name_warning" => false,
"posted_before" => false,
"payment_state" => "not_paid",
"name" => "/NEW/PLUS/".date("ymdhis"),
"partner_id" => 20346,
"partner_shipping_id" => 20346,
"ref" => false,
"payment_reference" => "UUDYYD" . date("ymdhis"),
"partner_bank_id" => false,
"invoice_vendor_bill_id" => false,
"purchase_id" => false,
"purchase_vendor_bill_id" => false,
"invoice_date" => "2021-08-18",
"invoice_date_due" => "2021-09-17",
"invoice_payment_term_id" => 4,
"journal_id" => 1,
"currency_id" => 1,
"edi_document_ids" => [],
"invoice_line_ids" => [
[
0,
"virtual_2375",
[
"sequence" => 10,
"product_id" => 2962,
"name" => "[106 -CP] Wit 5 ml doseerpipet",
"account_id" => 374,
"analytic_account_id" => false,
"analytic_tag_ids" => [
[
6,
false,
[]
]
],
"quantity" => 1,
"product_uom_id" => 1,
"price_unit" => 5,
"discount" => 0,
"tax_ids" => [
[
6,
false,
[
1
]
]
],
"partner_id" => 20346,
"amount_currency" => -5,
"currency_id" => 1,
"debit" => 0,
"credit" => 5,
"date_maturity" => false,
"tax_tag_ids" => [
[
6,
false,
[
11
]
]
],
"purchase_line_id" => false,
"recompute_tax_line" => false,
"predict_from_name" => false,
"display_type" => false,
"is_rounding_line" => false,
"exclude_from_invoice_tab" => false,
"parent_state" => "draft"
]
]
],

"line_ids" => [
[
0,
"virtual_2379",
[
"account_id" => 178,
"sequence" => 10,
"name" => "UUDYYD",
"quantity" => 1,
"price_unit" => -6.05,
"discount" => 0,
"debit" => 6.05,
"credit" => 0,
"amount_currency" => 6.05,
"date_maturity" => "2021-09-17",
"currency_id" => 1,
"partner_id" => 20346,
"product_uom_id" => false,
"product_id" => false,
"tax_ids" => [
[
6,
false,
[]
]
],
"tax_base_amount" => 0,
"tax_exigible" => true,
"tax_repartition_line_id" => false,
"tax_tag_ids" => [
[
6,
false,
[]
]
],
"analytic_account_id" => false,
"analytic_tag_ids" => [
[
6,
false,
[]
]
],
"recompute_tax_line" => false,
"display_type" => false,
"is_rounding_line" => false,
"exclude_from_invoice_tab" => true,
"purchase_line_id" => false,
"predict_from_name" => false
]
],
[
0,
"virtual_2375",
[
"account_id" => 374,
"sequence" => 10,
"name" => "[106 -CP] Wit 5 ml doseerpipet",
"quantity" => 1,
"price_unit" => 5,
"discount" => 0,
"debit" => 0,
"credit" => 5,
"amount_currency" => -5,
"date_maturity" => false,
"currency_id" => 1,
"partner_id" => 20346,
"product_uom_id" => 1,
"product_id" => 2962,
"tax_ids" => [
[
6,
false,
[
1
]
]
],
"tax_base_amount" => 0,
"tax_exigible" => true,
"tax_repartition_line_id" => false,
"tax_tag_ids" => [
[
6,
false,
[
11
]
]
],
"analytic_account_id" => false,
"analytic_tag_ids" => [
[
6,
false,
[]
]
],
"recompute_tax_line" => false,
"display_type" => false,
"is_rounding_line" => false,
"exclude_from_invoice_tab" => false,
"purchase_line_id" => false,
"predict_from_name" => false
]
],
[
0,
"virtual_2385",
[
"account_id" => 221,
"sequence" => 10,
"name" => "21%",
"quantity" => 1,
"price_unit" => 1.05,
"discount" => 0,
"debit" => 0,
"credit" => 1.05,
"amount_currency" => -1.05,
"date_maturity" => false,
"currency_id" => 1,
"partner_id" => 20346,
"product_uom_id" => false,
"product_id" => false,
"tax_ids" => [
[
6,
false,
[]
]
],
"tax_base_amount" => 5,
"tax_exigible" => true,
"tax_repartition_line_id" => 2,
"tax_tag_ids" => [
[
6,
false,
[
47
]
]
],
"analytic_account_id" => false,
"analytic_tag_ids" => [
[
6,
false,
[]
]
],
"recompute_tax_line" => false,
"display_type" => false,
"is_rounding_line" => false,
"exclude_from_invoice_tab" => true,
"purchase_line_id" => false,
"predict_from_name" => false
]
]
],
"invoice_user_id" => 2,
"team_id" => 5,
"invoice_origin" => false,
"qr_code_method" => false,
"invoice_incoterm_id" => false,
"fiscal_position_id" => 2,
"invoice_cash_rounding_id" => false,
"invoice_source_email" => false,
"auto_post" => false,
"to_check" => false,
"campaign_id" => false,
"medium_id" => false,
"source_id" => false,
"message_follower_ids" => [],
"activity_ids" => [],
"message_main_attachment_id" => false,
"message_ids" => []
];



$invoice = $this->models->execute_kw( $this->db, $this->uid, $this->password, 'account.move', 'create', [$doc], );
echo $invoice; /* ---> It returns a number */
$action = $this->models->execute_kw( $this->db, $this->uid, $this->password, 'account.move', 'action_post', [$invoice] );
print_r($action); /* It does not return anything */
}

0
Avatar
Verwerfen
Niyas Raphy (Walnut Software Solutions)

what you receive when you print/echo the invoice variable ? if you get an id, you can check that id in the db for the created record

Chris Lefevre
Autor

With the "Create" method, I get an ID, like "46", but the following command returns nothing

I don't know how to access the contents of the DB.  I am Odoo.sh

Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!

Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!

Registrieren
Verknüpfte Beiträge Antworten Ansichten Aktivität
Odoo 14: API : Getting product quantity by location
api v14
Avatar
Avatar
1
Jan. 23
2398
array values not updated using API
api v14
Avatar
0
Sept. 21
2731
Api Get model data with particular user only
api v14
Avatar
0
Juli 21
5648
API call to create a customer and assign account_fiscal_position
api v14
Avatar
Avatar
1
März 21
5266
How to create a Lead using API from MAKE.com? Gelöst
api crm.lead v14
Avatar
Avatar
Avatar
3
Jan. 25
5124
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Herunterladen
  • Github
  • Runbot
  • Übersetzungen
Dienstleistungen
  • Odoo.sh-Hosting
  • Support
  • Upgrade
  • Individuelle Entwicklungen
  • Bildung
  • Buchhalter finden
  • Partner finden
  • Partner werden
Über uns
  • Unsere Firma
  • Markenwerte
  • Kontakt
  • Karriere
  • Veranstaltungen
  • Podcast
  • Blog
  • Kunden
  • Rechtliches • Datenschutz
  • Sicherheit
الْعَرَبيّة 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 ist eine Suite von Open-Source-Betriebsanwendungen, die alle Bedürfnisse Ihres Unternehmens abdecken: CRM, E-Commerce, Buchhaltung, Lager, Kassensystem, Projektmanagement etc.

Das einzigartige Wertversprechen von Odoo ist, dass es gleichzeitig sehr einfach zu bedienen und voll integriert ist.

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