[CLEAN] [IMP] Idea:
- created models/views/tests/data/demo directories, moved existing files into them - reorganized menus (less depth) - removed inherit and dependance from mail.thread (basic idea = without mail.thread -> will be added further) - removed custom tools user group - added basic files for test, currently void bzr revid: tde@openerp.com-20130617112734-4vhj6sjbvip0ufuv
This commit is contained in:
parent
bfeba02b33
commit
145befd3e7
|
@ -19,5 +19,4 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
import idea
|
||||
|
||||
import models
|
||||
|
|
|
@ -22,29 +22,36 @@
|
|||
|
||||
{
|
||||
'name': 'Ideas',
|
||||
'version': '0.1',
|
||||
'summary': 'Share and Vote for your Ideas',
|
||||
'version': '1.0',
|
||||
'category': 'Tools',
|
||||
'description': """
|
||||
This module allows user to easily and efficiently participate in enterprise innovation.
|
||||
=======================================================================================
|
||||
Share your ideas and participate in enterprise innovation
|
||||
=========================================================
|
||||
|
||||
It allows everybody to express ideas about different subjects.
|
||||
Then, other users can comment on these ideas and vote for particular ideas.
|
||||
Each idea has a score based on the different votes.
|
||||
The managers can obtain an easy view of best ideas from all the users.
|
||||
The Ideas module give users a way to express and discuss ideas, allowing everybody
|
||||
to participate in enterprise innovation. Every user can suggest, comment ideas.
|
||||
A vote mechanism is included. Each idea has a score based on the different
|
||||
votes. The managers can obtain an easy view of best ideas from all the users.
|
||||
Once installed, check the menu 'Ideas' in the 'Tools' main menu.""",
|
||||
'author': 'OpenERP SA',
|
||||
'website': 'http://openerp.com',
|
||||
'depends': ['mail'],
|
||||
'website': 'http://www.openerp.com',
|
||||
'depends': ['base', 'base_setup'],
|
||||
'data': [
|
||||
'security/idea_security.xml',
|
||||
'security/idea.xml',
|
||||
'security/ir.model.access.csv',
|
||||
'idea_view.xml',
|
||||
'idea_workflow.xml',
|
||||
'views/idea.xml',
|
||||
'data/idea_workflow.xml',
|
||||
],
|
||||
'demo': [
|
||||
'demo/idea.xml'
|
||||
],
|
||||
'demo': ['idea_data.xml'],
|
||||
'test': [],
|
||||
'installable': True,
|
||||
'application': True,
|
||||
'images': [],
|
||||
'css': [],
|
||||
'js': [],
|
||||
'qweb': [],
|
||||
}
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -12,10 +12,6 @@
|
|||
<field name="name">Technical</field>
|
||||
</record>
|
||||
|
||||
<record id="base.user_demo" model="res.users">
|
||||
<field name="groups_id" eval="[(4,ref('base.group_tool_user'))]"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Business Applications
|
||||
# Copyright (c) 2013-TODAY OpenERP S.A. <http://openerp.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import idea
|
|
@ -32,19 +32,25 @@ class idea_category(osv.osv):
|
|||
""" Category of Idea """
|
||||
_name = "idea.category"
|
||||
_description = "Idea Category"
|
||||
_order = 'name asc'
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Category Name', size=64, required=True),
|
||||
}
|
||||
|
||||
_sql_constraints = [
|
||||
('name', 'unique(name)', 'The name of the category must be unique')
|
||||
]
|
||||
_order = 'name asc'
|
||||
|
||||
|
||||
class idea_idea(osv.osv):
|
||||
""" Model of an Idea """
|
||||
_name = 'idea.idea'
|
||||
_inherit = ['mail.thread']
|
||||
_description = 'Propose and Share your Ideas'
|
||||
_rec_name = 'name'
|
||||
_order = 'name asc'
|
||||
# _inherit = ['mail.thread']
|
||||
|
||||
_columns = {
|
||||
'create_uid': fields.many2one('res.users', 'Creator', required=True, readonly=True),
|
||||
'name': fields.char('Idea Summary', size=64, required=True, readonly=True,
|
||||
|
@ -67,7 +73,6 @@ class idea_idea(osv.osv):
|
|||
_defaults = {
|
||||
'state': lambda *a: 'draft',
|
||||
}
|
||||
_order = 'name asc'
|
||||
|
||||
def idea_cancel(self, cr, uid, ids, context=None):
|
||||
return self.write(cr, uid, ids, {'state': 'cancel'}, context=context)
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record model="res.groups" id="base.group_tool_user">
|
||||
<field name="name">User</field>
|
||||
<field name="category_id" ref="base.module_category_tools"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_idea_category_user,idea.category user,model_idea_category,base.group_tool_user,1,1,1,1
|
||||
access_idea_idea_user,idea.idea user,model_idea_idea,base.group_tool_user,1,1,1,1
|
||||
access_idea_category_user,idea.category.user,model_idea_category,base.group_user,1,1,1,1
|
||||
access_idea_idea_user,idea.idea.user,model_idea_idea,base.group_user,1,1,1,1
|
||||
|
|
|
Binary file not shown.
After Width: | Height: | Size: 139 KiB |
|
@ -0,0 +1,28 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Business Applications
|
||||
# Copyright (c) 2013-TODAY OpenERP S.A. <http://openerp.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp.addons.idea.tests import test_idea
|
||||
|
||||
checks = [
|
||||
test_idea,
|
||||
]
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -0,0 +1,39 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Business Applications
|
||||
# Copyright (c) 2013-TODAY OpenERP S.A. <http://openerp.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp.tests import common
|
||||
|
||||
|
||||
class TestIdeaBase(common.TransactionCase):
|
||||
|
||||
def setUp(self):
|
||||
super(TestIdeaBase, self).setUp()
|
||||
cr, uid = self.cr, self.uid
|
||||
|
||||
# Usefull models
|
||||
self.idea_category = self.registry('idea.category')
|
||||
self.idea_idea = self.registry('idea.idea')
|
||||
|
||||
def tearDown(self):
|
||||
super(TestIdeaBase, self).tearDown()
|
||||
|
||||
def test_OO(self):
|
||||
pass
|
|
@ -1,9 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<!-- Top menu item -->
|
||||
<menuitem name="Tools" id="base.menu_tools" sequence="120" groups="base.group_tool_user"/>
|
||||
|
||||
<!-- Idea Categories Search View-->
|
||||
<record model="ir.ui.view" id="view_idea_category_search">
|
||||
<field name="name">idea.category.search</field>
|
||||
|
@ -49,16 +46,6 @@
|
|||
<field name="search_view_id" ref="view_idea_category_search"/>
|
||||
</record>
|
||||
|
||||
<menuitem name="Configuration" parent="base.menu_tools"
|
||||
id="base.menu_lunch_survey_root" sequence="20"/>
|
||||
|
||||
<menuitem name="Ideas" parent="base.menu_lunch_survey_root"
|
||||
id="menu_ideas" sequence="3"/>
|
||||
|
||||
<menuitem name="Categories" parent="menu_ideas"
|
||||
id="menu_idea_category" action="action_idea_category"/>
|
||||
|
||||
|
||||
<!-- New Idea Form View -->
|
||||
<record model="ir.ui.view" id="view_idea_idea_form">
|
||||
<field name="name">idea.idea.form</field>
|
||||
|
@ -79,10 +66,6 @@
|
|||
<label for="description"/><newline/>
|
||||
<field name="description"/>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -128,8 +111,21 @@
|
|||
<field name="search_view_id" ref="view_idea_idea_search"/>
|
||||
</record>
|
||||
|
||||
<!-- MENUS
|
||||
-->
|
||||
|
||||
<!-- Top menu item -->
|
||||
<menuitem name="Tools"
|
||||
id="base.menu_tools" sequence="120"/>
|
||||
|
||||
<!-- Main menu -->
|
||||
<menuitem name="Ideas" parent="base.menu_tools"
|
||||
id="menu_ideas" sequence="10"/>
|
||||
|
||||
<menuitem name="Ideas" parent="menu_ideas"
|
||||
id="menu_idea_idea" action="action_idea_idea" sequence="1"/>
|
||||
id="menu_idea_idea" action="action_idea_idea" sequence="10"/>
|
||||
<menuitem name="Categories" parent="menu_ideas"
|
||||
id="menu_idea_category" action="action_idea_category" sequence="20"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
Loading…
Reference in New Issue