Odoo Magento 2 Connector

Install Magento Extension

Add “Emipro_apichange” Magento extension at magento side,follow the following steps. 

Add latest version of extension:

  •  Go to Magento-Connector Module folder
  • In that you will find extension named "Emipro" folder

Pre-Installation step:

  • Backup your Magento web directory and database.
  • Disable the Cache
  • Disable Compilation Mode

Upload Extension :

  • Copy Emipro folder and upload it in Magento.
  • Go to your Magento root directory
  • Go to extension extracted folder


Select extension's all files and folders and upload into your Magento root directory

Install Extension

  • Upgrade your Magento: from SSH, run the command in Magento2 root directory -"php bin/magento setup:upgrade"
  • Deployement of static content: run this command in Magento2 root directory -"php bin/magento setup:static-content:deploy"

Refresh the Cache

  • Go to System > Cache Management
  • Select all and refresh the cache




Add Additional Parameter in odoo.conf file

For Odoo-Magento Connector, to execute job of import or export operation, We need to configure job runner.To configure job runner follow the following steps:

Add following parameters in odoo.conf file :

  • [options-connector]

Do following changes in /etc/init.d/odoo script :

  • Load odoo with option “--load=web,odoo_magento2_ept”

  • Example : start-stop-daemon --start --quiet --pidfile ${PIDFILE} --chuid $
    {USER} --background --make-pidfile --exec ${DAEMON} -- $
    {DAEMON_OPTS} --load=web,odoo_magento2_ept

Create Magento Instance in Odoo

After install Magento-Odoo Integration in your Odoo, You can see Magento menu in your Odoo, If Current user has rights as manager or User for Magento Connector.

  • For use Magento-Odoo Integration we need to connect Magento Store with Odoo.

  • You can Configure Magento Instance under Menu Magento >> Configurations >> Settings.

  • There is one section called “Instance configuration“,click on “Create More Instance”,

  • You can see the wizard for Instance configure.

  • In that wizard add Magento2 details like version of magento, Magento Location, Access Token, Warehouse and click on “Create” Button.

  • You can generate Access Token through follwing steps.

Generate Access Token On Magento 
1) Go to System > Integration menu:

2) Click On button “Add New Integration”:


3) Enter General Information like name for integration, Email And current user’s password:



4) Go to API tab > and Select “ALL” In Resource access and Click on “Save” button to save Integration :


5) To active Integration click on “Active” link.

6) Click on “Allow” button in opened Pop up :

7) Save Access token and Click on “Done” To use Integration.


Configure Magento Instance

According to the Magento structure, one Magento Instance have multiple websites, One website have multiple Stores and one store has multiple store views. And all have ts own configuration parameters. Like website has configuration of different price and tax related options, the store has email notification related options, store view has anguage-related options. There are some parameters which are related to Magento Instance like the warehouse and main price list.

In section of “Instance Configuration” configure following options:

  • Catalog Price Scope : Scope of product price at Magento.

  • Pricelist : Used for get/set product price if Catalog price scope is ‘Global’.

  • Auto Create Product : If you want to create new product in Odoo if not found, At the time import Sale Order Or Product

In section of “Other Configuration” Configure following options:

  • Import/Export Product data from/to all storeview : Import product data (e.g Translated value of name,description,etc..) from all storeview if true else import data for only default storeview.

  • Import Images of Products :Import product images along with product from Magento while import product

  • Import Sale Orders on the fly :It Import all Sale Order directly without create Jobs, in this case system will create job in case of any failed transansactions

  • Product Import Page Size :While import products from Magento, if there are large no of products on Magento side, you can split product list in multiple partitions of x number of records to process in Odoo.

  • Customer Import Page Size :While import customers from Magento, you can split customer list in multiple partitions of x number records to process in Odoo.

  • Is Import Product Stock : It import product stock from Magento to Odoo.For that you need to select "Stock Warehouse" for stock.


