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

XML error: which is the correct synthax ?

By
Anne-Sylvie Burri
on 10/25/13, 4:52 AM 947 views

Hi everybody,

My code is the following :

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>**<record model="ir.ui.view" id="view_account_analytic_line">
            <field name="name">account.analytic.line.form</field>
            <field name="model">account.analytic.line</field>
            <field name="type">form</field>
            <field name="inherit_id" ref="account.view_analytic_line_form"/>
            <field name="arch" type="xml">
                <data>
                    <field name="date" position="after">
                        <field name="ressource"/>
                    </field>
                </data>
            </field>
        </record>
    </data>
</openerp>

I have this error :

ValueError: No such external ID currently defined in the system: account.view_analytic_line_form

I think it's a mistake with synthax but I can't find a solution.

Maybe someone could help me ?

Thanks in advance.

JMB

0

Acespritech

--Acespritech--
839
| 3 2 6
India
--Acespritech--

Having 8+ years of OpenERP Experience. We are Specialized in OpenERP/CRM Solutions, software development, Web development, E commerce solutions & other open source solutions.


Skype : acespritech

Email : info@acespritech.com

Acespritech
On 10/25/13, 5:21 AM

Hello,

In the above view you can given the wrong reference view ID.

<field name="inherit_id" ref="account.view_analytic_line_form"/>

Instead of write:

 <field name="inherit_id" ref="account.view_account_analytic_line_form"/>

Thanks,
www.acespritech.com

1

Ghanshyam Prajapati

--Ghanshyam Prajapati--
1377
| 4 4 8
Pune, India
--Ghanshyam Prajapati--
OpenERP Developer
Ghanshyam Prajapati
On 10/25/13, 5:17 AM

Hi JMB,

i think yout field name is 'resource', the problem was you mentioned wrong form view id of account.analytic.line, i replaced 'account.view_analytic_line_form' with 'account.view_account_analytic_line_form' . i updated your code, please replace your code with my code and see result.

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <record model="ir.ui.view" id="view_account_analytic_line_inherit_form">
            <field name="name">account.analytic.line.form.inherit</field>
            <field name="model">account.analytic.line</field>                
            <field name="inherit_id" ref="account.view_account_analytic_line_form"/>
            <field name="arch" type="xml">                    
                    <field name="date" position="after">
                        <field name="resource"/>
                    </field>
            </field>
        </record>
    </data>
</openerp>

hope it works for you.

Thanks for your answer. The following solution is the best.

J.-M. Burri - Bureau ing.-conseils informatique, Anne-Sylvie Burri
on 10/25/13, 7:29 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

0 follower(s)

Stats

Asked: 10/25/13, 4:52 AM
Seen: 947 times
Last updated: 3/16/15, 8:10 AM