Getting company_name from another doctype

Traceback (innermost last):
File “/home/justadmin/frappe-bench/apps/frappe/frappe/app.py”, line 67, in application
response = frappe.handler.handle()
File “/home/justadmin/frappe-bench/apps/frappe/frappe/handler.py”, line 77, in handle
execute_cmd(cmd)
File “/home/justadmin/frappe-bench/apps/frappe/frappe/handler.py”, line 94, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/justadmin/frappe-bench/apps/frappe/frappe/init.py”, line 788, in call
return fn(*args, **newargs)
File “/home/justadmin/frappe-bench/apps/frappe/frappe/templates/pages/print.py”, line 139, in get_html_and_style
no_letterhead=no_letterhead, trigger_print=trigger_print),
File “/home/justadmin/frappe-bench/apps/frappe/frappe/templates/pages/print.py”, line 118, in get_html
html = template.render(args, filters={“len”: len})
File “/home/justadmin/frappe-bench/env/local/lib/python2.7/site-packages/jinja2/environment.py”, line 989, in render
return self.environment.handle_exception(exc_info, True)
File “/home/justadmin/frappe-bench/env/local/lib/python2.7/site-packages/jinja2/environment.py”, line 754, in handle_exception
reraise(exc_type, exc_value, tb)
File "