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
    • Sociale 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

Odoo 17 - How to build a function to create a new bank transaction

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
accounting
1 Beantwoorden
1584 Weergaven
Avatar
under_the_weather

I am trying to create new bank transactions automatically instead of having users input the info manually as described here: https://odoo.com/documentation/17.0/applications/finance/accounting/bank/transactions.html#transactions-register

I have tried the following code but it did not work:

name = 'account.bank.statement.line'
id = models.execute_kw(db, uid, password, name, 'create',
[{
'move_id': 1,
'payment_ref': 'TEST/0001',
'amount': 100,
}])

What did I do wrong?

Thank you!


0
Avatar
Annuleer
Avatar
Mohamed Hussein Abbas
Beste antwoord
  1. Model Name: You've assigned the model name 'account.bank.statement.line' to the variable name, but it's unclear if this model exists in your Odoo instance. Make sure this is the correct model name.
  2. Field Names: Ensure that the field names you're using in the dictionary match the field names of the account.bank.statement.line model. The fields you've used ('move_id', 'payment_ref', 'amount') need to exist in the model and be spelled correctly.
  3. execute_kw Arguments: The execute_kw method requires the following arguments:
    • db: Database name
    • uid: User ID
    • password: User password
    • model: Model name
    • method: Method to execute (e.g., 'create')
    • args: List of dictionaries containing the data to be created

Let's refine your code with these considerations:

pythonCopy code# Assuming you have already imported necessary modules like models and requests
model = 'account.bank.statement.line'
data = {
    'move_id': 1,  # Assuming you have the move ID already
    'payment_ref': 'TEST/0001',
    'amount': 100,
    # Add other required fields here
}

# Make sure to replace 'db', 'uid', and 'password' with actual values
result = models.execute_kw(db, uid, password, model, 'create', [data])

# Print the result to check if the creation was successful
print("Created bank statement line with ID:", result)

Ensure you replace 'db', 'uid', and 'password' with the actual values for your Odoo instance. Also, make sure the user you're authenticating with has the necessary permissions to create bank statement lines. If there are any errors, the print statement will help you identify them.

0
Avatar
Annuleer
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
New date format odoo 19
accounting
Avatar
Avatar
Avatar
2
dec. 25
1450
Bank Suspense vs Bank Suspense Account on Odoo Chart of Accounts default Opgelost
accounting
Avatar
Avatar
2
dec. 25
442
Peppol - Envoie de mails à mon comptable pour WinAuditor
accounting
Avatar
Avatar
Avatar
3
dec. 25
1589
{{LL@mar Mexico}} ¿Cómo hablar con una persona en Air France?
accounting
Avatar
0
dec. 25
4
Why is the invoice PDF showing an error in the right corner
accounting
Avatar
Avatar
1
dec. 25
1316
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