Skip to Content
Odoo Menu
  • Zaloguj się
  • Wypróbuj za darmo
  • Aplikacje
    Finanse
    • Księgowość
    • Fakturowanie
    • Wydatki
    • Arkusz kalkulacyjny (BI)
    • Dokumenty
    • Podpisy
    Sprzedaż
    • CRM
    • Sprzedaż
    • PoS Sklep
    • PoS Restauracja
    • Subskrypcje
    • Wypożyczalnia
    Strony Internetowe
    • Kreator Stron Internetowych
    • eCommerce
    • Blog
    • Forum
    • Czat na Żywo
    • eLearning
    Łańcuch dostaw
    • Magazyn
    • Produkcja
    • PLM
    • Zakupy
    • Konserwacja
    • Jakość
    Zasoby Ludzkie
    • Pracownicy
    • Rekrutacja
    • Urlopy
    • Ocena pracy
    • Polecenia Pracownicze
    • Flota
    Marketing
    • Marketing Społecznościowy
    • E-mail Marketing
    • SMS Marketing
    • Wydarzenia
    • Automatyzacja Marketingu
    • Ankiety
    Usługi
    • Projekt
    • Ewidencja czasu pracy
    • Usługi Terenowe
    • Helpdesk
    • Planowanie
    • Spotkania
    Produktywność
    • Dyskusje
    • Zatwierdzenia
    • IoT
    • VoIP
    • Baza wiedzy
    • WhatsApp
    Aplikacje trzecich stron Studio Odoo Odoo Cloud Platform
  • Branże
    Sprzedaż detaliczna
    • Księgarnia
    • Sklep odzieżowy
    • Sklep meblowy
    • Sklep spożywczy
    • Sklep z narzędziami
    • Sklep z zabawkami
    Żywienie i hotelarstwo
    • Bar i Pub
    • Restauracja
    • Fast Food
    • Pensjonat
    • Dystrybutor napojów
    • Hotel
    Agencja nieruchomości
    • Agencja nieruchomości
    • Biuro architektoniczne
    • Budowa
    • Zarządzanie nieruchomościami
    • Ogrodnictwo
    • Stowarzyszenie właścicieli nieruchomości
    Doradztwo
    • Biuro księgowe
    • Partner Odoo
    • Agencja marketingowa
    • Kancelaria prawna
    • Agencja rekrutacyjna
    • Audyt i certyfikacja
    Produkcja
    • Tekstylia
    • Metal
    • Meble
    • Jedzenie
    • Browar
    • Prezenty firmowe
    Zdrowie & Fitness
    • Klub sportowy
    • Salon optyczny
    • Centrum fitness
    • Praktycy Wellness
    • Apteka
    • Salon fryzjerski
    Transakcje
    • Złota rączka
    • Wsparcie Sprzętu IT
    • Systemy energii słonecznej
    • Szewc
    • Firma sprzątająca
    • Usługi HVAC
    Inne
    • Organizacja non-profit
    • Agencja Środowiskowa
    • Wynajem billboardów
    • Fotografia
    • Leasing rowerów
    • Sprzedawca oprogramowania
    Przeglądaj wszystkie branże
  • Community
    Ucz się
    • Samouczki
    • Dokumentacja
    • Certyfikacje
    • Szkolenie
    • Blog
    • Podcast
    Pomóż w nauce innym
    • Program Edukacyjny
    • Scale Up! Gra biznesowa
    • Odwiedź Odoo
    Skorzystaj z oprogramowania
    • Pobierz
    • Porównaj edycje
    • Wydania
    Współpracuj
    • Github
    • Forum
    • Wydarzenia
    • Tłumaczenia
    • Zostań partnerem
    • Usługi dla partnerów
    • Zarejestruj swoją firmę rachunkową
    Skorzystaj z usług
    • Znajdź partnera
    • Znajdź księgowego
    • Spotkaj się z doradcą
    • Usługi wdrożenia
    • Opinie klientów
    • Wsparcie
    • Aktualizacje
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Zaplanuj demo
  • Cennik
  • Pomoc

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

  • CRM
  • e-Commerce
  • Księgowość
  • Zapasy
  • PoS
  • Projekt
  • MRP
All apps
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Pomoc

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

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
modulexmlinstallarchitectureinvalid
4 Odpowiedzi
6696 Widoki
Awatar
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
Awatar
Odrzuć
Awatar
Temur
Najlepsza odpowiedź

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
Awatar
Odrzuć
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

Awatar
Akhil P Sivan
Najlepsza odpowiedź

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
Awatar
Odrzuć
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 !!

Awatar
Amre MAARIR
Autor Najlepsza odpowiedź

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
Awatar
Odrzuć
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
Podoba Ci się ta dyskusja? Dołącz do niej!

Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!

Zarejestruj się
Powiązane posty Odpowiedzi Widoki Czynność
OPENERP: ValidateError Error occurred while validating the field(s) arch: Invalid XML for View Architecture
xml architecture invalid validateerror
Awatar
Awatar
Awatar
2
mar 15
9773
Error occurred while validating the field(s) arch: Invalid XML for View Architecture! while installing a module .
module install view architecture validateerror
Awatar
Awatar
Awatar
2
mar 15
9439
Invalid XML for View Architecture on Account Banking Payment export module install
export xml account architecture invalid
Awatar
Awatar
1
mar 15
6629
help installing module V7.0
error xml install mrp invalid
Awatar
Awatar
Awatar
2
mar 15
6179
odoo-14: I get an error when I try to install a module in Digital Ocean Rozwiązane
module install
Awatar
Awatar
1
kwi 21
6615
Społeczność
  • Samouczki
  • Dokumentacja
  • Forum
Open Source
  • Pobierz
  • Github
  • Runbot
  • Tłumaczenia
Usługi
  • Hosting Odoo.sh
  • Wsparcie
  • Aktualizacja
  • Indywidualne rozwiązania
  • Edukacja
  • Znajdź księgowego
  • Znajdź partnera
  • Zostań partnerem
O nas
  • Nasza firma
  • Zasoby marki
  • Skontaktuj się z nami
  • Oferty pracy
  • Wydarzenia
  • Podcast
  • Blog
  • Klienci
  • Informacje prawne • Prywatność
  • Bezpieczeństwo Odoo
الْعَرَبيّة 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 to pakiet aplikacji biznesowych typu open source, które zaspokoją wszystkie potrzeby Twojej firmy: CRM, eCommerce, księgowość, inwentaryzacja, punkt sprzedaży, zarządzanie projektami itp.

Unikalną wartością Odoo jest to, że jest jednocześnie bardzo łatwe w użyciu i w pełni zintegrowane.

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