Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.0] SO onchange partner special characters #3

Open
JaHicks opened this issue Jul 2, 2015 · 0 comments · May be fixed by #5
Open

[7.0] SO onchange partner special characters #3

JaHicks opened this issue Jul 2, 2015 · 0 comments · May be fixed by #5

Comments

@JaHicks
Copy link

JaHicks commented Jul 2, 2015

The use of special characters in the address fields of a customer results in the following traceback:

"avalara_salestax/sale_order.py", line 42, in onchange_partner_id
    res['value']['tax_address'] = str(unicodedata.normalize('NFKD', partner_name).encode('ascii','ignore') + '\n'+(addr.street or '')+ '\n'+(addr.city and addr.city+', ' or ' ')+(addr.state_id and addr.state_id.name or '')+ ' '+(addr.zip or '')+'\n'+(addr.country_id and addr.country_id.name or ''))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xa5' in position 36: ordinal not in range(128)

This can be resolved by applying the same method used to handle the partner_name.

@JaHicks JaHicks linked a pull request Jul 6, 2015 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant