Skip to content
Permalink
Browse files

[IMP] mail, rating, portal_rating: improve message and rating views

Purpose of this commit is to add some missing fields in message view, notably
is_internal newly added flag and its ratings. Rating form view is also
updated to display is_internal flag, and form view is a bit reorganized.

Task ID 2071556
PR #38692
  • Loading branch information
tde-banana-odoo committed Dec 2, 2019
1 parent 04744d6 commit bce562065f9e92d75cc75910cf3e31f84e0de230
@@ -62,6 +62,6 @@
name="Email Blacklist"
action="mail_blacklist_action"
parent="mail.mail_menu_technical"
sequence="20"/>
sequence="22"/>

</odoo>
@@ -50,7 +50,7 @@
id="menu_email_followers"
parent="mail.mail_menu_technical"
action="action_view_followers"
sequence="20"
sequence="21"
groups="base.group_no_one"/>

</data>
@@ -18,8 +18,8 @@
</record>

<!-- mail.message form: short view !-->
<record model="ir.ui.view" id="view_message_form">
<field name="name">mail.message.form</field>
<record id="mail_message_view_form" model="ir.ui.view">
<field name="name">mail.message.view.form</field>
<field name="model">mail.message</field>
<field name="priority">20</field>
<field name="arch" type="xml">
@@ -31,16 +31,17 @@
<field name="date"/>
<field name="email_from"/>
<field name="author_id"/>
<field name="record_name"/>
<field name="moderator_id"/>
<field name="message_type"/>
<field name="subtype_id"/>
<field name="is_internal"/>
</group>
<group>
<field name="parent_id"/>
<field name="model"/>
<field name="res_id" widget="integer"/>
<field name="message_type"/>
<field name="subtype_id"/>
<field name="record_name"/>
<field name="parent_id"/>
<field name="moderation_status"/>
<field name="moderator_id"/>
</group>
</group>
<notebook>
@@ -81,7 +82,7 @@
</field>
</group>
</page>
<page string="Tracking">
<page string="Tracking" name="page_tracking">
<field name="tracking_value_ids"/>
</page>
</notebook>
@@ -52,7 +52,7 @@
id="mail_notification_menu"
parent="mail.mail_menu_technical"
action="mail_notification_action"
sequence="30"
sequence="20"
groups="base.group_no_one"/>

</data></odoo>
@@ -5,7 +5,7 @@
<field name="model">rating.rating</field>
<field name="inherit_id" ref="rating.rating_rating_view_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='feedback']" position="after">
<xpath expr="//field[@name='is_internal']" position="after">
<field name="publisher_comment" string="Publisher comment"/>
</xpath>
</field>
@@ -10,11 +10,12 @@
'mail',
],
'data': [
'views/rating_view.xml',
'views/rating_rating_views.xml',
'views/rating_template.xml',
'views/mail_message_views.xml',
'views/assets.xml',
'security/ir.model.access.csv'
],
],
'installable': True,
'auto_install': False,
}
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<odoo><data>
<record id="mail_message_view_form" model="ir.ui.view">
<field name="name">mail.message.view.form.inherit.rating</field>
<field name="model">mail.message</field>
<field name="inherit_id" ref="mail.mail_message_view_form"/>
<field name="arch" type="xml">
<xpath expr="//page[@name='page_tracking']" position="after">
<page string="Ratings" name="page_rating">
<field name="rating_ids"/>
</page>
</xpath>
</field>
</record>
</data></odoo>
@@ -32,22 +32,21 @@
</div>
<group>
<group>
<field name="res_name"/>
<field name="parent_res_name"/>
<field name="res_name" string="Document"/>
<field name="parent_res_name" string="Parent Holder"/>
<field name="rated_partner_id"/>
<field name="partner_id"/>
<field name="rating" invisible="1"/>
<field name="create_date" string="Submitted on"/>
<field name="is_internal"/>
</group>
<group>
<div colspan="2" class="text-center">
<field name="partner_id"/>
<div colspan="2" class="text-center" name="rating_image_container">
<field name="rating_image" widget='image'/>
<div class="mt4">
<strong><field name="rating_text"/></strong>
</div>
</div>
</group>
<group>
<field name="create_date" string="Submitted on"/>
<field name="feedback" attrs="{'invisible': [('feedback','=',False)]}"/>
</group>
</group>
@@ -169,4 +168,17 @@
</field>
</record>

<record id="rating_rating_view" model="ir.actions.act_window">
<field name="name">Ratings</field>
<field name="res_model">rating.rating</field>
<field name="view_mode">kanban,tree,graph,pivot,form</field>
</record>

<!-- Add menu entry in Technical/Discuss -->
<menuitem name="Ratings"
id="rating_rating_menu_technical"
parent="mail.mail_menu_technical"
action="rating_rating_view"
sequence="30"/>

</odoo>

0 comments on commit bce5620

Please sign in to comment.
You can’t perform that action at this time.