user5109824 user5109824 - 1 year ago 225
Python Question

Odoo Server Error ubuntu

When try install any module get this error.

Odoo Server Error

Traceback (most recent call last):
File "/home/nolimit/git/odoo/openerp/", line 648, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/nolimit/git/odoo/openerp/", line 685, in dispatch
result = self._call_function(**self.params)
File "/home/nolimit/git/odoo/openerp/", line 321, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/nolimit/git/odoo/openerp/service/", line 118, in wrapper
return f(dbname, *args, **kwargs)
File "/home/nolimit/git/odoo/openerp/", line 314, in checked_call
result = self.endpoint(*a, **kw)
File "/home/nolimit/git/odoo/openerp/", line 964, in __call__
return self.method(*args, **kw)
File "/home/nolimit/git/odoo/openerp/", line 514, in response_wrap
response = f(*args, **kw)
File "/home/nolimit/git/odoo/addons/web/controllers/", line 892, in call_button
action = self._call_kw(model, method, args, {})
File "/home/nolimit/git/odoo/addons/web/controllers/", line 880, in _call_kw
return getattr(request.registry.get(model), method)(, request.uid, *args, **kwargs)
File "/home/nolimit/git/odoo/openerp/", line 250, in wrapper
return old_api(self, *args, **kwargs)
File "/home/nolimit/git/odoo/openerp/addons/base/module/", line 459, in button_immediate_install
return self._button_immediate_function(cr, uid, ids, self.button_install, context=context)
File "/home/nolimit/git/odoo/openerp/", line 250, in wrapper
return old_api(self, *args, **kwargs)
File "/home/nolimit/git/odoo/openerp/addons/base/module/", line 533, in _button_immediate_function
registry =, update_module=True)
File "/home/nolimit/git/odoo/openerp/modules/", line 386, in new
openerp.modules.load_modules(registry._db, force_demo, status, update_module)
File "/home/nolimit/git/odoo/openerp/modules/", line 338, in load_modules
loaded_modules, update_module)
File "/home/nolimit/git/odoo/openerp/modules/", line 237, in load_marked_modules
loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
File "/home/nolimit/git/odoo/openerp/modules/", line 156, in load_module_graph
_load_data(cr, module_name, idref, mode, kind='data')
File "/home/nolimit/git/odoo/openerp/modules/", line 98, in _load_data
tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
File "/home/nolimit/git/odoo/openerp/tools/", line 851, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "/home/nolimit/git/odoo/openerp/tools/", line 917, in convert_xml_import
doc = etree.parse(xmlfile)
File "lxml.etree.pyx", line 3239, in lxml.etree.parse (src/lxml/lxml.etree.c:69955)
File "parser.pxi", line 1769, in lxml.etree._parseDocument (src/lxml/lxml.etree.c:102257)
File "parser.pxi", line 1789, in lxml.etree._parseFilelikeDocument (src/lxml/lxml.etree.c:102516)
File "parser.pxi", line 1684, in lxml.etree._parseDocFromFilelike (src/lxml/lxml.etree.c:101442)
File "parser.pxi", line 1134, in lxml.etree._BaseParser._parseDocFromFilelike (src/lxml/lxml.etree.c:97069)
File "parser.pxi", line 582, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:91275)
File "parser.pxi", line 683, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:92461)
File "parser.pxi", line 622, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:91757)
XMLSyntaxError: StartTag: invalid element name, line 8, column 4

Any solution how fix this problem?

Structure of module

Folder: daily_transaction


'name': 'Daily Transaction Manager',
'version': '1.0',
'author': 'Lionel Messi',
'complexity': 'normal',
'description': 'New module',
'category': '',
'depends': [],
'data': ['daily_transaction_view.xml'],
'auto_install': False,
'installable': True,
'external_dependencies': {
'python': [],

from openerp.osv import fields, osv

class daily_transaction(osv.osv):
_name = "daily.transaction"
_description = "Daily Transaction"

_colums = {
'subject': fields.char('Subject', size=128, required=True),
'date':'Date', required=True),
'note': fields.text('Notes'),
'amount': fields.float('Amount', required=True),
'type': fields.selection([
('transport', 'Transport'),
('personal', 'Personal'),
],'Type', required=True),


<!--Daily Transaction List View-->
<record id="view_daily_transaction_tree" model="ir.ui.view">

<!– here id is the external id for this tree view which must be unique and will be used for accessing this record -->
<field name="name">daily.transaction.tree</field>

<!– this will be our name of record in ir.ui.view -->
<field name="model">daily.transaction</field>

<!– this will map out tree view with our daily transaction model -->
<field name="arch" type="xml">
<!-- this will be our title of list/tree view -->
<tree string="Daily Transaction"> <!-- these will automatically map table headers for our list view, so we’ll select out column names of our model here -->
<field name="name"/>
<field name="date"/>
<field name="type"/>
<field name="amount"/>

<!--Daily Transaction Form View-->

<record id="view_daily_transaction_form" model="ir.ui.view">
<field name="name">daily.transaction.form.view</field>
<field name="model">daily.transaction</field>
<field name="arch" type="xml">
<!-- this will be our title of list/tree view -->
<form string="Daily Transaction" version="7.0">
<field name="name"/>
<field name="date"/>
<field name="type"/>
<field name="amount"/>
<field name="note"/>

<record id="action_daily_transaction" model="ir.actions.act_window">
<field name="name">Daily Transaction</field>
<!– name of action -->
<field name="res_model">daily.transaction</field>
<!– this action will be mapped to model specified -->
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<!-- these are type of view our module will show for our daily transaction mode -->
<field name="search_view_id" eval="False"/>
<!– here we specify id of our search view -->
<field name="context">{}</field>
<field name="help">Create new daily transaction.</field>
<!– help text for our model -->


What is that?

Module -->

Answer Source

It seems like you forget to declare name field on your Class.

You can resolve it with following two option:

  1. Add name field on your class daily_transaction OR
  2. You may change field definition like

    'name': fields.char('Subject', size=128, required=True), 

Afterwards, restart your reserver and upgrade module.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download