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.


exporting lot of records ( products)

Jad Tabet
on 3/31/13, 3:58 PM 5,127 views


I have more than 300 products , I need to export the product name, cost price and current quantity.

Since the numbers of records exceeds 90, I have to do this by bunch of 90's.

Is it possible to do it one shot?

Also int the export fields I can only find foretasted qty, no other qty information is available.

help is appreciated.



| 5 6 9
Lisse, Netherlands
End-User. Installed 6.1.1 on a DS412+, DS211+ and DS113J Synology NAS. Reference installation on Ubuntu 12.04/Samsung Notebook. 12-03-2013 In production for Suppliers and Customers, adresbook. 7 small companies. Testing accounting, document management, import and export. Too much showstoppers I haven't fixed at this moment. 06-05-2013 little progress. Migration to v7 impossible because of missing Dutch localisation modules. What I see working is nice, so further testing and asking. Start testing products and warehouse. Happy with this forum and the community.
On 4/13/13, 9:25 AM

You can set the number of lines in the product menu to 80, 100, 200, 500 or unlimited.

Set it to unlimited and it lists all your products.

Go in the right hand menu to export.

If you click on it there is a dropdown menu in wich you can choose for:

  • Import Compatible Export (this is the default)
  • Export All Data

Choose for Export All Data.

Now extra fields are available for export like:

  • Quantity Available
  • Quantity On Hand

You have to go to Warehouse -> Products and not Sales -> Products to check unlimited value for listing all products..

on 10/12/13, 11:42 AM


| 5 4 7
Baarn, Netherlands
On 4/1/13, 6:59 AM

Another option is to use a script, which:

  1. connects to the server
  2. initializes the model(s) you want to export
  3. loop through all the models
  4. write the needed data.

#Example of script I run openERP V7 on a Ubuntu 12.04 server, and have installed openerp-client-lib

Than I made a script:

import openerplib

line = '-' * 40

h : "localhost"

db : 'test1'

u : "admin"

p : 'test654'

def fieldValues(m):

print line

print '-' *10, m

model = connection.get_model(m)

fields = model.fields_get()

# get the IDs, and sorted by 'id'
ids = model.search([],0,0,'id')
if ids == []:
  for f in fields:
    print f

for i in ids:
  print '-' *15, i

  for f in fields:
    info = model.read(i, [f])
    print f,':', info

def fieldData(m):

print line

print '-' *10, m

model = connection.get_model(m)

# get the IDs, and sorted by 'id'
ids = model.search([],0,0,'id')

for i in ids:
  print '-' *15, i
  print model.copy_data(i)

#Begin the process of getting data

print line

print '-' * 5, 'Host:', h

print '-' * 5, 'Database:', db

print line

connection = openerplib.get_connection(hostname=h, database=db, login=u, password=p)

models = { 'sale.order', }

for m in models:


for m in models:


print line

#summary Method fieldValues(m) gives you all the fields of the model, with the associated value.

Method fieldData(m) gives you all the data, including the related models (for example when your model is sale.order, than you also get all the related sale.order.lines).

An example would be very helpful. Now am facing another problem the field forcasted qty is not being shown anymore in the export dialog

Libatelqa, Jad Tabet
on 4/1/13, 9:21 AM


| 2 1 4
Buenos Aires, Argentina

Python developer, big fan of sailing

On 3/31/13, 4:37 PM

When you are listing your products, you are able to change how many products you show in each screen. It is located on the right corner of your screen.

I have already given this answer. See above.

on 5/4/13, 5:55 AM
On 6/14/13, 9:48 AM

A good way to do this is to locate view_list.js and add more selectable number of rows to the options available. That is add 90 to the list. ...addons/web/static/src/js/view_list.js add

'<option value=90">90</option>' + to

to the options

                var $select = $('<select>')
                    .click(function (e) {e.stopPropagation();})
                    .append('<option value="80">80</option>' +
                            '<option value="100">100</option>' +
                            '<option value="200">200</option>' +
                            '<option value="500">500</option>' +
                            '<option value="90">90</option>' +        this would help you I think                       
                            '<option value="NaN">' + _t("Unlimited") + '</option>')
                    .change(function () {
                        var val = parseInt($select.val(), 10);
On 7/5/13, 6:59 AM

How about the opposite of this... importing many products...i.e product name, cost price and current quantity... with like 2000 unique products?

Can you post a new question, than we do not mix things. Quick answer: using webinterface to import, or use a script.

on 7/9/13, 8:05 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

1 follower(s)


Asked: 3/31/13, 3:58 PM
Seen: 5127 times
Last updated: 3/16/15, 8:10 AM