Our connectors offer the flexibility to link products between Odoo and your e-commerce system using custom fields. This is particularly useful when the standard product identifiers (like SKU or internal reference) aren’t sufficient or suitable for your workflow.
Key requirements:
Unique values: The custom fields you choose must contain unique values for each product in both Odoo and your e-commerce system.
Non-empty: These fields cannot be blank or empty in either system.
More about requirements: Before you start: key requirements for using our connectors
Caution: This article contains advanced technical instructions for customizing product mappings. Incorrect configuration can lead to data loss or synchronization issues. We strongly recommend contacting our support team for assistance before making any changes. We cannot be held responsible for any problems arising from improper configuration.
Common Case: Using Barcode as the Reference Field
This is a common scenario where you might want to use the barcode as the “reference field” (the unique identifier for matching products).
Check existing mappings: Go to the Configuration → Product Fields Mapping section in connector settings. Identify the current “reference field” (marked in green) and the “barcode field” (marked in blue):
Enable advanced settings: Navigate to the Testing tab and enable Advanced Product Settings checkbox.
Reassign fields:
In the Reference E-Fields section, select the barcode mapping field.
In the Barcode E-Fields section, you can keep the existing mapping.
Important: The Reference E-Fields and Barcode E-Fields sections cannot be left empty; otherwise, you’ll encounter errors.
Review changes: The
default_code
field will no longer be the “reference field” but will still be populated during synchronization:
Consider this: Disabling barcode validation at the integration level can streamline the process since barcodes will already be validated as part of the reference field check.
Advanced Case: Using Custom Field as the Reference Field
Create new product fields. In this article, we’ll use the
reference_custom
field from e-commerce system’s product and variant data (assuming that such a field exists). To keep things simple, we’ll map this to Odoo’s existing “Internal Reference” field (default_code
).
On the screenshot below we created integration fields for the template and variant (e.g., “Template Reference” and “Variant Reference”) that correspond to e-commerce reference_custom
field:
Important: In Odoo, the reference field cannot be a simple character field. It must be a stored computed field with an inverse method set, similar to default_code
or barcode
. This allows variants to store their own values while the template remains empty.
Change product fields to be used as reference fields in Advanced Product Settings. Choose the newly created integration fields in the connector settings.
Create mappings for new product fields. Go to the Configuration → Product Fields Mapping and create mappings for newly created product fields:
As you can see, there are multiple mappings for default_code
field in Odoo. Such configuration will lead to errors, so we need to remove or disable duplicated rows (1 and 3).
Important: Ensure that only one e-commerce field maps to a single Odoo field to avoid conflicts during import. You might need to delete or deactivate old mappings.
Need More Help?
If you have any questions or need further assistance, please contact our support team at https://support.ventor.tech/.