mahmoudrdash/custome_packeg_connect_odoo

Odoo xml - RPC Connector using Ripcord with Repositry pattern and Solid archiecture

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/mahmoudrdash/custome_packeg_connect_odoo

dev-main 2025-12-05 09:27 UTC

This package is auto-updated.

Last update: 2025-12-04 21:34:33 UTC


README

Odoo xml - RPC Connector using Ripcord with Repositry pattern and Solid archiecture .

Installation

You can install the package via Composer:

composer require mahmoudrdash/custome_packeg_connect_odoo

Usage

To use the package, you first need to configure your Odoo connection details.

// Example usage

require_once __DIR__ . '/vendor/autoload.php';

use Mahmoudrdash\CustomePackegConnectOdoo\Client\ClientOdoo;
use Mahmoudrdash\CustomePackegConnectOdoo\Repositories\CustomerRepository;
use Mahmoudrdash\CustomePackegConnectOdoo\Services\CustomerService;


$clentOdoo = new ClientOdoo(
    "http://localhost:8069",
    "admin",
    "admin" ,
    "admin"
);

$customerRepository = new CustomerRepository($clentOdoo);
$customerService = new CustomerService($customerRepository);

$allCustomer  =  $customerService->getCustomerAll();

print_r($allCustomer);

// Create  Or Update 

$result = $customerService->syncCustomer([
    'name' => 'Mahmoud Reda',
    'email' => 'exampel@gmail.com',
    'phone' => '01000000000'
]);

print_r($result);

// Delete 
$customerService->deleteCustomerById(1);