diff --git a/addons/account/edi/invoice_action_data.xml b/addons/account/edi/invoice_action_data.xml index 1152d0bada5..eaf30f02b3d 100644 --- a/addons/account/edi/invoice_action_data.xml +++ b/addons/account/edi/invoice_action_data.xml @@ -66,11 +66,20 @@ except: href="${ctx.get('edi_web_url_view') or ''}">View Invoice % if object.company_id.paypal_account: + <% + comp_name = quote(object.company_id.name) + inv_number = quote(object.number) + paypal_account = quote(object.company_id.paypal_account) + inv_amount = quote(str(object.amount_total)) + cur_name = quote(object.currency_id.name) + paypal_url = "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=%s&item_name=%s%%20Invoice%%20%s&" \ + "invoice=%s&amount=%s&currency_code=%s&button_subtype=services&no_note=1&bn=OpenERP_Invoice_PayNow_%s" % \ + (paypal_account,comp_name,inv_number,inv_number,inv_amount,cur_name,cur_name) + %>

It is also possible to directly pay with Paypal:

Pay with Paypal + href="${paypal_url}">Pay with Paypal % endif
@@ -127,8 +136,18 @@ You can view the invoice document, download it and pay online using the followin ${ctx.get('edi_web_url_view') or 'n/a'} % if object.company_id.paypal_account: +<% +comp_name = quote(object.company_id.name) +inv_number = quote(object.number) +paypal_account = quote(object.company_id.paypal_account) +inv_amount = quote(str(object.amount_total)) +cur_name = quote(object.currency_id.name) +paypal_url = "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=%s&item_name=%s%%20Invoice%%20%s"\ + "&invoice=%s&amount=%s¤cy_code=%s&button_subtype=services&no_note=1&bn=OpenERP_Invoice_PayNow_%s" % \ + (paypal_account,comp_name,inv_number,inv_number,inv_amount,cur_name,cur_name) +%> It is also possible to directly pay with Paypal: - ${"https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=%s&item_name=OpenERP%%20Invoice%%20%s&invoice=%s&amount=%s¤cy_code=%s&button_subtype=services&no_note=1&bn=OpenERP_Invoice_PayNow_%s"%(object.company_id.paypal_account, object.number and object.number.replace('/','%2f') or '', object.number and object.number.replace('/','%2f') or '', object.amount_total, object.currency_id.name, object.currency_id.name)} + ${paypal_url} % endif If you have any question, do not hesitate to contact us. diff --git a/addons/purchase/edi/purchase_order_action_data.xml b/addons/purchase/edi/purchase_order_action_data.xml index 68e95dbad66..cd18e024f21 100644 --- a/addons/purchase/edi/purchase_order_action_data.xml +++ b/addons/purchase/edi/purchase_order_action_data.xml @@ -68,11 +68,21 @@ except: href="${ctx.get('edi_web_url_view') or ''}">View Order % if object.company_id.paypal_account: + <% + comp_name = quote(object.company_id.name) + order_name = quote(object.name) + paypal_account = quote(object.company_id.paypal_account) + order_amount = quote(str(object.amount_total)) + cur_name = quote(object.pricelist_id.currency_id.name) + paypal_url = "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=%s&item_name=%s%%20Order%%20%s" \ + "&invoice=%s&amount=%s&currency_code=%s&button_subtype=services&no_note=1" \ + "&bn=OpenERP_Order_PayNow_%s" % \ + (paypal_account,comp_name,order_name,order_name,order_amount,cur_name,cur_name) + %>

It is also possible to directly pay with Paypal:

Pay with Paypal + href="${paypal_url}">Pay with Paypal % endif
@@ -132,8 +142,18 @@ You can view the order confirmation, download it and even pay online using the f ${ctx.get('edi_web_url_view') or 'n/a'} % if object.company_id.paypal_account: +<% +comp_name = quote(object.company_id.name) +order_name = quote(object.name) +paypal_account = quote(object.company_id.paypal_account) +order_amount = quote(str(object.amount_total)) +cur_name = quote(object.pricelist_id.currency_id.name) +paypal_url = "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=%s&item_name=%s%%20Order%%20%s&invoice=%s&amount=%s" \ + "¤cy_code=%s&button_subtype=services&no_note=1&bn=OpenERP_Order_PayNow_%s" % \ + (paypal_account,comp_name,order_name,order_name,order_amount,cur_name,cur_name) +%> It is also possible to directly pay with Paypal: - ${"https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=%s&item_name=OpenERP%%20Order%%20%s&invoice=%s&amount=%s¤cy_code=%s&button_subtype=services&no_note=1&bn=OpenERP_Order_PayNow_%s"%(object.company_id.paypal_account,object.name and object.name.replace('/','%2f') or '', object.name and object.name.replace('/','%2f') or '', object.amount_total, object.pricelist_id.currency_id.name, object.pricelist_id.currency_id.name)} + ${paypal_url} % endif If you have any question, do not hesitate to contact us. diff --git a/addons/sale/edi/sale_order_action_data.xml b/addons/sale/edi/sale_order_action_data.xml index 3d138e510aa..b256728f49b 100644 --- a/addons/sale/edi/sale_order_action_data.xml +++ b/addons/sale/edi/sale_order_action_data.xml @@ -70,11 +70,21 @@ except: href="${ctx.get('edi_web_url_view') or ''}">View Order % if object.company_id.paypal_account: + <% + comp_name = quote(object.company_id.name) + order_name = quote(object.name) + paypal_account = quote(object.company_id.paypal_account) + order_amount = quote(str(object.amount_total)) + cur_name = quote(object.pricelist_id.currency_id.name) + paypal_url = "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=%s&item_name=%s%%20Order%%20%s" \ + "&invoice=%s&amount=%s&currency_code=%s&button_subtype=services&no_note=1" \ + "&bn=OpenERP_Order_PayNow_%s" % \ + (paypal_account,comp_name,order_name,order_name,order_amount,cur_name,cur_name) + %>

It is also possible to directly pay with Paypal:

Pay with Paypal + href="${paypal_url}">Pay with Paypal % endif
@@ -134,8 +144,18 @@ You can view the order confirmation, download it and even pay online using the f ${ctx.get('edi_web_url_view') or 'n/a'} % if object.company_id.paypal_account: +<% +comp_name = quote(object.company_id.name) +order_name = quote(object.name) +paypal_account = quote(object.company_id.paypal_account) +order_amount = quote(str(object.amount_total)) +cur_name = quote(object.pricelist_id.currency_id.name) +paypal_url = "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=%s&item_name=%s%%20Order%%20%s&invoice=%s&amount=%s" \ + "¤cy_code=%s&button_subtype=services&no_note=1&bn=OpenERP_Order_PayNow_%s" % \ + (paypal_account,comp_name,order_name,order_name,order_amount,cur_name,cur_name) +%> It is also possible to directly pay with Paypal: - ${"https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=%s&item_name=OpenERP%%20Order%%20%s&invoice=%s&amount=%s¤cy_code=%s&button_subtype=services&no_note=1&bn=OpenERP_Order_PayNow_%s"%(object.company_id.paypal_account,object.name and object.name.replace('/','%2f') or '', object.name and object.name.replace('/','%2f') or '', object.amount_total, object.pricelist_id.currency_id.name, object.pricelist_id.currency_id.name)} + ${paypal_url} % endif If you have any question, do not hesitate to contact us.