417 lines
28 KiB
XML
417 lines
28 KiB
XML
<?xml version="1.0"?>
|
|
<openerp>
|
|
<data>
|
|
<!-- mail.message tree: short view !-->
|
|
<record model="ir.ui.view" id="view_message_tree">
|
|
<field name="name">mail.message.tree</field>
|
|
<field name="model">mail.message</field>
|
|
<field name="priority">20</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Messages">
|
|
<field name="date"/>
|
|
<field name="subject"/>
|
|
<field name="author_id"/>
|
|
<field name="model"/>
|
|
<field name="res_id"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- mail.message form: short view !-->
|
|
<record model="ir.ui.view" id="view_message_form">
|
|
<field name="name">mail.message.form</field>
|
|
<field name="model">mail.message</field>
|
|
<field name="priority">20</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Message">
|
|
<sheet>
|
|
<group>
|
|
<group>
|
|
<field name="subject"/>
|
|
<field name="author_id"/>
|
|
<field name="email_from"/>
|
|
<field name="reply_to"/>
|
|
<field name="date"/>
|
|
<field name="message_type"/>
|
|
</group>
|
|
<group>
|
|
<field name="model"/>
|
|
<field name="res_id"/>
|
|
<field name="parent_id"/>
|
|
<field name="partner_ids" widget="many2many_tags"/>
|
|
<field name="notified_partner_ids" widget="many2many_tags"/>
|
|
<field name="subtype_id"/>
|
|
</group>
|
|
</group>
|
|
<field name="body"/>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- mail.message search: wall view !-->
|
|
<record model="ir.ui.view" id="view_message_search">
|
|
<field name="name">mail.message.search</field>
|
|
<field name="model">mail.message</field>
|
|
<field name="priority">25</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Messages Search">
|
|
<field name="body" string="Content" filter_domain="['|', ('subject', 'ilike', self), ('body', 'ilike', self)]" />
|
|
<field name="subject"/>
|
|
<field name="message_type"/>
|
|
<field name="author_id"/>
|
|
<field name="partner_ids"/>
|
|
<field name="model"/>
|
|
<field name="res_id"/>
|
|
<field name="parent_id"/>
|
|
<filter string="To Read"
|
|
name="message_unread" help="Show messages to read"
|
|
domain="[('to_read', '=', True)]"/>
|
|
<separator/>
|
|
<filter string="Has attachments"
|
|
name="attachments"
|
|
domain="[('attachment_ids', '!=', False)]"/>
|
|
<group expand="0" string="Group By">
|
|
<filter string="Type" name="thread" domain="[]" context="{'group_by':'message_type'}"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_view_mail_message" model="ir.actions.act_window">
|
|
<field name="name">Messages</field>
|
|
<field name="res_model">mail.message</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="search_view_id" ref="view_message_search"/>
|
|
</record>
|
|
|
|
<!-- Add menu entry in Settings/Email -->
|
|
<menuitem name="Messages" id="menu_mail_message" parent="base.menu_email" action="action_view_mail_message"/>
|
|
|
|
<record model="ir.ui.view" id="view_document_file_kanban">
|
|
<field name="name">ir.attachment kanban</field>
|
|
<field name="model">ir.attachment</field>
|
|
<field name="arch" type="xml">
|
|
<kanban>
|
|
<field name="file_type_icon"/>
|
|
<field name="url"/>
|
|
<field name="name"/>
|
|
<templates>
|
|
<t t-name="kanban-box">
|
|
<div class="oe_kanban_global_click">
|
|
<div class="oe_kanban_vignette">
|
|
<div class="oe_attachment">
|
|
<div t-if="record.file_type_icon.value != 'webimage'">
|
|
<img t-att-src="'/mail/static/src/img/mimetypes/' + record.file_type_icon.value + '.png'"></img>
|
|
</div>
|
|
<div t-if="record.file_type_icon.value == 'webimage' and !record.url.value">
|
|
<img t-att-src="kanban_image('ir.attachment', 'datas', record.id.value)"/>
|
|
</div>
|
|
<div t-if="record.file_type_icon.value and record.url.value">
|
|
<img t-att-src="record.url.value"/>
|
|
</div>
|
|
<div class="oe_name">
|
|
<field name="name"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
</templates>
|
|
</kanban>
|
|
</field>
|
|
</record>
|
|
<record id="base.action_attachment" model="ir.actions.act_window">
|
|
<field name="view_mode">kanban,tree,form</field>
|
|
</record>
|
|
|
|
<record model="ir.ui.view" id="mail_message_view_timeline">
|
|
<field name="name">mail.message.view.timeline.</field>
|
|
<field name="model">mail.message</field>
|
|
<field name="arch" type="xml">
|
|
<timeline string="Mail Timeline">
|
|
<field name="date"/>
|
|
<field name="author_id"/>
|
|
<field name="subject"/>
|
|
<field name="model"/>
|
|
<field name="res_id"/>
|
|
<field name="body"/>
|
|
<field name="attachment_ids"/>
|
|
<field name="tracking_value_ids"/>
|
|
<field name="subtype_id"/>
|
|
<field name="message_type"/>
|
|
<field name="vote_user_ids"/>
|
|
<field name="to_read"/>
|
|
<field name="starred"/>
|
|
<templates>
|
|
<t t-name="timeline-message">
|
|
<div t-attf-class="row o_timeline_msg o_timeline_msg_#{record.message_type}
|
|
#{record.subtype ? '' : 'o_timeline_msg_nobody'}">
|
|
<t t-if="record.message_type == 'expandable'">
|
|
<div class="col-md-2"> </div>
|
|
<span> - - - - - - - - - - - See more messages - - - - - - - - - - - </span>
|
|
</t>
|
|
|
|
<t t-if="record.message_type != 'expandable'">
|
|
<div class="col-md-2">
|
|
<div class="o_timeline_msg_date">
|
|
<span> <t t-raw="record.date"/> </span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-10 o_timeline_msg_message">
|
|
<div class='o_timeline_msg_left'> <!-- *** avatar *** -->
|
|
<a t-if="record.options.show_link"
|
|
t-attf-href="#model=res.partner&id=#{record.author_id[0]}"
|
|
t-att-title="record.author_id[1]">
|
|
<img class="o_timeline_msg_icon"
|
|
t-att-src="record.author_avatar"/>
|
|
</a>
|
|
<img t-if="!record.options.show_link" class="o_timeline_msg_icon"
|
|
t-att-src="record.author_avatar"/>
|
|
</div> <!-- *** avatar *** -->
|
|
|
|
<div class="o_timeline_msg_center"> <!-- *** msg_center *** -->
|
|
<div class="o_timeline_msg_content"> <!-- *** msg_content *** -->
|
|
|
|
<div class="o_timeline_header"> <!-- *** msg_header *** -->
|
|
<!-- *** header when tracking values *** -->
|
|
<div t-if="record.tracking_values" class="o_timeline_tracking_value_header">
|
|
<span t-if="!record.subtype" class="text-muted o_timeline_no_subtype">
|
|
Update </span>
|
|
<span t-if="record.subtype" class="o_timeline_subtype">
|
|
<t t-raw="record.subtype"/>
|
|
</span>
|
|
<span t-attf-class="text-muted #{!record.subtype ? 'o_timeline_no_subtype' : ''}">
|
|
by </span>
|
|
<span t-attf-class="#{!record.subtype ? 'text-muted o_timeline_no_subtype' : ''}">
|
|
<a t-if="record.options.show_link"
|
|
class="o_timeline_action_author"
|
|
t-attf-href="#model=res.partner&id=#{record.author_id[0]}"
|
|
t-att-data-partner="record.author_id[0]">
|
|
<t t-raw="record.author_id[2]"/>
|
|
</a>
|
|
<a t-if="!record.options.show_link"
|
|
class="o_timeline_action_author">
|
|
<t t-raw="record.author_id[2]"/>
|
|
</a>
|
|
</span>
|
|
</div>
|
|
|
|
<!-- *** header when no tracking value *** -->
|
|
<span t-if="!record.tracking_values" class="o_timeline_msg_header">
|
|
<span t-if="record.author_id and !(record.message_type == 'notification')"
|
|
class="text-muted">
|
|
<t t-if="record.subtype and record.message_type == 'comment'"> Message </t>
|
|
<t t-if="record.subtype and record.message_type == 'email'"> Email </t>
|
|
<t t-if="!record.subtype"> Note </t>
|
|
from
|
|
<a t-if="record.options.show_link and record.author_id[0]"
|
|
t-attf-href="#model=res.partner&id=#{record.author_id[0]}"
|
|
t-att-data-partner="record.author_id[0]" t-att-data-record="record.record_name"
|
|
class="o_timeline_action_author">
|
|
<t t-raw="record.author_id[2]"/>
|
|
</a>
|
|
<a t-if="record.author_id and (!record.options.show_link or !record.author_id[0])"
|
|
class="o_timeline_action_author">
|
|
<t t-raw="record.author_id[2]"/>
|
|
</a>
|
|
</span>
|
|
|
|
<span t-if="!record.options.readonly and !(record.message_type == 'notification')"
|
|
class='oe_subtle oe_sep text-muted'>•</span>
|
|
<span t-if="!record.options.readonly and !(record.message_type == 'notification')"
|
|
class="o_timeline_vote" t-att-data-id="record.id">
|
|
<span class="o_timeline_vote_count" t-att-data-id="record.id" t-if='record.vote_nb > 0'>
|
|
<t t-esc='record.vote_nb'/>
|
|
<i class="fa fa-thumbs-o-up" t-att-data-id="record.id"></i>
|
|
</span>
|
|
<t t-if="!record.has_voted">Like</t>
|
|
<t t-if="record.has_voted">Unlike</t>
|
|
</span>
|
|
</span>
|
|
|
|
<div t-attf-class="o_timeline_msg_icons #{record.tracking_values ?
|
|
'o_timeline_msg_icons_track' : ''}"
|
|
t-if="!record.options.readonly"> <!-- *** icons *** -->
|
|
<span>
|
|
<i t-if="record.options.show_read" title="Done"
|
|
class="oe_read fa fa-check" t-att-data-id="record.id"/>
|
|
<i t-if="record.is_favorite and record.options.show_unread" title="Set back to Todo"
|
|
class="oe_unread fa fa-inbox" t-att-data-id="record.id"/>
|
|
<i t-if="!record.is_favorite and record.options.show_unread" title="Move to Inbox"
|
|
class="oe_unread fa fa-inbox" t-att-data-id="record.id"/>
|
|
</span>
|
|
<span>
|
|
<i title="Mark as Todo" t-attf-class="oe_star #{record.is_favorite ? 'oe_starred':''} fa fa-star"
|
|
t-att-data-id="record.id"/>
|
|
</span>
|
|
</div> <!-- *** icons *** -->
|
|
</div> <!-- *** msg_header *** -->
|
|
|
|
<div t-attf-class="o_timeline_msg_body"> <!-- *** msg_body *** -->
|
|
<t t-if="record.tracking_values">
|
|
<ul class="o_timeline_tracking_value_list">
|
|
<t t-foreach='record.tracking_value_ids' t-as='value'>
|
|
<li>
|
|
<t t-esc="value.changed_field"/>
|
|
<span> : </span>
|
|
<t t-if="value.old_value">
|
|
<span class="o_timeline_tracking_value"> <t t-esc="value.old_value"/> </span>
|
|
<span> <i class="fa fa-long-arrow-right"></i> </span>
|
|
</t>
|
|
<span class="o_timeline_tracking_value"> <t t-esc="value.new_value"/> </span>
|
|
</li>
|
|
</t>
|
|
</ul>
|
|
</t>
|
|
<t t-if="!record.tracking_values">
|
|
<t t-raw="record.body"/>
|
|
<t t-if="!record.body and record.subject">
|
|
<t t-raw="record.subject"/>
|
|
</t>
|
|
</t>
|
|
</div> <!-- *** msg_body *** -->
|
|
|
|
<div class="o_timeline_msg_footer"> <!-- *** msg_footer *** -->
|
|
<t t-if="record.attachments">
|
|
<div class="o_timeline_msg_attachment_list">
|
|
<t t-raw="record.attachments_content"/>
|
|
</div>
|
|
</t>
|
|
|
|
<t t-if="(record.message_type == 'comment' or record.message_type == 'email') and
|
|
(record.subtype and record.partners)">
|
|
<div t-if="record.partners" class="o_timeline_partners_followers">
|
|
<span class="text-muted">
|
|
To </span>
|
|
<span class="o_timeline_partners_list">
|
|
<t t-foreach="record.partner_ids.slice(0, 3)" t-as="partner">
|
|
<span t-attf-class="o_timeline_partner_follower">
|
|
<a t-if="record.options.show_link"
|
|
t-attf-href="#model=res.partner&id=#{partner[0]}"
|
|
t-att-data-partner="partner[0]"
|
|
class="o_timeline_action_author">
|
|
<t t-esc="partner[1]"/>
|
|
</a>
|
|
<t t-if="!record.options.show_link" t-esc="partner[1]"/>
|
|
</span>
|
|
<t t-if="!partner_last">,</t>
|
|
</t>
|
|
<t t-if="record.partner_ids.length > 3">
|
|
<span t-att-title="record.partners_str">
|
|
and <t t-esc="record.partners_nb"/> more
|
|
</span>
|
|
</t>
|
|
</span>
|
|
</div>
|
|
</t>
|
|
</div> <!-- *** msg_footer *** -->
|
|
|
|
</div> <!-- *** msg_content *** -->
|
|
</div> <!-- *** msg_center *** -->
|
|
</div>
|
|
</t>
|
|
</div>
|
|
</t>
|
|
<t t-name="timeline-thread">
|
|
<t t-if="options.view_inbox">
|
|
<div t-attf-class="o_timeline_thread_content o_timeline_parent_#{widget.thread_type}">
|
|
<t t-if="widget.thread_type == 'expandable'">
|
|
<div class="col-md-2"> </div>
|
|
<span> - - - - - - - - - - - See more messages - - - - - - - - - - - </span>
|
|
</t>
|
|
|
|
<t t-if="widget.thread_type != 'expandable'">
|
|
<span class="col-md-2">
|
|
<t t-if="options.is_folded">
|
|
<div class="o_timeline_msg_date">
|
|
<span> <t t-raw="record.date"/> </span>
|
|
</div>
|
|
</t>
|
|
</span>
|
|
|
|
<div class="o_timeline_parent_message">
|
|
|
|
<span class="o_timeline_msg_icons" t-if="!options.readonly"> <!-- *** read *** -->
|
|
<i t-if="options.show_read_unread_button" title="Done" class="oe_read fa fa-check"/>
|
|
</span> <!-- *** read *** -->
|
|
|
|
<span t-attf-class="o_timeline_parent_subject #{widget.model and widget.res_id
|
|
and options.show_link ? 'o_timeline_small_subject' : ''}"> <!-- *** subject *** -->
|
|
<span class="o_timeline_subject">
|
|
<t t-if="widget.res_id and widget.subject">
|
|
<t t-raw="widget.record_name"/> : <t t-raw="widget.subject"/>
|
|
</t>
|
|
<t t-if="widget.res_id and !widget.subject">
|
|
<t t-raw="widget.record_name"/>
|
|
</t>
|
|
<t t-if="!widget.res_id and widget.subject">
|
|
<t t-raw="widget.subject"/>
|
|
</t>
|
|
<t t-if="!widget.res_id and !widget.subject">
|
|
No subject
|
|
</t>
|
|
</span>
|
|
</span> <!-- *** subject *** -->
|
|
|
|
<span class="o_timeline_go_to_doc" t-if="record.res_id and record.model and options.show_link"> <!-- *** Go to doc *** -->
|
|
<a t-attf-href="#action=mail.action_mail_redirect&model=#{record.model}&res_id=#{record.res_id}">
|
|
<i class="fa fa-arrow-circle-right" title="Go to document"></i>
|
|
</a>
|
|
</span> <!-- *** Go to doc *** -->
|
|
|
|
<span class="o_timeline_parent_avatar"> <!-- *** avatar *** -->
|
|
<a t-if="options.show_link"
|
|
t-attf-href="#model=res.partner&id=#{record.author_id[0]}"
|
|
t-att-title="record.author_id[1]">
|
|
<img class="o_timeline_msg_icon"
|
|
t-att-src="record.author_avatar"/>
|
|
</a>
|
|
<img t-if="!options.show_link" class="o_timeline_msg_icon"
|
|
t-att-src="record.author_avatar"/>
|
|
</span> <!-- *** avatar *** -->
|
|
|
|
<span class="o_timeline_parent_author"> <!-- *** author *** -->
|
|
<a t-if="options.show_link and record.author_id[0]"
|
|
t-attf-href="#model=res.partner&id=#{record.author_id[0]}"
|
|
t-att-data-partner="record.author_id[0]" class="o_timeline_action_author"
|
|
title="Last sender">
|
|
<t t-raw="record.author_id[2]"/>
|
|
</a>
|
|
<a t-if="record.author_id and (!options.show_link or !record.author_id[0])"
|
|
class="o_timeline_action_author"
|
|
title="Last sender">
|
|
<t t-raw="record.author_id[2]"/>
|
|
</a>
|
|
</span> <!-- *** author *** -->
|
|
|
|
<span class="o_timeline_parent_followers"> <!-- *** followers *** -->
|
|
<span t-if="widget.nb_followers > 0" title="Number of followers"> <t t-raw="widget.nb_followers"/> </span>
|
|
<i t-if="widget.nb_followers > 0" class="oe_follwrs fa fa-users"></i>
|
|
</span> <!-- *** followers *** -->
|
|
|
|
<span class="o_timeline_msg_icons" t-if="!options.readonly"> <!-- *** repy *** -->
|
|
<i t-if="options.show_reply_button" title="Reply" class="oe_reply fa fa-reply"/>
|
|
</span> <!-- *** reply *** -->
|
|
</div>
|
|
</t>
|
|
</div>
|
|
</t>
|
|
<t t-if="!options.is_folded">
|
|
<t t-foreach="widget.messages" t-as="message">
|
|
<t t-call="timeline-message">
|
|
<t t-set="record" t-value="message"/>
|
|
</t>
|
|
</t>
|
|
</t>
|
|
</t>
|
|
</templates>
|
|
</timeline>
|
|
</field>
|
|
</record>
|
|
|
|
</data>
|
|
</openerp>
|