Ir al contenido
Menú
Se marcó esta pregunta
3 Respuestas
238 Vistas

I need an API to enter records into accounting

Avatar
Descartar
Mejor respuesta

Hi,


You can use Odoo’s API to programmatically create and manage accounting entries, including journal entries, invoices, payments, and reconciliations via both internal server-side code and external integrations.


Refer to the following.


- https://www.cybrosys.com/blog/how-to-configure-odoo-rest-api-module-in-odoo-18

- https://www.youtube.com/watch?v=Pd_f6VZruxg

- https://www.youtube.com/watch?v=yxI9tyctkHU

- https://www.cybrosys.com/blog/how-to-connect-with-odoo-17-using-api-key


Hope it helps



Avatar
Descartar
Mejor respuesta

Hi,

if you are enter records using API

so use odoo external API XML-RPC

Here is the API documentation

https://www.odoo.com/documentation/18.0/developer/reference/external_api.html


here is example to enter record 


import xmlrpc.client


url = "http://localhost:8080"

db = "<Your database name>"

username = "<enter username>"

password = "<enter password>"


common = xmlrpc . client . ServerProxy ( f " { url } /xmlrpc/2/common" )

uid = common .authentication( db , username , password )


models = xmlrpc . client . ServerProxy ( f " { url } /xmlrpc/2/object" )


partner_id = models .execute_kw( db , uid , password , '<model_name>' , 'create' , [{

'name' : 'Test Partner From XMLRPC' ,

'email' : "abc02@gmail.com"

}])


print ( "Partner Created with ID:" , partner_id )


I hope it is full use.

Avatar
Descartar
Mejor respuesta

Odoo Official Documentation

Odoo REST/RPC API

  • Learn how to use the xmlrpc or jsonrpc to create accounting entries via endpoints.
  • Example: Posting to account.move model to create journal entries.

Community Tutorials

  • GitHub & YouTube have real examples from Odoo developers.
  • Look for terms like account.move create API or Odoo accounting integration.

Odoo Shell or Postman

  • Test API calls in Odoo Shell or via Postman using proper authentication.

Odoo Accounting Module (Python)

  • Browse the source code to understand how models like account.move, account.move.line work.

Avatar
Descartar

PLEASE check the accuracy of answers you get from AI Chatbots before pasting them here - there is no such link "Developer > ORM API" or "Accounting Module"

Correct links:
https://www.odoo.com/documentation/18.0/developer/reference/external_api.html
https://www.odoo.com/documentation/18.0/applications/finance/accounting.html

Anyone can do the same, you are not adding a lot of value - especially when your answer contains incorrect information