From 95b83f741efe93d8e9749dd0e6a149b09b9d5bdb Mon Sep 17 00:00:00 2001 From: ssi Date: Thu, 4 Nov 2010 18:44:26 +0530 Subject: [PATCH 1/3] [FIX]Idea: solved problem of visibility(If True creator of the idea will be visible to others) not working. added this functionaliy on write too. bzr revid: ssi@tinyerp.com-20101104131426-nag4b2ay79irgpjd --- addons/idea/idea.py | 12 +++++++++--- addons/idea/idea_view.xml | 1 + 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/addons/idea/idea.py b/addons/idea/idea.py index b7b7840a3f5..46f59a23f1a 100644 --- a/addons/idea/idea.py +++ b/addons/idea/idea.py @@ -200,12 +200,10 @@ class idea_idea(osv.osv): @return: Returns an id of the new record """ visibility = False - if vals.get('category_id', False): category_pool = self.pool.get('idea.category') category = category_pool.browse(cr, user, vals.get('category_id'), context) visibility = category.visibility - vals.update({ 'visibility':visibility }) @@ -252,7 +250,15 @@ class idea_idea(osv.osv): if vals.get('my_vote', False): if vals.get('state', state) != 'open': raise osv.except_osv(_("Warning !"), _("Draft/Accepted/Cancelled ideas Could not be voted")) - + + visibility = False + if vals.get('category_id', False): + category_pool = self.pool.get('idea.category') + category = category_pool.browse(cr, user, vals.get('category_id'), context) + visibility = category.visibility + vals.update({ + 'visibility':visibility + }) res = super(idea_idea, self).write(cr, user, ids, vals, context) return res diff --git a/addons/idea/idea_view.xml b/addons/idea/idea_view.xml index c41ab7e82c6..4a3067ff046 100644 --- a/addons/idea/idea_view.xml +++ b/addons/idea/idea_view.xml @@ -199,6 +199,7 @@ + From f2410cbd91d2f4644019363f8190724ee969f2c1 Mon Sep 17 00:00:00 2001 From: ssi Date: Thu, 4 Nov 2010 18:50:38 +0530 Subject: [PATCH 2/3] [FIX]Idea: rem char bzr revid: ssi@tinyerp.com-20101104132038-hizr3mc4sj1iwxut --- addons/idea/idea_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/idea/idea_view.xml b/addons/idea/idea_view.xml index 167c9a43960..f6338b2fa91 100644 --- a/addons/idea/idea_view.xml +++ b/addons/idea/idea_view.xml @@ -198,7 +198,7 @@ - + From 03bb6027eb0f23bcaac9f08adca313980182c554 Mon Sep 17 00:00:00 2001 From: ssi Date: Wed, 10 Nov 2010 15:16:16 +0530 Subject: [PATCH 3/3] [FIX]CRM: solved bug of Schedule a meeting not linked with the associated partner lp bug: https://launchpad.net/bugs/673050 fixed bzr revid: ssi@tinyerp.com-20101110094616-z4bvc9q2pt4z9krx --- addons/crm/crm_meeting_menu.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/crm/crm_meeting_menu.xml b/addons/crm/crm_meeting_menu.xml index 73880da9523..2d26adbdb1c 100644 --- a/addons/crm/crm_meeting_menu.xml +++ b/addons/crm/crm_meeting_menu.xml @@ -9,6 +9,7 @@ src_model="res.partner" view_mode="calendar,tree,form,gantt" context="{'search_default_partner_id': active_id, 'default_duration': 4.0}" + domain="[('partner_id', '=', active_id)]" />