Skip to Content
Menu
This question has been flagged
4 Replies
3255 Views

when trying to upgrade my custom module iam getting this error in xml file 


Error:

Odoo Server Error


Traceback (most recent call last):

  File "/odoo/odoo-server/odoo/http.py", line 619, in _handle_exception

    return super(JsonRequest, self)._handle_exception(exception)

  File "/odoo/odoo-server/odoo/http.py", line 309, in _handle_exception

    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])

  File "/odoo/odoo-server/odoo/tools/pycompat.py", line 14, in reraise

    raise value

  File "/odoo/odoo-server/odoo/http.py", line 664, in dispatch

    result = self._call_function(**self.params)

  File "/odoo/odoo-server/odoo/http.py", line 345, in _call_function

    return checked_call(self.db, *args, **kwargs)

  File "/odoo/odoo-server/odoo/service/model.py", line 93, in wrapper

    return f(dbname, *args, **kwargs)

  File "/odoo/odoo-server/odoo/http.py", line 338, in checked_call

    result = self.endpoint(*a, **kw)

  File "/odoo/odoo-server/odoo/http.py", line 910, in __call__

    return self.method(*args, **kw)

  File "/odoo/odoo-server/odoo/http.py", line 510, in response_wrap

    response = f(*args, **kw)

  File "/odoo/odoo-server/addons/web/controllers/main.py", line 1324, in call_button

    action = self._call_kw(model, method, args, kwargs)

  File "/odoo/odoo-server/addons/web/controllers/main.py", line 1312, in _call_kw

    return call_kw(request.env[model], method, args, kwargs)

  File "/odoo/odoo-server/odoo/api.py", line 387, in call_kw

    result = _call_kw_multi(method, model, args, kwargs)

  File "/odoo/odoo-server/odoo/api.py", line 374, in _call_kw_multi

    result = method(recs, *args, **kwargs)

  File "<decorator-gen-65>", line 2, in button_immediate_upgrade

  File "/odoo/odoo-server/odoo/addons/base/models/ir_module.py", line 72, in check_and_log

    return method(self, *args, **kwargs)

  File "/odoo/odoo-server/odoo/addons/base/models/ir_module.py", line 629, in button_immediate_upgrade

    return self._button_immediate_function(type(self).button_upgrade)

  File "/odoo/odoo-server/odoo/addons/base/models/ir_module.py", line 573, in _button_immediate_function

    modules.registry.Registry.new(self._cr.dbname, update_module=True)

  File "/odoo/odoo-server/odoo/modules/registry.py", line 86, in new

    odoo.modules.load_modules(registry._db, force_demo, status, update_module)

  File "/odoo/odoo-server/odoo/modules/loading.py", line 419, in load_modules

    force, status, report, loaded_modules, update_module, models_to_check)

  File "/odoo/odoo-server/odoo/modules/loading.py", line 315, in load_marked_modules

    perform_checks=perform_checks, models_to_check=models_to_check

  File "/odoo/odoo-server/odoo/modules/loading.py", line 225, in load_module_graph

    load_data(cr, idref, mode, kind='data', package=package, report=report)

  File "/odoo/odoo-server/odoo/modules/loading.py", line 68, in load_data

    tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)

  File "/odoo/odoo-server/odoo/tools/convert.py", line 736, in convert_file

    convert_xml_import(cr, module, fp, idref, mode, noupdate, report)

  File "/odoo/odoo-server/odoo/tools/convert.py", line 782, in convert_xml_import

    doc = etree.parse(xmlfile)

  File "src/lxml/etree.pyx", line 3426, in lxml.etree.parse

  File "src/lxml/parser.pxi", line 1861, in lxml.etree._parseDocument

  File "src/lxml/parser.pxi", line 1881, in lxml.etree._parseFilelikeDocument

  File "src/lxml/parser.pxi", line 1776, in lxml.etree._parseDocFromFilelike

  File "src/lxml/parser.pxi", line 1187, in lxml.etree._BaseParser._parseDocFromFilelike

  File "src/lxml/parser.pxi", line 601, in lxml.etree._ParserContext._handleParseResultDoc

  File "src/lxml/parser.pxi", line 711, in lxml.etree._handleParseResult

  File "src/lxml/parser.pxi", line 640, in lxml.etree._raiseParseError

  File "/odoo/odoo-server/addons/transfers/transfers.xml", line 16

