Odoo ERP Integration (V2)
The Odoo ERP Integration page is used to set up the integration between ATR CustomTools and Odoo ERP. These options appear in the ATR CustomTools Profile Options for users with a valid license for ATR CustomTools Odoo ERP Integration.
ATR CustomTools' Odoo ERP Integration is based on Odoo's External API, using JSON-RPC. When configuring the integration, ATR CustomTools connects to the Odoo instance and reads and caches all the "interesting" tables and fields. Thus, it's important that the ATR CustomTools cache is updated if Odoo is changed or upgraded; see Connect & Read.
Integration log file is available at each client computer's local path %TEMP%\OdooV2.log. When running the integration as PDM Task, the log is found from the PDM Task Details. Full request/response logging can be enabled per-session from Advanced Connection Options for local user only, but note that it exposes user credentials in plain text.
| Endpoint | Your Odoo instance address, for example https://your-odoo-instance.odoo.com/ |
| Database | Odoo database name, sometimes seen from the endpoint address. E.g. Database of Endpoint https://your-odoo-instance.odoo.com/ would be your-odoo-instance. |
| Connect & Read |
The Odoo ERP Integration page has two different states: Connected and not connected. Connected state can be achieved by clicking Connect & Read if the endpoint, database, and user credentials are valid. User credentials are conveniently prompted for the current user, but in general they are stored per ATR CustomTools user at User Options. When connecting for the first time, you can let ATR CustomTools configure Demo Integration as prompted. However, you should only configure it against an EMPTY ATR CustomTools Profile as you might otherwise lose your existing Profile configuration. When connected, a status text will update to show the version of the connected endpoint, as well as the cache timestamp of the oldest cached table. Connected state is also required to add new Tables of Interest. Use Connect & Read to update cached tables. |
| Advanced |
Define specific connection security parameters that might require tweaking in on-premises environments.
Also contains options to Use OAuth in Odoo, and option to Log API Requests and Responses.
NOTE:
When using OAuth Login, Odoo User Id must be obtained from Odoo and the API Key must be configured
for the user. Then, the user's password for the integration must be given in format
<user_id>:<api_key> (e.g. 11:a1b2c3d4e5f6g7h8i9).
|
Configuration of both Odoo Lookup Lists and Odoo Search Groups is very similar.
| Name | Name of the Lookup List/Search Group owned by this integration. Automatically filled. | ||||||||||||
| Source | Determines the Odoo ERP "object table" to link with. | ||||||||||||
| Field | Field of the Source. If the field type is Many2One, One2Many, or Many2Many, and the "object table" the selected field references to is cached to memory (see Advanced), a secondary mapping control is added below. The secondary control allows mapping to a field of the referenced object table. | ||||||||||||
| Binding (Lookup List Only) | Determines if the selected Field is used as Lookup List's value or one of its Keys. | ||||||||||||
| Separator | If the field type is One2Many or Many2Many, the referenced table can yield multiple results. Separator field allows defining separator for the multiple values; comma followed with one space (', ') is usually a good value. | ||||||||||||
| Filter (Lookup List Only) |
Sometimes target tables return rows that are not really usable. This option allows defining post-filters
that all must match for a row to be included in a Lookup List.
Following string matching operations are supported:
Border cases:
|
||||||||||||
| Checklist (Lookup List Only) | Select to make the Lookup List into Check List. This will then allow using Check List Property to manage values that allow multiple selections - such as Routes. | ||||||||||||
| List Separator (Lookup List Only) |
Usually used with Checklists. Since it must be possible to have multiple values in a single
property, List Separator defines the separator between selected values.
For example, if the ; would be set as a List Separator, selecting Routes Buy and Manufacture would set the property value as Buy;Manufacture. To utilize this value successfully, you'll also need to set the same separator also for the corresponding Export Profile Field. |
||||||||||||
| Menu: Save Changes | When creating new or editing existing one, you can save the changes so the Lookup List/Search Group becomes immediately available and updated. Saving is not necessary. All changes are auto-saved when Options is exited with Ok; as long as the configuration is complete. This option is grayed out and changes are lost when Options is exited, if the configuration is incomplete. | ||||||||||||
| Menu: Discard Changes | When editing existing one, you can discard the modification you have done and return the list to its original state. | ||||||||||||
| Menu: Unlock for Editing | When Lookup List/Search Group has been successfully created, it's "locked" from accidental changes and needs to be unlocked for editing. | ||||||||||||
| Menu: Discard | When creating new Lookup List/Search Group, you can cancel the creation by discarding it. | ||||||||||||
| Menu: Delete | Delete the Lookup List/Search Group. |
The Advanced tab holds all interesting Odoo tables and their technical representations. Do NOT make any changes here unless you know what you are doing. It is possible to add new tables using the plus (+) button, if the Options page is in Connected state. Tables can be used in Lookup List, Search Group, and even Export Field Mapping, and some are required for various internal operations.
The integration expects the following tables to be in the list with a valid checkmark:
| Companies (res.company) | Odoo Company is provided as context for each API query. |
| Languages (res.lang) | Language is provided as context for each API query. Affects translatable text fields. |
| Products (product.template) | Product listing in Odoo. |
| Variants (product.product) | Variant listing in Odoo. Important also when Variants are not enabled. |
| BOMs (mrp.bom) | Bill of Materials in Odoo. |
| BOM Lines (mrp.bom.line) | Product/Variant Lines of Bill of Materials in Odoo. |
| Attachments (ir.attachment) | Controls attachments of various objects in Odoo. |
| Product Documents (product.document) | Needed to control MRP visibility of uploaded Attachments |
The Property Grid on the right allows closer examination of the selected table:
| Export Safe Guards |
|
||||||
| Fields | Cached information of each Odoo field. | ||||||
| Misc | The unique table Name and freely definable Description for it. | ||||||
| Status | Cache Timestamp, Version of Odoo at the time of caching, Status of the table, and Table Load Error message in case Status is Error. |