diff options
| author | Fabien Pinckaers <fp@openerp.com> | 2016-07-15 15:13:17 +0200 |
|---|---|---|
| committer | Fabien Pinckaers <fp@openerp.com> | 2016-07-15 15:13:17 +0200 |
| commit | 9bf9eb863b26ea7d24168f3e62ca1202c3130317 (patch) | |
| tree | 99129ea04e55d6f4fc4ee54294f73126d8079f9a /addons/im_livechat | |
| parent | eee72c838072d376488cddea8be8796b95f2daf7 (diff) | |
[FIX] rating: correct list view (list --> tree)
[FIX] livechat_rating: ratings from livechat should be consumed
(otherwise invisible)
[IMP] usability: better views and tooltips
Diffstat (limited to 'addons/im_livechat')
5 files changed, 36 insertions, 13 deletions
diff --git a/addons/im_livechat/controllers/main.py b/addons/im_livechat/controllers/main.py index c80630deff3..aa0e7a6a4f2 100644 --- a/addons/im_livechat/controllers/main.py +++ b/addons/im_livechat/controllers/main.py @@ -87,6 +87,7 @@ class LivechatController(http.Controller): # limit the creation : only ONE rating per session values = { 'rating': rate, + 'consumed': True } if not channel.rating_ids: values.update({ diff --git a/addons/im_livechat/report/im_livechat_report_channel_views.xml b/addons/im_livechat/report/im_livechat_report_channel_views.xml index 9df7cd8ec77..73c31f00299 100644 --- a/addons/im_livechat/report/im_livechat_report_channel_views.xml +++ b/addons/im_livechat/report/im_livechat_report_channel_views.xml @@ -59,13 +59,6 @@ </record> <menuitem - id="menu_reporting_livechat" - name="Report" - parent="menu_livechat_root" - sequence="50" - groups="im_livechat_group_manager"/> - - <menuitem id="menu_reporting_livechat_channel" name="Session Statistics" parent="menu_reporting_livechat" diff --git a/addons/im_livechat/report/im_livechat_report_operator.py b/addons/im_livechat/report/im_livechat_report_operator.py index 7a15c90ef11..b29e367559d 100644 --- a/addons/im_livechat/report/im_livechat_report_operator.py +++ b/addons/im_livechat/report/im_livechat_report_operator.py @@ -12,7 +12,7 @@ class ImLivechatReportOperator(models.Model): partner_id = fields.Many2one('res.partner', 'Operator', readonly=True) livechat_channel_id = fields.Many2one('im_livechat.channel', 'Channel', readonly=True) - nbr_channel = fields.Integer('# of channel', readonly=True, group_operator="sum", help="Number of conversation") + nbr_channel = fields.Integer('# of Sessions', readonly=True, group_operator="sum", help="Number of conversation") channel_id = fields.Many2one('mail.channel', 'Conversation', readonly=True) start_date = fields.Datetime('Start Date of session', readonly=True, help="Start date of the conversation") time_to_answer = fields.Float('Time to answer', digits=(16, 2), readonly=True, group_operator="avg", help="Average time to give the first answer to the visitor") diff --git a/addons/im_livechat/views/im_livechat_channel_views.xml b/addons/im_livechat/views/im_livechat_channel_views.xml index e2c0a2928cf..df19f06e5c1 100644 --- a/addons/im_livechat/views/im_livechat_channel_views.xml +++ b/addons/im_livechat/views/im_livechat_channel_views.xml @@ -221,17 +221,31 @@ sequence="5"/> <menuitem - id="session_history" - name="History" + id="menu_reporting_livechat" + name="Report" parent="menu_livechat_root" + sequence="50" + groups="im_livechat_group_manager"/> + + + <menuitem + id="session_history" + name="Sessions History" + parent="menu_reporting_livechat" action="mail_channel_action" groups="im_livechat_group_user" - sequence="10"/> + sequence="1"/> + + <menuitem + id="livechat_config" + name="Configuration" + parent="menu_livechat_root" + sequence="55"/> <menuitem id="canned_responses" name="Canned Responses" - parent="menu_livechat_root" + parent="livechat_config" action="im_livechat_canned_response_action" groups="im_livechat_group_user" sequence="15"/> diff --git a/addons/im_livechat/views/mail_channel_views.xml b/addons/im_livechat/views/mail_channel_views.xml index edc085c80c8..fc86605a641 100644 --- a/addons/im_livechat/views/mail_channel_views.xml +++ b/addons/im_livechat/views/mail_channel_views.xml @@ -27,6 +27,7 @@ <tree string="History" create="false"> <field name="create_date" string="Session Date"/> <field name="name" string="Attendees"/> + <field name="rating_count" string="Has a Rating"/> </tree> </field> </record> @@ -108,7 +109,7 @@ <record id="mail_channel_action_from_livechat_channel" model="ir.actions.act_window"> <field name="name">Sessions</field> <field name="res_model">mail.channel</field> - <field name="view_mode">list,form</field> + <field name="view_mode">tree,form</field> <field name="domain">[('livechat_channel_id', 'in', [active_id])]</field> <field name="context">{ 'search_default_livechat_channel_id': [active_id], @@ -116,6 +117,20 @@ }</field> <field name="search_view_id" ref="mail_channel_view_search"/> </record> + <record id="mail_channel_action_livechat_tree" model="ir.actions.act_window.view"> + <field name="sequence">1</field> + <field name="view_mode">tree</field> + <field name="view_id" ref="im_livechat.mail_channel_view_tree"/> + <field name="act_window_id" ref="im_livechat.mail_channel_action_from_livechat_channel"/> + </record> + + <record id="mail_channel_action_livechat_form" model="ir.actions.act_window.view"> + <field name="sequence">2</field> + <field name="view_mode">form</field> + <field name="view_id" ref="im_livechat.mail_channel_view_form"/> + <field name="act_window_id" ref="im_livechat.mail_channel_action_from_livechat_channel"/> + </record> + </data> </openerp> |
