Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Priemyselné odvetvia
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Reštaurácia
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Reality
    • Real Estate Agency
    • Architecture Firm
    • Konštrukcia
    • Estate Managament
    • Gardening
    • Property Owner Association
    Poradenstvo
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Jedlo
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Iní
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Pomoc

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

Odoo 12.0 cannot be located in parent view ??

Odoberať

Get notified when there's activity on this post

This question has been flagged
viewsmodulesupgradingissues
1 Odpoveď
7768 Zobrazenia
Avatar
Muhammad Arslan

Hi,

I'm facing this error whenever I upgrade any module, kindly help in this issue. 

Error: 
Server Error 

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/models.py", line 1108, in _validate_fields
check(self)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 345, in _check_xml
view_def = view.read_combined(['arch'])
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 784, in read_combined
arch = self.apply_view_inheritance(arch_tree, root.id, self.model)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 732, in apply_view_inheritance
source = self.apply_inheritance_specs(source, specs_tree, view_id)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 710, in apply_inheritance_specs
self.raise_view_error(_("Element '%s' cannot be located in parent view") % tag, inherit_id)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 548, in raise_view_error
raise ValueError(message)
ValueError: Element '<xpath expr="//td[hasclass('td-qty')]/div[hasclass('css_quantity','input-group','oe_website_spinner')]//div[hasclass('input-group-prepend')]">' cannot be located in parent view

