diff options
| author | Christophe Matthieu <chm@openerp.com> | 2013-04-15 12:34:31 +0200 |
|---|---|---|
| committer | Christophe Matthieu <chm@openerp.com> | 2013-04-15 12:34:31 +0200 |
| commit | ed4b70dfe33605fde42cccd788bb0f43ffefbec6 (patch) | |
| tree | 970ec3a89a382a0d2d8182710081206fb815ef4d /addons/project_long_term/project_long_term.py | |
| parent | 177f51cb541f6f635d445ca24ce4453d79eb6d39 (diff) | |
| parent | 53f168daaf989d97a4e514934afc7fe04d21193b (diff) | |
[MERGE] from trunk
bzr revid: chm@openerp.com-20130415103431-y96fhba0502b6aqc
Diffstat (limited to 'addons/project_long_term/project_long_term.py')
| -rw-r--r-- | addons/project_long_term/project_long_term.py | 6 |
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 e53ff9ed253..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 or vals.get('use_phases') + 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() |
