SharpSync
  • Welcome
  • Fundamentals
    • Getting Started
      • Registration
      • Landing Page
      • Support
      • Subscription
    • Data Sources
    • Property Mappings
      • Adding Property Mapping
      • Property Mapping Settings
    • Rules
      • Import / Export
        • Append text
        • Calculate number
        • Export manipulation
        • Format as decimal number
        • Prepend text
        • Remove property
        • Replace all instances
        • Replace first instance
        • Round to nearest X
        • Select from JSON
        • Set cell value
        • Set empty cells
        • Text manipulation
      • Display
        • Number between
        • Text contains
        • Text ends with
        • Text evaluation
        • Text is a number
        • Text is exactly
        • Text is in list
        • Text is not a number
        • Text is not empty
        • Text is not in list
        • Text length between
        • Text length is exactly
        • Text maximum length
        • Text minimum length
        • Text not contains
        • Text not ends with
        • Text not starts with
        • Text starts with
      • Advanced Scripting
    • BOM Comparison
    • Data Safety
    • Troubleshooting
      • Duplicate component paths
      • OAuth 2.0
  • Data Sources
    • Autodesk Inventor
    • CSV
      • Getting Started
      • Importing a Bill of Materials (BOM)
    • MS Dynamics 365 Business Central
      • Getting Started
      • Item Fields Json & Internal Names
      • Resource Fields Json & Internal Names
      • List Names For nestedObject Mappings
    • NetSuite
      • OAuth Setup
        • Permissions
      • RESTlet Script Setup
        • SharpSync RESTlet Script
      • Thumbnail Folder Setup
      • Authentication + Configuration
      • Common setup
        • Configure quantity mapping
        • Configure accounts mappings
        • Configure itemType mapping
        • Configure isPhantom mapping
        • Configure subsidiary mapping
        • Configure price mapping
        • Configure Where Used Link mapping
        • Configure thumbnail mapping
        • Read-Only NetSuite Fields
        • Common Mapping Rules
        • Common List names
      • Advanced Bill of Materials
      • Configure Routings
      • Integration tips
      • Troubleshooting
    • Odoo
      • Getting Started
        • Authentication + Configuration
        • Debugging tips
      • Common Setup
        • Map BOM Codes
        • Map BOM Types
        • Map Attribute Values
          • Reading Attributes - Overview
          • Display All Attribute Names
          • Display Single Attribute Values
          • Writing attributes
      • Product Management
      • Hosting Options
      • List Names
      • Permissions
      • Troubleshooting
    • Onshape
      • Getting Started
      • Setting up Derivatives
    • Propel PLM
      • Getting Started
    • SolidWorks
    • SolidWorks PDM
      • Downloading and installing the add-in
      • Configure the add-in
      • Setting up the Solidworks PDM Web 2
      • Troubleshooting
      • Submitting a BOM for update
  • Advanced
    • Derivatives
  • User management
    • User Management
    • Application Permissions
Powered by GitBook
On this page
  • Variant Link
  • Variant Id
  1. Data Sources
  2. Odoo
  3. Getting Started

Debugging tips

It can be useful during the setup process to have access to information that helps you to troubleshoot.

Below are some common fields that can be setup using rules. Once the setup has been completed, be sure to hide or remove these mappings as it can clutter the BOM Comparison page.

Variant Link

The Variant URL is the URL link to the variant (product.product) that SharpSync found during the search process.

Create a new mapping with the following values

Setting
Value

Primary source property

(Unmapped)

Secondary source property

(Unmapped)

Prefer Secondary Value

checked

Rendering type

Url

New Import Rule Mapping

Text Manipulation

Process for Primary

unchecked

Process for Odoo

checked

Rule value

See below **

Paste the below code into the textbox. It makes use of the rowData object's secondaryViewHref property to create a new url:

const urlObj = new URL(rowData.secondaryViewHref);
const hashString = urlObj.hash.substring(1);  
const params = new URLSearchParams(hashString);

const variantId = params.get("variant_id");
if (variantId !== null) {
  params.set("id", variantId);
}

if (params.get("model") === "product.template") {
  params.set("model", "product.product");
}

urlObj.hash = params.toString();

return urlObj.toString().trim();

This will display a URL to the product variant in the UI in the form of a clickable link.

Variant Id

The Variant Id is the id of the product variant (product.product) that SharpSync found during the search process.

Create a new mapping with the following values

Setting
Value

Primary source property

(Unmapped)

Secondary source property

(Unmapped)

Prefer Secondary Value

checked

Rendering type

Free Text

New Import Rule Mapping

Text Manipulation

Process for Primary

unchecked

Process for Odoo

checked

Rule value

See below **

Paste the below code into the textbox. It makes use of the rowData object's secondaryViewHref property to create a new text field:

const urlObj = new URL(rowData.secondaryViewHref);
const hashString = urlObj.hash.substring(1);
const params = new URLSearchParams(hashString);

const variantId = params.get("variant_id");
if (variantId !== null) {
  return variantId;
}

return "";

This will display the id in the form of an integer (e.g. 5600 or 5601) in the UI

PreviousAuthentication + ConfigurationNextCommon Setup

Last updated 3 months ago