Zum Inhalt springen
Odoo Menü
  • Anmelden
  • Jetzt gratis testen
  • Apps
    Finanzen
    • Buchhaltung
    • Rechnungsstellung
    • Spesenabrechnung
    • Tabellenkalkulation (BI)
    • Dokumente
    • E-Signatur
    Vertrieb
    • CRM
    • Vertrieb
    • Kassensystem – Shop
    • Kassensystem – Restaurant
    • Abonnements
    • Vermietung
    Websites
    • Website-Builder
    • E-Commerce
    • Blog
    • Forum
    • Livechat
    • E-Learning
    Lieferkette
    • Lager
    • Fertigung
    • PLM
    • Einkauf
    • Wartung
    • Qualität
    Personalwesen
    • Mitarbeiter
    • Personalbeschaffung
    • Abwesenheiten
    • Mitarbeiterbeurteilung
    • Personalempfehlungen
    • Fuhrpark
    Marketing
    • Social Marketing
    • E-Mail-Marketing
    • SMS-Marketing
    • Veranstaltungen
    • Marketing-Automatisierung
    • Umfragen
    Dienstleistungen
    • Projekte
    • Zeiterfassung
    • Außendienst
    • Kundendienst
    • Planung
    • Termine
    Produktivität
    • Dialog
    • Genehmigungen
    • IoT
    • VoIP
    • Wissensdatenbank
    • WhatsApp
    Apps von Drittanbietern Odoo Studio Odoo Cloud-Plattform
  • Branchen
    Einzelhandel
    • Buchladen
    • Kleidergeschäft
    • Möbelhaus
    • Lebensmittelgeschäft
    • Baumarkt
    • Spielwarengeschäft
    Essen & Gastgewerbe
    • Bar und Kneipe
    • Restaurant
    • Fast Food
    • Gästehaus
    • Getränkehändler
    • Hotel
    Immobilien
    • Immobilienagentur
    • Architekturbüro
    • Baugewerbe
    • Immobilienverwaltung
    • Gartenarbeit
    • Eigentümervereinigung
    Beratung
    • Buchhaltungsfirma
    • Odoo-Partner
    • Marketingagentur
    • Anwaltskanzlei
    • Talentakquise
    • Prüfung & Zertifizierung
    Fertigung
    • Textil
    • Metall
    • Möbel
    • Speisen
    • Brauerei
    • Firmengeschenke
    Gesundheit & Fitness
    • Sportklub
    • Brillengeschäft
    • Fitnessstudio
    • Therapeut
    • Apotheke
    • Friseursalon
    Handel
    • Handyman
    • IT-Hardware & -Support
    • Solarenergiesysteme
    • Schuster
    • Reinigungsdienstleistungen
    • HLK-Dienstleistungen
    Sonstiges
    • Gemeinnützige Organisation
    • Umweltschutzagentur
    • Plakatwandvermietung
    • Fotostudio
    • Fahrrad-Leasing
    • Software-Händler
    Alle Branchen ansehen
  • Community
    Lernen
    • Tutorials
    • Dokumentation
    • Zertifizierungen
    • Schulung
    • Blog
    • Podcast
    Bildung fördern
    • Bildungsprogramm
    • Scale-Up! Planspiel
    • Odoo besuchen
    Software anfragen
    • Herunterladen
    • Editionen vergleichen
    • Releases
    Zusammenarbeiten
    • Github
    • Forum
    • Veranstaltungen
    • Übersetzungen
    • Partner werden
    • Dienstleistungen für Partner
    • Buchhaltungsfirma registrieren
    Services anfragen
    • Partner finden
    • Buchhalter finden
    • Einen Experten treffen
    • Implementierungsservices
    • Kundenreferenzen
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Eine Demo erhalten
  • Preiskalkulation
  • Hilfe

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

  • CRM
  • e-Commerce
  • Buchhaltung
  • Lager
  • PoS
  • Projekte
  • MRP
All apps
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo accounting v14 pos v15
Über dieses Forum
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo accounting v14 pos v15
Über dieses Forum
Hilfe

Can't install custom module -> arch: Invalid XML for View Architecture!

Abonnieren

Erhalten Sie eine Benachrichtigung, wenn es eine Aktivität zu diesem Beitrag gibt

Diese Frage wurde gekennzeichnet
modulexmlinstallarchitectureinvalid
4 Antworten
6692 Ansichten
Avatar
Amre MAARIR

Hello everyone,

I'm trying to create a custom module that can add fields to an existing view. I followed this tutorial to create the module : http://www.pixelite.co.nz/article/adding-additional-fields-using-custom-module-openerp-7/ but i get an error when i try to install it : arch: Invalid XML for View Architecture!

I'm using OpenERP 7 on Windows 7.

This is my module configuration:

  • __init__.py

import demo
  • __openerp__.py

{
"name": "Demo module",
"version": "0.2",
"author": "Amre",
"category": "Demo",
"depends": ["base"],
"demo": [],
"data": ["demo_view.xml"],
"installable": True,
}
  • demo.py

from openerp.osv import osv, fields


