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

cant solve this error - ValidateError Error occurred while validating the field(s) arch: Invalid XML for View Architecture!

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
2 Odpowiedzi
7034 Widoki
Awatar
Praveen S

*__init__.py*

import person

__openerp__.py

{
    'name': 'Person Data Storage',
    'version': '2.0',
    'author': 'Praveen',
    'depends': ['base'],
    'data': [  # data files to load at module install
        'view/menu.xml',  
    ], 
    'demo': [],  # demo data (for unit tests)
} 

person.py

from osv import osv, fields

    class person(osv.Model):
        _name = 'person.person'
        _columns = 
{
                       'name': fields.char('Name', size = 100), 
                       'dob': fields.date('Date of birth'),
                       'father_name': fields.char('Father Name', size = 100),
}
     person()

menu.xml

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
       <menuitem id="person_main_menu" name="Persons"/>



     <record id="person_person_tree_view" model="ir.ui.view">
        <field name="name">person.person.tree</field>
        <field name="model">person.person</field>
        <field name="type">tree</field>
        <field name="arch" type="xml">
            <tree string="Persons">
                <field name="name"/>
                <field name="dob"/>
                <field name="father_name"/>
            </tree>
        </field>
    </record>

    <record id="person_person_form_view" model="ir.ui.view">
        <field name="name">person.person.form</field>
        <field name="model">person.person</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
            <form string="Persons">
                <field name="name"/>
                <field name="dob"/>
                <field name="father_name"/>
            </form>
        </field>
    </record>

    <record id="person_normal_action" model="ir.actions.act_window">
        <field name="name">Person</field>
        <field name="res_model">person.person</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,form</field>
    </record>

    <menuitem id="section_main_menu" parent="person_main_menu" name = "View"/>
        <menuitem id="person_real_menu" parent="section_main_menu" action="person_normal_action"/>

    </data>
</openerp>
0
Awatar
Odrzuć
Awatar
Ghanshyam Prajapati
Najlepsza odpowiedź

Hey Praveen,

are you working in OpenERP 7 version??, If yes then you should do following changes,

  • Remove <field name="type">form</field> from form view.

  • Replcae <form string="Persons"> with <form string="Persons" version="7.0">

  • Replace from osv import osv, fields with from openerp.osv import osv, fields

from openerp.osv import osv, fields

person.py

class person(osv.Model):
    _name = 'person.person'
    _columns = {
       'name': fields.char('Name', size = 100), 
       'dob': fields.date('Date of birth'),
       'father_name': fields.char('Father Name', size = 100),
}

menu.xml

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <menuitem id="person_main_menu" name="Persons"/>

         <record id="person_person_tree_view" model="ir.ui.view">
            <field name="name">person.person.tree</field>
            <field name="model">person.person</field>
            <field name="arch" type="xml">
                <tree string="Persons">
                    <field name="name"/>
                    <field name="dob"/>
                    <field name="father_name"/>
                </tree>
            </field>
        </record>

        <record id="person_person_form_view" model="ir.ui.view">
            <field name="name">person.person.form</field>
            <field name="model">person.person</field>
            <field name="arch" type="xml">
                <form string="Persons" version="7.0">
                    <group>
                        <field name="name"/>
                        <field name="dob"/>
                        <field name="father_name"/>
                    </group>
               </form>
            </field>
        </record>

        <record id="person_normal_action" model="ir.actions.act_window">
            <field name="name">Person</field>
            <field name="res_model">person.person</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
        </record>

        <menuitem id="section_main_menu" parent="person_main_menu" name = "View"/>
        <menuitem id="person_real_menu" parent="section_main_menu" action="person_normal_action"/>

    </data>
</openerp>

Hope it work for you.

1
Awatar
Odrzuć
Praveen S
Autor

thanks Ghanshyam Prajapati for your replay the same error occurs after replacing all of the above

Ghanshyam Prajapati

Hi Praveen, if my answer solved your problem, then please mark this answer as solved, Thanks.

Ghanshyam Prajapati

have you updated your module, after made changes?? please restart your server and then update your module.

Praveen S
Autor

same error occurs when me try to install this module after replacing all of the above fields

Ghanshyam Prajapati

Hey Praveen I installed your module with my changes and its working fine. See my updated answer

Praveen S
Autor

but it doesn't work for me pls share your work files

Ghanshyam Prajapati

https://www.dropbox.com/s/fhor2fx6blp8onr/test_module.zip download my module. and please mark my answer as solved if your problem is solved, Thanks. :)

Praveen S
Autor

Your module was successfully working. But i didn't find the error in my module. If you know it pls help me.

Awatar
Alec Mouti
Najlepsza odpowiedź

I have been having that error problem for weeks now. I changed the view as suggested by many still no luck. I even removed openerp and installed the current release. I hope this thread can find solution to my problem.

0
Awatar
Odrzuć
Praveen S
Autor

is it worked for u

Alec Mouti

No, It did not work. I believe there is something else that is causing this error apart from xml views. example, I managed to install custom hotel management module in earlier opener 7.0 releases without problem. I then removed openerp and reinstalled the stable openerp 7.0 release. now I cannot install the same custom Hotel module because of this error. nothing has change regarding custom Module. this tells me that the problem might be a bug. thus why Ghanshyam Prajapati can install the same module while you cannot

Praveen S
Autor

Hi Alec Mouti, I got the solution when me deleted all the data regarding to the current module,delete the module from add ones and restarted the server. Then i copied the module to addone and updated then installed. Its now working. Hopes it will helps you too

sneha antony

I installed the same module with the updated code as a new module.But my issue is the module is not shown in the Installed Modules list though it is there in the addons folder of my openerp 7.What can be done to resolve this issue

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