← Back to team overview

credativ team mailing list archive

[Bug 908722] Re: [6.1 trunk] [server] database cannot be updated

 

if I manually run the statement, the field gets created in the ir_model_fiels table...
then:
[2011-12-26 10:23:43,167][bs_02] INFO:init.load:module base: loading base_module_meta.xml
[2011-12-26 10:23:43,204][bs_02] ERROR:db.cursor:bad query: insert into "ir_module_module" (id,"license","sequence","demo","state","application","complexity",create_uid,create_date) values (684,'AGPL-3',10,'False','uninstalled','False','normal',1,now())
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/openerp-6.1beta-py2.7.egg/openerp/sql_db.py", line 215, in execute
    res = self._obj.execute(query, params)
IntegrityError: null value in column "name" violates not-null constraint

[2011-12-26 10:23:43,206][bs_02] ERROR:tools.convert.xml_import:Parse error in /usr/local/lib/python2.7/dist-packages/openerp-6.1beta-py2.7.egg/openerp/addons/base/base_module_meta.xml:5: 
<record id="base.module_account_accountant" model="ir.module.module">
            <field name="sequence">10</field>
        </record>
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/openerp-6.1beta-py2.7.egg/openerp/tools/convert.py", line 895, in parse
    self._tags[rec.tag](self.cr, rec, n)
  File "/usr/local/lib/python2.7/dist-packages/openerp-6.1beta-py2.7.egg/openerp/tools/convert.py", line 862, in _tag_record
    id = self.pool.get('ir.model.data')._update(cr, self.uid, rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode, context=rec_context )
  File "/usr/local/lib/python2.7/dist-packages/openerp-6.1beta-py2.7.egg/openerp/addons/base/ir/ir_model.py", line 732, in _update
    res_id = model_obj.create(cr, uid, values, context=context)
  File "/usr/local/lib/python2.7/dist-packages/openerp-6.1beta-py2.7.egg/openerp/osv/orm.py", line 4134, in create
    cr.execute('insert into "'+self._table+'" (id'+upd0+") values ("+str(id_new)+upd1+')', tuple(upd2))
  File "/usr/local/lib/python2.7/dist-packages/openerp-6.1beta-py2.7.egg/openerp/sql_db.py", line 153, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/openerp-6.1beta-py2.7.egg/openerp/sql_db.py", line 215, in execute
    res = self._obj.execute(query, params)
IntegrityError: null value in column "name" violates not-null constraint

