Browse Source

[IMP] mail_move_message: show email_from + use built-in css for body

pull/1/head
Ivan Yelizariev 9 years ago
parent
commit
a1f9af5642
  1. 1
      mail_move_message_models.py
  2. 16
      mail_move_message_views.xml

1
mail_move_message_models.py

@ -56,6 +56,7 @@ class wizard(models.TransientModel):
message_id = fields.Many2one('mail.message', string='Message') message_id = fields.Many2one('mail.message', string='Message')
message_body = fields.Html(related='message_id.body', string='Message to move', readonly=True) message_body = fields.Html(related='message_id.body', string='Message to move', readonly=True)
message_from = fields.Char(related='message_id.email_from', string='From', readonly=True)
message_moved_by_message_id = fields.Many2one('mail.message', related='message_id.moved_by_message_id', string='Moved with', readonly=True) message_moved_by_message_id = fields.Many2one('mail.message', related='message_id.moved_by_message_id', string='Moved with', readonly=True)
message_moved_by_user_id = fields.Many2one('res.users', related='message_id.moved_by_user_id', string='Moved by', readonly=True) message_moved_by_user_id = fields.Many2one('res.users', related='message_id.moved_by_user_id', string='Moved by', readonly=True)
message_is_moved = fields.Boolean(string='Is Moved', related='message_id.is_moved', readonly=True) message_is_moved = fields.Boolean(string='Is Moved', related='message_id.is_moved', readonly=True)

16
mail_move_message_views.xml

@ -52,9 +52,21 @@
<button name="move" string="Move" type="object" class="oe_highlight" attrs="{'invisible':[('can_move', '=', False)]}"/> <button name="move" string="Move" type="object" class="oe_highlight" attrs="{'invisible':[('can_move', '=', False)]}"/>
<button string="Close" class="" special="cancel" /> <button string="Close" class="" special="cancel" />
<separator string="Message"/> <separator string="Message"/>
<div>
<group>
<field name="message_from"/>
<field name="message_id" invisible="1"/> <field name="message_id" invisible="1"/>
<field name="message_body"/>
</group>
<div class="openerp">
<div class="oe_mail">
<div class="oe_msg">
<div class="oe_msg_content">
<div class="oe_msg_body">
<!-- use built-in css for messages -->
<field name="message_body"/>
</div>
</div>
</div>
</div>
</div> </div>
<footer> <footer>
<button name="read_close" string="Mark as read and Close" type="object" class="oe_highlight"/> or <button name="read_close" string="Mark as read and Close" type="object" class="oe_highlight"/> or

Loading…
Cancel
Save