Odoo Help


ValueError: No such external ID currently defined in the system in my wizard? [Closed]

on 6/5/13, 2:58 AM 2,085 views

The Question has been closed

Sudhir Arya (ERP Harbor Consulting Services)
on 06/05/2013 04:43:30

I have created a module just like the Lunch module in the addons, my module is giftshop and i created two wizards in it that confirm and cancel order. Now what happens that my confirm wizard works fine but my cancel wizard doesn't. Everytime i try to upgrade my module it gives the above error defined in the title. here is the python code for wizard:

from osv import fields, osv

class gift_order_cancel(osv.osv_memory):
    _name = "gift.order.cancel"
    _description = "Cancel Order"

    def cancel(self, cr, uid, ids, context=None):
        if context is None:
            context = {}
        data = context and context.get('active_ids', []) or []
        return self.pool.get('gift.order').gift_order_cancel(cr, uid, data, context)


the xml:

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

<!-- cancel order  -->

        <record id="view_gift_order_cancel" model="ir.ui.view">
            <field name="name">gift.order.cancel.form</field>
            <field name="model">gift.order.cancel</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Cancel Order">
                    <group colspan="4" >
                         <label string="Are you sure you want to cancel this order ?"/>
                        <separator string="" colspan="4" />
                    <group colspan="4" col="6">
                        <button  icon="gtk-cancel" special="cancel" string="No"/>
                        <button  icon="gtk-ok" name="cancel" string="Yes" type="object"/>

        <record id="action_gift_order_cancel" model="ir.actions.act_window">
            <field name="name">Cancel Order</field>
            <field name="res_model">gift.order.cancel</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
           <field name="view_id" ref="view_gift_order_cancel"/>
           <field name="target">new</field>

        <act_window id="action_gift_order_cancel_values"
            key2="client_action_multi" name="Cancel Order"
            res_model="gift.order.cancel" src_model="gift.order"
            view_mode="form" target="new" view_type="form"/>


and the main xml from where i am invoking these two wizards :

                <button name="%(action_gift_order_confirm)d" string="Confirm Order" type="action" icon="gtk-ok" attrs="{'invisible':[('state','=','confirmed')]}"/>
                <button name="%(action_gift_order_cancel)d" string="Cancel Order" type="action" icon="gtk-cancel"/>

Please help!


Sudhir Arya (ERP Harbor Consulting Services)

--Sudhir Arya (ERP Harbor Consulting Services)--
| 6 8 8
Ahmedabad, India
--Sudhir Arya (ERP Harbor Consulting Services)--

• Co-Founder & Co-Owner at ERP Harbor Consulting Services

• ERP Consultant / ERP Customization / TechnoFunctional Expert

• Sound knowledge in Python, Odoo (Open ERP), XML, PostgreSQL

• Domain knowledge of Sale Management, Purchase Management, Warehouse Management, Manufacturing, Multi Company Configuration & Management, HR Management, Medical Management, Construction Management, Education Management, Point of Sale, Third Party Integrations

• Positive attitude and quick Learner

• Good analytical skill, quick bug and issue tracing and find the solution

• Good knowledge and experience in payment gateway integration with Odoo

• Ready to accept new challenges

• Active Memeber On Stackoverflow 




Sudhir Arya
ERP Harbor Consulting Services
Sudhir Arya (ERP Harbor Consulting Services)
On 6/5/13, 3:41 AM

Its a common error. I guess reason of this error is in __openerp__.py you have placed your main xml file before wizard's xml file.

You have to place xml files of wizards first and then your main xml file and then restart your server and update your module.

hey thanks it works now. :)

on 6/5/13, 3:49 AM

Thanks for the input, do not know where to find the source of this error.

on 9/10/13, 2:09 AM

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 6/5/13, 2:58 AM
Seen: 2085 times
Last updated: 3/16/15, 8:10 AM