Error context:
View `Shopping Cart Lines`
[view_id: 3411, xml_id: website_quote_system.cart_check_quote_line_readonly_qty, model: n/a, parent_id: 1275]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 757, in parse
self._tags[rec.tag](rec, de, mode=mode)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 735, in _tag_template
return self._tag_record(record, data_node)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 662, in _tag_record
record = model.with_context(rec_context)._load_records([data], self.mode == 'update')
File "/usr/lib/python3/dist-packages/odoo/models.py", line 3811, in _load_records
data['record']._load_records_write(data['values'])
File "/usr/lib/python3/dist-packages/odoo/addons/website/models/ir_ui_view.py", line 120, in _load_records_write
super(View, self)._load_records_write(values)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 3749, in _load_records_write
self.write(values)
File "/usr/lib/python3/dist-packages/odoo/addons/website/models/ir_ui_view.py", line 41, in write
return super(View, self).write(vals)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 444, in write
return super(View, self).write(self._compute_defaults(vals))
File "/usr/lib/python3/dist-packages/odoo/models.py", line 3323, in write
fields[0].determine_inverse(records)
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1110, in determine_inverse
getattr(records, self.inverse)()
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 275, in _inverse_arch
view.write(data)
File "/usr/lib/python3/dist-packages/odoo/addons/website/models/ir_ui_view.py", line 41, in write
return super(View, self).write(vals)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 444, in write
return super(View, self).write(self._compute_defaults(vals))
File "/usr/lib/python3/dist-packages/odoo/models.py", line 3284, in write
self._write(store_vals)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 3430, in _write
self._validate_fields(vals)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 1112, in _validate_fields
raise ValidationError("%s\n\n%s" % (_("Error while validating constraint"), tools.ustr(e)))
odoo.exceptions.ValidationError: ('Error while validating constraint\n\nElement \'<xpath expr="//td[hasclass(\'td-qty\')]/div[hasclass(\'css_quantity\',\'input-group\',\'oe_website_spinner\')]//div[hasclass(\'input-group-prepend\')]">\' cannot be located in parent view\n\nError context:\nView `Shopping Cart Lines`\n[view_id: 3411, xml_id: website_quote_system.cart_check_quote_line_readonly_qty, model: n/a, parent_id: 1275]', None)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 654, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 312, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/usr/lib/python3/dist-packages/odoo/http.py", line 696, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 344, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 337, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 939, in __call__
return self.method(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 517, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 966, in call_button
action = self._call_kw(model, method, args, {})
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 954, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 749, in call_kw
return _call_kw_multi(method, model, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 736, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "<decorator-gen-67>", line 2, in button_immediate_upgrade
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 73, in check_and_log
return method(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 613, in button_immediate_upgrade
return self._button_immediate_function(type(self).button_upgrade)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 552, in _button_immediate_function
modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 417, in load_modules
force, status, report, loaded_modules, update_module, models_to_check)
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 313, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 222, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package, report=report)
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 68, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 801, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 864, in convert_xml_import
obj.parse(doc.getroot(), mode=mode)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 754, in parse
self.parse(rec, mode)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 763, in parse
exc_info[2]
File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 86, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 757, in parse
self._tags[rec.tag](rec, de, mode=mode)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 735, in _tag_template
return self._tag_record(record, data_node)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 662, in _tag_record
record = model.with_context(rec_context)._load_records([data], self.mode == 'update')
File "/usr/lib/python3/dist-packages/odoo/models.py", line 3811, in _load_records
data['record']._load_records_write(data['values'])
File "/usr/lib/python3/dist-packages/odoo/addons/website/models/ir_ui_view.py", line 120, in _load_records_write
super(View, self)._load_records_write(values)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 3749, in _load_records_write
self.write(values)
File "/usr/lib/python3/dist-packages/odoo/addons/website/models/ir_ui_view.py", line 41, in write
return super(View, self).write(vals)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 444, in write
return super(View, self).write(self._compute_defaults(vals))
File "/usr/lib/python3/dist-packages/odoo/models.py", line 3323, in write
fields[0].determine_inverse(records)
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1110, in determine_inverse
getattr(records, self.inverse)()
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 275, in _inverse_arch
view.write(data)
File "/usr/lib/python3/dist-packages/odoo/addons/website/models/ir_ui_view.py", line 41, in write
return super(View, self).write(vals)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 444, in write
return super(View, self).write(self._compute_defaults(vals))
File "/usr/lib/python3/dist-packages/odoo/models.py", line 3284, in write
self._write(store_vals)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 3430, in _write
self._validate_fields(vals)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 1112, in _validate_fields
raise ValidationError("%s\n\n%s" % (_("Error while validating constraint"), tools.ustr(e)))
odoo.tools.convert.ParseError: "Error while validating constraint

Element '<xpath expr="//td[hasclass('td-qty')]/div[hasclass('css_quantity','input-group','oe_website_spinner')]//div[hasclass('input-group-prepend')]">' cannot be located in parent view

Error context:
View `Shopping Cart Lines`
[view_id: 3411, xml_id: website_quote_system.cart_check_quote_line_readonly_qty, model: n/a, parent_id: 1275]
None" while parsing None:391, near
<data inherit_id="website_stock.cart_line_validate_lines">
<xpath expr="//table//tbody//a[hasclass('js_delete_product', 'no-decoration')]" position="attributes">
<attribute name="t-if">not line.order_id.preorder_payment_state == 'partial'</attribute>
</xpath>
<xpath expr="//table/tbody/t/tr/td[last()]" position="after">
<t t-if="not line.order_id.preorder_payment_state == 'partial'">
<t t-if="not validate_value">
<td class="text-center td-qty" id="td-qty" t-att-data-line-id="line.id" t-att-data-product-id="line.product_id.id" style="width: 50px;">
<a href="#" class="remove-cart-line"><i class="fa fa-trash-o fa-2x"/></a>
<div class="cart-line-error-md hidden-xs">
<i class="fa fa-exclamation-triangle"/> Product Not Available
</div>
<div class="cart-line-error-xs hidden-md hidden-sm hidden-md hidden-lg">
<i class="fa fa-exclamation-triangle"/> Product Not Available
</div>
</td>
</t>
</t>
</xpath>
<xpath expr="//table/tbody/t/tr/t[3]" position="replace">
<t t-if="line.order_id.preorder_payment_state == 'partial'">
<td class="text-center td-qty" id="td-qty">
<div class="input-group oe_website_spinner">
<a t-attf-href="#" class="mb8 input-group-addon js_add_cart_json" data-no-instant="" style="cursor:default;text-decoration:none;pointer-events:none;">
<i class="fa fa-minus"/>
</a>
<input type="text" class=" text-center form-control" t-att-data-line-id="line.id" readonly="1" t-att-data-product-id="line.product_id.id" t-att-value="int(line.product_uom_qty)"/>
<a t-attf-href="#" class="mb8 input-group-addon float_left js_add_cart_json" data-no-instant="" style="cursor:default;text-decoration:none;pointer-events:none;">
<i class="fa fa-plus"/>
</a>
</div>
</td>
</t>
<t t-if="not line.order_id.preorder_payment_state == 'partial'">
<t t-if="validate_value">
<td class="text-center td-qty" id="td-qty">
<div class="input-group oe_website_spinner">
<a t-attf-href="#" class="mb8 input-group-addon js_add_cart_json" data-no-instant="">
<i class="fa fa-minus"/>
</a>
<input type="text" class="js_quantity form-control" t-att-data-line-id="line.id" t-att-data-product-id="line.product_id.id" t-att-value="int(line.product_uom_qty)"/>
<a t-attf-href="#" class="mb8 input-group-addon float_left js_add_cart_json" data-no-instant="">
<i class="fa fa-plus"/>
</a>
</div>
</td>
</t>
</t>
</xpath>
</data>
0
Avatar
Zrušiť
Avatar
Binh Nguyen
Best Answer

There is a module in your database/addon-path which also depends/updates/inherits module `website_stock` and conflicted with your new installing module `website_quote_system`.

It seems some inheritance view remove/change the xml node from parent view then `website_quote_system` cannot find the correct one since it does not exist anymore.

Follow these steps below to resolve your issue:

  1. Run the psql query to let odoo stop upgrading modules: `update ir_module_module set state='installed' where state='to upgrade'`

  2. Remove `website_quote_system` out of your addon-path

  3. In your case, upgrade module `website_stock` to make the database refresh

  4. Please check with your supplier if they can support in this case.

Regards,

Binh Nguyen

0
Avatar
Zrušiť
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrácia
Related Posts Replies Zobrazenia Aktivita
Custom Module - installs fine first time but upgrading gives error Solved
views modules upgrading Odoo13.0
Avatar
Avatar
1
aug 20
3264
View xml's not reloading when upgrading custom module Solved
modules upgrading v14
Avatar
Avatar
Avatar
Avatar
4
feb 25
18583
Recommended way of changing frontend values Solved
views modules portal
Avatar
Avatar
1
júl 23
4406
Error Element cannot be located in parent view
views modules error
Avatar
Avatar
1
máj 23
4695
[SOLVED] Custom module won't show view when clicking on menu item
views modules menu
Avatar
0
okt 22
6143
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo je sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now