Overslaan naar inhoud
Odoo Menu
  • Aanmelden
  • Probeer het gratis
  • Apps
    Financiën
    • Boekhouding
    • Facturatie
    • Onkosten
    • Spreadsheet (BI)
    • Documenten
    • Ondertekenen
    Verkoop
    • CRM
    • Verkoop
    • Kassasysteem winkel
    • Kassasysteem Restaurant
    • Abonnementen
    • Verhuur
    Websites
    • Websitebouwer
    • E-commerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Bevoorradingsketen
    • Voorraad
    • Productie
    • PLM
    • Inkoop
    • Onderhoud
    • Kwaliteit
    Personeelsbeheer
    • Werknemers
    • Werving & Selectie
    • Verlof
    • Evaluaties
    • Aanbevelingen
    • Wagenpark
    Marketing
    • Social media Marketing
    • E-mailmarketing
    • SMS Marketing
    • Evenementen
    • Marketingautomatisering
    • Enquêtes
    Diensten
    • Project
    • Urenstaten
    • Buitendienst
    • Helpdesk
    • Planning
    • Afspraken
    Productiviteit
    • Chat
    • Goedkeuringen
    • IoT
    • VoIP
    • Kennis
    • WhatsApp
    Apps van derden Odoo Studio Odoo Cloud Platform
  • Bedrijfstakken
    Detailhandel
    • Boekhandel
    • kledingwinkel
    • Meubelzaak
    • Supermarkt
    • Bouwmarkt
    • Speelgoedwinkel
    Food & Hospitality
    • Bar en Pub
    • Restaurant
    • Fastfood
    • Gastenverblijf
    • Drankenhandelaar
    • Hotel
    Vastgoed
    • Makelaarskantoor
    • Architectenbureau
    • Bouw
    • Vastgoedbeheer
    • Tuinieren
    • Vereniging van eigenaren
    Consulting
    • Accountantskantoor
    • Odoo Partner
    • Marketingbureau
    • Advocatenkantoor
    • Talentenwerving
    • Audit & Certificering
    Productie
    • Textiel
    • Metaal
    • Meubels
    • Eten
    • Brewery
    • Relatiegeschenken
    Gezondheid & Fitness
    • Sportclub
    • Opticien
    • Fitnesscentrum
    • Wellness-medewerkers
    • Apotheek
    • Kapper
    Trades
    • Klusjesman
    • IT-hardware & support
    • Zonne-energiesystemen
    • Schoenmaker
    • Schoonmaakdiensten
    • HVAC-diensten
    Andere
    • Non-profitorganisatie
    • Milieuagentschap
    • Verhuur van Billboards
    • Fotograaf
    • Fietsleasing
    • Softwareverkoper
    Browse all Industries
  • Community
    Leren
    • Tutorials
    • Documentatie
    • Certificeringen
    • Training
    • Blog
    • Podcast
    Versterk het onderwijs
    • Onderwijs- programma
    • Scale Up! Business Game
    • Bezoek Odoo
    Download de Software
    • Downloaden
    • Vergelijk edities
    • Releases
    Werk samen
    • Github
    • Forum
    • Evenementen
    • Vertalingen
    • Word een Partner
    • Services for Partners
    • Registreer je accountantskantoor
    Diensten
    • Vind een partner
    • Vind een boekhouder
    • Een adviseur ontmoeten
    • Implementatiediensten
    • Klantreferenties
    • Ondersteuning
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Vraag een demo aan
  • Prijzen
  • Help

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

  • CRM
  • e-Commerce
  • Boekhouding
  • Voorraad
  • PoS
  • Project
  • MRP
All apps
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Help

Account.move avec Odoo V14.0 does not work

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
apiv14PHP
4321 Weergaven
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
Annuleer
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
Auteur

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

Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!

Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!

Aanmelden
Gerelateerde posts Antwoorden Weergaven Activiteit
Odoo 14: API : Getting product quantity by location
api v14
Avatar
Avatar
1
jan. 23
2388
array values not updated using API
api v14
Avatar
0
sep. 21
2724
Api Get model data with particular user only
api v14
Avatar
0
jul. 21
5640
API call to create a customer and assign account_fiscal_position
api v14
Avatar
Avatar
1
mrt. 21
5253
How to create a Lead using API from MAKE.com? Opgelost
api crm.lead v14
Avatar
Avatar
Avatar
3
jan. 25
5099
Community
  • Tutorials
  • Documentatie
  • Forum
Open Source
  • Downloaden
  • Github
  • Runbot
  • Vertalingen
Diensten
  • Odoo.sh Hosting
  • Ondersteuning
  • Upgrade
  • Gepersonaliseerde ontwikkelingen
  • Onderwijs
  • Vind een boekhouder
  • Vind een partner
  • Word een Partner
Over ons
  • Ons bedrijf
  • Merkelementen
  • Neem contact met ons op
  • Vacatures
  • Evenementen
  • Podcast
  • Blog
  • Klanten
  • Juridisch • Privacy
  • Beveiliging
الْعَرَبيّة 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 is een suite van open source zakelijke apps die aan al je bedrijfsbehoeften voldoet: CRM, E-commerce, boekhouding, inventaris, kassasysteem, projectbeheer, enz.

Odoo's unieke waardepropositie is om tegelijkertijd zeer gebruiksvriendelijk en volledig geïntegreerd te zijn.

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