1. zikzakmedia
  2. trytond-electronic_mail

Commits

Raimon Esteve (Zikzakmedia)  committed afe0d0a

ElectronicEmail order by date DESC

  • Participants
  • Parent commits 11be16c
  • Branches default

Comments (0)

Files changed (2)

File CHANGELOG

View file
+* ElectronicEmail order by date DESC
 * Rename Model name. Replace _ to . (dot)
 * Add get_rec_name in ElectronicMail
 * Review INSTALL documentation

File electronic_mail.py

View file
     "E-mail"
     _name = 'electronic.mail'
     _description = __doc__
+    _order_name = 'date'
 
     mailbox = fields.Many2One(
         'electronic.mail.mailbox', 'Mailbox', required=True)
         fields.One2Many('res.user', None, 'Write Users'),
         'get_mailbox_users', searcher='search_mailbox_users')
 
+    def __init__(self):
+        super(ElectronicMail, self).__init__()
+        self._order.insert(0, ('date', 'DESC'))
+
     def default_collision(self):
         return 0