Commits

Raimon Esteve (Zikzakmedia)  committed 2b7137d

Usability: Email menu in top menu. Access user email group (not necessary admin group)

  • Participants
  • Parent commits 7628981

Comments (0)

Files changed (6)

+* Electronic Email Form View: flag group 
+* Usability: Email menu in top menu. Access user email group (not necessary admin group)
 * Add flag send field
 * Add mailbox field in electronic.mail tree view
 * Add get_email_valid method in ElectronicMail class
 include *.xml
 include locale/*.po
 include doc/*
+include icons/*

File electronic_mail.py

     digest = fields.Char('MD5 Digest', size=32)
     collision = fields.Integer('Collision')
     email = fields.Function(fields.Binary('Email'), 'get_email', 'set_email')
-    flag_send = fields.Boolean('Send', readonly=True)
+    flag_send = fields.Boolean('Sent', readonly=True)
     flag_seen = fields.Boolean('Seen')
     flag_answered = fields.Boolean('Answered')
     flag_flagged = fields.Boolean('Flagged')

File electronic_mail.xml

 <tryton>
   <data>
     <menuitem name="Email Management" sequence="10" 
-      id="menu_email_management" parent="res.menu_res"/>
+      id="menu_email_management"/>
 
     <record model="res.group" id="group_email_admin">
       <field name="name">Electronic Mail Administrator</field>
     </record>
     <menuitem id="menu_mailbox" action="act_mailbox_form" 
       parent="menu_email_management"/>
+    <record model="ir.ui.menu-res.group"
+        id="menu_mailbox_group_email_admin">
+        <field name="menu" ref="menu_mailbox"/>
+        <field name="group" ref="group_email_admin"/>
+    </record>
 
     <record model="ir.ui.view" id="headers_view_tree">
       <field name="model">electronic.mail.header</field>
           <label name="mailbox"/>
           <field name="mailbox"/>
         </group>
-        <group colspan="4" col="10" id="flags_area">
+        <group colspan="4" col="10" id="send_area">
           <label name="flag_send"/>
           <field name="flag_send"/>
+        </group>
+        <group colspan="4" col="10" id="flags_area">
           <label name="flag_seen"/>
           <field name="flag_seen"/>
           <label name="flag_flagged"/>

File icons/tryton-electronic_mail.svg

Added
New image
     ],
     package_data={
         'trytond.modules.electronic_mail': info.get('xml', []) \
-                + info.get('translation', []),
+                + info.get('translation', []) \
+                + ['icons/*.svg'],
     },
     classifiers=[
         'Development Status :: 5 - Production/Stable',