Magento 2 Odoo Integration

Table of Contents

  1. 1. Extension Installation
  2. 2. Configure Integration in Extension
    1. 2.1 Connect Magento 2 with Odoo

      2.2 Select Website to Sync

      2.3 Data Synchronization Settings

      2.4 Generate Debug Log

  3. 3. Map Tax Codes & Payment Methods
  4. 4. Manage Sync Queue & Logs

1. Extension Installation

For Magento Marketplace Customers

Find the extension’s Composer name and version in its composer.json file.

  • Login to your SSH and run:

    • composer require meetanshi/magento-2-odoo-integration

  • Enter your authentication keys. Your public key is your username; your private key is your password.

  • Wait for Composer to finish updating your project dependencies and make sure there aren’t any errors.

  • To verify that the extension is installed properly, run the command:

    • php bin/magento module:status Meetanshi_Odoo

  • By default, the extension is probably disabled. Enable the extension and clear static view files:

    • php bin/magento module:enable Meetanshi_Odoo  --clear-static-content

    • php bin/magento setup:upgrade

    • For Magento version 2.0.x to 2.1.x - php bin/magento setup:static-content:deploy

    • For Magento version 2.2.x & above - php bin/magento setup:static-content:deploy –f

    • php bin/magento cache:flush 

For Meetanshi Customers

  • Download the extension zip file and extract it to your Magento’s root directory.

  • Login to your SSH and run below commands step by step:

  • php bin/magento setup:upgrade

  • For Magento version 2.0.x to 2.1.x - php bin/magento setup:static-content:deploy

  • For Magento version 2.2.x & above - php bin/magento setup:static-content:deploy –f

  • php bin/magento cache:flush

2. Configure Integration in Extension

Log into your Magento 2 admin panel and navigate to Odoo Integration > Configuration to configure the extension. 
 

2.1 Connect Magento 2 with Odoo

You can configure the breadcrumbs schema in your store. Expand the Breadcrumbs Schema section and configure these settings:

  • Enable Odoo Integration: Enable the button to integrate Magento 2 and Odoo.

  • Connection Status: Displays the Magento-Odoo connection status.

  • Connection Mode: Select from the following modes to configure the Magento 2 Odoo Integration based on your needs:

    • Sandbox (for testing)
    • Production (for live)
  • Sandbox Username: Your sandbox account username provided by Odoo.

  • Sandbox Password: The password associated with the sandbox account.

  • Sandbox Odoo Database: The name of the Odoo database you are using for testing.

  • Sandbox Odoo URL: The base URL of the sandbox environment for Odoo (e.g., https://sandbox.odoo.com).

  • Username: Your Odoo account username for the live environment.

  • Password: The password for the live account.

  • Odoo Database: The name of the Odoo database used in production.

  • Odoo URL: The URL of the live Odoo environment (e.g., https://live.odoo.com).

 

After entering the required details for either of the two modes, click on the Test Authentication button to verify the credentials.

  • Authenticate Status: If the authentication is successful, the status will indicate that the connection has been established. If authentication fails, double-check the provided details and try again.

2.2 Select Website to Sync

Here, you can choose the website you want to sync with Odoo.

2.3 Data Synchronization Settings

The extension allows you to sync accounts, products, orders, and invoices with Odoo Inventory. You can choose options for each of these data.

For each data sync, you can choose from the following sync mode:

  • Immediate: The data is synced immediately from Magento 2 to Odoo Inventory

  • Cron Job: The data is synced regularly at a specific interval. For e.g., daily, weekly, or monthly

 

Here’s what the synced customers look like in Odoo Inventory:

 

Here’s what the synced products look like in Odoo Inventory:

 

For the order synchronization, you can also select order status to sync. The orders with the selected statuses will only be synced with Odoo Inventory.

 

Here’s what the synced orders and invoices look like in Odoo Inventory:

 

Credit Memo Synchronization Settings

  • Credit Memo Synchronization: Enable or disable the synchronization of credit memos between Magento and Odoo.

  • Sync Mode: Choose the sync mode for credit memo synchronization:

    • Immediate: Sync as soon as changes occur.
    • Cron Job: Sync at scheduled intervals.

 

2.4 Generate Debug Log

Developer Options provides an option to enable logging errors to troubleshoot the integration in case of any issues.

  • Generate Debug Log: Enable the option to get detailed logs of the integration process of Magento 2 Odoo Integration.

 

Once enabled, you can find the debug logs at /var/log/xerointegration.log

3. Tax Mapping

Move to Odoo Integration > Tax Mapping to map Magento 2 tax classes with Odoo. First of all, click the “Add All Tax Code” button to add all the Magento 2 tax codes to the list in the grid and then, click “Synchronize” to sync each tax code with Odoo API.
 

4. Manage Sync Queue & Logs

If your store already has customers, products, orders, invoices and want all of them to sync with Odoo, move to Odoo Integration > Sync Queue. 
 

Click Add Customers, Add Products, Add Invoices, and Add CreditMemos, one by one in the same order as mentioned to add all here in the sync queue. 
 

 

Once synchronized, the status of each entity is shown with the details at Odoo Integration > History Logs. If the data is synchronized correctly, the status will be successful, else if there's a problem during data sync, it will show the error status.