Read BOM Operations
This page is a Work in Progress and not completed yet, please check back again soon
BOM operations are individual operations that are performed on the item. There are 2 scenarios, reading and writing. BOM operations are never repeated. Even if you see duplicates in Odoo, they each have their own underlying unique operationId
for that line in the BOM.
BOM operations can often include one or more of the following items in the table
Punching
Painting
Welding
Assembling
Galvanizing
Powder Coating
etc.
Wiring
To read these operations from the BOM, we map to the Odoo property
mrp.bom.operation_id
Create a new Property Mapping with the following settings:
Property Name / Header
BOM Operations
Accessor
bomOperations
Primary Property
(Unmapped)
Secondary Property
mrp.bom.operation_ids
Update Odoo on Submit
true
Rendering Type
Advanced Multi Select List
List Display Selector
displayName
List Value Selector
id
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]**
[
{
"workCenterId": 2,
"name": "Drill",
"value": {
"sequence": 10,
"name": "Drill",
"workcenter_id": 2,
"time_mode": "manual",
"time_mode_batch": 10,
"time_cycle_manual": 60
}
},
{
"workCenterId": 1,
"name": "Galvanize",
"value": {
"sequence": 20,
"name": "Galvanize",
"workcenter_id": 1,
"time_mode": "manual",
"time_mode_batch": 10,
"time_cycle_manual": 60
}
},
{
"workCenterId": 3,
"name": "Punch",
"value": {
"sequence": 30,
"name": "Punch",
"workcenter_id": 3,
"time_mode": "manual",
"time_mode_batch": 10,
"time_cycle_manual": 60
}
},
]
Enabled
true
Prefer Odoo Value
true
** When creating this list, and you only want to read the values, you'll want to specify at least the Work center id, and the name of the operation. If you also want to write the values back to Odoo, then you'll have to specify the entire object required to add new operations and the default settings for the operation. Adding new work centers are not supported at the moment.
Some default BOM operation properties that are available are listed below. The list is not exhaustive and you may customize your own (See the Odoo Configuration options > Models > mrp.routing.workcenter
):
active
bool
16, 17, 18
name
string
16, 17, 18
bom_id
integer
16, 17, 18
workcenter_id
integer
16,17,18
time_mode_batch
integer
16,17,18
time_cycle_manual
integer
16,17,18
note
string
16,17,18
sequence
integer
16,17,18
After adding the new Property Mapping, add an import rule
Type
import
Name
Text Manipulation
Process for {Primary}
false
Process for Odoo
true
JavaScript expression
// TODO
Last updated