import jingrow


def execute():
	jingrow.reload_pg("jcloude", "doctype", "team")
	jingrow.reload_pg("jcloude", "doctype", "invoice")

	partners = jingrow.db.get_all("Team", filters={"erpnext_partner": True})

	for partner in partners:
		jingrow.db.set_value("Team", partner.name, "partner_email", partner.name)
