PHP code example of previewict / openerp-php-connector
1. Go to this page and download the library: Download previewict/openerp-php-connector library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
previewict / openerp-php-connector example snippets
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();
json
{
"name": "YourProjectName",
"description": "YourProjectDescription",
"
}