% set doc_name = 'quotation' if object.state in ('draft', 'sent') else 'order'
Dear ${object.partner_id.name}
% 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.pricelist_id.currency_id)}
from ${object.company_id.name}.
Do not hesitate to contact us if you have any question.