From bfd96de42bc942fa24158a8c87b9e905c2460b72 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Mon, 7 May 2012 12:50:49 +0530 Subject: [IMP]rename all fields which r required in project and another module and improve code and bzr revid: sgo@tinyerp.com-20120507072049-u00lsqra9x34nf73 --- addons/project_long_term/project_long_term.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'addons/project_long_term/project_long_term.py') diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py index 7806bc0abb9..582a5ed8ef0 100644 --- a/addons/project_long_term/project_long_term.py +++ b/addons/project_long_term/project_long_term.py @@ -217,7 +217,7 @@ project_user_allocation() class project(osv.osv): _inherit = "project.project" - def _open_phase(self, cr, uid, ids, field_name, arg, context=None): + def _phase_count(self, cr, uid, ids, field_name, arg, context=None): open_phase={} phase_pool=self.pool.get('project.phase') for id in ids: @@ -227,12 +227,12 @@ class project(osv.osv): _columns = { 'phase_ids': fields.one2many('project.phase', 'project_id', "Project Phases"), - 'phases' : fields.boolean('Phase',help = "If you check this field Phases are appears in kanban view"), - 'open_phases' : fields.function(_open_phase , type='integer',string="Open Phases"), + 'use_phases' : fields.boolean('Phase',help = "If you check this field Phases are appears in kanban view"), + 'phase_count' : fields.function(_phase_count , type='integer',string="Open Phases"), } _defaults = { - 'phases' : True, + 'use_phases' : True, } def open_phase(self, cr, uid, ids, context=None): #Open the View for the Tasks for the project -- cgit v1.2.3