Terms and Condition changes according to Product in the sales order and Invoice

No, it will not reflect during an ERPNext upgrade. If you want the custom fields and client scripts, you need to create a custom app and export them. After that, you can easily use these changes during different ERPNext upgrades.

Please check this: