Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
11378 มุมมอง

How can I call a wizard from another module/folder??

I know where are the view and the .py what can I do for call that wizard on another menu?

อวตาร
ละทิ้ง

Which one do you want to call? Please tell me the path and i'll give you an answer according your wizard.

คำตอบที่ดีที่สุด

If you wanted to call a wizard from button you need to write a button like

<button name='%(module_name.window_action)d' type='action' string='Button'/>

and if you have wrote a method in py file then you need to return action like

def your_method(self, cr, uid, ids, context=None):
    .....
    your code
    .....
    return {
       'name': 'Wizard name'
       'type': 'ir.actions.act_window',
       'res_model': 'wizard_model',
       'view_mode': 'form',
       'view_type': 'form',
       'target': 'new',
       'context': context,
    }

In return "target: new" will popup a wizard. This will help you to call a wizard from another module.

อวตาร
ละทิ้ง
ผู้เขียน

I did that but I have an error

raise NotImplementedError('Many2Many columns should not be used as record name (_rec_name)') NotImplementedError: Many2Many columns should not be used as record name (_rec_name)

ผู้เขียน คำตอบที่ดีที่สุด

I did that but I have an error

raise NotImplementedError('Many2Many columns should not be used as record name (_rec_name)') NotImplementedError: Many2Many columns should not be used as record name (_rec_name)
What's Happen?

อวตาร
ละทิ้ง

I suppose you have defined many2many field and in that you are giving columns as name field of model, change it by suffix "id" it will work. for eg. model_id.

I suppose you have defined many2many field and in that you are giving columns as name field of model, change it by suffix "id" it will work. for eg. model_id.

ผู้เขียน

thanks it works now

Related Posts ตอบกลับ มุมมอง กิจกรรม
3
ก.พ. 25
57870
Open the form view into a Wizard แก้ไขแล้ว
2
ธ.ค. 16
14656
Select multiple elements with XPath แก้ไขแล้ว
5
ส.ค. 24
46759
2
เม.ย. 24
2596
3
มิ.ย. 23
5912