Browse Source

upload mail_wall_menu

pull/1/head
Ivan Yelizariev 10 years ago
commit
d0dba4cd6a
  1. 1
      __init__.py
  2. 17
      __openerp__.py
  3. 32
      mail_wall_menu_views.xml
  4. 1
      models.py
  5. 21
      static/src/css/mail_wall_menu.css
  6. 14
      static/src/js/mail_wall_menu.js

1
__init__.py

@ -0,0 +1 @@
import models

17
__openerp__.py

@ -0,0 +1,17 @@
{
'name' : 'Menu for widgets at Messaging section',
'version' : '1.0.0',
'author' : 'Ivan Yelizariev',
'category' : 'Sale',
'website' : 'https://it-projects.info',
'description': """
Module creates special menu at Messaging section to show only gamification-like blocks there.
Tested on Odoo 8.0 ab7b5d7732a7c222a0aea45bd173742acd47242d
""",
'depends' : ['mail'],
'data':[
'mail_wall_menu_views.xml',
],
'installable': True
}

32
mail_wall_menu_views.xml

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="assets_backend" name="assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link rel="stylesheet" href="/mail_wall_menu/static/src/css/mail_wall_menu.css"/>
<script type="text/javascript" src="/mail_wall_menu/static/src/js/mail_wall_menu.js"></script>
</xpath>
</template>
<record id="action_dashboard" model="ir.actions.client">
<field name="name">Dashboard</field>
<field name="tag">mail.wall</field>
<field name="context">{
'default_model': 'res.users',
'default_res_id': uid,
'thread_model': 'res.partner',
'needaction_menu_ref': ['mail.mail_tomefeeds', 'mail.mail_starfeeds']
}</field>
<field name="params" eval="&quot;{
'disable_thread': True
}&quot;"/>
</record>
<menuitem id="mail_wall_menu.menu_folder" name="Dashboard" parent="mail.mail_feeds_main" groups="base.group_user" sequence="5"/>
<menuitem id="mail_wall_menu.menu_dashboard" name="Dashboard" parent="mail_wall_menu.menu_folder" groups="base.group_user" sequence="10" action="action_dashboard"/>
</data>
</openerp>

1
models.py

@ -0,0 +1 @@
from openerp import api,models,fields

21
static/src/css/mail_wall_menu.css

@ -0,0 +1,21 @@
.openerp .oe_mail_wall .dashboard_only .oe_mail{
display:none;
}
.openerp .oe_mail_wall .dashboard_only .oe_mail_wall_aside{
margin:0;
padding: 16px;
display: block;
position: static;
width:100%;
}
.openerp .oe_mail_wall .dashboard_only .oe_mail_wall_aside .oe_gamification_challenge_list {
background-color:inherit;
}
.openerp .oe_mail_wall .dashboard_only .oe_goal{
background-color: #ededf6;
width:280px;
float:left;
margin:5px;
}

14
static/src/js/mail_wall_menu.js

@ -0,0 +1,14 @@
openerp.mail_wall_menu = function(instance){
var QWeb = instance.web.qweb;
var _t = instance.web._t;
instance.mail.Widget.include({
start: function(){
if (this.action.params.disable_thread){
$('.oe_view_manager_body').addClass('dashboard_only');
return;
}
this._super.apply(this, arguments)
}
})
}
Loading…
Cancel
Save