diff options
| author | Jiten (OpenERP) <jra@tinyerp.com> | 2012-06-27 13:25:08 +0530 |
|---|---|---|
| committer | Jiten (OpenERP) <jra@tinyerp.com> | 2012-06-27 13:25:08 +0530 |
| commit | 18dd2dfcab7ee866f5e344ea5c26d4e78faba2f2 (patch) | |
| tree | 068dcc026be4048b1bf56df1c6a61a28dcf34b0c /addons/project_issue/project_issue.py | |
| parent | ea46eb264517fac17720f3a9a524c766e891ac1d (diff) | |
| parent | 6c0bdc167b1c6a5b2cbb36a045bfd1abc1cd121a (diff) | |
[MERGE] Merged from openobject-addons.
bzr revid: jra@tinyerp.com-20120627075508-kko9c9dr67695hzw
Diffstat (limited to 'addons/project_issue/project_issue.py')
| -rw-r--r-- | addons/project_issue/project_issue.py | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index ad6e7afdbcc..976a706ac54 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -591,14 +591,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: @@ -611,4 +606,18 @@ class project(osv.osv): ] project() +class account_analytic_account(osv.osv): + _inherit = 'account.analytic.account' + _description = 'Analytic Account' + + _columns = { + 'use_issues' : fields.boolean('Issues Tracking', help="Check this field if this project manages issues"), + } + + def _trigger_project_creation(self, cr, uid, vals, context=None): + res = super(account_analytic_account, self)._trigger_project_creation(cr, uid, vals, context=context) + return res or vals.get('use_issues') + +account_analytic_account() + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
