Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

"Invalid XML for View Architecture" when trying to insert a header

By
Fritz Fessler
on 3/22/13, 6:17 AM 1,578 views
  When I load this code I get an error:  "Invalid XML for View Architecture". This raised when I inserted the header. Is it iserted correct? Thanks.

  <record id="student_student_form" model="ir.ui.view">
        <field name="name">student.result.form.new</field>
        <field name="model">student.student</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
            <form string="Student_result" version="7.0" >
                <sheet>
                    <header>
                        <button name="create_marklist" string="Create" type="object"/>
                        <field name="state" widget="statusbar" statusbar_visible="draft,sent,invoiced,done" statusbar_colors='{"draft":"red","done":"blue"}'/>
                    </header>
                    <group colspan="2" col="2">
                        <h3> 
                            <label for="name"/>
                        </h3>
                        <h4>
                            <field name="name" placeholder="Insert a name..."/>
                        </h4>
                        <h3>
                            <label for="age" />
                        </h3>
                        <h4> 
                            <field name="age" placeholder="Insert the age..."/>
                        </h4>   
                        <h3>    
                            <label for="percent"/>
                        </h3>   
                        <h4>    
                            <field name="percent" placeholder="Insert the percent..."/>
                        </h4>   
                        <h3> 
                            <label for="gender"/>
                        </h3>   
                        <h4>    
                            <field name="gender" placeholder="Choose the gender..." />
                        </h4>   
                        <h3>    
                            <label for="active"/>
                        </h3>   
                        <h4>    
                            <field name="active" />
                        </h4>   
                        <h3>    
                            <label for="notes"/>
                        </h3>   
                        <h4>    
                            <field name="notes" placeholder="Insert a note" />
                        </h4>
                    </group>
                </sheet>
            </form>
        </field>
    </record>

What version of OpenERP are you using? If using V7, than you probably have to remove <field name="type">form</field>.

patrick
on 3/22/13, 6:33 AM

Yes, I am using the V7, but that was not the problem. The code was ok until I inserted the Header. Thanks.

Fritz Fessler
on 3/22/13, 7:25 AM
0

Fabien Pinckaers (fp)

--Fabien Pinckaers (fp)--
6598
| 6 8 8
fsdsdfsdf, Belgium
--Fabien Pinckaers (fp)--

Odoo Founder & CEO

Fabien Pinckaers (fp)
On 3/22/13, 6:37 AM

The tag that causes the error is in the traceback. You should check the detailed traceback or post it here.

the tag <header> is after tag <sheet>. This might be the issue. When I check sale\sale_view.xml, the sale.order.form, I get first <form ...>, than <header ..> as child of form and after closing header, I get <sheet ...> as child of <form ...>.

patrick
on 3/22/13, 7:50 AM

Yes, that could be a problem, but it still doesn't work. I uploaded the code here : https://www.wetransfer.com/downloads/9609dcad35b1d0913ddf93ee611ad31b20130322112035/67999f211107eafad81e7a7fade33b2920130322112035/b97943

Fritz Fessler
on 3/22/13, 8:21 AM

And here is the traceback http://we.tl/wIjKfYocWv. Sorry for answering only now, but I misunderstood your request.

Fritz Fessler
on 3/22/13, 11:38 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 3/22/13, 6:17 AM
Seen: 1578 times
Last updated: 3/16/15, 8:10 AM