Nicolas Martinelli 110bf158f6 [FIX] website_sale_digital: special character in filename
- Create a product with attachment, and name the attachment 'テスト'
- Purchase the product, make a payment, validate and pay the invoice
- Go to My Orders under My Account, open the order, and try to download
  the file 'テスト'.

An error 500 is raised due to a UnicodeEncodeError.

```
  File "/home/nim/src/odoo/addons/website_sale_digital/controllers/main.py", line 104, in download_attachment
    return http.send_file(data, filename=attachment['name'], as_attachment=True)
  File "/home/nim/src/odoo/odoo/http.py", line 1595, in send_file
    headers.add('Content-Disposition', 'attachment', filename=filename)
  File "/usr/lib/python2.7/dist-packages/werkzeug/datastructures.py", line 1093, in add
    _value = _options_header_vkw(_value, kw)
  File "/usr/lib/python2.7/dist-packages/werkzeug/datastructures.py", line 830, in _options_header_vkw
    for k, v in kw.items()))
  File "/usr/lib/python2.7/dist-packages/werkzeug/http.py", line 212, in dump_options_header
    segments.append('%s=%s' % (key, quote_header_value(value)))
  File "/usr/lib/python2.7/dist-packages/werkzeug/http.py", line 165, in quote_header_value
    value = str(value)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-2: ordinal not in range(128)

```

opw-766568
2017-08-18 11:26:08 +02:00
2017-06-23 16:34:23 +02:00
2017-08-14 14:18:25 +02:00
…
…
…
…
…
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

If you are a developer you may type the following command at your terminal:

wget -O- https://raw.githubusercontent.com/odoo/odoo/10.0/setup/setup_dev.py | python

Then follow the developer tutorials

For Odoo employees

To add the odoo-dev remote use this command:

$ ./setup/setup_dev.py setup_git_dev

To fetch odoo merge pull requests refs use this command:

$ ./setup/setup_dev.py setup_git_review
S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%