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

Hello, 

I've created a custom module and I've created an action window: 

        <act_window id="action_wv_so_invoice_status"
            multi="True"
            key2="client_action_multi" name="Change Invoice Status"
            res_model="wv.so.invoice.status" src_model="sale.order"
           view_mode="form" target="new" view_type="form" />

Now when I go from an Opportunity to the Quotations through the smart button I get this error : 

    File "/opt/odoo/odoo11/odoo/addons/base/ir/ir_actions.py", line 125, in get_bindings
    result[binding_type].append(action.read()[0])
    IndexError: list index out of range

I stop the code to debug, and I get this : 

> /opt/odoo/odoo11/odoo/addons/base/ir/ir_actions.py(125)get_bindings()
-> result[binding_type].append(action.read()[0])
(Pdb) action ir.actions.act_window(654,) (Pdb) action.name'Change Invoice Status' (Pdb) action.read(['name']) [{'name': 'Change Invoice Status', 'id': 654}] (Pdb) action.read() [] (Pdb) action.read()[0] *** IndexError: list index out of range

The variable action has the record of an action window, but isn't "readable".
What I'm doing wrong? What can I do ? 


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 2 24
9600
1
thg 11 22
49264
1
thg 7 17
7860
2
thg 8 20
6161
1
thg 8 25
41