0
votes

I am using Odoo v8 in Combination with Magento. I imported all products from Magento to Odoo, now I would like to mass update multiple fields on the products in Odoo based on the Internal Reference field: - Cost Price - Supplier - Inventory Levels - Weight - Status - Leadtime

What is the best way to do that? Can I use the import CSV function for that or do I have to do that directly via the database?

Thanks, Michael

1

1 Answers

0
votes

If you need to update a lot of data, I suggest use CSV file, it reduces write much code more than use XML file to insert/update/etc... data in data base, and in my personal opinion insert/update/etc... the data manually it's not the best practice.

For example to insert country state in data base:

By CSV file:

id country_id:id name code state_us_1 us Alabama AL state_us_2 us Alaska AK state_us_3 us Arizona AZ state_us_4 us Arkansas AR state_us_5 us California CA state_us_6 us Colorado CO state_us_7 us Connecticut CT state_us_8 us Delaware DE

By XML file:

<record model="res.country.state" id="state_us_1">
    <field name="name">Alabam</field>
    <field name="code">AL</field>
    <field name="country_id" ref="base.us"/>
</record>

<record model="res.country.state" id="state_us_2">
    <field name="name">Alaska</field>
    <field name="code">AK</field>
    <field name="country_id" ref="base.us"/>
</record>

One record for every data!

I hope this can help you!