OK so I have a number of references in my custom print format for Sales Invoice fetching Sales Order Journal Entries like this:
{{ frappe.db.get_value('Sales Order', doc.journal_entries[0].sales_order, 'name') }}
But I get an error
UndefinedError: 'erpnext.accounts.doctype.sales_invoice.sales_invoice.SalesInvoice object' has no attribute 'journal_entries'
Where has this field gone and what other field can I use to fetch my sales order values please???
Thanks.