Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
10459 Zobrazení

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

http://help.openerp.com/upfiles/13714978738961137.jpg)

Avatar
Zrušit
Nejlepší odpověď

Export your Units of Measure.

The default ones are:

product.product_uom_day

product.product_uom_dozen

product.product_uom_hour

product.product_uom_litre

product.product_uom_unit

product.product_uom_cm

product.product_uom_gram

product.product_uom_kgm

product.product_uom_km

product.product_uom_meter

product.product_uom_ton

UPDATE:

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:

C:\fakepath\Untitled.png]

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.

Ray.

Avatar
Zrušit
Autor

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.

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

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

Autor

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?

Autor

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!

Have you imported the BOM?

Related Posts Odpovědi Zobrazení Aktivita
1
led 20
2871
4
led 24
14601
1
led 22
3595
4
kvě 18
4477
0
lis 16
3785