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 access_url = is_online and object.get_mail_url() or '/report/pdf/account.report_invoice/' + str(object.id) % if object.partner_id.parent_id: (${object.partner_id.parent_id.name}) % endif ,

Here is your % if object.number: invoice ${object.number} % else: pro-forma invoice % endif % if object.origin: (with reference: ${object.origin} ) % endif amounting in ${object.amount_total} ${object.currency_id.name} from ${object.company_id.name}.

% if is_online:

View Invoice
% endif

% if object.reference_type=='bba' and object.reference:

Please use the following communication for your payment : ${object.reference}

% endif

Please remit payment at your earliest convenience.

Thank you,

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