From 0e90703ad0d1727c7a4511e30f335c0a3667357c Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Mon, 28 May 2012 18:00:54 +0530 Subject: [IMP]add boolean of project,projec_longterm,and project issue and create related project bzr revid: sgo@tinyerp.com-20120528123054-ntp1u33q1iavwtej --- addons/project_issue/project_issue.py | 27 ++++++++++++++++++++++----- addons/project_issue/project_issue_view.xml | 15 +++++++++++++++ 2 files changed, 37 insertions(+), 5 deletions(-) (limited to 'addons/project_issue') diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index 176ffa61acd..d49631fb771 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -512,14 +512,9 @@ class project(osv.osv): _columns = { 'project_escalation_id' : fields.many2one('project.project','Project Escalation', help='If any issue is escalated from the current Project, it will be listed under the project selected here.', states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}), 'reply_to' : fields.char('Reply-To Email Address', size=256), - 'use_issues' : fields.boolean('Use Issues', help="Check this field if this project manages issues"), 'issue_count': fields.function(_issue_count, type='integer'), } - _defaults = { - 'use_issues': True, - } - def _check_escalation(self, cr, uid, ids, context=None): project_obj = self.browse(cr, uid, ids[0], context=context) if project_obj.project_escalation_id: @@ -532,4 +527,26 @@ class project(osv.osv): ] project() +class account_analytic_account(osv.osv): + + _inherit = 'account.analytic.account' + _description = 'Analytic Account' + + _columns = { + 'use_issues' : fields.boolean('Issue Tracking:', help="Check this field if this project manages issues"), + } +# _defaults = { +# 'use_issues': True, +# } + + def create(self, cr, uid, vals, context=None): + if context is None: + context = {} + obj_id = super(account_analytic_account, self).create(cr, uid, vals, context=context) + if vals.get('use_issues', False): + self.project_create(cr, uid, obj_id, vals, context) + return obj_id + +account_analytic_account() + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index 716a02f2f60..99b4ecafc57 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -387,5 +387,20 @@ + + account.analytic.account.issue.form.inherit + account.analytic.account + form + + + + + + + + + + + -- cgit v1.2.3 From 87040b2390a496a96c2c69e09cfb2f19769b1f27 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Wed, 30 May 2012 12:29:34 +0530 Subject: [IMP]:project:improved project view bzr revid: apa@tinyerp.com-20120530065934-qpo4hsv4pcyhngjr --- addons/project_issue/project_issue.py | 2 +- addons/project_issue/project_issue_view.xml | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'addons/project_issue') diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index d49631fb771..0c4b6af0956 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -533,7 +533,7 @@ class account_analytic_account(osv.osv): _description = 'Analytic Account' _columns = { - 'use_issues' : fields.boolean('Issue Tracking:', help="Check this field if this project manages issues"), + 'use_issues' : fields.boolean('Issues Tracking', help="Check this field if this project manages issues"), } # _defaults = { # 'use_issues': True, diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index 99b4ecafc57..6d01aabcb96 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -360,9 +360,13 @@ form - - - + + + Issues Tracking + +