Data import - here: articles

I’m trying to import a CSV list of articles. Found the “import” menu entry meanwhile, but when triggering the import, it says “Fehler mit Warenbestand” (error with stock). I assume, this is for the reason that there is not an item as “Warenbestand / stock” in my list:

Bildschirmfoto von 2020-05-05 10-24-33

Modules “stock” and “stock_consignment” are activated - do I need another one to handle stock?

A second question occurs:
For what reason are there some double entries, e.g. “Listenpreis” or "Methode Kostenpreis ?

Thanks lot in advance,

Could you list (in english if possible) the name of fields you are importing?

Sorry but as a non german speaker I did not understand most of your words.

P.S: Please open a single topic for each question you have

Listenpreis (listed price)
Varianten/Beschreibung (variants / description)
Varianten/Artikelnummer (variants / ID of article)
Warenbestand (stock - amount of items available)
Mindestbestand vor Warnung (minimum stock before waring)
Gewünschter Lagerbestand (stock desired)
Lieferant (supplier)
Lieferanten-Artikelnummer (supplier’s ID of article)
Einkaufspreis (purchase price of article)

Yes, I will.

This field is not importable by default. I bet you have a custom module that modifies the field and the error is there.

Nonono. Everything very much vanilla. But I didnt know that I cannot import number of items available. No way?

Now I got a bit further on, and end up with this error:

  File "/usr/local/lib/python37/dist-packages/trytond/wsgipy", line 108, in dispatch_request
    return endpoint(request, **requestview_args)
  File "/usr/local/lib/python37/dist-packages/trytond/protocols/dispatcherpy", line 48, in rpc
    request, database_name, *requestrpc_params)
  File "/usr/local/lib/python37/dist-packages/trytond/wsgipy", line 76, in auth_required
    return wrapped(*args, **kwargs)
  File "/usr/local/lib/python37/dist-packages/trytond/protocols/wrapperspy", line 131, in wrapper
    return func(request, pool, *args, **kwargs)
  File "/usr/local/lib/python37/dist-packages/trytond/protocols/dispatcherpy", line 186, in _dispatch
    result = rpcresult(meth(*c_args, **c_kwargs))
  File "/usr/local/lib/python37/dist-packages/trytond/model/modelstoragepy", line 974, in import_data
    records = clscreate(to_create)
  File "/usr/local/lib/python37/dist-packages/trytond/modules/product/productpy", line 157, in create
    return super(Template, cls)create(vlist)
  File "/usr/local/lib/python37/dist-packages/trytond/model/modelsqlpy", line 159, in wrapper
    return func(cls, *args, **kwargs)
  File "/usr/local/lib/python37/dist-packages/trytond/model/modelsqlpy", line 667, in create
    fieldset(cls, fname, *fargs)
  File "/usr/local/lib/python37/dist-packages/trytond/model/fields/one2manypy", line 241, in set
    actions[action](ids, *args)
KeyError: '3'```

You must create an inventory for the location and then add a line for each product available. Have a look at the documentation.

The documentation says that doesn’t suite for initial importations…

Only when a non fixed cost price is used for inventory valuation

1 Like

I postponed the attempt to import amounts in stock and tried to import a inventory list without first. I simplified it as much as possible, but got the same error as under msg. #5.

Here is the CSV file

; and ’ are separators.

Should I file a bug report? - But I tend to believe that the problem is not the software…