This is what you can do.
- Go to “menu / settings / technical / user interface / views” and search for “account.report_invoice_document” and edit that.
- Add code snippet like below (say after the source field’s div element)
<div name="provider_name" class="col-xs-2" t-if="o.origin">
<t t-foreach="request.env['sale.order'].search([('name', '=', o.origin)])" t-as="obj">
Note: the above assumes the source of the invoice is a sale order.
It works for me. Some might object to make “request.env” call in QWeb views. Alternatively, you can figure out what is the model, add a method in there, and call the method for the view template.
I am no expert on Odoo, but @anandpatel @ramashish can verify if this the correct way.