Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
3703 Представления

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

Аватар
Отменить
Related Posts Ответы Просмотры Активность
2
авг. 25
355
2
мая 25
1401
1
апр. 25
1310
0
мар. 25
1413
0
мар. 25
1331