← Back to team overview

credativ team mailing list archive

[Bug 1075200] Re: [6.0, project] Assign invalid state to analytic account

 

Hello Stefan,

yes this patch is working for me

Thanks

-- 
You received this bug notification because you are a member of
OpenUpgrade Committers, which is subscribed to OpenUpgrade Addons.
https://bugs.launchpad.net/bugs/1075200

Title:
  [6.0, project] Assign invalid state to analytic account

Status in OpenUpgrade Addons:
  Triaged

Bug description:
  When migrating from 5.0.13 to 6.0 during the module project I get this
  error:

  ERROR:OpenUpgrade:project: error in migration script openupgrade-addons/6.0/project/migrations/6.0.1.1/post-migration.py: ('ValidateError', u'The value "don
  e" for the field "state" is not in the selection')
  [2012-11-05 13:48:09,224][MIGRACION] ERROR:OpenUpgrade:Traceback (most recent call last):
    File "6.0/bin/openupgrade/openupgrade.py", line 387, in wrapped_function
      func(cr, version)
    File "project/migrations/6.0.1.1/post-migration.py", line 165, in migrate
      migrate_analytic(cr, pool)
    File "project/migrations/6.0.1.1/post-migration.py", line 74, in migrate_analytic
      'state': row[9] or False,
    File "openupgrade-addons/6.0/project/project.py", line 755, in create
      return super(account_analytic_account, self).create(cr, uid, vals, context=context)
    File "6.0/bin/osv/orm.py", line 3705, in create
      self._check_selection_field_value(cr, user, field, vals[field], context=context)
    File "6.0/bin/osv/orm.py", line 2378, in _check_selection_field_value
      _('The value "%s" for the field "%s" is not in the selection') % (value, field))
  except_orm: ('ValidateError', u'The value "done" for the field "state" is not in the selection')

  Browsing the code for openupgrade-
  addons/6.0/project/migrations/6.0.1.1/post-migration.py line 74 I see
  the "State" field for account_analytic_account is directly read from
  the "State" field of project_project but they don't share the same
  states so the creation fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/openupgrade-addons/+bug/1075200/+subscriptions


References