1. Zikzakmedia 100% GPL
  2. trytond-electronic_mail

Commits

Raimon Esteve  committed afe0d0a

ElectronicEmail order by date DESC

Comments (0)

Files changed (2)

File CHANGELOG Modified

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

File electronic_mail.py Modified

View file
  • Ignore whitespace
  • Hide word diff
     "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