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

ParseError: "External ID not found in the system:

By
Henry Lamorski
on 9/2/14, 12:22 PM 7,490 views

Hey,

i follow a odoo Moduldevelopment Tutorial, but on installation i go this error:

ParseError: "External ID not found in the system: daily_transaction.action_daily_transaction" while parsing /opt/odoo/custom/addons/daily_transaction/daily_transaction_view.xml:9, near <menuitem action="action_daily_transaction" id="menu_action_daily_transaction" parent="menu_daily_transaction_root" sequence="20"/>

 

why is that so?

Here is my daily_transaction_view.xml:

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Main Menu Related Info -->
<menuitem name="Daily Transaction" id="base.daily_transaction_root" sequence="60"/>
<!-- Sub Menu Related Info -->
<menuitem id="menu_daily_transaction_root" name="Daily Transaction" parent="base.daily_transaction_root" sequence="1" />
<!-- Action Menu Related info -->
<menuitem action="action_daily_transaction" id="menu_action_daily_transaction" parent="menu_daily_transaction_root" sequence="20"/>

<!-- Daily Transaction List View -->
<record id="view_daily_transaction_tree" model="ir.ui.view"> <!-- id is the external id for this tree view which must be unique and will be used for accessing this record -->
    <field name="name">daily.transaction.tree</field>
    <field name="model">daily.transaction</field>
    <field name="arch" type="xml">
        <!-- this will be our title of list/tree view -->
        <tree string="Daily Transaction">
            <!-- automatisches Mapping durch odoo -->
            <field name="name"/>
            <field name="date"/>
            <field name="type"/>
            <field name="amount"/>
        </tree>
    </field>
</record>

<!-- Daily Transaction Form View -->
<record id="view_daily_transaction_form" model="ir.ui.view">
    <field name="name">daily.transaction.form.view</field>
    <field name="model">daily.transaction</field>
    <field name="arch" type="xml">
        <!-- this will be our title of list/tree view -->
        <form string="Daily Transaction" version="7.0">
            <group>
                <field name="name"/>
                <field name="date" />
                <field name="type" />
                <field name="amount" />
                <field name="note" />
            </group>
        </form>
    </field>
</record>

<record id="action_daily_transaction" model="ir.actions.act_window">
    <field name="name">Daily Transaction</field> <!-- name of action -->
    <field name="res_model">daily.transaction</field> <!-- this action will be mapped to model-->
    <field name="view_type">form</field>
    <field name="view_mode">tree.form</field> <!-- these are type of view our module will show for our daily transaction mode -->
    <field name="search_view_id" eval="False"/> <!-- here we specily id of our search view -->
    <field name="context">{}</field>
    <field name="help">Create New daily transaction.</field> <!-- help text for our model -->
</record>
</data>
</openerp>

 

1
Lucio
On 9/2/14, 1:00 PM

Hi,

just change the order of the definitions. 
Put the menuitems at the bottom of the file (before  </data></openerp> though) and that will do it.

OpenERP or Odoo for that matter, parse the xml files in a bottom-down fashion and at the moment that you are declaring the menuitem with id=menu_action_daily_transaction the action does not exists, it is defined later on the same file.

Hope I made myself clear!

0
Ehtesham
On 2/16/16, 5:27 PM

Yes the order does matter, I had a similar issue I had to move definitions before/above before referring to them.

0
Toni Mas
On 11/23/14, 6:39 AM

The same error could appear if you call a undefined view in a view_id field.

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: 9/2/14, 12:22 PM
Seen: 7490 times
Last updated: 2/16/16, 5:27 PM