Fetch PDF copy of doctype in another doctype

Hello Guys,

Help please…

I have added 2 custom fields in Opportunity:
1- supplier_quotation (linked to Supplier Quotation doctype)
2- sqtn_attach (as attach type)

what I need is when I fill the custom field (supplier_quotation) I need to fetch a pdf copy of the linked Supplier Quotation and add it to the custom field (sqtn_attach)

Thank yuo very much.