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 there any way to call php script in python

Cavid Aslanov
on 9/30/13, 9:18 AM 5,215 views

Hi everyone,i have database in mysql and i need to create php script toget data from database and after it i want to call this script in python.How can i do it?

On 9/30/13, 11:36 AM

If you want to communicate OpenERP with PHP you can do it through XML-RPC, consuming web service from php. You can search the official documentation of OpenERP XML-RPC or google "OpenERP 7.0 connection with PHP using XML-RPC". I hope help you.


AJ Schrafel Paper Corp

--AJ Schrafel Paper Corp--
| 4 5 8
Bronx, United States
--AJ Schrafel Paper Corp--

Exploring OpenERP for business

AJ Schrafel Paper Corp
On 9/30/13, 12:24 PM

you can run things at the command line if you can create a custom module.

at the top of your python file import subprocess

and then to run the php script

cmd = "php and your file name"
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)

google "python subprocess" to get more details on what is necessary.

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

0 follower(s)


Asked: 9/30/13, 9:18 AM
Seen: 5215 times
Last updated: 3/16/15, 8:10 AM