diff options
| author | Olivier Dony <odo@openerp.com> | 2011-10-13 19:03:27 +0200 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2011-10-13 19:03:27 +0200 |
| commit | 3bffe65b2ca8bc50ece644e7947ad2bbd5c9341a (patch) | |
| tree | b307874680dbdce7b2f5109b7b696ea38e679e20 /addons/idea | |
| parent | a93ca01b5b1365f92e191e3c429ef655e751b455 (diff) | |
| parent | 8a7c61cb96a541a9aaca51ffe3ee903407b26360 (diff) | |
[MERGE] sync with latest trunk
bzr revid: odo@openerp.com-20111013170327-9rvfdkbgj01hdgxb
Diffstat (limited to 'addons/idea')
| -rw-r--r-- | addons/idea/__openerp__.py | 4 | ||||
| -rw-r--r-- | addons/idea/i18n/et.po | 58 | ||||
| -rw-r--r-- | addons/idea/idea_view.xml | 1 | ||||
| -rw-r--r-- | addons/idea/wizard/idea_post_vote.py | 21 |
4 files changed, 44 insertions, 40 deletions
diff --git a/addons/idea/__openerp__.py b/addons/idea/__openerp__.py index 2a561a93b81..e6dab775d6e 100644 --- a/addons/idea/__openerp__.py +++ b/addons/idea/__openerp__.py @@ -21,9 +21,9 @@ { - 'name': 'Idea Manager', + 'name': 'Ideas Box', 'version': '0.1', - 'category': 'Tools', + 'category': 'Hidden', 'complexity': "easy", 'description': """ This module allows your user to easily and efficiently participate in enterprise innovation. diff --git a/addons/idea/i18n/et.po b/addons/idea/i18n/et.po index c2da6a20f39..0ea8fbc0661 100644 --- a/addons/idea/i18n/et.po +++ b/addons/idea/i18n/et.po @@ -7,14 +7,14 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev_rc3\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2011-01-11 11:15+0000\n" -"PO-Revision-Date: 2010-08-03 06:33+0000\n" -"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n" +"PO-Revision-Date: 2011-10-11 17:58+0000\n" +"Last-Translator: Aare Vesi <Unknown>\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-09-05 05:22+0000\n" -"X-Generator: Launchpad (build 13830)\n" +"X-Launchpad-Export-Date: 2011-10-12 04:40+0000\n" +"X-Generator: Launchpad (build 14124)\n" #. module: idea #: help:idea.category,visibility:0 @@ -80,7 +80,7 @@ msgstr "Idee haldur" #. module: idea #: selection:report.vote,month:0 msgid "March" -msgstr "" +msgstr "Märts" #. module: idea #: code:addons/idea/wizard/idea_post_vote.py:92 @@ -92,12 +92,12 @@ msgstr "" #: view:report.vote:0 #: field:report.vote,day:0 msgid "Day" -msgstr "" +msgstr "Päev" #. module: idea #: view:idea.idea:0 msgid "Refuse" -msgstr "" +msgstr "Keeldu" #. module: idea #: field:idea.idea,count_votes:0 @@ -120,7 +120,7 @@ msgstr "Halb" #. module: idea #: selection:report.vote,idea_state:0 msgid "Cancelled" -msgstr "" +msgstr "Tühistatud" #. module: idea #: view:idea.category:0 @@ -133,7 +133,7 @@ msgstr "Ideede kategooriad" #: code:addons/idea/wizard/idea_post_vote.py:92 #, python-format msgid "Warning !" -msgstr "" +msgstr "Hoiatus!" #. module: idea #: view:idea.idea:0 @@ -172,7 +172,7 @@ msgstr "" #: view:report.vote:0 #: field:report.vote,nbr:0 msgid "# of Lines" -msgstr "" +msgstr "Ridade arv" #. module: idea #: code:addons/idea/wizard/idea_post_vote.py:89 @@ -193,7 +193,7 @@ msgstr "Idee sisu" #. module: idea #: model:ir.model,name:idea.model_idea_category msgid "Idea Category" -msgstr "" +msgstr "Idee kategooria" #. module: idea #: view:idea.idea:0 @@ -232,7 +232,7 @@ msgstr "Alamkategooriad" #. module: idea #: view:idea.select:0 msgid "Next" -msgstr "" +msgstr "Järgmine" #. module: idea #: view:idea.idea:0 @@ -240,7 +240,7 @@ msgstr "" #: view:report.vote:0 #: field:report.vote,idea_state:0 msgid "State" -msgstr "" +msgstr "Maakond/provints" #. module: idea #: selection:idea.idea,my_vote:0 @@ -277,7 +277,7 @@ msgstr "" #. module: idea #: selection:report.vote,month:0 msgid "July" -msgstr "" +msgstr "Juuli" #. module: idea #: view:idea.idea:0 @@ -337,18 +337,18 @@ msgstr "Kommentaar" #. module: idea #: selection:report.vote,month:0 msgid "September" -msgstr "" +msgstr "September" #. module: idea #: selection:report.vote,month:0 msgid "December" -msgstr "" +msgstr "Detsember" #. module: idea #: view:report.vote:0 #: field:report.vote,month:0 msgid "Month" -msgstr "" +msgstr "Kuu" #. module: idea #: model:ir.actions.act_window,name:idea.action_idea_idea_categ_open @@ -415,7 +415,7 @@ msgstr "Mustand" #. module: idea #: selection:report.vote,month:0 msgid "August" -msgstr "" +msgstr "August" #. module: idea #: selection:idea.idea,my_vote:0 @@ -428,13 +428,13 @@ msgstr "Tavaline" #. module: idea #: selection:report.vote,month:0 msgid "June" -msgstr "" +msgstr "Juuni" #. module: idea #: field:report.vote,creater_id:0 #: field:report.vote,user_id:0 msgid "User Name" -msgstr "" +msgstr "Kasutajanimi" #. module: idea #: model:ir.model,name:idea.model_idea_vote_stat @@ -452,7 +452,7 @@ msgstr "Kasutaja" #. module: idea #: field:idea.vote,date:0 msgid "Date" -msgstr "" +msgstr "Kuupäev" #. module: idea #: view:idea.post.vote:0 @@ -467,7 +467,7 @@ msgstr "Minu hääl" #. module: idea #: selection:report.vote,month:0 msgid "October" -msgstr "" +msgstr "Oktoober" #. module: idea #: field:idea.comment,create_date:0 @@ -478,7 +478,7 @@ msgstr "Loomiskuupäev" #. module: idea #: selection:report.vote,month:0 msgid "January" -msgstr "" +msgstr "Jaanuar" #. module: idea #: model:ir.model,name:idea.model_idea_idea @@ -498,12 +498,12 @@ msgstr "Idee kokkuvõte" #. module: idea #: selection:report.vote,month:0 msgid "November" -msgstr "" +msgstr "November" #. module: idea #: view:idea.idea:0 msgid "History" -msgstr "" +msgstr "Ajalugu" #. module: idea #: view:idea.idea:0 @@ -594,7 +594,7 @@ msgstr "Kirjeldus" #. module: idea #: selection:report.vote,month:0 msgid "May" -msgstr "" +msgstr "Mai" #. module: idea #: selection:idea.idea,state:0 @@ -616,7 +616,7 @@ msgstr "" #. module: idea #: selection:report.vote,month:0 msgid "February" -msgstr "" +msgstr "Veebruar" #. module: idea #: view:report.vote:0 @@ -631,7 +631,7 @@ msgstr "Häälte arv" #. module: idea #: selection:report.vote,month:0 msgid "April" -msgstr "" +msgstr "Aprill" #. module: idea #: field:idea.idea,count_comments:0 @@ -674,7 +674,7 @@ msgstr "" #: view:report.vote:0 #: field:report.vote,year:0 msgid "Year" -msgstr "" +msgstr "Aasta" #. module: idea #: view:idea.select:0 diff --git a/addons/idea/idea_view.xml b/addons/idea/idea_view.xml index 4ac27fee51f..bf94ecb2350 100644 --- a/addons/idea/idea_view.xml +++ b/addons/idea/idea_view.xml @@ -198,6 +198,7 @@ <field name="category_id" select="1"/> <field name="open_date" select="1"/> <field name="user_id" attrs="{'invisible':[('visibility','=',False)]}"/> + <field name="visibility" invisible="1"/> <field name="vote_avg" widget="progressbar"/> <group col="4" colspan="2"> <field name="my_vote" readonly="1"/> diff --git a/addons/idea/wizard/idea_post_vote.py b/addons/idea/wizard/idea_post_vote.py index b54c007549d..420955b992b 100644 --- a/addons/idea/wizard/idea_post_vote.py +++ b/addons/idea/wizard/idea_post_vote.py @@ -73,12 +73,14 @@ class idea_post_vote(osv.osv_memory): """ idea_obj = self.pool.get('idea.idea') vote_obj = self.pool.get('idea.vote') + + ctx_key = 'idea_ids' if context.get('idea_ids') is not None else 'active_ids' - for idea in idea_obj.browse(cr, uid, context.get('active_ids', []), context=context): + for idea in idea_obj.browse(cr, uid, context.get(ctx_key, []), context=context): - for active_id in context.get('active_ids'): + for idea_id in context.get(ctx_key): - vote_ids = vote_obj.search(cr, uid, [('user_id', '=', uid), ('idea_id', '=', active_id)]) + vote_ids = vote_obj.search(cr, uid, [('user_id', '=', uid), ('idea_id', '=', idea_id)]) vote_obj_id = vote_obj.browse(cr, uid, vote_ids) count = 0 for vote in vote_obj_id: @@ -101,9 +103,10 @@ class idea_post_vote(osv.osv_memory): @param ids: List of Idea Post vote’s IDs. @return: Dictionary {} """ + + ctx_key = 'idea_ids' if context.get('idea_ids') is not None else 'active_ids' - vote_ids = context and context.get('active_ids', []) or [] - vote_id = context['active_ids'][0] + idea_id = context[ctx_key][0] vote_pool = self.pool.get('idea.vote') idea_pool = self.pool.get('idea.idea') comment_pool = self.pool.get('idea.comment') @@ -112,19 +115,19 @@ class idea_post_vote(osv.osv_memory): score = str(do_vote_obj['vote']) comment = do_vote_obj.get('note', False) vote = { - 'idea_id': vote_id, + 'idea_id': idea_id, 'user_id': uid, 'score': score } if comment: comment = { 'user_id':uid, - 'idea_id':vote_id, + 'idea_id':idea_id, 'content': comment, } comment = comment_pool.create(cr, uid, comment) - idea_pool._vote_save(cr, uid, vote_id, None, score, context) + idea_pool._vote_save(cr, uid, idea_id, None, score, context) #vote = vote_pool.create(cr, uid, vote) return {'type': 'ir.actions.act_window_close'} @@ -166,7 +169,7 @@ class idea_select(osv.osv_memory): 'views': [(id2, 'form'), (False, 'tree'), (False, 'calendar'), (False, 'graph')], 'type': 'ir.actions.act_window', 'target': 'new', - 'context': {'active_ids': [idea_id]} + 'context': {'idea_ids': [idea_id]} } return value |
