Map BoM Type
Last updated
Last updated
In Odoo the default values for BOM types can be in the range
Manufacture this Product
Kit
Subcontracting
[These can depend on your installation, but it is a common theme]
To update this from SharpSync, start by adding a for
mrp.bom.type
Primary Accessor
(Unmapped)
Secondary Accessor
mrp.bom.type
Prefer Odoo Value
checked
Update Odoo on submit
checked
Rendering Type
Advanced List **see setup below
The type of the Odoo property will be array
. This is an indication that you can typically select from a list of values in Odoo. In my example the value of this array looks like this
bundle (Bundle)|normal (Manufacture this product)|phantom (Kit)
This means there are 3 internal values in Odoo:
bundle
Bundle
normal
Manufacture this product
phantom
Kit
Let's setup an Advanced Selection list to present this to the user in SharpSync.
Copy the values in the Array Enum Values field
Using ChatGPT, Claude, Copilot or similar, convert it to a text json list using the prompt
Convert this to a json list with string kv pairs using the value before parenthesis as 'name' and the value in the parenthesis as 'value'
Copy the output
Back in SharpSync, make the following edits to the property mapping for Bom Type:
Rendering Type
Advanced List
List Display Selector
value
List Value Selector
name
Prefer Odoo Value
checked
For the list items, paste the value in your clipboard specified in the previous step. It should look like the following:
I'm now able to display + update the values from Odoo