Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

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

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

XML RPC - Pay Invoice

Subscriure's

Get notified when there's activity on this post

This question has been flagged
2 Respostes
3883 Vistes
Avatar
Jesse Rye

Is there anyway to pay an invoice using the XML RPC such as with exec_workflow()?

0
Avatar
Descartar
OdooBot
Dear ,

Thank you for emailing Cotton Babies. Our customer service system has received your email. Your ticket number is XQM-55694-261. Please reference this ticket number if you contact Cotton Babies about this issue.

If the issue you emailed about is time sensitive (address change, shipping upgrades, payment updates, order cancellations), please make note of the ticket number above and then give us a call at 1-888-332-2243.

Our customer service team is available to respond to customer messages on normal business days, 9am - 5pm CST.  We are occasionally closed for holidays.  Our goal is to respond to customer emails within one business day.

Just emailing for help with a return? Returns are easy! More information and instructions for processing a return can be found here:

http://www.cottonbabies.com/info.php#returns

Our Cloth Diapering Basics may have answers to many of your questions:
http://www.cottonbabies.com/clothdiapers.php

We know your time is extremely valuable, thank you for writing us, we will get back to you as soon as we possibly can.

Kindest regards,


Cotton Babies Customer Service Team
contactus@cottonbabies.com
1-888-332-2243
Avatar
Axel Mendoza
Best Answer

This is how I do it in Zato ESB using their integration with Odoo, you could take it as an example or a seudo-code but it's working ok and contains all the steps, obviously you need to adapt it because the following code is not complete:

invoice_pool = zoe.get_model('account.invoice')

voucher_pool = zoe.get_model('account.voucher')

journal_pool = zoe.get_model('account.journal')

partner_pool = zoe.get_model('res.partner')

invoice_info = invoice_pool.read([int(vals.get('id_invoice'))], ['partner_id', 'name', 'company_id', 'currency_id', 'type', 'state'])

if invoice_info:

invoice_info = invoice_info[0]

if invoice_info['state'] != 'open':

self.report_error("The invoice with code %s is not validated"% vals.get('id_invoice'))

return

else:

self.report_error("Invoice not found with id %s"% vals.get('id_invoice'))

return

partner_info = partner_pool.read([invoice_info['partner_id'][0]], ['is_company', 'parent_id'])[0]

while not partner_info['is_company'] and partner_info['parent_id']:

partner_info = partner_pool.read([invoice_info['parent_id'][0]], ['is_company', 'parent_id'])[0]

journal_id = journal_pool.search([('code', '=', vals.get('journal_code'))])

if not journal_id:

self.report_error("There is no journal asociated with this code: %s"%(vals.get('journal_code')))

return

result = voucher_pool.onchange_journal([],journal_id[0], [], False, partner_info['id'], False, float(vals.get('amount_payment')), 'receipt', invoice_info['company_id'][0], context={'invoice_id': invoice_info['id']})

voucher_vals = result['value']

voucher_vals.update({

'type': 'receipt',

'date': vals.get('fecha'),

'amount': float(vals.get('amount_payment')),

'partner_id': partner_info['id'],

'reference': invoice_info['name'],

'company_id': invoice_info['company_id'][0],

'journal_id': journal_id[0],

})

line_cr_ids = voucher_vals.pop('line_cr_ids')

voucher_vals['line_cr_ids'] = [(0,0,cr) for cr in line_cr_ids]

voucher_id = voucher_pool.create(voucher_vals)

ctx = {

'payment_expected_currency': invoice_info['currency_id'][0],

'close_after_process': True,

'invoice_type': invoice_info['type'],

'invoice_id': invoice_info['id'],

'type': 'receipt',

}

voucher_pool.button_proforma_voucher([voucher_id], context=ctx)

voucher_ids[invoice_info['id']] = voucher_id

You just need to change it to xmlrpclib if you use it, like this search example:

uid = oerp_common.authenticate(db, 'admin', password, {})

oerp_models = xmlrpclib.ServerProxy('{}/xmlrpc/2/object'.format(url))ids = oerp_models.execute_kw(db, uid, password,'ir.module.module', 'search',[[['name', '=', module]]])s

Hope this helps

3
Avatar
Descartar
Avatar
Jesse Rye
Autor Best Answer

Thanks. I'll give this methodology a try.

0
Avatar
Descartar
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrar-se
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة 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 és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

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