From 031a2addd5c5e27232e65360e5eb100135a9005e Mon Sep 17 00:00:00 2001 From: "Harry (Open ERP)" Date: Thu, 21 Jan 2010 19:37:45 +0530 Subject: [PATCH] [IMP] idea : add wizard to give vote from list view of idea bzr revid: hmo@tinyerp.com-20100121140745-b6wfwlpqor5g5n0q --- addons/idea/__init__.py | 1 + addons/idea/__terp__.py | 3 +- addons/idea/idea.py | 1 + addons/idea/idea_view.xml | 8 +++-- addons/idea/idea_wizard.xml | 14 ++++++++ addons/idea/wizard/__init__.py | 22 ++++++++++++ addons/idea/wizard/idea_vote.py | 63 +++++++++++++++++++++++++++++++++ 7 files changed, 109 insertions(+), 3 deletions(-) create mode 100644 addons/idea/idea_wizard.xml create mode 100644 addons/idea/wizard/__init__.py create mode 100644 addons/idea/wizard/idea_vote.py diff --git a/addons/idea/__init__.py b/addons/idea/__init__.py index e9243780570..2aa68d00eff 100644 --- a/addons/idea/__init__.py +++ b/addons/idea/__init__.py @@ -20,5 +20,6 @@ ############################################################################## import idea +import wizard # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/idea/__terp__.py b/addons/idea/__terp__.py index beaccca5a54..c56d89e669a 100644 --- a/addons/idea/__terp__.py +++ b/addons/idea/__terp__.py @@ -30,10 +30,11 @@ 'depends': ['base'], 'init_xml': [], 'update_xml': [ + 'idea_wizard.xml', 'idea_view.xml', 'idea_workflow.xml', 'security/idea_security.xml', - 'security/ir.model.access.csv' + 'security/ir.model.access.csv', ], 'demo_xml': [], 'installable': True, diff --git a/addons/idea/idea.py b/addons/idea/idea.py index 518ff4808a5..195140e99ba 100644 --- a/addons/idea/idea.py +++ b/addons/idea/idea.py @@ -174,6 +174,7 @@ class idea_vote(osv.osv): 'score': fields.selection( VoteValues, 'Score', required=True) } _defaults = { + #'user_id': lambda self, cr, uid, context: uid, 'score': lambda *a: DefaultVoteValue, } idea_vote() diff --git a/addons/idea/idea_view.xml b/addons/idea/idea_view.xml index 1dd97ab5f9b..64401748e62 100644 --- a/addons/idea/idea_view.xml +++ b/addons/idea/idea_view.xml @@ -113,7 +113,7 @@ - + @@ -131,6 +131,9 @@ + + + @@ -161,6 +164,7 @@ +