diff options
| author | Quentin (OpenERP) <qdp-launchpad@openerp.com> | 2013-04-10 14:50:46 +0200 |
|---|---|---|
| committer | Quentin (OpenERP) <qdp-launchpad@openerp.com> | 2013-04-10 14:50:46 +0200 |
| commit | 748681e5d2b911638d5a01315c48ca48ae63ed41 (patch) | |
| tree | 9ee35662330b403724dc71ec0c552352ca0e25ff /addons/project_long_term/project_long_term.py | |
| parent | 241b9ee07a5f16b1184222dc4fbef8751013fae3 (diff) | |
| parent | 3887d1e6fa8a7ad3339ac8710760721bacd2404a (diff) | |
[FIX] project_long_term: don't create the project twice if 'use_phases' is thicked.
bzr revid: qdp-launchpad@openerp.com-20130410125046-01n3v3p5pnu78wgs
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() |
