I created an wizard and I want to get all the data from my table and put it in my wizard. I can not make a loop with my result in xml. Have you any idea of what I can do it Odoo 11 please.
Here is my code:
my model
class PopMessage(models.TransientModel):
_name = "custom.pop.message"
def get_values(self):
cron = self.env['cron.stock.limit'].search([])
for i in range(len(cron)):
res.append({'quantity': cron[i].quantity})
return res
test = fields.Char(string='Test', default=get_values, readonly=True)