diff --git a/addons/audittrail/audittrail_view.xml b/addons/audittrail/audittrail_view.xml
index b0efa7c29f2..c8999e78774 100644
--- a/addons/audittrail/audittrail_view.xml
+++ b/addons/audittrail/audittrail_view.xml
@@ -44,6 +44,8 @@
+
diff --git a/addons/board/board.py b/addons/board/board.py
index 230954d942b..ff62a80b5a6 100644
--- a/addons/board/board.py
+++ b/addons/board/board.py
@@ -143,7 +143,8 @@ class board_board(osv.osv):
_columns = {
'name': fields.char('Dashboard', size=64, required=True),
'view_id': fields.many2one('ir.ui.view', 'Board View'),
- 'line_ids': fields.one2many('board.board.line', 'board_id', 'Action Views')
+ 'line_ids': fields.one2many('board.board.line', 'board_id', 'Action Views'),
+ 'menu_id':fields.many2one('ir.ui.menu', 'Menu', required=False),
}
# the following lines added to let the button on dashboard work.
diff --git a/addons/board/board_view.xml b/addons/board/board_view.xml
index 18e87f12c50..8c957c37f11 100644
--- a/addons/board/board_view.xml
+++ b/addons/board/board_view.xml
@@ -66,11 +66,14 @@
diff --git a/addons/idea/idea.py b/addons/idea/idea.py
index 37bdaa80b7f..5a44f678f4e 100644
--- a/addons/idea/idea.py
+++ b/addons/idea/idea.py
@@ -20,6 +20,7 @@
##############################################################################
from osv import osv, fields
+import time
VoteValues = [('-1', 'Not Voted'), ('0', 'Very Bad'), ('25', 'Bad'), \
('50', 'Normal'), ('75', 'Good'), ('100', 'Very Good') ]
@@ -90,26 +91,6 @@ class idea_idea(osv.osv):
cr.execute(sql, (ids,))
return dict(cr.fetchall())
- def _comment_count(self, cr, uid, ids, name, arg, context=None):
-
- """ count number of comment
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of comment’s IDs
- @return: dictionay of Idea """
-
- if not ids:
- return {}
-
- sql = """SELECT i.id, COUNT(1)
- FROM idea_idea i LEFT OUTER JOIN idea_comment c ON i.id = c.idea_id
- WHERE i.id = ANY(%s)
- GROUP BY i.id
- """
-
- cr.execute(sql, (ids,))
- return dict(cr.fetchall())
-
def _vote_read(self, cr, uid, ids, name, arg, context = None):
""" Read Vote
@@ -149,18 +130,15 @@ class idea_idea(osv.osv):
vote_obj.create(cr, uid, {'idea_id': id, 'user_id': uid, 'score': textual_value })
_columns = {
- 'user_id': fields.many2one('res.users', 'Creator', required=True, readonly=True),
+ 'user_id': fields.many2one('res.users', 'Responsible', required=True, readonly=True),
'title': fields.char('Idea Summary', size=64, required=True),
'description': fields.text('Description', required=True, help='Content of the idea'),
- 'comment_ids': fields.one2many('idea.comment', 'idea_id', 'Comments'),
- 'create_date': fields.datetime('Creation date', readonly=True),
- 'vote_ids': fields.one2many('idea.vote', 'idea_id', 'Vote'),
+ 'created_date': fields.datetime('Date'),
+ 'vote_ids': fields.one2many('idea.vote', 'idea_id', 'Vote', readonly=True),
'my_vote': fields.function(_vote_read, fnct_inv = _vote_save, \
string="My Vote", method=True, type="selection", selection=VoteValues),
'vote_avg': fields.function(_vote_avg_compute, method=True, string="Average Score", type="float"),
'count_votes': fields.function(_vote_count, method=True, string="Count of votes", type="integer"),
- 'count_comments': fields.function(_comment_count, method=True, \
- string="Count of comments", type="integer"),
'category_id': fields.many2one('idea.category', 'Category', required=True),
'state': fields.selection([('draft', 'Draft'), ('open', 'Opened'), \
('close', 'Accepted'), ('cancel', 'Cancelled')], \
@@ -169,8 +147,7 @@ class idea_idea(osv.osv):
opened by the user, the state is \'Opened\'.\
\nIf the idea is accepted, the state is \'Accepted\'.'),
'stat_vote_ids': fields.one2many('idea.vote.stat', 'idea_id', 'Statistics', readonly=True),
- 'date': fields.date('Creation date'),
- 'vote_user': fields.integer('Maximum Vote per User',
+ 'vote_limit': fields.integer('Maximum Vote per User',
help="Set to one if you require only one Vote per user"),
}
@@ -178,7 +155,8 @@ class idea_idea(osv.osv):
'user_id': lambda self,cr,uid,context: uid,
'my_vote': lambda *a: '-1',
'state': lambda *a: 'draft',
- 'vote_user': lambda * a: 1,
+ 'vote_limit': lambda * a: 1,
+ 'created_date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
}
_order = 'id desc'
@@ -199,29 +177,6 @@ class idea_idea(osv.osv):
return True
idea_idea()
-class idea_comment(osv.osv):
- """ Apply Idea for Comment """
-
- _name = 'idea.comment'
- _description = 'Comments'
- _rec_name = 'content'
-
- _columns = {
- 'idea_id': fields.many2one('idea.idea', 'Idea', required=True, ondelete='cascade'),
- 'user_id': fields.many2one('res.users', 'User', required=True),
- 'content': fields.text('Comment', required=True),
- 'create_date': fields.datetime('Creation date', readonly=True),
- }
-
- _defaults = {
- 'user_id': lambda self, cr, uid, context: uid
- }
-
- _order = 'id desc'
-
-idea_comment()
-
-
class idea_vote(osv.osv):
""" Apply Idea for Vote """
@@ -230,12 +185,15 @@ class idea_vote(osv.osv):
_rec_name = 'score'
_columns = {
- 'user_id': fields.many2one('res.users', 'User'),
- 'idea_id': fields.many2one('idea.idea', 'Idea', required=True, ondelete='cascade'),
- 'score': fields.selection(VoteValues, 'Score', required=True),
+ 'user_id': fields.many2one('res.users', 'By user', readonly="True"),
+ 'idea_id': fields.many2one('idea.idea', 'Idea', readonly="True", ondelete='cascade'),
+ 'score': fields.selection(VoteValues, 'Vote Status', readonly="True"),
+ 'date': fields.datetime('Date', readonly="True"),
+ 'comment': fields.text('Comment', readonly="True"),
}
_defaults = {
'score': lambda *a: DefaultVoteValue,
+ 'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
}
idea_vote()
diff --git a/addons/idea/idea_view.xml b/addons/idea/idea_view.xml
index d89296d317a..4b6fd7b9553 100644
--- a/addons/idea/idea_view.xml
+++ b/addons/idea/idea_view.xml
@@ -47,10 +47,10 @@
id="base.menu_lunch_survey_root" sequence="6"/>
-
+
-
+
@@ -61,13 +61,18 @@
-
+
+
+
-
+
+
Open Ideas
@@ -108,9 +113,9 @@
tree
-
-
-
+
+
+
@@ -123,9 +128,14 @@
form
@@ -144,6 +154,7 @@
+
@@ -159,37 +170,25 @@
form
@@ -213,12 +221,11 @@
tree
-
-
-
-
+
+
+
+
-
@@ -251,30 +258,13 @@
-
+
-
-
-
-
-
-
Ideas
idea.idea
diff --git a/addons/idea/security/ir.model.access.csv b/addons/idea/security/ir.model.access.csv
index 0c720f2ee2d..e89bbf059f5 100644
--- a/addons/idea/security/ir.model.access.csv
+++ b/addons/idea/security/ir.model.access.csv
@@ -1,7 +1,6 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_idea_category","idea.category","model_idea_category","base.group_user",1,0,0,0
"access_idea_idea","idea.idea","model_idea_idea","base.group_user",1,1,1,1
-"access_idea_comment","idea.comment","model_idea_comment","base.group_user",1,1,1,1
"access_idea_vote","idea.vote","model_idea_vote","base.group_user",1,1,1,1
"access_idea_vote_stat","idea.vote.stat","model_idea_vote_stat","base.group_user",1,0,0,0
"access_idea_category_system","idea.category system","model_idea_category","base.group_system",1,1,1,1
diff --git a/addons/idea/test/test_idea.yml b/addons/idea/test/test_idea.yml
index c1ee6deb80f..ae09dd8ef0d 100644
--- a/addons/idea/test/test_idea.yml
+++ b/addons/idea/test/test_idea.yml
@@ -8,10 +8,10 @@
name: Technical
- |
I create a New Idea of "Technical presentation for 1 hours in every day" and specify category "Technical".
-
-
!record {model: idea.idea, id: idea_idea_0}:
category_id: idea_category_technical0
+ created_date: '05/13/2010 19:16:26'
description: I want that Technical presentation are arranged for 1 hours in every
day.\nso, on that presentation, we can know all things what improvement and development
are done in our company.\n\n\n\n\n
@@ -50,31 +50,34 @@
- |
In order to post vote I connect as user1 and open the idea page
- I click on "Vote" wizard and vote the idea as "Normal"
+ I click on "Give Vote" wizard button and vote the idea as "Normal"
-
!record {model: idea.post.vote, id: idea_post_vote_0}:
vote: 50
+
- |
- Now I click on "Post Vote" button of wizard.
+ Now I click on "Post" button of this wizard.
-
!python {model: idea.post.vote}: |
uid = ref('res_users_user0')
- self.do_vote(cr, uid, [ref("idea_post_vote_0")], {'active_id': ref('idea_idea_0')})
+ self.do_vote(cr, uid, [ref("idea_post_vote_0")], {'active_ids': [ref('idea_idea_0')]})
- |
To add other vote I connect as user2 and open the idea page
- I click on "Vote" wizard and vote the idea as "Very Good"
+ I click on "Give Vote" wizard and vote the idea as "Very Good" and put comment "We can learn many things from technical presentation".
-
!record {model: idea.post.vote, id: idea_post_vote_1}:
vote: 100
+ content: We can learn many things from technical presentation
+
- |
- I click on "Post Vote" button of this wizard.
+ I click on "Post" button of this wizard.
-
!python {model: idea.post.vote}: |
uid = ref('res_users_user1')
- self.do_vote(cr, uid, [ref("idea_post_vote_1")], {'active_id': ref('idea_idea_0')})
+ self.do_vote(cr, uid, [ref("idea_post_vote_1")], {'active_ids': [ref('idea_idea_0')]})
- |
I can see that the Average score changed in "Average score" field with value 75
@@ -82,14 +85,6 @@
!record {model: idea.idea, id: idea_idea_0}:
vote_avg: 75
-- |
- I put one comment "We can learn many things from technical presentation" for the idea.
--
- !record {model: idea.idea, id: idea.idea_idea_0}:
- comment_ids:
- - content: We can learn many things from technical presentation
- idea_id: idea.idea_idea_0
- user_id: res_users_user1
- |
I connect as Manager and close this idea by click on "Close" button.
-
diff --git a/addons/idea/wizard/idea_post_vote.py b/addons/idea/wizard/idea_post_vote.py
index dac60ddf18b..4f57bb9750e 100644
--- a/addons/idea/wizard/idea_post_vote.py
+++ b/addons/idea/wizard/idea_post_vote.py
@@ -34,7 +34,7 @@ class idea_post_vote(osv.osv_memory):
('25', 'Bad'),
('50', 'Normal'),
('75', 'Good'),
- ('100', 'Very Good') ], 'Post Vote', required=True),
+ ('100', 'Very Good') ], 'Give Vote', required=True),
'content': fields.text('Comment'),
}
@@ -48,25 +48,28 @@ class idea_post_vote(osv.osv_memory):
@param context: A standard dictionary for contextual values
"""
idea_obj = self.pool.get('idea.idea')
-
+ vote_obj = self.pool.get('idea.vote')
+
for idea in idea_obj.browse(cr, uid, context.get('active_ids', [])):
- cr.execute('select count(id) from idea_vote where user_id=%s\
- and idea_id=%s' % (uid, context.get('active_id')))
- res = cr.fetchone()[0]
- user_limit = idea.vote_user
- if res >= user_limit:
+ for active_id in context.get('active_ids'):
+
+ vote_ids = vote_obj.search(cr, uid, [('user_id', '=', uid), ('idea_id', '=', active_id)])
+ vote_obj_id = vote_obj.browse(cr, uid, vote_ids)
+ count = 0
+ for vote in vote_obj_id:
+ count += 1
+
+ user_limit = idea.vote_limit
+ if count >= user_limit:
raise osv.except_osv(_('Warning !'),_("You can not give Vote for this idea more than %s times") % (user_limit))
- if idea.state in ['draft', 'close', 'cancel']:
- raise osv.except_osv(_("Warning !"), _("Draft/Accepted/Cancelled \
-ideas Could not be voted"))
if idea.state != 'open':
- raise osv.except_osv(_('Warning !'), _('idea should be in \
+ raise osv.except_osv(_('Warning !'), _('Idea should be in \
\'Open\' state before vote for that idea.'))
return False
- def do_vote(self, cr, uid, ids, context):
+ def do_vote(self, cr, uid, ids, context=None):
"""
Create idea vote.
@@ -75,21 +78,56 @@ ideas Could not be voted"))
@param ids: List of Idea Post vote’s IDs.
@return: Dictionary {}
"""
-
- data = context and context.get('active_id', False) or False
+ data = context and context.get('active_ids', []) or []
vote_obj = self.pool.get('idea.vote')
- comment_obj = self.pool.get('idea.comment')
-
for do_vote_obj in self.read(cr, uid, ids):
score = str(do_vote_obj['vote'])
comment = do_vote_obj['content']
- dic = {'idea_id': data, 'user_id': uid, 'score': score}
- if comment:
- comment_id = comment_obj.create(cr, uid, {'idea_id': data, 'user_id': uid, 'content': comment})
- vote = vote_obj.create(cr, uid, dic)
+ for id in data:
+ dic = {'idea_id': id, 'user_id': uid, 'score': score, 'comment': comment}
+ vote = vote_obj.create(cr, uid, dic)
return {}
-
+
idea_post_vote()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+class idea_select(osv.osv_memory):
+
+ """ Select idea for vote."""
+
+ _name = "idea.select"
+ _description = "select idea"
+ _columns = {
+ 'idea_id': fields.many2one('idea.idea', 'Idea', required=True),
+ }
+
+ def open_vote(self, cr, uid, ids, context=None):
+ """
+ This function load column.
+ @param cr: the current row, from the database cursor,
+ @param uid: the current users ID for security checks,
+ @param ids: List of load column,
+ @return: dictionary of query logs clear message window
+ """
+ idea_obj = self.browse(cr, uid, ids)
+ for idea in idea_obj:
+ idea_id = idea.idea_id.id
+
+ data_obj = self.pool.get('ir.model.data')
+ id2 = data_obj._get_id(cr, uid, 'idea', 'view_idea_post_vote')
+ if id2:
+ id2 = data_obj.browse(cr, uid, id2, context=context).res_id
+ value = {
+ 'view_type': 'form',
+ 'view_mode': 'form',
+ 'res_model': 'idea.post.vote',
+ 'views': [(id2, 'form'), (False, 'tree'), (False, 'calendar'), (False, 'graph')],
+ 'type': 'ir.actions.act_window',
+ 'target': 'new',
+ 'context': {'active_ids': [idea_id]}
+ }
+ return value
+
+idea_select()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/idea/wizard/idea_post_vote_view.xml b/addons/idea/wizard/idea_post_vote_view.xml
index a3e7fa6a1b3..b7e3a0e5e5f 100644
--- a/addons/idea/wizard/idea_post_vote_view.xml
+++ b/addons/idea/wizard/idea_post_vote_view.xml
@@ -9,8 +9,9 @@
idea.post.vote
form
-
+
+
+
+
+
+ idea.select.form
+ idea.select
+ form
+
+
@@ -36,12 +58,16 @@
new
-
-
-
+
+
+ Idea select
+ idea.select
+ form
+ tree,form
+
+ new
+ {'model': 'idea.idea'}
+
diff --git a/addons/sale_journal/report/sale_journal_report_view.xml b/addons/sale_journal/report/sale_journal_report_view.xml
index 438b510b3f3..9d4cdf3e368 100644
--- a/addons/sale_journal/report/sale_journal_report_view.xml
+++ b/addons/sale_journal/report/sale_journal_report_view.xml
@@ -91,7 +91,7 @@
sale.journal.picking.report
tree
-
+
@@ -172,7 +172,7 @@
@@ -192,7 +193,7 @@
stock.picking
-
+
@@ -252,7 +253,7 @@
stock.picking
-
+
@@ -280,7 +281,7 @@
stock.picking
-
+
@@ -417,7 +418,7 @@
sale_journal.picking.journal
search
-
+
@@ -434,7 +435,7 @@
- Picking journals
+ Picking Journals
sale_journal.picking.journal
form
tree,form
diff --git a/addons/thunderbird/installer.py b/addons/thunderbird/installer.py
index 69576aa2a46..4e0f4435d31 100644
--- a/addons/thunderbird/installer.py
+++ b/addons/thunderbird/installer.py
@@ -39,15 +39,28 @@ class thunderbird_installer(osv.osv_memory):
self.write(cr, uid, ids, data)
return False
+ def process_pdf_file(self, cr, uid, ids, context):
+ """
+ Default Attach Thunderbird Plug-in Installation File.
+ """
+ data = {}
+ pdf_file = open(config['addons_path'] + "/thunderbird/doc/Installation Guide to OpenERP Thunderbid Plug-in.pdf", 'r')
+ data['pdf_file'] = base64.encodestring(pdf_file.read())
+ self.write(cr, uid, ids, data)
+ return False
+
_columns = {
- 'name':fields.char('File name', size=34, required=True, help='Save Thunderbird plugin file.'),
+ 'name':fields.char('File name', size=34),
+ 'pdf_name':fields.char('File name', size=64),
'thunderbird':fields.boolean('Thunderbird Module ', help="Allows you to select an object that you’d like to add to your email and its attachments."),
'plugin_file':fields.binary('Thunderbird Plug-in', readonly=True, help="Thunderbird plug-in file. Save as this file and install this plug-in in thunderbir."),
-
+ 'pdf_file':fields.binary('Thunderbird Plug-in Installation File', help="The documentation file :- how to install Thunderbird Plug-in.", readonly=True),
}
+
_defaults = {
'thunderbird' : True,
'name' : 'tiny_plugin-2.0.xpi',
+ 'pdf_name' : 'Installation Guide to OpenERP Thunderbid Plug-in.pdf',
}
thunderbird_installer()
diff --git a/addons/thunderbird/partner/partner.py b/addons/thunderbird/partner/partner.py
index 3aa190090a4..f7c3f41a776 100644
--- a/addons/thunderbird/partner/partner.py
+++ b/addons/thunderbird/partner/partner.py
@@ -92,9 +92,6 @@ class tinythunderbird_partner(osv.osv):
partner=add_obj.read(cr,user,partner_ids,['partner_id'])
if partner:
dictcreate.update({'partner_id':partner[0]['partner_id'][0]})
-# search_id = self.pool.get('res.request.link').search(cr,user,[('object','=',dictcreate['ref'].split(',')[0])])
-# if not search_id:
-# create_link_id = self.pool.get('res.request.link').create(cr,user,{'name':dictcreate['ref'].split(',')[0],'object':dictcreate['ref'].split(',')[0]})
create_id = self.pool.get(dictcreate.get('object','crm.case')).create(cr, user, dictcreate)
cases=case_pool.browse(cr,user,[create_id])
case_pool._history(cr, user, cases, _('Archive'), history=True, email=False)
@@ -195,4 +192,4 @@ class tinythunderbird_partner(osv.osv):
self.pool.get('ir.attachment').unlink(cr,uid,attachments)
return super(tinythunderbird_partner, self).unlink(cr, uid, ids,context)
-tinythunderbird_partner()
\ No newline at end of file
+tinythunderbird_partner()
diff --git a/addons/thunderbird/plugin/tiny_plugin-2.0.xpi b/addons/thunderbird/plugin/tiny_plugin-2.0.xpi
deleted file mode 100644
index ad92876d570..00000000000
Binary files a/addons/thunderbird/plugin/tiny_plugin-2.0.xpi and /dev/null differ
diff --git a/addons/thunderbird/thunderbird_installer.xml b/addons/thunderbird/thunderbird_installer.xml
index bd19a780456..356282d2de5 100644
--- a/addons/thunderbird/thunderbird_installer.xml
+++ b/addons/thunderbird/thunderbird_installer.xml
@@ -12,23 +12,32 @@
Thunderbird Module Installation
- Configure Thunderbird Module
+ Thunderbird
This module is required for the thuderbird plug-in to work properly.This allows you to select an object that you had like to add to your email and its attachments. You can select a partner, a task, a project, an analytical account, or any other object and attach selected mail as .eml file in attachment of selected record.
-
-
+
+
+ 15
+
+
+
+
-
+
+
+
+
+