[FIX] sale: in paypal, the encoding of the url should be done with werkzeug instead of urllib for better handeling of unicode (opw 607866)

This commit is contained in:
Martin Trigaux 2014-05-20 10:16:17 +02:00
parent a8a085eabb
commit d88ecfa970
2 changed files with 4 additions and 4 deletions

View File

@ -21,7 +21,7 @@
from openerp.osv import osv, fields
from openerp.addons.edi import EDIMixin
from urllib import urlencode
from werkzeug import url_encode
INVOICE_LINE_EDI_STRUCT = {
'name': True,
@ -274,7 +274,7 @@ class account_invoice(osv.osv, EDIMixin):
"no_note": "1",
"bn": "OpenERP_Invoice_PayNow_" + inv.currency_id.name,
}
res[inv.id] = "https://www.paypal.com/cgi-bin/webscr?" + urlencode(params)
res[inv.id] = "https://www.paypal.com/cgi-bin/webscr?" + url_encode(params)
return res
_columns = {

View File

@ -22,7 +22,7 @@ from openerp.osv import osv, fields
from openerp.addons.edi import EDIMixin
from openerp.tools.translate import _
from urllib import urlencode
from werkzeug import url_encode
SALE_ORDER_LINE_EDI_STRUCT = {
'sequence': True,
@ -197,7 +197,7 @@ class sale_order(osv.osv, EDIMixin):
"no_note": "1",
"bn": "OpenERP_Order_PayNow_" + order.pricelist_id.currency_id.name,
}
res[order.id] = "https://www.paypal.com/cgi-bin/webscr?" + urlencode(params)
res[order.id] = "https://www.paypal.com/cgi-bin/webscr?" + url_encode(params)
return res
_columns = {