Skip to Content
Menu
This question has been flagged
5 Replies
1936 Views

iam trying to update mu custom module , iam getting this error when iam trying to upgrade the module

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



transfers.xml:


<?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

If you are new to odoo development, have a look at this:

http://learnopenerp.blogspot.com

Best Answer

You miss to close the tag :  <field name="arch" type="xml">

<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>

Thanks
Avatar
Discard
Author

thanks for the reply but still iam getting the same error

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

<odoo>

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

<field name="name">Money.Transfer.form</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"/>

<field name ="image"/>

</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>

<field name ="transfers_Name"/>

<field name ="transfers_ISO"/>

<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>

Best Answer

Hi,

Rewrite the record transfer_tree like below

<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>

Avatar
Discard
Author

oh yeah i forgot to close that field , thanks for the reply but still iam getting a new error while upgrading it

Error:

Traceback:

_renderBodyCell@http://localhost:8069/web/static/src/js/views/list/list_renderer.js:444:25

_renderRow/$cells<@http://localhost:8069/web/static/src/js/views/list/list_renderer.js:838:25

_renderRow@http://localhost:8069/web/static/src/js/views/list/list_renderer.js:837:35

_renderRow@http://localhost:8069/web/static/src/js/views/list/list_editable_renderer.js:1166:32

OdooClass.extend/Class.include/</prototype[name]</<@http://localhost:8069/web/static/src/js/core/class.js:123:38

_renderRows@http://localhost:8069/web/static/src/js/views/list/list_renderer.js:858:32

_renderRows@http://localhost:8069/web/static/src/js/views/list/list_editable_renderer.js:1187:26

OdooClass.extend/Class.include/</prototype[name]</<@http://localhost:8069/web/static/src/js/core/class.js:123:38

_renderBody@http://localhost:8069/web/static/src/js/views/list/list_renderer.js:375:26

_renderBody@http://localhost:8069/web/static/src/js/views/list/list_editable_renderer.js:1092:33

OdooClass.extend/Class.include/</prototype[name]</<@http://localhost:8069/web/static/src/js/core/class.js:123:38

_renderView@http://localhost:8069/web/static/src/js/views/list/list_renderer.js:971:32

OdooClass.extend/</prototype[name]</<@http://localhost:8069/web/static/src/js/core/class.js:90:38

_renderView@http://localhost:8069/web/static/src/js/views/list/list_editable_renderer.js:1222:28

OdooClass.extend/Class.include/</prototype[name]</<@http://localhost:8069/web/static/src/js/core/class.js:123:38

_render@http://localhost:8069/web/static/src/js/views/basic/basic_renderer.js:590:21

_render@http://localhost:8069/web/static/src/js/views/list/list_editable_renderer.js:1055:28

OdooClass.extend/Class.include/</prototype[name]</<@http://localhost:8069/web/static/src/js/core/class.js:133:38

start@http://localhost:8069/web/static/src/js/views/abstract_renderer.js:37:34

OdooClass.extend/</prototype[name]</<@http://localhost:8069/web/static/src/js/core/class.js:90:38

start@http://localhost:8069/web/static/src/js/views/list/list_editable_renderer.js:115:21

OdooClass.extend/Class.include/</prototype[name]</<@http://localhost:8069/web/static/src/js/core/class.js:133:38

_widgetRenderAndInsert/<@http://localhost:8069/web/static/src/js/core/widget.js:433:25

transfers.xml:

<?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>

</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>

ps : i have restarted my odoo13

Author

now iam getting this error

<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>

<?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>

</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>