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

ValueError

By
Diogenes Ojeda
on 4/1/15, 12:18 PM 416 views

Hello everyone,

The following code

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

<openerp>

<data>

<menuitem id="menu_daily_transaction_root" name="Daily Transaction" parent= "base.daily_transaction_root" sequence="1" />

<menuitem id="daily_transaction" name= "Menu 2" parent= "menu_daily_transaction_root"/>

<menuitem action="action_daily_transaction" id="action_daily_transaction" parent="menu_daily_transaction_root"

sequence="20"/>


</data>

</openerp>

generates the following error:

ValueError: No such external ID currently defined in the system: daily_transaction.action_daily_transaction


I could not fix it even though I gave laps.

Help please.

Thank You




1

Cyril Gaspard (GEM)

--Cyril Gaspard (GEM)--
4136
| 5 6 8
Paris, France
--Cyril Gaspard (GEM)--

Forum contributor since 2008

Cyril Gaspard (GEM)
On 4/1/15, 8:31 PM

before to use reference of an "id", this "id" must be defined, then action id used in your menu is not action_123 but action_daily_transaction.

The action must defined before the menu having action action_daily_transaction.

see:


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

<openerp>

<data>

<record id="view_daily_transaction_tree" model="ir.ui.view">

<field name="name">daily.transaction_tree</field>

<field name="model">daily.transaction</field>

<field name="arch" type="xml">

<tree string="ANY NAME">

<field name= 'date'/>

</tree>

</field>

</record>

<record id="view_daily_tansaction_form" model="ir.ui.view">

<field name="name">dail.transaction_form</field>

<field name="model">daily.transaction</field>

<field name="arch" type="xml">

<form string="Form View Name" version="7.0">

<field name="note"/>

<field name="type"/>

</form>

</field>

</record>

<record id="action_daily_transaction" model="ir.actions.act_window">

<field name="name">Daily Transaction</field>

<field name="res_model">daily.transaction</field>

<field name="view_type">form</field>

<field name="view_mode">tree,form</field>

</record>

<menuitem id="menu_daily_transaction_root" name="Daily Transaction" parent= "base.daily_transaction_root" sequence="1" />

<menuitem id="daily_transaction" name= "Menu 2" parent= "menu_daily_transaction_root"/>

<menuitem action="action_daily_transaction" id="action_daily_transaction" parent="menu_daily_transaction_root"

sequence="20"/>

</data>

</openerp>


0
Diogenes Ojeda
On 4/1/15, 8:51 PM

 .

I update my answer, bye

Cyril Gaspard (GEM)
on 4/2/15, 2:07 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: 4/1/15, 12:18 PM
Seen: 416 times
Last updated: 4/2/15, 8:10 AM