openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #03857
Re: [Bug 906362] Re: [6.1/trunk] regression in module loading since around rev #3887: "name" violates not-null constraint
Hello,
You have to run the following query :
update ir_model_data set name = 'module_' || module, module = 'base' where
name = 'module_meta_information' and model = 'ir.module.module';
Because the "XML ids" for the modules in ir_model_data have been modified
but old trunk databases still have the old values. base_module_meta.xml
updates the modules using the new XML ids but do not find them so try to
create them in ir.module.module.
Merry Christmas
Guewen
Le 24 déc. 2011 17:25, "Raphaël Valyi - http://www.akretion.com" <
906362@xxxxxxxxxxxxxxxxxx> a écrit :
> Hello, we had the same issue several times trying to update some database.
> So far we work around the issue by editing the __openerp__.py file of the
> base module (in the server directory) and comment out the loading of the
> base_module_meta.xml (or some similar name cannot remember sorry). It
> doesn't do anything important at all but it's what generates the issue.
>
> Merry christmas.
> On Dec 24, 2011 1:30 PM, "Coco" <906362@xxxxxxxxxxxxxxxxxx> wrote:
>
> > Hello,
> >
> > I am on revision 3923 and I'm facing the same problem :
> >
> > ERROR:db.cursor:bad query: insert into "ir_module_module"
> >
> (id,"license","sequence","demo","state","application","complexity",create_uid,create_date)
> > values
> (231,E'AGPL-3',10,E'False',E'uninstalled',E'False',E'normal',1,now())
> > Traceback (most recent call last):
> > File "/usr/lib/openerp/trunk/server/openerp/sql_db.py", line 215, in
> > execute
> > res = self._obj.execute(query, params)
> > IntegrityError: null value in column "name" violates not-null constraint
> >
> > ERROR:tools.convert.xml_import:Parse error in
> > /usr/lib/openerp/trunk/server/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/lib/openerp/trunk/server/openerp/tools/convert.py", line 889,
> > in parse
> > self._tags[rec.tag](self.cr, rec, n)
> > File "/usr/lib/openerp/trunk/server/openerp/tools/convert.py", line 856,
> > 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/lib/openerp/trunk/server/openerp/addons/base/ir/ir_model.py",
> > line 732, in _update
> > res_id = model_obj.create(cr, uid, values, context=context)
> > File "/usr/lib/openerp/trunk/server/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/lib/openerp/trunk/server/openerp/sql_db.py", line 153, in
> > wrapper
> > return f(self, *args, **kwargs)
> > File "/usr/lib/openerp/trunk/server/openerp/sql_db.py", line 215, in
> > execute
> > res = self._obj.execute(query, params)
> > IntegrityError: null value in column "name" violates not-null constraint
> >
> > --
> > You received this bug notification because you are a member of OpenERP
> > Committers, which is subscribed to OpenERP Server.
> > https://bugs.launchpad.net/bugs/906362
> >
> > Title:
> > [6.1/trunk] regression in module loading since around rev #3887:
> > "name" violates not-null constraint
> >
> > Status in OpenERP Server:
> > Fix Released
> >
> > Bug description:
> > Hello today,
> > when I tried to refresh our trunk server with --update=all
> > --database=my_base,
> >
> > I got this error:
> >
> >
> > [2011-12-19 15:01:18,768][?] INFO:web.common.http:Loading web_mobile
> > [2011-12-19 15:01:18,769][?] INFO:web.common.http:Loading base
> > [2011-12-19 15:01:18,941][prod] INFO:init.load:module base: loading
> > objects
> > [2011-12-19 15:01:18,943][prod] INFO:init:module base: registering
> objects
> > [2011-12-19 15:01:19,025][prod] INFO:init:module base: creating or
> > updating database tables
> > [2011-12-19 15:01:21,411][prod] INFO:init.load:module base: loading
> > base_data.xml
> > [2011-12-19 15:01:21,784][prod] INFO:init.load:module base: loading
> > security/base_security.xml
> > [2011-12-19 15:01:21,856][prod] INFO:init.load:module base: loading
> > base_menu.xml
> >
> > [2011-12-19 15:01:21,959][prod] INFO:init.load:module base: loading
> > base_module_meta.xml
> > [2011-12-19 15:01:21,966][prod] ERROR:db.cursor:bad query: insert into
> > "ir_module_module" (id,"license","sequence","demo","state","application"
> > ,"complexity",create_uid,create_date) values
> > (242,'AGPL-3',10,'False','uninstalled','False','normal',1,now())
> > Traceback (most recent call last):
> > File "/opt/openerp/prod/server/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-19 15:01:21,967][prod] ERROR:tools.convert.xml_import:Parse
> > error in
> /opt/openerp/prod/server/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 "/opt/openerp/prod/server/openerp/tools/convert.py", line 889, in
> > parse
> > self._tags[rec.tag](self.cr, rec, n)
> > File "/opt/openerp/prod/server/openerp/tools/convert.py", line 856, 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), nou
> > pdate=self.isnoupdate(data_node), mode=self.mode, context=rec_context )
> > File "/opt/openerp/prod/server/openerp/addons/base/ir/ir_model.py",
> > line 719, in _update
> > res_id = model_obj.create(cr, uid, values, context=context)
> > File "/opt/openerp/prod/server/openerp/osv/orm.py", line 4116, in
> create
> > cr.execute('insert into "'+self._table+'" (id'+upd0+") values
> > ("+str(id_new)+upd1+')', tuple(upd2))
> > File "/opt/openerp/prod/server/openerp/sql_db.py", line 153, in
> wrapper
> > return f(self, *args, **kwargs)
> > File "/opt/openerp/prod/server/openerp/sql_db.py", line 215, in
> execute
> > res = self._obj.execute(query, params)
> > IntegrityError: null value in column "name" violates not-null constraint
> >
> >
> > Notice this that roll backing to rev #3887 the update worked normally.
> > I had no time to hunt the exact revision but it's between #3887 and
> > #3893
> >
> > Hope this helps.
> >
> > To manage notifications about this bug go to:
> > https://bugs.launchpad.net/openobject-server/+bug/906362/+subscriptions
> >
>
> --
> You received this bug notification because you are subscribed to OpenERP
> Project Group.
> https://bugs.launchpad.net/bugs/906362
>
> Title:
> [6.1/trunk] regression in module loading since around rev #3887:
> "name" violates not-null constraint
>
> Status in OpenERP Server:
> Fix Released
>
> Bug description:
> Hello today,
> when I tried to refresh our trunk server with --update=all
> --database=my_base,
>
> I got this error:
>
>
> [2011-12-19 15:01:18,768][?] INFO:web.common.http:Loading web_mobile
> [2011-12-19 15:01:18,769][?] INFO:web.common.http:Loading base
> [2011-12-19 15:01:18,941][prod] INFO:init.load:module base: loading
> objects
> [2011-12-19 15:01:18,943][prod] INFO:init:module base: registering objects
> [2011-12-19 15:01:19,025][prod] INFO:init:module base: creating or
> updating database tables
> [2011-12-19 15:01:21,411][prod] INFO:init.load:module base: loading
> base_data.xml
> [2011-12-19 15:01:21,784][prod] INFO:init.load:module base: loading
> security/base_security.xml
> [2011-12-19 15:01:21,856][prod] INFO:init.load:module base: loading
> base_menu.xml
>
> [2011-12-19 15:01:21,959][prod] INFO:init.load:module base: loading
> base_module_meta.xml
> [2011-12-19 15:01:21,966][prod] ERROR:db.cursor:bad query: insert into
> "ir_module_module" (id,"license","sequence","demo","state","application"
> ,"complexity",create_uid,create_date) values
> (242,'AGPL-3',10,'False','uninstalled','False','normal',1,now())
> Traceback (most recent call last):
> File "/opt/openerp/prod/server/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-19 15:01:21,967][prod] ERROR:tools.convert.xml_import:Parse
> error in /opt/openerp/prod/server/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 "/opt/openerp/prod/server/openerp/tools/convert.py", line 889, in
> parse
> self._tags[rec.tag](self.cr, rec, n)
> File "/opt/openerp/prod/server/openerp/tools/convert.py", line 856, 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), nou
> pdate=self.isnoupdate(data_node), mode=self.mode, context=rec_context )
> File "/opt/openerp/prod/server/openerp/addons/base/ir/ir_model.py",
> line 719, in _update
> res_id = model_obj.create(cr, uid, values, context=context)
> File "/opt/openerp/prod/server/openerp/osv/orm.py", line 4116, in create
> cr.execute('insert into "'+self._table+'" (id'+upd0+") values
> ("+str(id_new)+upd1+')', tuple(upd2))
> File "/opt/openerp/prod/server/openerp/sql_db.py", line 153, in wrapper
> return f(self, *args, **kwargs)
> File "/opt/openerp/prod/server/openerp/sql_db.py", line 215, in execute
> res = self._obj.execute(query, params)
> IntegrityError: null value in column "name" violates not-null constraint
>
>
> Notice this that roll backing to rev #3887 the update worked normally.
> I had no time to hunt the exact revision but it's between #3887 and
> #3893
>
> Hope this helps.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openobject-server/+bug/906362/+subscriptions
>
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/906362
Title:
[6.1/trunk] regression in module loading since around rev #3887:
"name" violates not-null constraint
Status in OpenERP Server:
Fix Released
Bug description:
Hello today,
when I tried to refresh our trunk server with --update=all --database=my_base,
I got this error:
[2011-12-19 15:01:18,768][?] INFO:web.common.http:Loading web_mobile
[2011-12-19 15:01:18,769][?] INFO:web.common.http:Loading base
[2011-12-19 15:01:18,941][prod] INFO:init.load:module base: loading objects
[2011-12-19 15:01:18,943][prod] INFO:init:module base: registering objects
[2011-12-19 15:01:19,025][prod] INFO:init:module base: creating or updating database tables
[2011-12-19 15:01:21,411][prod] INFO:init.load:module base: loading base_data.xml
[2011-12-19 15:01:21,784][prod] INFO:init.load:module base: loading security/base_security.xml
[2011-12-19 15:01:21,856][prod] INFO:init.load:module base: loading base_menu.xml
[2011-12-19 15:01:21,959][prod] INFO:init.load:module base: loading base_module_meta.xml
[2011-12-19 15:01:21,966][prod] ERROR:db.cursor:bad query: insert into "ir_module_module" (id,"license","sequence","demo","state","application"
,"complexity",create_uid,create_date) values (242,'AGPL-3',10,'False','uninstalled','False','normal',1,now())
Traceback (most recent call last):
File "/opt/openerp/prod/server/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-19 15:01:21,967][prod] ERROR:tools.convert.xml_import:Parse error in /opt/openerp/prod/server/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 "/opt/openerp/prod/server/openerp/tools/convert.py", line 889, in parse
self._tags[rec.tag](self.cr, rec, n)
File "/opt/openerp/prod/server/openerp/tools/convert.py", line 856, 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), nou
pdate=self.isnoupdate(data_node), mode=self.mode, context=rec_context )
File "/opt/openerp/prod/server/openerp/addons/base/ir/ir_model.py", line 719, in _update
res_id = model_obj.create(cr, uid, values, context=context)
File "/opt/openerp/prod/server/openerp/osv/orm.py", line 4116, in create
cr.execute('insert into "'+self._table+'" (id'+upd0+") values ("+str(id_new)+upd1+')', tuple(upd2))
File "/opt/openerp/prod/server/openerp/sql_db.py", line 153, in wrapper
return f(self, *args, **kwargs)
File "/opt/openerp/prod/server/openerp/sql_db.py", line 215, in execute
res = self._obj.execute(query, params)
IntegrityError: null value in column "name" violates not-null constraint
Notice this that roll backing to rev #3887 the update worked normally.
I had no time to hunt the exact revision but it's between #3887 and
#3893
Hope this helps.
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/906362/+subscriptions
References