Instance Configuration

  • Go to Magento >> Configuration >> Instance Details >> Instance, Here you can see the Instance which you configure.

  • Open it and click on “Sync metadata”, It will import all Websites, Stores,

  • Storeviews and all product attribute set of Magento. It will also Import Payment Method code, and delivery method code in Odoo

  • Here you need to add “Default Attribute Set”, It will use as base attribute set while exporting any new attribute set. 

  • You can set “Default Product Category” after import Product Category.How to import product category that you can find in section Perform Import/Export Operation. 

  • "Delete Product Image On Magento", When we delete Product Image in Odoo, Then It will delete on Magento or not.

Website Configuration

  • Go to Magento >> Configuration >> Instance Details >> Wesites.

  • Website has configuration of different price and tax related options :

  • Warehouse : Warehouse to be used to deliver an order from this website.

  • Tax include in price : Magento Product Price is tax including or not

  • Create Tax if not found : While Import Order, If Order tax is not found in Odoo then it will create tax automatic.Here you need to give Tax account and Tax refund Account.

  • Pricelist : If “Catalog Price Scope” is website, system will get/set price based on this pricelist.


Store Configuration

  • Store has Configuration related email notification.
  • It will send email to customer from Magento once shipment or Invoice done.


Store view Configuration

  • Storeview contain configuration related language and sale prefix.

  • While Sync metadata, If language found for storeview it will automatic set in storeview’s language.

  • Sale Prefix : While Import order, For specific storeview’s Order,add this Prefix, In Sale Order reference.

Workflow Settings

This is advisable to configure Automatic workflow before you start to sync Odoo with Magento. Because improper configuration of workflow leads you to runtime issues of sales order import.

With Auto workflow user can choose what actions they want to do after order import, like create shipments, invoices create / validate. User can configure automatic workflow from Magento >> Configuration >> Automatic Workflow Menu. 

Invoice policy configuration : User can configure invoice policy for sale orders from automatic workflow. This invoice policy will be apply to orders from workflow which is selected inside the order. There are two options for that invoice will be created based on delivery order or ordered quantity.

Options to choose automatic actions : With this feature user can configure automatic create or validate sale order and related invoice and shipments. 

  • Order validation : In automatic workflow if “Validate Order” option is selected then order will automatically be confirmed. 

  • Create invoice : If option “Create Invoice” is selected then automatic 

    invoice created as per invoice policy of order. 

  • Validate invoice : If option “Validate Invoice” is selected then 

    automatically invoice will be validated. 

  • Confirm and close shipment : if option “Confirm and Close Picking” is selected then confirm the shipment and close it.

  • Force invoice date : if this option is selected invoice will be created with order date.


Payment Method Configuration

This is the very import configuration to import sales order from Magento to Odoo. If this is not configured then order will not be imported.User have to create website wise payment methods before to start sales order import process. In payment method user need to set some parameters like Payment Journal,Invoice Journal,Automatic workflow, Create Invoice on etc. 

For Create Payment Method Go to Magento >> Configuration >> Payment Method, Click on create button.

For name of Payment method, Here you can find all the payment code, Which are available at Magento side.

Import Rule : Import Rule for Sale Order

  • Always : This Payment Method Order will always import

  • Paid : If Order is Paid On Magento then and then import

  • Never : This Payment Method Order will never imported

Payment journal configuration :

  • Payment Journal : When Payment of Order is created, it will created in selected journal.

  • Invoice Journal : When Invoice is created, Invoice entries will created in selected journal.

Automatic process configuration : All the automatic actions will be taken for the sales order which are linked up with the Magento, auto workflow will be selected from the payment methods and set into the sales order.

Configuration when to export invoice to Magento : User can control the invoice export flow by configuring “create invoice on” option in payment method, if user don't want to export invoices to Magento then simply need to set N/A options. The same way user can choose the export invoice trigger point either it's being while invoice getting paid or validated.

Other Configuration :

  • Import Past Orders Of X Days : For Import order of last X days.

  • Payment term : Payment term for Sale Order.


Magento Instance wise auto schedule jobs configuration

Per each Magento Instance, you can set automatic jobs for importing customer groups, customers, product categories, products, sale orders, export product stock , export shipment, export invoice from Odoo to Magento etc.

