El 25/08/16 a les 08:34, Manuel Moura ha escrit:
<https://lh3.googleusercontent.com/-BKKnb7v1MO8/V76LcrlQHSI/AAAAAAAAFeI/S4KuR-iaNwAOtZKWQ5KmCOiq2bn_khoyACLcB/s1600/Captura%2Bde%2Becr%25C3%25A3%2Bde%2B2016-08-25%2B07%253A06%253A06.png>

Hi. I tried to find an answer for my question but because I did not
found it, here is my problem:

I need to import 400 client records to tryton 4.0.3.

1. First of all I made a test export from a record that I already input
manually:
Name,Phone,Mobile,E-Mail,Addresses/Street,Addresses/Zip,Addresses/City,VAT
Code
Maxxx Mxxxx,,+351XXXXXXXXX,[email protected],"Rua das Fxxxxxxxxx,
112",4XXX-XXX,Braga,PT111222333

2. Based on that export I created an import test csv file:
Name,Phone,Mobile,E-Mail,Addresses/Street,Addresses/Zip,Addresses/City,VAT
Code
Teste Name,,+351123456789,[email protected],"Rua dos Anzois de Cima,
1234",4700-100,Braga,PT100334223

3. I tried the Auto-Detect button but the result was "error processing
the file at field Phone".

I get this error with -l debug
"ERROR:tryton.common.common:Traceback (most recent call last):
  File "/trytond/wsgi.py", line 47, in dispatch_request
    return endpoint(request, **request.view_args)
  File "/trytond/protocols/dispatcher.py", line 59, in rpc
    request, database_name, *request.params)
  File "/trytond/wsgi.py", line 39, in auth_required
    return wrapped(*args, **kwargs)
  File "/trytond/protocols/dispatcher.py", line 40, in wrapper
    return func(request, pool, *args, **kwargs)
  File "/trytond/protocols/dispatcher.py", line 201, in _dispatch
    result = rpc.result(meth(*c_args, **c_kwargs))
  File "/trytond/model/modelstorage.py", line 744, in import_data
    assert all(len(x) == len_fields_names for x in data)
AssertionErrorr"

The filed names are/should be different in export/import files?

THe problem is that the phone field is a Functional field which has no setter method, so it's not editable and you should not import this on the CSV file. Same for Mobile and Email.

You should create contact mechanisms for them.

Hope it helps!

--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk

--
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/5893abea-dbf6-3003-ca67-511074340fe9%40koolpi.com.

Reply via email to