Sales Order - Send by Email ${(object.user_id.email and '%s <%s>' % (object.user_id.name, object.user_id.email) or '')|safe} ${object.company_id.name} ${object.state in ('draft', 'sent') and 'Quotation' or 'Order'} (Ref ${object.name or 'n/a' }) ${object.partner_id.id} ${(object.name or '').replace('/','_')}${object.state == 'draft' and '_draft' or ''} ${object.partner_id.lang} Dear ${object.partner_id.name} % set access_action = object.with_context(force_website=True).get_access_action() % set is_online = access_action and access_action['type'] == 'ir.actions.act_url' % set doc_name = 'quotation' if object.state in ('draft', 'sent') else 'order confirmation' % set pay_sign_name = object.get_portal_confirmation_action() % set access_name = is_online and object.state in ('draft', 'sent') and pay_sign_name in ('pay', 'sign') and 'Accept and %s online' % pay_sign_name or 'View %s' % doc_name % set access_url = is_online and object.get_mail_url() or '' % if object.partner_id.parent_id: (${object.partner_id.parent_id.name}) % endif ,

Here is % if ctx.get('proforma') in attachment, your pro-forma invoice % else the ${doc_name} ${object.name} % endif % if object.origin: (with reference: ${object.origin} ) % endif amounting in ${format_amount(object.amount_total, object.currency_id)} from ${object.company_id.name}.

% if is_online and not ctx.get('proforma'):

${access_name}


(or view attached PDF)

% endif

You can reply to this email if you have any questions.

Thank you,

% if object.user_id and object.user_id.signature: ${object.user_id.signature | safe} % endif

]]>
Sales Order Notification Email ${object.subject} % set record = ctx.get('record') % set company = record and record.company_id or user.company_id
${object.record_name} ${company.name}
${object.body | safe}
${company.name}
${company.phone or ''}
% if company.email: ${company.email}
% endif % if company.website: ${company.website} % endif
]]>