Showing posts with label mrp. Show all posts
Showing posts with label mrp. Show all posts

Thursday, July 3, 2014

Import and Export in Odoo V8

In order to be able to export/import we have to go to Settings->Configuration->General settings. check the box "Allow users to import data from CSV files" and apply the change.

Now let's see an example of import/export a product:

Go to any products view and change it to "list view", for some reason Kanban View and Form View do not have import/export as an option.

You will only see "Import" in "list view" if you don't choose any product. For export, first choose some or all products by choose the check box(s) in left, then click "more" button on top of the view, choose "Export" from there.

Export:
After click Export, set export type to be "import-compatible Export", choose Export Formats as "CSV".

Import: 
My suggestion: It's better you check the export file to make sure your import file is based on the columns you need):

To use import to create a new record: 
Although your first field will always be ID, be sure to leave that empty when you are importing so ERP will assign IDs to your items instead of using your items to overwrite the fields on existing items.
when you choose your file to improt be sure to click "file format options", if the encoding is UTF-8 change it to latin1 so it can accept a wider variety of characters like the degree symbol and the like.

So how to load a new product that has multiple variants and variants values? Here is an example(copy those in blue and open as csv file to see better format):


Products / External_id,cost_method,categ_id/id,valuation,name,type,Products / Product Attributs / Attribute,Products / Product Attributs / Product Attribute Value,uom_po_id/id,uom_id/id
,Standard Price,product.ipad,Periodical (manual),iPad Retina Display Duplicate3,Stockable Product,Memory,"16 Go,32 Go",product.product_uom_unit,product.product_uom_unit
,,,,,,Color,"White,Black",,
,,,,,,Wi-Fi,2.4 GHz,,

I will explain the structure of this a little bit:
Products / External_id will be empty for new product
Products / Product Attributs / Attribute is for attribute
Products / Product Attributs / Product Attribute Value: You can put multiple values there, but when you do that, using comma(,) to seperate values. e.g. "16 Go,32 Go". Odoo will not create new attribute values when import product, you only can put the value existing in Odoo.

Even though it has multiple records for one product, Odoo know how to deal with it. Be sure only the first line has product's other information, and Odoo know the following lines is for the product of first line. And be sure to define the right column mapping information when load the variants' attributes and attributes values.

To use import to update a record: 
The only difference is you need to add a reference so Odoo know that is to update a record, not create a new record. My suggestion is use id from the export to identify the records you need to import, be aware that id is called External_id when you import.

Monday, June 30, 2014

How to disassemble a product in Odoo/OpenErp 8

Our company sells clothes. We wholesale the clothes by box or dozen, a dozen normally has different sizes but one color, and a box has many dozens of different colors. I have created a product (Say Product1) with size and color variants. Now I wonder if I can create 2 new products, 1st is "Dozen of Product1" which includes 12 of Product1 of different sizes, and 2nd is "Box of Product1" with many of "Dozen of Product1". We are only reseller, not manufacturer. 

We need to handle that with the BoM function as we are packing/assembling into a Dozen. Create the individual products 1, 2,3..with the color and sizes. Then create the BOM. Manufacturing order will allow you pack the boxes and store them as complete dozens in the warehouse. This way you can monitor the individual products themselves and dozen packs as well.

The second question is, we may need to open a box and sell them to different customers if needed. so that is, we receive our mechandise in boxes, then sale them in boxes or sale them in dozens, how do we handle these in Odoo? 

It can be done by install the mrp_byproducts module. Then you can define "Dozen of Product1" as component, Product1(small size) as the produced product, and Product1(other sizes) as byproducts. By doing this you actually disassemble the package.