Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
2354 Vizualizări

This is my error, any help please

ERROR

    raise ValueError('No such external ID currently defined in the system: %s.%s' % (module, xml_id))

    ValueError: No such external ID currently defined in the system: purchase_rentals.action_extend_rent

Here my code:

        (extend_rental_view.xml)

                .

                .

                .

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

<field name="name">Extend Rental</field>

<field name="type">ir.action.act_window</field>

<field name="res_model">extend.rental</field>

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

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

<field name="view_id" ref="extend_rent_form"/>

<field name="target">new</field>

</record>

<act_window id="action_extend_rent"

                name="Extend Rental"

                res_model="extend.rental"

                view_mode="form"

                target="new"/>

                .

                .

                .

 

(__init__.py)

.

.

.

import wizard

(__openerp__.py)

.

.

.

'data' : [

              'rental_view.xml',

              'purchase_view.xml',

              'wizard/extend_rental_view.xml'

              ],

.

.

.

 

(rental_view.xml)

.

.

.

<button name="%(action_extend_rent)d" string="Extend Rental" type="action" states="manual" class="oe_highlight"/>

.

.

.

Imagine profil
Abandonează

Hi, just a comment. I think you are duplicating the definition of 'action_extend_rent' in 'extend_rental_view.xml'. The tag " ..."

Cel mai bun răspuns

Hi,

Just change the sequence of the DATA into __openerp__.py as like below.

'data' : [

             'wizard/extend_rental_view.xml',

              'rental_view.xml',

              'purchase_view.xml',

              ],

Your error will be resolved.

Imagine profil
Abandonează

Hi, If this is the solution then accept this as an answer by clicking on the right mark.

Autor

thanks for help Chirag.