Issue for import_journal_entry (#2,153)
Status: OPEN
Date: 10/08/2021
ID: 2,153
S/O number: SO2021/1523531
Reviewer: Hiral Bhatt
Module Name: import_journal_entry
Version: 13.0
Tags:

Assigned to
Contact
Tirth Mehta
tirth.mehta@browseinfo.in

Description
i am getting this error

Please help ASAP

Error:

Odoo Server Error



Traceback (most recent call last):

File "/odook13e/odook13e-server/odoo/addons/base/models/ir_ui_view.py", line 662, in apply_inheritance_specs

pre_locate=pre_locate)

File "/odook13e/odook13e-server/odoo/tools/template_inheritance.py", line 230, in apply_inheritance_specs

_("Element '%s' cannot be located in parent view") % tag

ValueError: Element '<button name="action_post">' cannot be located in parent view



During handling of the above exception, another exception occurred:



Traceback (most recent call last):

File "/odook13e/odook13e-server/odoo/tools/convert.py", line 712, in parse

self._tag_root(de)

File "/odook13e/odook13e-server/odoo/tools/convert.py", line 674, in _tag_root

f(rec)

File "/odook13e/odook13e-server/odoo/tools/convert.py", line 674, in _tag_root

f(rec)

File "/odook13e/odook13e-server/odoo/tools/convert.py", line 577, in _tag_record

record = model._load_records([data], self.mode == 'update')

File "/odook13e/odook13e-server/odoo/models.py", line 4080, in _load_records

records = self._load_records_create([data['values'] for data in to_create])

File "/odook13e/odook13e-server/odoo/models.py", line 3994, in _load_records_create

return self.create(values)

File "<decorator-gen-148>", line 2, in create

File "/odook13e/odook13e-server/odoo/api.py", line 317, in _model_create_single

return self.browse().concat(*(create(self, vals) for vals in arg))

File "/odook13e/odook13e-server/odoo/api.py", line 317, in <genexpr>

return self.browse().concat(*(create(self, vals) for vals in arg))

File "/odook13e/enterprise/addons/web_studio/models/studio_mixin.py", line 19, in create

res = super(StudioMixin, self).create(vals)

File "<decorator-gen-31>", line 2, in create

File "/odook13e/odook13e-server/odoo/api.py", line 335, in _model_create_multi

return create(self, [arg])

File "/odook13e/odook13e-server/odoo/addons/base/models/ir_ui_view.py", line 473, in create

return super(View, self).create(vals_list)

File "<decorator-gen-3>", line 2, in create

File "/odook13e/odook13e-server/odoo/api.py", line 336, in _model_create_multi

return create(self, arg)

File "/odook13e/odook13e-server/odoo/models.py", line 3775, in create

fields[0].determine_inverse(batch_recs)

File "/odook13e/odook13e-server/odoo/fields.py", line 1114, in determine_inverse

getattr(records, self.inverse)()

File "/odook13e/odook13e-server/odoo/addons/base/models/ir_ui_view.py", line 299, in _inverse_arch

view.write(data)

File "/odook13e/enterprise/addons/web_studio/models/studio_mixin.py", line 28, in write

res = super(StudioMixin, self).write(vals)

File "/odook13e/odook13e-server/odoo/addons/base/models/ir_ui_view.py", line 491, in write

res = super(View, self).write(self._compute_defaults(vals))

File "/odook13e/odook13e-server/odoo/models.py", line 3564, in write

real_recs._validate_fields(set(vals) - set(inverse_fields))

File "/odook13e/odook13e-server/odoo/models.py", line 1176, in _validate_fields

check(self)

File "/odook13e/odook13e-server/odoo/addons/base/models/ir_ui_view.py", line 385, in _check_xml

view_def = view.read_combined(['arch'])

File "/odook13e/odook13e-server/odoo/addons/base/models/ir_ui_view.py", line 736, in read_combined

arch = self.apply_view_inheritance(arch_tree, root.id, self.model)

File "/odook13e/odook13e-server/odoo/addons/base/models/ir_ui_view.py", line 685, in apply_view_inheritance

source = self.apply_inheritance_specs(source, specs_tree, view_id)

File "/odook13e/enterprise/addons/web_studio/models/ir_ui_view.py", line 154, in apply_inheritance_specs

pre_locate=pre_locate)

File "/odook13e/odook13e-server/odoo/addons/base/models/ir_ui_view.py", line 664, in apply_inheritance_specs

self.raise_view_error(str(e), inherit_id)

File "/odook13e/odook13e-server/odoo/addons/base/models/ir_ui_view.py", line 612, in raise_view_error

raise ValueError(message)

ValueError: Element '<button name="action_post">' cannot be located in parent view



Error context:

View `inherit.move.form.import.move.line`

[view_id: 1817, xml_id: n/a, model: account.move, parent_id: 964]



During handling of the above exception, another exception occurred:



Traceback (most recent call last):

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

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

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

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

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

raise value

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

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

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

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

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

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

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

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

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

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

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

response = f(*args, **kw)

File "/odook13e/odook13e-server/addons/web/controllers/main.py", line 1331, in call_button

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

File "/odook13e/odook13e-server/addons/web/controllers/main.py", line 1319, in _call_kw

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

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

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

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

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

File "<decorator-gen-59>", line 2, in button_immediate_install

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

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

File "/odook13e/odook13e-server/odoo/addons/base/models/ir_module.py", line 463, in button_immediate_install

return self._button_immediate_function(type(self).button_install)

