Sale Order - Send by Email (Portal) ${object.user_id.email or ''} ${object.company_id.name} ${object.state in ('draft', 'sent') and 'Quotation' or 'Order'} (Ref ${object.name or 'n/a' }) ${object.partner_invoice_id.id} ${(object.name or '').replace('/','_')}_${object.state == 'draft' and 'draft' or ''}

Hello${object.partner_id.name and ' ' or ''}${object.partner_id.name or ''},

Here is your ${object.state in ('draft', 'sent') and 'quotation' or 'order confirmation'} from ${object.company_id.name}:

  REFERENCES
  Order number: ${object.name}
  Order total: ${object.amount_total} ${object.pricelist_id.currency_id.name}
  Order date: ${object.date_order}
% if object.origin:   Order reference: ${object.origin}
% endif % if object.client_order_ref:   Your reference: ${object.client_order_ref}
% endif % if object.user_id:   Your contact: ${object.user_id.name} % endif

<% action = 'portal_sale.action_quotations_portal' if object.state in ('draft', 'sent') else 'portal_sale.action_orders_portal' object.partner_id.signup_prepare() signup_url = object.partner_id._get_signup_url_for_action(action=action,view_type='form',res_id=object.id)[object.partner_id.id] %> % if signup_url:

You can access this document and pay online via our Customer Portal:

View ${object.state in ('draft', 'sent') and 'Quotation' or 'Order'} % endif % if object.order_policy in ('prepaid','manual') and object.company_id.paypal_account and object.state != 'draft': <% 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.residual)) 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:

% endif

If you have any question, do not hesitate to contact us.

Thank you for choosing ${object.company_id.name or 'us'}!



${object.company_id.name}

% if object.company_id.street: ${object.company_id.street}
% endif % if object.company_id.street2: ${object.company_id.street2}
% endif % if object.company_id.city or object.company_id.zip: ${object.company_id.zip} ${object.company_id.city}
% endif % if object.company_id.country_id: ${object.company_id.state_id and ('%s, ' % object.company_id.state_id.name) or ''} ${object.company_id.country_id.name or ''}
% endif
% if object.company_id.phone:
Phone:  ${object.company_id.phone}
% endif % if object.company_id.website: %endif

]]>
Invoice - Send by Email (Portal) ${object.user_id.email or object.company_id.email or 'noreply@localhost'} ${object.company_id.name} Invoice (Ref ${object.number or 'n/a' }) ${object.partner_id.id} Invoice_${(object.number or '').replace('/','_')}_${object.state == 'draft' and 'draft' or ''}

Hello${object.partner_id.name and ' ' or ''}${object.partner_id.name or ''},

A new invoice is available for you:

  REFERENCES
  Invoice number: ${object.number}
  Invoice total: ${object.amount_total} ${object.currency_id.name}
  Invoice date: ${object.date_invoice}
% if object.origin:   Order reference: ${object.origin}
% endif % if object.user_id:   Your contact: ${object.user_id.name} % endif

<% action = 'portal_sale.portal_action_invoices' object.partner_id.signup_prepare() signup_url = object.partner_id._get_signup_url_for_action(action=action,view_type='form',res_id=object.id)[object.partner_id.id] %> % if signup_url:

You can access the invoice document and pay online via our Customer Portal:

View Invoice % endif % if object.company_id.paypal_account and object.type in ('out_invoice', 'in_refund'): <% 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.residual)) 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:

% endif

If you have any question, do not hesitate to contact us.

Thank you for choosing ${object.company_id.name or 'us'}!



${object.company_id.name}

% if object.company_id.street: ${object.company_id.street}
% endif % if object.company_id.street2: ${object.company_id.street2}
% endif % if object.company_id.city or object.company_id.zip: ${object.company_id.zip} ${object.company_id.city}
% endif % if object.company_id.country_id: ${object.company_id.state_id and ('%s, ' % object.company_id.state_id.name) or ''} ${object.company_id.country_id.name or ''}
% endif
% if object.company_id.phone:
Phone:  ${object.company_id.phone}
% endif % if object.company_id.website: %endif

]]>