I am not sure for which doctype print format you are using it … depending on that its as simple as just using the below jinja (for example in case of Pick List, Sales Order doctype etc.)
{{ doc.company }}
What are you trying to achieve with frappe.get_doc ??
I am using it for the invoice print doc. I want to add company information such as address and so on (from seller and buyer).
I have to admit I am pretty new to this and used this template:
It works for me though… Did you add multiple companies ???
If its only one company then there should not be a problem.
So assuming you want to create a custom print format for Sales Invoice, the first thing you would need to do is open the “Sales Invoice” Doctype in a separate windows as you see below.