lxml.etree.XMLSyntaxError: Opening and ending tag mismatch: field line 9 and record, line 16, column 15


my xml file :



<?xml version="1.0" encoding="utf-8"?>

<odoo>



    <record id="transfer_tree" model="ir.ui.view">

           <field name="name">Money.Transfer.tree</field>

           <field name="model">transfers.name</field>

           <field name="type">tree</field>

           <field name="arch" type="xml">

     <tree string ="money_transfers">

<field name ="transfers_Name"/>

<field name ="transfers_ISO"/>

<field name ="transfers_amount"/>

<field name ="notes"/>         

             </tree>

     </record>



    <record id="money_transfer" model="ir.ui.view">

           <field name="name">Money.Transfer.form</field>

           <field name="model">transfers.name</field>

           <field name="type">form</field>

           <field name="arch" type="xml">

     <form string ="money_transfers">

<sheet>

<group>

            <group>

<field name ="transfers_Name"/>

            </group>

          <group>

<field name ="transfers_ISO"/>

          </group>

</group>

<group>

      <field name ="transfers_amount"/>

      <field name ="notes"/>

      <field name ="image"/>

</group>

</sheet>

     </form>           

           </field>

     </record>



    <record id="action_transfers" model="ir.actions.act_window">

           <field name="name">Transfers</field>

           <field name="type">ir.actions.act_window</field>

           <field name="res_model">transfers.name</field>

   <field name="view_mode">tree,form</field>

           <field name="help" type="html">

     <p class="o_view_nocontent_smiling_face">

       create your first transfer

     </p>            

           </field>

     </record>



    <menuitem id ="transfers_root" name ="Transfers" sequence ="0" web_icon="transfers,static/description/icon.png" />  

    <menuitem id ="transfers_name" name ="Transfers_Name" parent="transfers_root" action="action_transfers"/> 



</odoo>


Avatar
Discard
Author

now iam unable to upgrade the module in odoo13

Odoo Client Error

An error occurred

Please use the copy button to report the error to your support service.

Traceback:

TypeError: Cannot read property 'type' of undefined

