[FIX] sale: in paypal, the encoding of the url should be done with werkzeug instead...
authorMartin Trigaux <mat@openerp.com>
Tue, 20 May 2014 08:16:17 +0000 (10:16 +0200)
committerMartin Trigaux <mat@openerp.com>
Tue, 20 May 2014 08:16:17 +0000 (10:16 +0200)
addons/account/edi/invoice.py
addons/sale/edi/sale_order.py

index 2c2a754..c82d041 100644 (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 = {
index bf015b3..cd1b18e 100644 (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 = {