Odoo Help

0

2
10 Answers
3
Avatar

patrick

--patrick--

1961
| 5 4 7
Baarn, Olanda
--patrick--
patrick
01/04/13, 06:59

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:

fieldValues(m)

for m in models:

fieldData(m)

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).

1 Comment
Libatelqa, Jad Tabet
01/04/13, 09:21

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

3
Avatar

ton123

--ton123--

1423
| 5 6 9
Lisse, Olanda
--ton123--
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.
ton123
13/04/13, 09:25

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
1 Comment
Mitul
12/10/13, 11:42

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

0
Inson Cycles
01/11/17, 15:55

For posterity: This is a problem, even in v10.0. The easiest solution for an administrator is to simply edit the "limit" tag in the address line:

http://123.123.123.167:8069/web#min=1&limit=2000&view_type=list&model=product.product&menu_id=190&action=307

...where the 2000 number is the limit of the items displayed.

1 Comment
Soporte Jocaagura
04/08/18, 16:05

Excelent answer :)

0
Avatar

Gustavo

--Gustavo--
1000
| 2 2 5
Buenos Aires, Argentina
--Gustavo--

Python developer, big fan of sailing

Gustavo
31/03/13, 16:37

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.

1 Comment
ton123
04/05/13, 05:55

I have already given this answer. See above.

0
kaynis
14/06/13, 09:48

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>')
                    .appendTo($this.empty())
                    .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);
0
mmycool
05/07/13, 06:59

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

1 Comment
patrick
09/07/13, 08:05

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

Ask a Question
Writer
Keep Informed
1 follower(s)
About This Community

This platform 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.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now