c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #19969
[Bug 696176] Re: TypeError: node contents must be a string when using base_module_record
Hi,
I just ran into this error. The error is triggered when you export a
resource of type "account.account.type". The culprit is the field "sign"
which is defined as follows:
'sign': fields.selection([(-1, 'Negative'), (1, 'Positive')], ...)
Seems that the module recorder always assumes that a fields.selection is
of type string. Does removing xml.dom as suggested above solve the
problem in that case?
Cheers,
Stefan.
--
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/696176
Title:
TypeError: node contents must be a string when using
base_module_record
Status in OpenERP Modules (addons):
Confirmed
Bug description:
Use base_module_record to export customizations (related to account.)
and got the following error
Environment Information :
System : Linux-2.6.32-27-generic-x86_64-with-Ubuntu-10.04-lucid
OS Name : posix
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1 LTS
Release: 10.04
Codename: lucid
Operating System Release : 2.6.32-27-generic
Operating System Version : #49-Ubuntu SMP Thu Dec 2 00:51:09 UTC 2010
Operating System Architecture : 64bit
Operating System Locale : vi_VN.UTF8
Python Version : 2.6.5
OpenERP-Client Version : 6.0.0-rc1-1
Last revision No. & ID :1749 nch@xxxxxxxxxxx-20101231104757-ce6pdhceekdcjza2
Traceback (most recent call last):
File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/netsvc.py", line 489, in dispatch
result = ExportService.getService(service_name).dispatch(method, auth, params)
File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/service/web_services.py", line 635, in dispatch
res = fn(db, uid, *params)
File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/service/web_services.py", line 662, in exp_execute
return self._execute(db, uid, wiz_id, datas, action, context)
File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/service/web_services.py", line 644, in _execute
return wiz.execute(db, uid, self.wiz_datas[wiz_id], action, context)
File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/wizard/__init__.py", line 177, in execute
res = self.execute_cr(cr, uid, data, state, context)
File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/wizard/__init__.py", line 153, in execute_cr
return self.execute_cr(cr, uid, data, next_state, context)
File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/wizard/__init__.py", line 72, in execute_cr
action_res = action(self, cr, uid, data, context)
File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/addons/base_module_record/wizard/base_module_record_data.py", line 119, in _create_xml
res_xml = mod.generate_xml(cr, uid)
File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/addons/base_module_record/base_module_record.py", line 472, in generate_xml
res_list,noupdate = self._generate_object_xml(cr, uid, rec[1], rec[2], doc, rec[3])
File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/addons/base_module_record/base_module_record.py", line 388, in _generate_object_xml
record,noupdate = self._create_record(cr, uid, doc, rec[2], rec[5], id)
File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/addons/base_module_record/base_module_record.py", line 215, in _create_record
field.appendChild(doc.createTextNode(val))
File "/usr/lib/python2.6/xml/dom/minidom.py", line 1611, in createTextNode
raise TypeError, "node contents must be a string"
TypeError: node contents must be a string
Server log
[2011-01-01 14:42:40,615][crdev] DEBUG:addons.account.account:Filters: AND l.state <> 'draft' AND l.period_id IN (SELECT id FROM account_period WHERE fiscalyear_id IN (1) )
[2011-01-01 14:42:40,616][crdev] DEBUG:addons.account.account:Status: SELECT
[2011-01-01 14:42:40,635][crdev] DEBUG:addons.account.account:Filters: AND l.state <> 'draft' AND l.period_id IN (SELECT id FROM account_period WHERE fiscalyear_id IN (1) )
[2011-01-01 14:42:40,636][crdev] DEBUG:addons.account.account:Status: SELECT
[2011-01-01 14:42:40,669][crdev] DEBUG:addons.account.account:Filters: AND l.state <> 'draft' AND l.period_id IN (SELECT id FROM account_period WHERE fiscalyear_id IN (1) )
[2011-01-01 14:42:40,670][crdev] DEBUG:addons.account.account:Status: SELECT
[2011-01-01 14:42:53,601][crdev] ERROR:web-services:[01]: Exception in call: Traceback (most recent call last):
[2011-01-01 14:42:53,601][crdev] ERROR:web-services:[02]: File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/wizard/__init__.py", line 72, in execute_cr
[2011-01-01 14:42:53,601][crdev] ERROR:web-services:[03]: action_res = action(self, cr, uid, data, context)
[2011-01-01 14:42:53,601][crdev] ERROR:web-services:[04]: File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/addons/base_module_record/wizard/base_module_record_data.py", line 119, in _create_xml
[2011-01-01 14:42:53,601][crdev] ERROR:web-services:[05]: res_xml = mod.generate_xml(cr, uid)
[2011-01-01 14:42:53,602][crdev] ERROR:web-services:[06]: File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/addons/base_module_record/base_module_record.py", line 472, in generate_xml
[2011-01-01 14:42:53,602][crdev] ERROR:web-services:[07]: res_list,noupdate = self._generate_object_xml(cr, uid, rec[1], rec[2], doc, rec[3])
[2011-01-01 14:42:53,602][crdev] ERROR:web-services:[08]: File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/addons/base_module_record/base_module_record.py", line 388, in _generate_object_xml
[2011-01-01 14:42:53,602][crdev] ERROR:web-services:[09]: record,noupdate = self._create_record(cr, uid, doc, rec[2], rec[5], id)
[2011-01-01 14:42:53,602][crdev] ERROR:web-services:[10]: File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/addons/base_module_record/base_module_record.py", line 215, in _create_record
[2011-01-01 14:42:53,602][crdev] ERROR:web-services:[11]: field.appendChild(doc.createTextNode(val))
[2011-01-01 14:42:53,602][crdev] ERROR:web-services:[12]: File "/usr/lib/python2.6/xml/dom/minidom.py", line 1611, in createTextNode
[2011-01-01 14:42:53,602][crdev] ERROR:web-services:[13]: raise TypeError, "node contents must be a string"
[2011-01-01 14:42:53,602][crdev] ERROR:web-services:[14]: TypeError: node contents must be a string
[2011-01-01 14:42:53,603][crdev] ERROR:web-services:[01]: Exception in call: Traceback (most recent call last):
[2011-01-01 14:42:53,603][crdev] ERROR:web-services:[02]: File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/wizard/__init__.py", line 153, in execute_cr
[2011-01-01 14:42:53,603][crdev] ERROR:web-services:[03]: return self.execute_cr(cr, uid, data, next_state, context)
[2011-01-01 14:42:53,603][crdev] ERROR:web-services:[04]: File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/wizard/__init__.py", line 72, in execute_cr
[2011-01-01 14:42:53,603][crdev] ERROR:web-services:[05]: action_res = action(self, cr, uid, data, context)
[2011-01-01 14:42:53,603][crdev] ERROR:web-services:[06]: File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/addons/base_module_record/wizard/base_module_record_data.py", line 119, in _create_xml
[2011-01-01 14:42:53,603][crdev] ERROR:web-services:[07]: res_xml = mod.generate_xml(cr, uid)
[2011-01-01 14:42:53,604][crdev] ERROR:web-services:[08]: File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/addons/base_module_record/base_module_record.py", line 472, in generate_xml
[2011-01-01 14:42:53,604][crdev] ERROR:web-services:[09]: res_list,noupdate = self._generate_object_xml(cr, uid, rec[1], rec[2], doc, rec[3])
[2011-01-01 14:42:53,604][crdev] ERROR:web-services:[10]: File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/addons/base_module_record/base_module_record.py", line 388, in _generate_object_xml
[2011-01-01 14:42:53,604][crdev] ERROR:web-services:[11]: record,noupdate = self._create_record(cr, uid, doc, rec[2], rec[5], id)
[2011-01-01 14:42:53,604][crdev] ERROR:web-services:[12]: File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/addons/base_module_record/base_module_record.py", line 215, in _create_record
[2011-01-01 14:42:53,604][crdev] ERROR:web-services:[13]: field.appendChild(doc.createTextNode(val))
[2011-01-01 14:42:53,604][crdev] ERROR:web-services:[14]: File "/usr/lib/python2.6/xml/dom/minidom.py", line 1611, in createTextNode
[2011-01-01 14:42:53,604][crdev] ERROR:web-services:[15]: raise TypeError, "node contents must be a string"
[2011-01-01 14:42:53,604][crdev] ERROR:web-services:[16]: TypeError: node contents must be a string
[2011-01-01 14:42:53,605][crdev] DEBUG:web-services:netrpc: rpc-dispatching exception
Traceback (most recent call last):
File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/service/netrpc_server.py", line 70, in run
result = self.dispatch(msg[0], msg[1], msg[2:])
File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/netsvc.py", line 499, in dispatch
raise OpenERPDispatcherException(e, tb_s)
OpenERPDispatcherException
Version info
addons/ : al@xxxxxxxxxxx-20101231194448-me09u7591xu24xf3 4161
addons-community/ : fran@fran-pc-20101213182241-2fogs8yh5u4ma31q 292
addons-extra/ : rvalyi@xxxxxxxxx-20101231204649-bd26dshj7y0im9pz 5139
client/ : nch@xxxxxxxxxxx-20101231104757-ce6pdhceekdcjza2 1749
server/ : launchpad_translations_on_behalf_of_openerp-20101231052227-rbby2m5910zai1xz 3199
web/ : sma@xxxxxxxxxxx-20101231130815-ezbofsbn2vpf522z 4228
References