Write BOM Operations
This page is a Work in Progress and not completed yet, please check back again soon
Summary of article's major steps
Create a new Property Mapping
Add 2 new export rules to format the object and make it ready for Odoo BOM
BOM operations are individual operations that are performed on the item. This page follows on the progress from the previous topic Read BOM Operations
Create a new Property Mapping
To write these operations to the Odoo BOM, we map to the Odoo property
mrp.bom.operation_ids
The first step is to create a Property Mapping in addition to the Property Mapping created in the previous article.
Create a new Property Mapping with the following settings :
Property Name / Header
BOM Operations
Accessor
bomOperations
Primary Property
(Unmapped) (or a related property in the Primary Source)
Secondary Property
mrp.bom.operation_ids
List Name
mrp.workcenter
List Value Selector
{id}:{name}
Update Odoo on Submit
false
Rendering Type
Advanced List
List Display Selector
operationName
List Value Selector
workCenterId
List items
Here is a sample of what you can insert, but it can be anything, whatever you use most frequently [more on this below]**
Enabled
true
Prefer Odoo Value
true
Update Odoo On Submit?
false
true
Add new Export Rules
After adding the new Property Mapping, add 2 new export rules
Type
export
Name
Text Manipulation
Process for {Primary}
false
Process for Odoo
true
JavaScript expression
What this rule does
For the mapped BOM operations, get the id of the existing BOM operation line. Use this to determine if the BOM operation should be added or updated
Type
export
Name
Export Manipulation
Process for {Primary}
false
Process for Odoo
true
JavaScript expression
What this rule does
If there is no value for the bomOperations value, then remove it, clearing the operations from Odoo
Last updated