Custom Table from new Doctype in Project

i have read this Task instead of Project Task!:

i have create a new Doctype “Campionatura” and “Project Campionature” taking inspiration “Task” and “Project Task”

def load_campionature(self):
	"""Load `campionature` from the database"""
	self.campionature = []
	for campionatura in self.get_campionature():
		campionatura_map = {
			"title": campionatura.subject,
			"status": campionatura.status,
			"description": campionatura.description,
			"codice_prodotto": campionatura.codice_prodotto

		self.map_custom_fields(campionatura, campionatura_map)

		self.append("campionature", campionatura_map)

def get_campionature(self):
	if is None:
		return {}
		return frappe.get_all("Campionatura", "*", {"project":}, order_by="date asc")

def validate(self):
	self.campionature = []

def sync_campionature(self):
	"""sync campionature and remove table"""
	if self.flags.dont_sync_campionature: return
	campionatura_names = []
	for t in self.campionature:
		if t.campionatura_id:
			campionatura = frappe.get_doc("Campionatura", t.campionatura_id)
			campionatura = frappe.new_doc("Campionatura")
			campionatura.project =
			"subject": t.title,
			"status": t.status,
			"description": t.description,
			"codice_prodotto": t.codice_prodotto

		self.map_custom_fields(t, campionatura)

		campionatura.flags.ignore_links = True
		campionatura.flags.from_project = True
		campionatura.flags.ignore_feed = True = True)

	# delete
	for t in frappe.get_all("Campionatura", ["name"], {"project":, "name": ("not in", campionatura_names)}):

def map_custom_fields(self, source, target):
	project_campionatura_custom_fields = frappe.get_all("Custom Field", {"dt": "Project Campionature"}, "fieldname")

	for field in project_campionatura_custom_fields:
			field.fieldname: source.get(field.fieldname)

def update_project(self):
	self.flags.dont_sync_campionature = True = True)

def on_update(self):

i have insert this code in


Without results
what would be the best way to proceed?

Hi @sharpec
What results are you expecting?

I would like to have a result such this

in Project page

in Customize

if insert a new “Campionatura” from project page and click save
I would like it is synchronized with doctype.

vice versa, if I create “Campionatura” from the module and check a project, I would like it to appear in the list