콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
8086 화면

I'm new to openerp and using version 7. I'm trying to create a new module using the instructions from the link below:

http://acespritechblog.wordpress.com/2012/05/22/how-to-create-a-module-in-openerp/

But when i try to install the module all i'm getting is "Error occurred while validating the field(s) arch: Invalid XML for View Architecture!" is there a way to debug this? What part of my view is wrong? Everything i did is the same with the link but here is the view XML anyway:

<?xml version="1.0" encoding="utf-8"?>

<openerp>
    <data>
       <record model="ir.ui.view" id="test_base_form">
           <field name="name">test.base.form</field>
               <field name="model">test.base</field>
               <field name="type">form</field>
               <field name="arch" type="xml">
                   <form string="Test Base">
                       <field name="name"/>
                       <field name="code"/>
                   </form>
              </field>
        </record>

        <record model="ir.ui.view" id="test_base_tree">
            <field name="name">test.base.tree</field>
            <field name="model">test.base</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Test Base">
                    <field name="name"/>
                    <field name="code"/>
                </tree>
            </field>
        </record>

        <record model="ir.actions.act_window" id="action_test_seq">
            <field name="name">Test Base</field>
            <field name="res_model">test.base</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
        </record>

        <menuitem id="menu_test_base_main" name="Test Base"/>
        <menuitem id="menu_test_base" parent="menu_test_base_main" name="Test Base" action="action_test_seq"/>

    </data>
</openerp>

아바타
취소
베스트 답변

Did you try to restart openerp?

 

In Debian/Ubuntu Linux just do:

$ sudo service openerp restart

 

Then login and find the module and click upgrade.  Sometimes openerp/postgresql needs to first restart before your xml files are recognised.

아바타
취소
작성자

It actually worked thanks but i can't mark your answer as the correct one because of my karma i guess.

베스트 답변

Hi..

Your xml looks fine... just check wether your python objects are loaded.. check whether py files are imported in __init__.py...

아바타
취소
관련 게시물 답글 화면 활동
1
3월 15
3947
2
3월 15
3813
0
3월 15
3708
0
3월 15
4196
1
6월 16
4085