Skip to content

Connect your PHP driven web application with OpenERP through PHP XML RPC

License

Notifications You must be signed in to change notification settings

previewict/openerp-php-connector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenErp Logo

OpenERP PHP Connector

Connect your PHP driven web application with OpenERP through PHP XML RPC

#####Installation & Usage To get started you need to install this library via Composer. If you have ready composer.json file then just add "previewict/openerp-php-connector": "dev-master" as a dependency. Or if you don't have any composer.json ready then copy/paste the below code and create your composer.json file.

{
    "name": "YourProjectName",

    "description": "YourProjectDescription",

    "require": {
        "php": ">=5.3.0",
        "previewict/openerp-php-connector": "dev-master"
    }
}

Now just run composer update command and this openerp php connector library will be cloned into your vendor directory.

Now I am assuming that you already cloned this repository via composer.json or direct clone from GitHub. Now to use this you have to write down the following codes on your script.

require_once 'vendor/autoload.php';

use OpenErp\Modules\Sales\Customer;

/**
* USERNAME = Your OpenERP username. i.e: admin
* PASSWORD = Your OpenERP password. i.e: 123456
* DATABASE = Your OpenERP database name. i.e: openerp_demo
* SERVER = Your OpenERP Server. i.e: http://yourOpenERPServer.com
*/
$sales = new Customer(USERNAME, PASSWORD, DATABASE, SERVER);
$result = $sales->read($customerID);   // a customer ID to get details from your OpenERP. i.e: 10
var_dump($result); die();

Now it will give you a PHP array. And now you can use the data however you want.

Please Form and send me Pull request if you added something useful for this. Happy PHP-ing!

About

Connect your PHP driven web application with OpenERP through PHP XML RPC

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages