Powertable set data property from CellEdited

I'm trying to run this on a CellEdited but it does not set the value of self.data to the query below. the query is correct i test it outside. but self.data does not change, can anyone tell me why?

def onCellEdited(self, rowIndex, colIndex, colName, oldValue, newValue):
	orderid =  self.parent.OrderID
	invoiceid = self.parent.ID
	ordertype = self.parent.ordertype
	locationfrom = self.parent.locationfrom

	if colName == 'id' and newValue != oldValue:
		if newValue == 0:
			print "entro a borrar"   
	     	system.db.runNamedQuery("Orders/DeleteInvoiceTempPallet", {"PALLET_ID": old Value, "ORDER_ID": invoiceid, "ORDER_TYPE": ordertype})
		    self.data = system.db.runNamedQuery("Orders/SelectCustomInvoiceTempPallet", {"ORDER_ID": invoiceid, "LOCATION_FROM": locationfrom})

Your indentation is wrong. Everything under def should be indented one tab stop.

Thanks for pointing that out, it but it was when I pasted the code here that I made the mistake, in Igntion my code it was correct , now I have corrected here also. the print runs, and the first name query also runs, but i can't set the data property with the self.data

How is the data initially set? Do you have a data binding? If so, consider replacing the last line of your script with system.db.refresh(self, data)

no binding, i want to set data from that script