Those automated jobs are setup that can run at different timed intervals. To do this setting, you need to go to menu 'Magento >> Configuration >> Settings' and at each instance you can see these settings under the “Auto Cron Configuration” option. Once you set and click on Apply.



Perform Import Operation

You can perform Import operation from Magento >> Operation >> All Operation wizard.

Import Operation : You can perform import operation manually like partner category, partner, Product category, products, attribute set, attributes, sale order, Sale order by
reference, Import Product Stock, Import Product Image etc. from here. 

Import Product Stock and Import Product Image you can perform by two ways.

Import Product Stock :

  • Go to Magento >> Operation >> All Operation, Select "Import Product Stock" and click on execute button.

  • Go to Magento >> Products >> Simple Products, Select products and click on action button and select action "Import Product Stock".

Import Product Image :

  • Go to Magento >> Operation >> All Operation, Select "Import Product Image" and click on execute button. 

  • Go to Magento >> Products >> Simple Products, Select products and click on action button and select action "Import Product Image".As well as you can Import product for Configurable Product


Perform Export/Update Operation

You can perfrom export operation from Magento >> Operation >> All Operation wizard. There are many others ways to perform export operation.

We can export shipment, invoice, product category, product attribute set, product attribute, product and product attribute.



Export Shipment

  • Export shipment can be perform from Magento >> Operation >> All Operation wizard.

Export Invoice

  • Export Invocie can be perform from Magento >> Operation >> All operation wizard

Product Category

  • We can new export Product Category from Odoo to Magento.

  • You can create new category from menu Magento >> Categories & Attributes >> Product Category.

  • After select product category, click on ‘Action’ button and select action “Export Product Category”, It will export product category.

  • As well as you can update product category by click on “Update Product Category”.




Product Attribute Set

  • We can export new Attribute Set from Odoo to Magento.

  • You can create new attribute set from menu Magento >> Categories & Attributes >> Attribute Set.Click on ‘Create’ button and create Attribute Set.

  • After select Attribute set ,click on ‘Action’ button and select action “Export Attribute Set”, It will export attribute set to Magento.

  • As well as you can update Attribute set by click on “Update Attribute Set”.



Product Attribute

  • We can export new Attribute from Odoo to Magento.

  • You can create new attribute from menu Magento >> Categories & Attributes >> Attributes.Click on ‘Create’ button and create Attribute.

  • After select Attribute ,click on ‘Action’ button and select action “Export Attribute”, It will export attribute to Magento.

  • As well as you can update Attribute by click on “Update Attribute”.

Product Export /Update 
  • Product export process is same for Simple or Configurable product.

  • You can create product from menu Sales >> Catalog >> Product.

  • After create product, Click on ‘Action’ button, In that select action “Prepare for Export to Magento”.

  • In Popup wizard,Select Magento Instance,Website and Attribute set.and click on “Export” button.


  • After that you can find that products in Magento >> Products menu 

  • If Product has variants then it will show under menu Magento >> Products >> Configurable products.If Product has no variant then you can find that product in menu Magento >> Products >> Simple Products.

  • Now, Add details like Product Category, Images, Description, Short description, etc.

  • Set value of Product Attributes in Open attribute wizard.

  • In Case of configurable product, Add Magento SKU in product.

  • After verify all details, Click on button “Action”, In that select action “Export Product to Magento”.

  • In Case of Simple Product export, You can create simple Product in Sales >> Catalog >> Product Variant.

  • After create product,"Prepare for Export to Magento" and Export it to Magento,Process of export simple product is same as export configurable product.

  • As well as you can update product from Odoo to Magento by click on action “Update Product to Magento”.



Product Stock

  • We can update single or multiple product’s stock manually from products view.
  • Go to Magento >> Products >> Simple Products, select one or more products, click on “Action” and select action “Export Stock to Magento”.It will export product stock to Magento.



  • Odoo create log of every operation which you perform for Import or Export.

  •  Every import or export operation create job, job execute, it will import or export record.

  • Based On configuration job will execute and in case of any misconfiguration or any wrong response from Magento, job become fail and it give the reason of job fail in result.

  • You can requeue the failed job, it will re-execute job.