Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2379 Lượt xem

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"/>

.

.

.

Ảnh đại diện
Huỷ bỏ

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

Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ

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

Tác giả

thanks for help Chirag.