[2011-12-26 10:23:43,223][bs_02] ERROR:root:Failed to initialize database `bs_02`.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/openerp-6.1beta-py2.7.egg/EGG-INFO/scripts/openerp-server", line 92, in preload_registry
    db, registry = openerp.pooler.get_db_and_pool(dbname, update_module=config['init'] or config['update'], pooljobs=False)
  File "/usr/local/lib/python2.7/dist-packages/openerp-6.1beta-py2.7.egg/openerp/pooler.py", line 33, in get_db_and_pool
    registry = RegistryManager.get(db_name, force_demo, status, update_module, pooljobs)
  File "/usr/local/lib/python2.7/dist-packages/openerp-6.1beta-py2.7.egg/openerp/modules/registry.py", line 138, in get
    update_module, pooljobs)
  File "/usr/local/lib/python2.7/dist-packages/openerp-6.1beta-py2.7.egg/openerp/modules/registry.py", line 160, in new
    openerp.modules.load_modules(registry.db, force_demo, status, update_module)
  File "/usr/local/lib/python2.7/dist-packages/openerp-6.1beta-py2.7.egg/openerp/modules/loading.py", line 299, in load_modules
    loaded_modules, processed_modules = load_module_graph(cr, graph, status, perform_checks=(not update_module), report=report)
  File "/usr/local/lib/python2.7/dist-packages/openerp-6.1beta-py2.7.egg/openerp/modules/loading.py", line 192, in load_module_graph
    load_init_xml(module_name, idref, mode)
  File "/usr/local/lib/python2.7/dist-packages/openerp-6.1beta-py2.7.egg/openerp/modules/loading.py", line 91, in <lambda>
    load_init_xml = lambda *args: _load_data(cr, *args, kind='init_xml')
  File "/usr/local/lib/python2.7/dist-packages/openerp-6.1beta-py2.7.egg/openerp/modules/loading.py", line 140, in _load_data
    tools.convert_xml_import(cr, module_name, fp, idref, mode, noupdate, report)
  File "/usr/local/lib/python2.7/dist-packages/openerp-6.1beta-py2.7.egg/openerp/tools/convert.py", line 1005, in convert_xml_import
    obj.parse(doc.getroot())
  File "/usr/local/lib/python2.7/dist-packages/openerp-6.1beta-py2.7.egg/openerp/tools/convert.py", line 895, in parse
    self._tags[rec.tag](self.cr, rec, n)
  File "/usr/local/lib/python2.7/dist-packages/openerp-6.1beta-py2.7.egg/openerp/tools/convert.py", line 862, in _tag_record
    id = self.pool.get('ir.model.data')._update(cr, self.uid, rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode, context=rec_context )
  File "/usr/local/lib/python2.7/dist-packages/openerp-6.1beta-py2.7.egg/openerp/addons/base/ir/ir_model.py", line 732, in _update
    res_id = model_obj.create(cr, uid, values, context=context)
  File "/usr/local/lib/python2.7/dist-packages/openerp-6.1beta-py2.7.egg/openerp/osv/orm.py", line 4134, in create
    cr.execute('insert into "'+self._table+'" (id'+upd0+") values ("+str(id_new)+upd1+')', tuple(upd2))
  File "/usr/local/lib/python2.7/dist-packages/openerp-6.1beta-py2.7.egg/openerp/sql_db.py", line 153, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/openerp-6.1beta-py2.7.egg/openerp/sql_db.py", line 215, in execute
    res = self._obj.execute(query, params)
IntegrityError: null value in column "name" violates not-null constraint

thank you,
B

-- 
You received this bug notification because you are a member of OpenERP
Framework Experts, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/908722

Title:
  [6.1 trunk] [server] database cannot be updated

Status in OpenERP Server:
  New

Bug description:
  hello,

  after updating the server (and client) to the latest revs, the update
  process stops with error.

  [2011-12-26 10:15:41,403][bs_02] ERROR:root:Failed to initialize database `bs_02`.
  Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1beta-py2.7.egg/EGG-INFO/scripts/openerp-server", line 92, in preload_registry
      db, registry = openerp.pooler.get_db_and_pool(dbname, update_module=config['init'] or config['update'], pooljobs=False)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1beta-py2.7.egg/openerp/pooler.py", line 33, in get_db_and_pool
      registry = RegistryManager.get(db_name, force_demo, status, update_module, pooljobs)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1beta-py2.7.egg/openerp/modules/registry.py", line 138, in get
      update_module, pooljobs)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1beta-py2.7.egg/openerp/modules/registry.py", line 160, in new
      openerp.modules.load_modules(registry.db, force_demo, status, update_module)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1beta-py2.7.egg/openerp/modules/loading.py", line 299, in load_modules
      loaded_modules, processed_modules = load_module_graph(cr, graph, status, perform_checks=(not update_module), report=report)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1beta-py2.7.egg/openerp/modules/loading.py", line 171, in load_module_graph
      init_module_models(cr, package.name, models)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1beta-py2.7.egg/openerp/modules/module.py", line 287, in init_module_models
      result = obj._auto_init(cr, {'module': module_name})
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1beta-py2.7.egg/openerp/osv/orm.py", line 2747, in _auto_init
      self._field_create(cr, context=context)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1beta-py2.7.egg/openerp/osv/orm.py", line 817, in _field_create
      if cols[k][key] != vals[key]:
  KeyError: 'serialization_field_id'

  i noticed that rev 3915 introduced some new concepts; apparently the
  statement in /oenerp/addons/base/base.sql:52

  ALTER TABLE ir_model_fields ADD column serialization_field_id int
  references ir_model_fields on delete cascade;

  does not get executed early enough (if at all) or else.

  thank you,
  Bogdan

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/908722/+subscriptions


References