diff options
| author | Christophe Matthieu <chm@openerp.com> | 2013-04-23 17:29:43 +0200 |
|---|---|---|
| committer | Christophe Matthieu <chm@openerp.com> | 2013-04-23 17:29:43 +0200 |
| commit | 300a2aaeeec4147c4d543a0142ba61bd558036bf (patch) | |
| tree | fec46071455255c24260d3186ac1d5a6b23a1355 /addons/project_long_term/project_long_term.py | |
| parent | 809ec6e49f0eb328f318ce08e4baa2a87fa3db67 (diff) | |
| parent | 8590e68b2b399394c8b0541e885949fc40bca898 (diff) | |
[MERGE] from trunk
bzr revid: chm@openerp.com-20130423152943-8qbm6nhc9ubds5td
Diffstat (limited to 'addons/project_long_term/project_long_term.py')
| -rw-r--r-- | addons/project_long_term/project_long_term.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py index e53ff9ed253..a950907fb69 100644 --- a/addons/project_long_term/project_long_term.py +++ b/addons/project_long_term/project_long_term.py @@ -198,7 +198,6 @@ class project_phase(osv.osv): result += "\n" return result -project_phase() class project_user_allocation(osv.osv): _name = 'project.user.allocation' @@ -211,7 +210,6 @@ class project_user_allocation(osv.osv): 'date_start': fields.datetime('Start Date', help="Starting Date"), 'date_end': fields.datetime('End Date', help="Ending Date"), } -project_user_allocation() class project(osv.osv): _inherit = "project.project" @@ -267,7 +265,6 @@ class project(osv.osv): 'date_end': p.end.strftime('%Y-%m-%d %H:%M:%S') }, context=context) return True -project() class account_analytic_account(osv.osv): _inherit = 'account.analytic.account' @@ -283,17 +280,17 @@ 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() class project_task(osv.osv): _inherit = "project.task" _columns = { 'phase_id': fields.many2one('project.phase', 'Project Phase', domain="[('project_id', '=', project_id)]"), } -project_task() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
