def writeCustomer(self, openetran): grid = self.Customer.layout() status = 0 # Status = 1 when no widgets are left to delete while status == 0: status = Add_Delete_Widgets.deleteCustomer(self, grid) # Number of Meters in the system num = len(openetran['customer']) if num > 1: for k in range(num - 1): Add_Delete_Widgets.addCustomer(self, grid) writeWidgets(openetran, grid, 'customer', 6, 6, 1)
def newCustomer(): Add_Delete_Widgets.addCustomer(self, self.Customer.layout())