at Class._renderBodyCell (http://localhost:8069/web/static/src/js/views/list/list_renderer.js:444:50)

at http://localhost:8069/web/static/src/js/views/list/list_renderer.js:838:25

at Array.map (<anonymous>)

at Class._renderRow [as _super] (http://localhost:8069/web/static/src/js/views/list/list_renderer.js:837:35)

at Class._renderRow (http://localhost:8069/web/static/src/js/views/list/list_editable_renderer.js:1166:32)

at Class._renderRow (http://localhost:8069/web/static/src/js/core/class.js:123:38)

at Array.map (<anonymous>)

at Class._renderRows (http://localhost:8069/web/static/src/js/views/list/list_renderer.js:858:32)

at Class._renderRows (http://localhost:8069/web/static/src/js/views/list/list_editable_renderer.js:1187:26)

at Class._renderRows (http://localhost:8069/web/static/src/js/core/class.js:123:38)

Best Answer

Hi, Guna

I just reviewed the view file you share above and found issue was due to two "</group>" tags which was present in 30, 31 line. Kindly your view like given below,

https://prnt.sc/rf4hwy 

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="transfer_tree" model="ir.ui.view">
<field name="name">Money.Transfer.tree</field>
<field name="model">transfers.name</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string ="money_transfers">
<field name ="transfers_Name"/>
<field name ="transfers_ISO"/>
<field name ="transfers_amount"/>
<field name ="notes"/>
</tree>
</field>
</record>
<record id="money_transfer" model="ir.ui.view">
<field name="name">Money.Transfer.form</field>
<field name="model">transfers.name</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string ="money_transfers">
<sheet>
<group>
<group>
<field name ="transfers_Name"/>
</group>
<group>
<field name ="transfers_ISO"/>
<group>
<field name ="transfers_amount"/>
<field name ="notes"/>
<field name ="image"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="action_transfers" model="ir.actions.act_window">
<field name="name">Transfers</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">transfers.name</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
  create your first transfer
</p>
</field>
</record>
<menuitem id ="transfers_root" name ="Transfers" sequence ="0" web_icon="transfers,static/description/icon.png" />
<menuitem id ="transfers_name" name ="Transfers_Name" parent="transfers_root" action="action_transfers"/>
</odoo>
Thanks,
Ashish Singh (Team Lead)
Webkul Software Private Limited
Avatar
Discard
Author

thanks for the reply Ashish i have updated but still iam getting this error in xml file

<?xml version="1.0" encoding="utf-8"?>

<odoo>

<record id="transfer_tree" model="ir.ui.view">

<field name="name">Money.Transfer.tree</field>

<field name="model">transfers.name</field>

<field name="type">tree</field>

<field name="arch" type="xml">

<tree string ="money_transfers">

<field name ="transfers_Name"/>

<field name ="transfers_ISO"/>

<field name ="transfers_amount"/>

<field name ="notes"/>

</tree>

</record>

<record id="money_transfer" model="ir.ui.view">

<field name="name">Money.Transfer.form</field>

<field name="model">transfers.name</field>

<field name="type">form</field>

<field name="arch" type="xml">

<form string ="money_transfers">

<sheet>

<group>

<group>

<field name ="transfers_Name"/>

</group>

<group>

<field name ="transfers_ISO"/>

</group>

</group>

<group>

<field name ="transfers_amount"/>

<field name ="notes"/>

<field name ="image"/>

</group>

</sheet>

</form>

</field>

</record>

<record id="action_transfers" model="ir.actions.act_window">

<field name="name">Transfers</field>

<field name="type">ir.actions.act_window</field>

<field name="res_model">transfers.name</field>

<field name="view_mode">tree,form</field>

<field name="help" type="html">

<p class="o_view_nocontent_smiling_face">

create your first transfer

</p>

</field>

</record>

<menuitem id ="transfers_root" name ="Transfers" sequence ="0" web_icon="transfers,static/description/icon.png" />

<menuitem id ="transfers_name" name ="Transfers_Name" parent="transfers_root" action="action_transfers"/>

</odoo>

Error:

Odoo Server Error

Traceback (most recent call last):

File "/odoo/odoo-server/odoo/http.py", line 619, in _handle_exception

return super(JsonRequest, self)._handle_exception(exception)

File "/odoo/odoo-server/odoo/http.py", line 309, in _handle_exception

raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])

File "/odoo/odoo-server/odoo/tools/pycompat.py", line 14, in reraise

raise value

File "/odoo/odoo-server/odoo/http.py", line 664, in dispatch

result = self._call_function(**self.params)

File "/odoo/odoo-server/odoo/http.py", line 345, in _call_function

return checked_call(self.db, *args, **kwargs)

File "/odoo/odoo-server/odoo/service/model.py", line 93, in wrapper

return f(dbname, *args, **kwargs)

File "/odoo/odoo-server/odoo/http.py", line 338, in checked_call

result = self.endpoint(*a, **kw)

File "/odoo/odoo-server/odoo/http.py", line 910, in __call__

return self.method(*args, **kw)

File "/odoo/odoo-server/odoo/http.py", line 510, in response_wrap

response = f(*args, **kw)

File "/odoo/odoo-server/addons/web/controllers/main.py", line 1324, in call_button

action = self._call_kw(model, method, args, kwargs)

File "/odoo/odoo-server/addons/web/controllers/main.py", line 1312, in _call_kw

return call_kw(request.env[model], method, args, kwargs)

File "/odoo/odoo-server/odoo/api.py", line 387, in call_kw

result = _call_kw_multi(method, model, args, kwargs)

File "/odoo/odoo-server/odoo/api.py", line 374, in _call_kw_multi

result = method(recs, *args, **kwargs)

File "<decorator-gen-65>", line 2, in button_immediate_upgrade

File "/odoo/odoo-server/odoo/addons/base/models/ir_module.py", line 72, in check_and_log

return method(self, *args, **kwargs)

File "/odoo/odoo-server/odoo/addons/base/models/ir_module.py", line 629, in button_immediate_upgrade

return self._button_immediate_function(type(self).button_upgrade)

File "/odoo/odoo-server/odoo/addons/base/models/ir_module.py", line 573, in _button_immediate_function

modules.registry.Registry.new(self._cr.dbname, update_module=True)

File "/odoo/odoo-server/odoo/modules/registry.py", line 86, in new

odoo.modules.load_modules(registry._db, force_demo, status, update_module)

File "/odoo/odoo-server/odoo/modules/loading.py", line 419, in load_modules

force, status, report, loaded_modules, update_module, models_to_check)

File "/odoo/odoo-server/odoo/modules/loading.py", line 315, in load_marked_modules

perform_checks=perform_checks, models_to_check=models_to_check

File "/odoo/odoo-server/odoo/modules/loading.py", line 225, in load_module_graph

load_data(cr, idref, mode, kind='data', package=package, report=report)

File "/odoo/odoo-server/odoo/modules/loading.py", line 68, in load_data

tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)

File "/odoo/odoo-server/odoo/tools/convert.py", line 736, in convert_file

convert_xml_import(cr, module, fp, idref, mode, noupdate, report)

File "/odoo/odoo-server/odoo/tools/convert.py", line 782, in convert_xml_import

doc = etree.parse(xmlfile)

File "src/lxml/etree.pyx", line 3426, in lxml.etree.parse

File "src/lxml/parser.pxi", line 1861, in lxml.etree._parseDocument

File "src/lxml/parser.pxi", line 1881, in lxml.etree._parseFilelikeDocument

File "src/lxml/parser.pxi", line 1776, in lxml.etree._parseDocFromFilelike

File "src/lxml/parser.pxi", line 1187, in lxml.etree._BaseParser._parseDocFromFilelike

File "src/lxml/parser.pxi", line 601, in lxml.etree._ParserContext._handleParseResultDoc

File "src/lxml/parser.pxi", line 711, in lxml.etree._handleParseResult

File "src/lxml/parser.pxi", line 640, in lxml.etree._raiseParseError

File "/odoo/odoo-server/addons/transfers/transfers.xml", line 14

lxml.etree.XMLSyntaxError: Opening and ending tag mismatch: field line 7 and record, line 14, column 14

Hi, Guna

I just check and found there is also an issue with your tree view where "</field>" closing tag was missing due to this you were getting this issue. Kindly update the below view.

<?xml version="1.0" encoding="utf-8"?>

<odoo>

<record id="transfer_tree" model="ir.ui.view">

<field name="name">Money.Transfer.tree</field>

<field name="model">transfers.name</field>

<field name="type">tree</field>

<field name="arch" type="xml">

<tree string ="money_transfers">

<field name ="transfers_Name"/>

<field name ="transfers_ISO"/>

<field name ="transfers_amount"/>

<field name ="notes"/>

</tree>

</field>

</record>

<record id="money_transfer" model="ir.ui.view">

<field name="name">Money.Transfer.form</field>

<field name="model">transfers.name</field>

<field name="type">form</field>

<field name="arch" type="xml">

<form string ="money_transfers">

<sheet>

<group>

<group>

<field name ="transfers_Name"/>

</group>

<group>

<field name ="transfers_ISO"/>

<group>

<field name ="transfers_amount"/>

<field name ="notes"/>

<field name ="image"/>

</group>

</sheet>

</form>

</field>

</record>

<record id="action_transfers" model="ir.actions.act_window">

<field name="name">Transfers</field>

<field name="type">ir.actions.act_window</field>

<field name="res_model">transfers.name</field>

<field name="view_mode">tree,form</field>

<field name="help" type="html">

<p class="o_view_nocontent_smiling_face">

create your first transfer

</p>

</field>

</record>

<menuitem id ="transfers_root" name ="Transfers" sequence ="0" web_icon="transfers,static/description/icon.png" />

<menuitem id ="transfers_name" name ="Transfers_Name" parent="transfers_root" action="action_transfers"/>

</odoo>

Thanks.

Ashish Singh