← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 734077] Re: Analytic Account Code sequence not working

 

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.

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/734077

Title:
  Analytic Account Code sequence not working

Status in OpenERP Modules (addons):
  Invalid

Bug description:
  Fresh installation of OpenERP 6.0.1 stable, modules analytic and account_accountant installed).
  Add admin user to the group "Useability / Analytic Accounting".

  Go to Accounting > Configuration > Analytic Accounting > Analytic Accounts
  Click "New" and fill in minimum of required fields, save the record.

  Field "Account Code" stays empty. Expected behavior: it should have
  value 2708 (that's the next number for this sequence in a default
  installation).

  Working with many analytic accounts becomes messy without this
  automated sequence.



References