Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
4117 Zobrazení

Hi , i want to count the list of rows in a reminder and display the number of this list , what can i change in this function to display the number in the menuitem:

              class Reminders(http.Controller):

                          @http.route('/general_reminders/all_reminder', type='json', auth="public")

                          def all_reminder(self):

                          reminder = []

                          nb=0

                          for i in request.env['popup.reminder'].search([]):

                                     reminder.append(i.name)

                                     nb=nb+1

                              return reminder

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
srp 25
1074
2
kvě 25
1940
1
dub 25
1921
0
bře 25
1851
0
bře 25
1830