File "/odook13e/odook13e-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 "/odook13e/odook13e-server/odoo/modules/registry.py", line 86, in new

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

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

loaded_modules, update_module, models_to_check)

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

perform_checks=perform_checks, models_to_check=models_to_check

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

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

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

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

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

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

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

obj.parse(doc.getroot())

File "/odook13e/odook13e-server/odoo/tools/convert.py", line 721, in parse

exc_info[2]

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

raise value.with_traceback(tb)

File "/odook13e/odook13e-server/odoo/tools/convert.py", line 712, in parse

self._tag_root(de)

File "/odook13e/odook13e-server/odoo/tools/convert.py", line 674, in _tag_root

f(rec)

File "/odook13e/odook13e-server/odoo/tools/convert.py", line 674, in _tag_root

f(rec)

File "/odook13e/odook13e-server/odoo/tools/convert.py", line 577, in _tag_record

record = model._load_records([data], self.mode == 'update')

File "/odook13e/odook13e-server/odoo/models.py", line 4080, in _load_records

records = self._load_records_create([data['values'] for data in to_create])

File "/odook13e/odook13e-server/odoo/models.py", line 3994, in _load_records_create

return self.create(values)

File "<decorator-gen-148>", line 2, in create

File "/odook13e/odook13e-server/odoo/api.py", line 317, in _model_create_single

return self.browse().concat(*(create(self, vals) for vals in arg))

File "/odook13e/odook13e-server/odoo/api.py", line 317, in <genexpr>

return self.browse().concat(*(create(self, vals) for vals in arg))

File "/odook13e/enterprise/addons/web_studio/models/studio_mixin.py", line 19, in create

res = super(StudioMixin, self).create(vals)

File "<decorator-gen-31>", line 2, in create

File "/odook13e/odook13e-server/odoo/api.py", line 335, in _model_create_multi

return create(self, [arg])

File "/odook13e/odook13e-server/odoo/addons/base/models/ir_ui_view.py", line 473, in create

return super(View, self).create(vals_list)

File "<decorator-gen-3>", line 2, in create

File "/odook13e/odook13e-server/odoo/api.py", line 336, in _model_create_multi

return create(self, arg)

File "/odook13e/odook13e-server/odoo/models.py", line 3775, in create

fields[0].determine_inverse(batch_recs)

File "/odook13e/odook13e-server/odoo/fields.py", line 1114, in determine_inverse

getattr(records, self.inverse)()

File "/odook13e/odook13e-server/odoo/addons/base/models/ir_ui_view.py", line 299, in _inverse_arch

view.write(data)

File "/odook13e/enterprise/addons/web_studio/models/studio_mixin.py", line 28, in write

res = super(StudioMixin, self).write(vals)

File "/odook13e/odook13e-server/odoo/addons/base/models/ir_ui_view.py", line 491, in write

res = super(View, self).write(self._compute_defaults(vals))

File "/odook13e/odook13e-server/odoo/models.py", line 3564, in write

real_recs._validate_fields(set(vals) - set(inverse_fields))

File "/odook13e/odook13e-server/odoo/models.py", line 1176, in _validate_fields

check(self)

File "/odook13e/odook13e-server/odoo/addons/base/models/ir_ui_view.py", line 385, in _check_xml

view_def = view.read_combined(['arch'])

File "/odook13e/odook13e-server/odoo/addons/base/models/ir_ui_view.py", line 736, in read_combined

arch = self.apply_view_inheritance(arch_tree, root.id, self.model)

File "/odook13e/odook13e-server/odoo/addons/base/models/ir_ui_view.py", line 685, in apply_view_inheritance

source = self.apply_inheritance_specs(source, specs_tree, view_id)

File "/odook13e/enterprise/addons/web_studio/models/ir_ui_view.py", line 154, in apply_inheritance_specs

pre_locate=pre_locate)

File "/odook13e/odook13e-server/odoo/addons/base/models/ir_ui_view.py", line 664, in apply_inheritance_specs

self.raise_view_error(str(e), inherit_id)

File "/odook13e/odook13e-server/odoo/addons/base/models/ir_ui_view.py", line 612, in raise_view_error

raise ValueError(message)

odoo.tools.convert.ParseError: "Element '<button name="action_post">' cannot be located in parent view



Error context:

View `inherit.move.form.import.move.line`

[view_id: 1817, xml_id: n/a, model: account.move, parent_id: 964]" while parsing /odook13e/odook13e-server/addons/import_journal_entry/account_move.xml:2, near

<odoo>

<data>



<!--Import account Move lines-->

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

<field name="name">Import Journal Entries</field>

<field name="model">gen.journal.entry</field>

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

<form string="Import Journal Items">

<group>

<field name="import_option" wedgit="selection"/>

<field name="file_to_upload"/>

</group>

<footer>

<button string="Import" name="import_move_lines" type="object"/>

<button string="Cancel" class="btn-default" special="cancel"/>

</footer>

</form>

</field>

</record>



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

<field name="name">Import Journal Entries</field>

<field name="res_model">gen.journal.entry</field>



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

<field name="target">new</field>

</record>



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

<field name="name">inherit.move.form.import.move.line</field>

<field name="model">account.move</field>

<field name="inherit_id" ref="account.view_move_form"/>

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

<button name="action_post" position="after">

<button string="Import Journal Items" name="%(action_import_account_move_line)d" type="action" attrs="{'invisible': [('state', '!=', 'draft')]}" class="oe_highlight"/>

</button>

</field>

</record>



</data>

</odoo>

Message and communication history