summaryrefslogtreecommitdiff
path: root/addons/project_long_term/project_long_term.py
diff options
context:
space:
mode:
authorJosse Colpaert <jco@openerp.com>2013-04-10 10:46:38 +0200
committerJosse Colpaert <jco@openerp.com>2013-04-10 10:46:38 +0200
commit3887d1e6fa8a7ad3339ac8710760721bacd2404a (patch)
tree52ef43f8bcf47a97b49e514f86ab75c6cdf42b84 /addons/project_long_term/project_long_term.py
parent7897eb3898ddbf84e0478e627e2279909534c514 (diff)
[FIX] Adapt like issues and tasks
bzr revid: jco@openerp.com-20130410084638-v9yeobgc91yy7lyx
Diffstat (limited to 'addons/project_long_term/project_long_term.py')
-rw-r--r--addons/project_long_term/project_long_term.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py
index 2afaeb40eb0..109f0c03c6f 100644
--- a/addons/project_long_term/project_long_term.py
+++ b/addons/project_long_term/project_long_term.py
@@ -283,9 +283,11 @@ class account_analytic_account(osv.osv):
res['value']['use_phases'] = template.use_phases
return res
+
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
+ if context is None: context = {}
+ res = super(account_analytic_account, self)._trigger_project_creation(cr, uid, vals, context=context)
+ return res or (vals.get('use_phases') and not 'project_creation_in_progress' in context)
account_analytic_account()