[Skip to main content](#vessel-content)

#  Odoo plugin

Details    Written by: Administrator    Category: [Pther extensions](/support/documentation/hikashop/other-extensions)     Published: 18 November 2026     Hits: 18

The Odoo plugin keeps your shop in step with **Odoo**, which stays the master of your data. Customers, prices and stock come from Odoo; orders go to Odoo as sales orders and their status comes back. Everything is set on the **Odoo** page of the HikaShop backend (System menu), which also shows what each synchronisation did.

## Installation

1. Check your Odoo: version 19 or later (Community or Enterprise), on your server, on Odoo.sh, or on Odoo Online with the **Custom** plan. The One App Free and Standard plans of Odoo Online have no external API.
2. In Odoo, create a user for the shop, for instance "HikaShop", with the rights the plugin uses: Sales (to read customers, pricelists and create sales orders), Inventory (to read the stock) and, if the shop is to invoice its paid orders, Invoicing. Log in as that user (or ask an administrator), open **Preferences &gt; Account Security &gt; New API Key**, give the key a name and a duration, and copy it: Odoo shows it only once. Note its expiry date.
3. Odoo keys last 90 days at most. For the plugin to renew its key by itself, an administrator sets the system parameter `base.enable_programmatic_api_keys` to `True` (activate the developer mode, then Settings &gt; Technical &gt; System Parameters). An administrator user does not need it.
4. In Odoo, create three service products for the extra lines of the orders: shipping, payment fees and discounts, with their sales tax.
5. Download the plugin from our website via the download link given after the purchase, and install it with the extension manager of Joomla, or in HikaShop &gt; Plugins on WordPress. Enable it.
6. Open HikaShop &gt; System &gt; **Odoo**, enter the address of your Odoo, the API key and its expiry date, and click Save. The top of the page then shows the version of Odoo and the user the shop is connected as, and the settings offer the pricelists, tags, warehouses, taxes, products and journals of your Odoo. After a change in Odoo (a new pricelist, warehouse or tax), click **Read Odoo's settings again** to see it in the lists.
7. Make sure your products have, as their code in HikaShop, their **internal reference** in Odoo: that is how the plugin matches them. A product variant of Odoo is matched on its own reference.
8. Set up the HikaShop cron (System &gt; Configuration &gt; Advanced), ideally every 5 to 15 minutes: it runs the synchronisation. The "Run now" button does a run at once, handy for the first import.
9. In System &gt; Order statuses, tick in the **Odoo** column the statuses that send an order to Odoo (confirmed and shipped by default).

## The Odoo page

![The top of the Odoo page: the connection, the customers and products linked, and the orders in Odoo](/images/doc/plugins/odoo/odoo_status.png)

The top of the page shows the connection to Odoo, how many customers and products are linked, and how many orders are in Odoo. Below, the **Synchronisation** table gives, for each job, when it last ran and what it did. "Run now" runs a job at once; "Read everything again" makes the next runs read every customer or product again. The orders that could not be sent are listed with their error and a button to try them all again.

## Connection

![The Connection settings: address, database, API key, its expiry date and renewal, company, alerts](/images/doc/plugins/odoo/odoo_connection_settings.png)

- **Odoo address**: the address of your Odoo, as you open it in your browser, for instance https://mycompany.odoo.com.
- **Database**: only when your Odoo server holds several databases, the name of yours. Leave it empty for Odoo Online and most servers.
- **API key**: the key of the Odoo user of step 2. Leave the field empty to keep the saved key.
- **Key valid until**: the expiry date of the key, as chosen in Odoo. "Renew the key now" makes a new key at once and revokes the old one.
- **Renew the key by itself**: 20 days before the expiry date, the plugin makes a new key for 85 days and revokes the old one (step 3 of the installation is needed). Off, you make a new key in Odoo before the date and enter it here.
- **Company**: only when your Odoo holds several companies, the one of the shop. Empty uses the company of the API user.
- **Debug mode**: writes every call to Odoo to the HikaShop log (System &gt; Logs).
- **Alert after (hours)** and **Alert email**: an email is sent when a synchronisation has not succeeded for this long (Odoo unreachable, key expired or revoked, cron stopped), at most once a day.

## Customers

- **Import the customers**: creates and updates a HikaShop customer for each Odoo customer (a company or an individual, not one of its contacts) that has an email. The customer gets a shop account when they register with that email: the account is linked to the Odoo customer at once.
- **Only this tag**: imports only the customers with one Odoo tag.
- **Import the address**: keeps the customer's billing address in step with the customer's address in Odoo. For a company, the names come from its contact with the same email, or its first contact. Odoo has no title nor, for France, a region: when your address form requires them, the customer fills them in once at the checkout and they are kept.
- **Pricelists**: the user group of each Odoo pricelist. Each customer is put in the group of their pricelist, and the products get the prices of that pricelist for the group. HikaShop gives each customer the lowest price they are entitled to. This needs HikaShop Business.
- **Customer tags**: puts the customers with an Odoo tag in a user group, to give them a discount, a payment method or a shipping method of their own.
- **Customers not in Odoo**: when someone who is not in Odoo orders, the plugin can create them in Odoo, put the order on one Odoo customer of your choice (give its id in **Catch-all customer**), or not send the order.
- **Other customer fields**: one line per field, `odoo_field=hikashop_column`, to copy more information onto the customer, for instance `ref=user_erp_ref`. The HikaShop column is a customer custom field you created.

## Products, prices and stock

- **Update the products**: updates the HikaShop products whose code is an Odoo internal reference. Variants are matched the same way, on their own code.
- **Create the missing products**: creates the Odoo products that can be sold and are not in the shop, unpublished, in the category chosen in **Category of the new products**, so you add pictures and a description before publishing them.
- **Fields Odoo updates**: what Odoo overwrites. Leave the name and the description off to write them in HikaShop. "Published" unpublishes a product when it is archived or no longer for sale in Odoo.
- **VAT rates**: the HikaShop tax category of the products, from the rate of their sales tax in Odoo.
- **Other product fields**: one line per field, `odoo_field=hikashop_column`, for instance `sale_delay=product_delay` for the customer lead time, or a field added with Odoo Studio.
- **Import the prices**: replaces the prices of the products with those of Odoo, excluding tax, in the main currency of the shop. Odoo computes each price with its own pricelist rules. Turn it off to manage the prices in HikaShop.
- **Price for everyone**: the pricelist whose price every customer gets, or the sales price of the product.
- **Quantity prices**: also imports the prices from a minimum quantity that the pricelist rules give.
- **Products checked per run**: a pricelist rule changed in Odoo does not change the products, so the products are read again in turn, this many at each run.
- **Import the stock** and **Warehouses**: the stock of the shop is the on hand quantity of the warehouses you tick, or of all of them. The plugin follows the stock moves of Odoo, so a delivery or a receipt shows in the shop at the next run. Products that Odoo does not track in its inventory get an unlimited stock.

A product archived or deleted in Odoo is unpublished in the shop, never deleted.

## Orders

![The Orders settings: sending, confirmation, service products, payment terms, invoicing and status follow-up](/images/doc/plugins/odoo/odoo_orders_settings.png)

- **Send the orders**: a sales order is created in Odoo when the order reaches one of the statuses ticked in the Odoo column of System &gt; Order statuses. Its customer reference is the order number of the shop.
- **Confirm them**: confirms the order in Odoo, which plans its delivery. Off, it stays a quotation for you to check.
- **Product for the shipping**, **for the payment fees**, **for the discounts**: the Odoo service products of these lines. An order with such a line waits until the product is set.
- **Payment terms**: the Odoo payment terms of the orders paid with each payment method of the shop. Empty: those of the customer in Odoo.
- **Delivery address**: when the order goes to another address than the billing one, it is added to the customer in Odoo as a delivery address and put on the order.
- **Invoice the paid orders** and **Payment journal**: creates and posts the invoice of the paid orders in Odoo and registers their payment in the journal.
- **Other order fields**: one line per field, `hikashop_column=odoo_field`, to send order custom fields, for instance a site reference into a field added with Odoo Studio.
- **Follow the status in Odoo**, **Statuses** and **Notify the customer**: the HikaShop status an order gets when its Odoo order is confirmed, invoiced, delivered or canceled, and whether the customer gets the status email.

The lines are sent with the prices and the VAT rates of the shop, so the totals match; Odoo needs a sales tax excluding tax at each rate the shop uses. A difference of total is written in the HikaShop log. The order page of the backend shows its Odoo order, with a link to it.

![The order page of the backend with its Odoo order and its status](/images/doc/plugins/odoo/odoo_order_page.png)

When it could not be sent, the error is shown with a "Send to Odoo" button. An order is never sent twice: an order created in Odoo just before a time-out is found again rather than created a second time.

## Customer account

**Show the Odoo documents** adds a "My documents" page to the account of the customers known in Odoo: their orders, invoices or quotations (as chosen in **Documents shown**), including those made outside the shop, with their PDF. A customer only ever sees their own documents.

## Instant updates (webhooks)

The cron is enough. To see changes made in Odoo at once, enable **Accept Odoo webhooks** and save: the page shows the address to give to Odoo. In Odoo, activate the developer mode and open Settings &gt; Technical &gt; Automation Rules. Create one rule for each model you want (Contact, Product Variant, Sales Order, Stock Move), triggered "On save", with the action "Send Webhook Notification" to this address; for Stock Move, add the field Product to the data sent. The address holds a secret key: keep it private, and click **Make a new address** if it leaked (then give the new address to Odoo). Odoo does not try again a call that failed, so the cron keeps checking everything anyway.

## For developers

An add-on plugin of the hikashop group can change what is imported and sent with these events: `onOdooBeforeCustomerSave($partner, &$data, &$extra, &$do)`, `onOdooAfterCustomerSave($partner, $userId, $new)`, `onOdooBeforeProductSave($odooProduct, &$columns, &$prices, &$do)`, `onOdooBeforeCustomerCreate($order, &$partner)`, `onOdooOrderPayload($order, &$payload, &$do)`, `onOdooAfterOrderPush($order, $odooOrderId)` and `onOdooOrderStatus($odooOrder, $orderId, &$status, &$do)`.

## Troubleshooting

- "Connection failed" or "Odoo refused the API key": check the address, and that the key is right and not expired or revoked. On Odoo Online, check the plan is Custom.
- "The API key could not be renewed": set the system parameter of step 3, or make a new key in Odoo and enter it with its date.
- An order waits with "No Odoo product with the code ...": the product has no Odoo product with that internal reference. Fix the code, then click "Send to Odoo".
- "No Odoo sales tax at ... %": create in Odoo a sales tax at that rate, excluding tax, then send the order again.
- "No Odoo product set for the shipping lines" (or fee, discount): choose the service product in the Orders settings.
- A customer is not imported: they need an email, the Customer rank Odoo gives to anyone you sold to, and the tag of the setting if one is chosen.
