Hello. I am trying to import some data from a file trough a wizard.
Every goes right on, but when I create the address for a particular party, something goes wrong.
Part of the code is like this:
(.....)
Party = pool.get('party.party')
employer = {
'name': person_data.employer,
}
if person_data.employer_street\
or person_data.employer_location\
or person_data.employer_zip_code:
address = {
'street': person_data.employer_street,
'city': person_data.employer_location,
'zip': person_data.employer_zip_code,
}
employer['address'] = [('create',address)]
employer = Party.create([employer])
(....)
And it gives me this error:
(....)
employer = Party.create([employer])
File "/trytond/modules/health/health.py", line 744, in create
return super(Party, cls).create(vlist)
File "/trytond/modules/party/party.py", line 192, in create
return super(Party, cls).create(vlist)
File "/trytond/model/modelsql.py", line 596, in create
field.set(cls, fname, *fargs)
File "/trytond/model/fields/one2many.py", line 215, in set
actions[action](ids, *args)
File "/trytond/model/fields/one2many.py", line 154, in create
values = values.copy()
AttributeError: 'str' object has no attribute 'copy'
Any help, would be very appreciated.
Regards
Francisco