Commits

Raimon Esteve (Zikzakmedia) committed 2b7137d

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

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/*

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')

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"/>

icons/tryton-electronic_mail.svg

Added
New image
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="64px"
+   height="64px"
+   id="svg3471"
+   sodipodi:version="0.32"
+   inkscape:version="0.48.2 r9819"
+   sodipodi:docname="tryton-helloword.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   version="1.1">
+  <defs
+     id="defs3473">
+    <linearGradient
+       id="linearGradient3212">
+      <stop
+         style="stop-color:#fffff2;stop-opacity:1;"
+         offset="0"
+         id="stop3214" />
+      <stop
+         style="stop-color:#fffff2;stop-opacity:0;"
+         offset="1"
+         id="stop3216" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3212"
+       id="linearGradient3230"
+       gradientUnits="userSpaceOnUse"
+       x1="164.10248"
+       y1="472.9617"
+       x2="199.2081"
+       y2="538.2522" />
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 32 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="64 : 32 : 1"
+       inkscape:persp3d-origin="32 : 21.333333 : 1"
+       id="perspective3479" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5571"
+       id="linearGradient3009"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.9069282,0,0,1.9069282,65.660981,-1088.5263)"
+       x1="287.26981"
+       y1="678.03345"
+       x2="286.95731"
+       y2="715.93921" />
+    <linearGradient
+       id="linearGradient5571">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0;"
+         offset="0"
+         id="stop5573" />
+      <stop
+         style="stop-color:#ededed;stop-opacity:1;"
+         offset="1"
+         id="stop5575" />
+    </linearGradient>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="4.2038081"
+     inkscape:cx="50.552967"
+     inkscape:cy="21.665557"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     inkscape:window-width="1024"
+     inkscape:window-height="600"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="0" />
+  <metadata
+     id="metadata3476">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Bertrand Chenal</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <cc:license
+           rdf:resource="" />
+      </cc:Work>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <g
+       id="g3021"
+       transform="matrix(1.1064959,0,0,1,-3.9546392,0)">
+      <path
+         sodipodi:nodetypes="ccccc"
+         id="path3913"
+         d="M 3.6837489,50.199546 C 3.8486534,59.585173 8.889999,64.288548 18.93512,64.288548 l 28.131344,0 c 8.256741,0.06149 12.99565,-3.516303 14.27492,-10.694564 C 42.880688,52.003671 23.588549,50.856916 3.6837489,50.199546 z"
+         style="font-size:108.87190247px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#4d4d4d;fill-opacity:1;stroke:none;font-family:Kimberley;-inkscape-font-specification:Kimberley"
+         inkscape:connector-curvature="0" />
+      <path
+         sodipodi:nodetypes="ssscccssssccccccccccccsccccccsccccccccccsccccccccccccccc"
+         id="path3915"
+         d="M 18.601128,0.01794205 C 8.6064763,0.01795766 3.6287391,5.062284 3.6287391,15.129822 l 0,34.59458 c 0,0.75805 0.030899,1.48659 0.092994,2.185417 -0.048455,-0.55002 -0.036205,-1.133825 -0.046505,-1.720433 19.9047999,0.657371 39.1969399,1.80404 57.6576349,3.394361 0.235349,-1.320593 0.371984,-2.760008 0.371984,-4.324322 l 0,-34.036601 C 61.704792,5.0823996 56.747077,0.01794205 46.825459,0.01794205 z M 61.332871,53.583747 c -0.07995,0.448646 -0.171989,0.881436 -0.278989,1.301945 0.10597,-0.417083 0.199728,-0.857185 0.278989,-1.301945 z M 3.7217329,51.909819 c 0.1475199,1.660297 0.4780935,3.137836 0.9764665,4.463813 C 4.2086202,55.053039 3.8670446,53.559863 3.7217329,51.909819 z m 0.9764665,4.463813 C 4.86223,56.810028 5.0540931,57.228882 5.2561702,57.62908 5.0546003,57.225504 4.8613951,56.813828 4.6981994,56.373632 z M 35.200941,7.4576437 c 0.300151,0.010144 0.637731,0.07202 0.976459,0.1859877 2.732129,0.918078 4.502133,4.6048016 2.789893,5.8122626 -0.759759,0.535686 -1.003753,2.131695 -1.34845,8.602148 -0.441943,8.296746 -0.09204,10.508272 1.76693,11.624518 1.652174,0.991846 2.18981,0.756029 5.672764,-2.045911 3.695682,-2.972604 5.249688,-4.865268 5.347286,-6.695728 0.09075,-1.702634 1.22408,-2.642357 3.02237,-2.464399 1.146294,0.113859 1.637676,0.519831 2.278411,1.720433 1.308265,2.451672 0.924406,4.019295 -1.06946,4.417316 -1.624786,0.32409 -4.401305,3.905023 -8.695142,11.206038 -4.533976,7.709296 -5.520251,8.494048 -10.601562,8.555651 -2.088858,0.02481 -5.023673,-0.676191 -11.903515,-2.836382 -5.017064,-1.57573 -9.758836,-2.92581 -10.555065,-3.022378 -2.876918,-0.347599 -4.328357,-4.889362 -1.952918,-6.137749 1.210168,-0.635663 3.485287,0.38716 4.51031,2.045919 0.919085,1.487028 5.557353,2.86235 7.20721,2.138913 1.100921,-0.482557 1.401727,-1.079128 1.487932,-3.208373 0.162236,-4.004337 -0.753142,-7.15877 -3.673342,-12.740475 -1.465507,-2.801309 -2.98313,-5.897891 -3.394361,-6.881715 -0.411356,-0.984246 -1.520408,-2.720175 -2.464399,-3.859346 -2.008988,-2.422942 -2.067244,-3.058309 -0.418488,-4.463813 2.468792,-2.1045258 6.619518,1.264156 5.719269,4.649809 -0.443035,1.666359 0.391444,4.135947 3.208366,9.25312 3.342518,6.07244 6.76493,8.499986 8.788143,6.323737 0.522679,-0.561974 1.169008,-3.701409 1.766922,-8.555644 0.899445,-7.300842 0.897557,-7.738775 -0.09299,-9.206623 C 32.075153,9.6543909 33.099927,7.3862168 35.200941,7.4576437 z M 5.9071426,58.791534 c 0.4788504,0.7251 1.0437813,1.371624 1.6739358,1.952918 C 6.9469366,60.157189 6.3871712,59.525396 5.9071426,58.791534 z m 52.4963444,1.348442 c -0.227935,0.262611 -0.445501,0.506301 -0.697469,0.743974 0.249027,-0.235129 0.471914,-0.484507 0.697469,-0.743974 z m -1.90642,1.720433 c -0.213024,0.149627 -0.424652,0.282633 -0.650972,0.41848 0.223948,-0.133483 0.439937,-0.271608 0.650972,-0.41848 z"
+         style="font-size:108.87190247px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Kimberley;-inkscape-font-specification:Kimberley"
+         inkscape:connector-curvature="0" />
+    </g>
+  </g>
+</svg>
     ],
     package_data={
         'trytond.modules.electronic_mail': info.get('xml', []) \
-                + info.get('translation', []),
+                + info.get('translation', []) \
+                + ['icons/*.svg'],
     },
     classifiers=[
         'Development Status :: 5 - Production/Stable',