I wanted to edit the email template that generates emails when I send an invoice to a customer.
I should have made a copy of the template but I didn't, so now i'm here.
The generated email should look like this:
Dear JOHN DOE,
Here is your invoice INV/2023/03/0007 amounting in $ 1.00 from COMPANY LTD. This invoice is already paid.
Do not hesitate to contact us if you have any questions.
The actual Generated Email looks like this:
Dear % if object.partner_id.parent_id: JOHN DOE (False), % else: JOHN DOE, % endif
Here is your % if object.name: invoice INV/2023/03/0007 % else: invoice %endif % if object.invoice_origin: (with reference: False) % endif amounting in $ 1.00 from COMPANY LTD. % if object.payment_state in ('paid', 'in_payment'): This invoice is already paid. % else: Please remit payment at your earliest convenience. % if object.payment_reference:
Please use the following communication for your payment: INV/2023/03/0007. % endif % endif
Do not hesitate to contact us if you have any questions. % if object.invoice_user_id.signature: % endif
This whole mess is due to the PRESUMPTION that I could copy (ctrl + c) the template text to preserve it and paste (ctrl + v) it back when I had "tested" some changes, now i have a useless template. Any help would be greatly appreciated.