Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Bom mapping for importing from csv

michel Guénard
on 6/14/13, 9:36 PM 3,554 views

After tens of trials, I am not able to import Boms from a csv file due to the "product unit of measure" field!

Could someone advise as to the correct name of the Bom unit to import.

EDIT: added screen capture: enclosed a screen capture[C:\fakepath\bom_import.jpg](/upfiles/1371284244559582.jpg)

Below the first lines of the import file



Ray Carnes

--Ray Carnes--
| 9 7 9
Greater Los Angeles, United States
--Ray Carnes--

Senior Odoo Analyst

OpenERP 6.1, 7.0 and Odoo 8.0, 9.0 (Since 2012)

Completed Functional and Technical Training.

Major Skills:

  • Needs Discovery and Requirements Analysis;

  • Function and Technical Specifications;

  • Project Planning;

  • Prototyping and Proof of concepts;

  • Data migration;

  • Configuration & Customization (UI and modules);

  • Integration - data, business logic and service levels;

  • Training and Knowledge transfer;

  • Go Live support;

  • Help desk;

  • Version Migration.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

Ray Carnes
On 6/15/13, 12:13 AM

Export your Units of Measure.

The default ones are:













You have several problems going on, the data you are providing isn't in the right format and you are also missing data that is required if you import the lines from the BOM.

Looking at the screenshot of your file, you are asking OpenERP to create a BOM with a product instead of a product ID, which is made by using 1 of a product you don't provide details for.

When you export data from a model that has relationships with other models, you must use the XML ID field of those models when linking and any mandatory fields must always be populated.

When exporting via the UI, if you select 'EXPORT ALL DATA' as the Export Type, OpenERP will put an arrow next to any field that represents a relationship and make BLUE any field that is mandatory for an import:


In your case you want to import data from the mrp.bom model and you will see blue fields that are actually relationships to COMPANY, PRODUCT and PRODUCT UNIT OF MEASURE.

COMPANY you have correct - "base.main_company"

PRODUCT you have incorrect - you have the name when you need the ID. Export your products to get the ID. It will be in the format "__export__.product_product_XX".

PRODUCT UNIT OF MEASURE you have correct if you use "product.product_uom_unit" but incorrect if you use "Units(s)"

Since you are also importing BOM LINES, you also need to make sure all of the blue fields on that model are provided. For each line on a BOM, you need COMPANY, PRODUCT and PRODUCT UNIT OF MEASURE.

You are providing only type and quantity - but none of the others. The message is referring to the unit of measure for the BOM LINES data that is not provided.

Export your BOM again, but take all of the blue fields that are part of the BOM LINES model.


Thanks Ray for the advice; I did it as a regular step before import. I will edit my question above, joining a screen capture showing my test file structure and the error messages returned by the server.

AD LIBITOM, michel Guénard
on 6/15/13, 6:15 AM

Can you also attach your CSV file? Is there a value in "PRODUCT UNIT OF MEASURE" on the second row of your file?

Bista Solutions US, Ray Carnes
on 6/17/13, 3:09 PM

product_uom is "Unit(s)" in your CSV but "product.product_uom_unit" in your screenshot?? What's going on?

Bista Solutions US, Ray Carnes
on 6/17/13, 5:46 PM

Unit(s) corresponds to my latest -unsuccessful - trial; whilst "product.product_uom_unit" is the exported value that I tried first (at the time of my first post). Unité(s) is the value found when exporting the unit of measures; it also was unsuccessful. Could it be that the true reason does not lie with the unit of measure field?

AD LIBITOM, michel Guénard
on 6/17/13, 6:42 PM

Wahouh! My mistake comes from the idea to create Boms starting from existing products which I exported. My need is to create kits of products made of 2 existing ones ( music score plus a CDROM, with different tax rates!) ;such kits represent the selling units. Thanks for all your explanations; I'll let you know the results once I implement your explanations; thanks a lot!

AD LIBITOM, michel Guénard
on 6/17/13, 9:18 PM

Have you imported the BOM?

on 12/10/13, 6:54 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)


Asked: 6/14/13, 9:36 PM
Seen: 3554 times
Last updated: 3/16/15, 8:10 AM