class demo(osv.osv):
_inherit = "res.partner"

_columns = {
'demo_id': fields.integer('Demo ID', size=11),
}

_defaults = {
'demo_id': 0
}


demo()
  • demo_view.xml

<?xml version="1.0"?>
<openerp>
<data>
<record model="ir.ui.view" id="demo_view_form">
<field name="name">res.partner.form</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<xpath expr="/form/sheet/group/group/field[@name='website']" position="after">
<field name="demo_id"/>
</xpath>
</field>
</record>
</data>
</openerp>

This module example needs to add a field called "demo_id" to the existing view "base.view_partner_form".


Thanks a lot for you effort and your help.


EDIT 1 : I corrected the xpath with "form", but i still get the same error.

EDIT 2 : made corrections suggested by Akhil P Sivan, i still get the same error again :(

EDIT 3 : made corrections suggested by Temur,the code now works like a charm :D. Good job guys !

0
Avatar
Verwerfen
Avatar
Temur
Beste Antwort

You can use partial path:

<xpath expr="//group/group/field[@name='website']" position="after">
<field name="demo_id"/>
</xpath>

UPDATE:

added missing apostrophe to the above code. it should work now.

1
Avatar
Verwerfen
Amre MAARIR
Autor

Thanks for the feedback, i tried your code but i still get the same error :s

Temur

Sorry, there were missing ' after website in xpath.. (perhaps I copied it from the question). I updated answer, try now please

Amre MAARIR
Autor

GREAT !! it works.. thanks a lot buddy you really helped me.

Temur

You're welcome

Avatar
Akhil P Sivan
Beste Antwort

Remove duplicate occurrence of "data" in your __openerp__.py file. Also _columns and _defaults are different dictionaries. Put the closing brace of _columns before _defaults.  

Keep .py file like this:

from openerp.osv import osv, fields


class demo(osv.osv):
 
_inherit = "res.partner"

_columns = {
'demo_id': fields.integer('Demo ID', size=11),
              }

_defaults = {
'demo_id': 0
}


demo()

Because you wrongly typed form in your xpath expression:

<xpath expr="/form/sheet/group/group/field[@name='website']" position="after">
<field name="demo_id"/>
</xpath>
1
Avatar
Verwerfen
Amre MAARIR
Autor

Thanks for the tip, but still getting the same error.

Amre MAARIR
Autor

Thanks a lot for your help, and sorry for those mistakes i'm new to module developement. Unfortunatly i made all the corrections but i still have the same error !!

Avatar
Amre MAARIR
Autor Beste Antwort

Thanks for your feedback,

i tried both solutions but i still get the same error when i try to install the module. :\


UPDATE : It works now !! the xpath expression was missing an apostrophe. Thanks a lots to Temur and to Akhil P Sivan for your effort.


0
Avatar
Verwerfen
Akhil P Sivan

Make those corrections in updated answer n try

Akhil P Sivan

Did you check after the corrections?

OdooBot

Thanks a lot for your help, and sorry for the mistakes i'm new to module développement.
I made all the corrections but I still get the same error :(

Le 2 nov. 2015 15:53, "Akhil P Sivan" <akhilpsivan01@gmail.com> a écrit :

Did you check after the corrections?

--
Akhil P Sivan
Sent by Odoo S.A. using Odoo access your messages
Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!

Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!

Registrieren
Verknüpfte Beiträge Antworten Ansichten Aktivität
OPENERP: ValidateError Error occurred while validating the field(s) arch: Invalid XML for View Architecture
xml architecture invalid validateerror
Avatar
Avatar
Avatar
2
März 15
9772
Error occurred while validating the field(s) arch: Invalid XML for View Architecture! while installing a module .
module install view architecture validateerror
Avatar
Avatar
Avatar
2
März 15
9438
Invalid XML for View Architecture on Account Banking Payment export module install
export xml account architecture invalid
Avatar
Avatar
1
März 15
6627
help installing module V7.0
error xml install mrp invalid
Avatar
Avatar
Avatar
2
März 15
6172
odoo-14: I get an error when I try to install a module in Digital Ocean Gelöst
module install
Avatar
Avatar
1
Apr. 21
6613
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Herunterladen
  • Github
  • Runbot
  • Übersetzungen
Dienstleistungen
  • Odoo.sh-Hosting
  • Support
  • Upgrade
  • Individuelle Entwicklungen
  • Ausbildung
  • Buchhalter finden
  • Partner finden
  • Partner werden
Über uns
  • Unsere Firma
  • Markenwerte
  • Kontakt
  • Karriere
  • Veranstaltungen
  • Podcast
  • Blog
  • Kunden
  • Rechtliches • Datenschutz
  • Sicherheit
الْعَرَبيّة 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 ist eine Suite von Open-Source-Betriebsanwendungen, die alle Bedürfnisse Ihres Unternehmens abdecken: CRM, E-Commerce, Buchhaltung, Lager, Kassensystem, Projektmanagement etc.

Das einzigartige Wertversprechen von Odoo ist, dass es gleichzeitig sehr einfach zu bedienen und voll integriert ist.

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