Website alternative code
by Terrabit https://www.terrabit.ro , Dorin Hongu https://www.terrabit.ro| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Website (website)
• eCommerce (website_sale) • Inventory (stock) • Purchase (purchase) • Discuss (mail) • Invoicing (account) |
| Community Apps Dependencies | Show |
| Lines of code | 387 |
| Technical Name |
deltatech_alternative_website |
| License | OPL-1 |
| Website | https://www.terrabit.ro |
| Versions | 17.0 18.0 19.0 |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Website (website)
• eCommerce (website_sale) • Inventory (stock) • Purchase (purchase) • Discuss (mail) • Invoicing (account) |
| Community Apps Dependencies | Show |
| Lines of code | 387 |
| Technical Name |
deltatech_alternative_website |
| License | OPL-1 |
| Website | https://www.terrabit.ro |
| Versions | 17.0 18.0 19.0 |
Website alternative code
Show alternative code in website
This module extends the Odoo website shop to expose alternative product codes directly on the product page and in the website search engine. It is designed for businesses (spare parts distributors, industrial suppliers) where customers search by OEM codes, cross-reference numbers, or manufacturer codes rather than internal SKUs.
Key features:
- ✓Displays the alternative code(s) stored on the product
(
alternative_ids) as hidden<span>elements withitemprop="alternateName", making them available to search engines and the internal site search. - ✓Shows a dedicated “Alternative code” section on the product page
(visible to logged-in users only) with the primary
alternative_codevalue. - ✓Shows a “Used For” section on the product page when the
used_forfield is populated, indicating the vehicle / equipment the part fits. - ✓Extends the website full-text search (
_search_get_detail) to includealternative_ids.namein the searchable fields, so customers can find products by any of their cross-reference codes. - ✓Improves search query normalisation via
website.searchable.mixin: strips leading/trailing whitespace and collapses multiple spaces before the search is executed, reducing false “0 results” responses. - ✓Depends on
deltatech_alternativefor the underlyingalternative_idsandused_forfields onproduct.template.
Usage
Searching by alternative code
- Open the website shop (
/shop) and type an alternative / cross-reference code in the search bar (e.g.DIN933). - The search engine now includes
alternative_ids.namein its searchable fields, so any product whose alternative code matches the query will appear in the results. - The query is normalised before searching: extra whitespace is
collapsed, so
DIN 933andDIN933produce the same results.
Product page display
- Navigate to any product page on the shop.
- If the product has alternative codes configured
(
alternative_ids), each non-hidden code is rendered as a hidden<span itemprop="alternateName">element. These are invisible to visitors but readable by search engines and the site search index. - If the product has a primary
alternative_codeand the visitor is logged in, an “Alternative code” label and value are shown below the product form. - If the
used_forfield is filled in (e.g."Ford Focus 2005-2011"), a “Used For” section is displayed on the product page.
Enabling / disabling the website snippets
Both the “Alternative code” block and the “Used For” block are optional
website templates with customize_show="True". To toggle them:
- Go to Website > Customize (pencil icon) while browsing any product page.
- In the customization panel, locate Alternative code or Used For and switch them on or off.
Configuring alternative codes on a product
Alternative codes are managed in deltatech_alternative. To add or
edit them:
- Go to Inventory > Products > Products (or Sales > Products).
- Open a product and locate the Alternatives tab (added by
deltatech_alternative). - Add one or more alternative/cross-reference codes. These codes will immediately be searchable on the website.
Bug Tracker
Bugs are tracked on Terrabit Issues. In case of trouble, please check there if your issue has already been reported.
Do not contact contributors directly about support or help with technical issues.
Credits
Authors
- Terrabit
- Dorin Hongu
Maintainers
Current maintainer:

This module is part of the dhongu/deltatech project on GitHub.
You are welcome to contribute.
Need help getting started?
We are an Odoo partner building apps for the Romanian market (SAGA & WinMentor export; Romanian accounting localization in progress). Direct support from the team that built the module.
Contact Terrabit →Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module