Comment 5 for bug 734077

Revision history for this message
Jean-Paul (jpvewijk) wrote :

I think I found the code that was removed. Module project (project.py), class account_analytic_account, in V4:

class account_analytic_account(osv.osv):
        _name = 'account.analytic.account'
        _description = "Analytic Accounts"
<snip>
        def create(self, cr, uid, vals, context=None):
                parent_id = vals.get('parent_id', 0)
                if ('code' not in vals or not vals['code']) and not parent_id:
                        vals['code'] = self.pool.get('ir.sequence').get(cr, uid, 'account.analytic.account')
                return super(account_analytic_account, self).create(cr, uid, vals, context=context)

Same method in V6:

    def create(self, cr, uid, vals, context=None):
        if context is None:
            context = {}
        if vals.get('child_ids', False) and context.get('analytic_project_copy', False):
            vals['child_ids'] = []
        return super(account_analytic_account, self).create(cr, uid, vals, context=context)

If this is not considered a bug, I might create a module to reintroduce this functionality.