Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Is it possible to trigger Actions/Methods via Web services?

on 2/9/16, 10:31 AM 289 views

Similar to exec_workflow, is there there a call that would execute actions or/and methods? For example, actions and methods tied to buttons. More specifically Converting to Opportunity, Mark Won, Mark Lost, etc.



Axel Mendoza

--Axel Mendoza--
| 6 7 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full time employee trying to understand what to do an how

Reach me at aekroft@gmail.com

Axel Mendoza
On 2/9/16, 4:11 PM

Yes, you could trigger actions and methods using XMLRPC (Webservices), just be sure to pass the corresponding parameters to the method or action method. For example:

#Using direct XMLRPC using xmlrpclib

    oerp_common = xmlrpclib.ServerProxy('{}/xmlrpc/2/common'.format(url))
    for d in dbs:
        password = dbs[d].get('admin_pass','admin')
        uid = oerp_common.authenticate(db, 'admin', password, {})
        oerp_models = xmlrpclib.ServerProxy('{}/xmlrpc/2/object'.format(url))
        action = oerp_models.execute_kw(db, uid, password,'ir.module.module', 'update_list',[])


#this is using Zato ESB for Odoo:

with self.outgoing.odoo.get('solt-open').conn.client() as zoe:

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

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 2/9/16, 10:31 AM
Seen: 289 times
Last updated: 2/10/16, 6:46 AM